Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 27 19:28

    nodiscc on master

    doc: remove obsolete link (compare)

  • Nov 27 19:28

    nodiscc on master

    doc: remove obsolete link (compare)

  • Nov 26 22:46

    virtualtam on master

    Fix #1382 - update documentatio… Merge pull request #1383 from d… (compare)

  • Nov 09 15:45

    nodiscc on master

    Added php-json as required PHP … doc: add explanation of php-jso… Merge pull request #1379 from r… (compare)

  • Nov 08 12:00

    ArthurHoaro on thumbnailer-soundcloud

    (compare)

  • Oct 27 09:55

    nodiscc on master

    Fix some typos and remove a few… Merge pull request #1374 from p… (compare)

  • Oct 02 20:00

    nodiscc on doc-setuptools-mkdocs

    (compare)

  • Oct 02 19:58

    nodiscc on master

    doc: CI/dev tools: add paragrap… fix typo Merge pull request #1366 from s… (compare)

  • Oct 02 19:57

    nodiscc on doc-setuptools-mkdocs

    fix typo (compare)

  • Sep 28 11:16

    nodiscc on master

    emojione & twemoji removed Sin… Merge pull request #1368 from N… (compare)

  • Sep 21 17:41

    nodiscc on master

    thumbnailer: add soundcloud.com… Merge pull request #1367 from s… (compare)

  • Sep 21 16:48

    nodiscc on thumbnailer-soundcloud

    thumbnailer: add soundcloud.com… (compare)

  • Sep 19 19:04

    nodiscc on doc-setuptools-mkdocs

    doc: CI/dev tools: add paragrap… (compare)

  • Sep 19 18:49

    nodiscc on master

    Add pelican shaarli_poster plug… doc: update shaarli_poster peli… Merge pull request #1361 from L… (compare)

  • Sep 19 18:45

    dependabot[bot] on npm_and_yarn

    (compare)

  • Sep 19 18:44

    nodiscc on master

    Bump mixin-deep from 1.3.1 to 1… Merge pull request #1365 from s… (compare)

  • Sep 19 18:26

    dependabot[bot] on npm_and_yarn

    Bump mixin-deep from 1.3.1 to 1… (compare)

  • Sep 14 14:39

    nodiscc on master

    Fix RSS permalink included in M… Merge pull request #1364 from A… (compare)

  • Sep 10 18:25

    ArthurHoaro on master

    Fix undefined thumbnail on Open… Fix undefined thumbnail in Open… (compare)

  • Aug 27 20:33

    ArthurHoaro on npm_and_yarn

    (compare)

kalvn
@kalvn
I have a question for Shaarli maintainers.
A user of Shaarli Material theme has a strange issue which seems related to Shaarli itself, even though it apparently doesn't happen with the default theme.
https://github.com/kalvn/Shaarli-Material/issues/90#issuecomment-453805952
Did you already have such error before? Any idea where it could come from? I wasn't able to reproduce so far.
The Doctor
@virtadpt
Are there any resources for developing Shaarli themes? I just updated to 0.10.2 (which means that a lot of the older themes don't work anymore), and I'm interested in developing something like a Brutalist theme for Shaarli.
matrixbot
@matrixbot
Lou Ixo Ixo Hey I made a community room for Shaarli on matrix. The alias is #shaarli:matrix.org if anyone wanna join.
kalvn
@kalvn
@virtadpt Not very detailed ones as far as I know. The best is to check the default template and to do the same with your own HTML and CSS.
The Doctor
@virtadpt
I was afraid you were going to say that.
Okay, I'll give it a shot.
VirtualTam
@virtualtam
Hi,
Sadly there's no such guide, and the templating engine used by Shaarli (RainTPL3) is both unmaintained and quite poorly documented...
A switch to Twig was mentioned a while back, and was put aside as it would imply 1/ refactoring the rendering engine and 2/ supporting multiple templating backends not to break existing themes
The syntax should be quite familiar though as it is close to popular engines (Mustache, Django/Jinja2, etc.)
The Doctor
@virtadpt
+1 for Twig - I could use-use a fair amount of the code from my website. Plus, it's actually maintained.
Unmaintained dependencies are security risks.
VirtualTam
@virtualtam
Definitely agreed! Refactoring this is no simple feat though, so as much as it pains me to say so, it might not be happening for a while...
The Doctor
@virtadpt
New use case for Shaarli: Card catalogue.
What are the challenges to refactoring?
VirtualTam
@virtualtam

most refactoring efforts are tracked on shaarli/Shaarli#324 and this project board; there have been great improvements made since Shaarli was forked a while back (e.g. unitary testing, namespacing, documentation, separation of concerns, etc.) but development is still somewhat hindered due to (IMHO):

  • using a serialized array as a database: this leads to quite convoluted data access/update code, not to mention separation of concerns and database migrations
  • the lack of a proper data model also prevents from having multi-user instances
  • NIH: homemade authentication and session management, homemade syndication, etc. we're slowly getting to the point where we can isolate such components and maybe start replacing them in favor of standard/community-supported components

on top of this, we're careful not to break existing installations during upgrades, and keep backwards compatibility as much as possible, though this is not always feasible (e.g. with 3rd-party plugins and themes)

ideally it'd be really nice to be able to rely on actively maintained 3rd-party libraries for all generic stuff (authentication, templating, routing, etc.) and build upon them to provide features dedicated to managing a collection of bookmarks/notes

The Doctor
@virtadpt
The first point, I think, is why at least a couple of people have advocated for using a SQL database (like SQLite) instead of a flat file. Same with the ad-hoc data model; that would be a good idea even for Shaarli's single user architectre.
M. Fioretti
@mfioretti_en_twitter

The first point, I think, is why at least a couple of people have advocated for using a SQL database (like SQLite) instead of a flat file. Same with the ad-hoc data model; that would be a good idea even for Shaarli's single user architectre.

I am one of them. +100 to that proposal. I've been using shaarli for ~7/8 months now, to handle +15k bookmarks, increasing every week, and can now confirm that a) shaarli remains the ONLY usable alternative even for power users, but b) its "flat file" architecture greatly limits both performances and flexibility. If one could query/update the bookmarks database with standard and fast SQLite queries, the usefulness of shaarli would increase tenfold, really.

Now, I do know that switching to SQLite would be a BIG task, and I have not enough php/SQLite skills to actually hack/rewrite the source code myself. BUT if someone else can do that, I believe I could do a pretty good job as tester. Besides having previous experience on that kind of work, as I said I have a pretty big, real-world shaarli database already, and making a separate install of shaarli just to make automatic tests on that would be no problem. So count me in for that.

The Doctor
@virtadpt
You have way more bookmarks than I do (mostly because I've been pruning mine to bring the count down).
I just finished writing a bot to interact with Shaarli, so I think I could add some stress-testing code that would use the API to put it through its paces and find pain points.
Not being able to put spaces in tags is also problematic, but I should open a ticket about that.
VirtualTam
@virtualtam
Issues tagged as tag improvements: https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Atags
Spaces in tags (or the ability to set a delimiter) is a recurring request theme :)
The SQL aspect has been bugging me for a while, this is something I'd very much like to see happening at some point! I'll try to start experimenting with Doctrine when I get enough spare time.
Regarding testing, I think something that would be greatly beneficial for developers and community alike would be to add functional tests with browser automation, e.g. with Selenium and/or RobotFramework. We're using both at work and they nicely complement unitary testing ;-)
The Doctor
@virtadpt
@virtualtam Something else that I just thought of...
I spent a lot of last night playing around with editing the default theme for Shaarli. What about an HTML5 boilerplate theme (https://html5boilerplate.com/) for Shaarli, to make it easier to write new themes? Pretty much all of the ones out there don't work anymore due to the namespacing changes, and such a thing would make it much easier to rebuild the Shaarli ecosystem.
kalvn
@kalvn
Good idea of plugin: interfacing with https://github.com/pirate/ArchiveBox
The Doctor
@virtadpt
That seems like a really good idea.
nodiscc
@nodiscc
I'll try to release v0.10.4 this week. I have to rebuild my build and testing environment.
I think I'll cherry-pick these commits to the v0.10 branch:
  • Fix thumbnails disabling if PHP GD is not installed
  • Fix a warning if links sticky status isn't set
Iwill send a PR when I manage to get everything in order (releasable tarball, docker images, everything tested)
x-0n
@x-0n
hi, I'm trying the python client, but it's not working. getting 404s, e.g. for "shaarli get-links": *212 open() "/var/www/shaarli/rootdir/api/v1/links" failed (2: No such file or directory)
I don't have a <rootdir>/api directory in my shaarli folder structure. what am I doing wrong?
nodiscc
@nodiscc
@x-0n
  • What are your configuration file contents and command line when running the client?
  • Can you post the full output including error message?
x-0n
@x-0n
sure thing. here goes:
nodiscc
@nodiscc
@x-0n remove /one from your configuration file? url = must be the base URL of your shaarli instance. See https://python-shaarli-client.readthedocs.io/en/latest/user/configuration.html#example.
x-0n
@x-0n
@nodiscc I have several shaarli instances each running on one of these urls (one, two...) so the url from the config file is the correct base url
Luce Carević
@llune
Hi!
ArthurHoaro
@ArthurHoaro
Hi
nodiscc
@nodiscc
@x-0n make sure Enable REST API is checked in Shaarli settings, also make sure your server is properly configured (including URL rewriting support)
M. Fioretti
@mfioretti_en_twitter

@virtadpt about "interfacing shaarli with ArchiveBox", which I only saw today: I believe it could work this way:

1) external script/cronjob a) gets with shaarli_client the list of bookmarks to make copies of, b) passes that list to archivebox and c) saves each file in a folder called $BOOMARKS_HOME/$ID/index.html where $ID is the identifier of that bookmark inside shaarli.

2) then, all shaarli needs to do is to add, ONLY when user is logged in, a link/button to $BOOMARKS_HOME/$ID/index.html, close to where the "edit" icon of the same bookmark is. Theoretically, this should be very, very little code, no?

Is this correct? If it is... I know how to do 1) myself, hope to actually do it in the next weeks. But I honestly have no clue on how to do 2). I don't care if there is no gui interface, i.e. I don't mind patching the shaarli source code to add the php commands that display that extra link to logged in users... but I would really need someone to write down that code for me, and tell me where to put it. Once I have that info, I can go and test myself, and report, so someone else can make a usable plugin.

The Doctor
@virtadpt
I think you could do that with Shaarli's RSS feeds.
Have Archivebox pull the RSS feed, see if it's already grabbed that URL, if not save a copy.
M. Fioretti
@mfioretti_en_twitter

@virtadpt the problem with that approach is that the RSS feed would not include private bookmarks (incidentally, this is one more case/reason why having the bookmarks as one SQLite db would be waaaay better, but that is another issue, of course). And in any case, the real problem I have and need help with is part 2 of my earlier comment: how do I hack shaarli's source code to make it display,ONLY to logged-in user, one extra link with the same bookmark ID?

Concrete example: if I look right now at my own shaarli installation, the latest (private!) bookmark includes an icon that is a link to https://example.com/?edit_link=289. Well, all I need to know is how to change the php code so that, right after that icon/link, it displays another one pointing to https://example.com/WEBARCHIVE/289/index.html, which would be the copy of the same page created by archivebox . For the record, I ALREADY tried to do this, but after a couple of hours or so of looking at the code I had to stop. My limit, of course. That is why I ask for help

ArthurHoaro
@ArthurHoaro
FYI the demo was broken for a few days because it was still using the old Docker image in PHP 5.6. I've switched to the official shaarli/shaarli image, and the workflow is way simplier. Let me know if you encounter any issue in the next few days.
arnaudmm
@arnaudmm
Hello I would like to contribute to Shaarli, is there a dev guide to setup dev environment using docker?
to be more specific i'd like to develop a new plugin
M. Fioretti
@mfioretti_en_twitter

to @virtadpt and everybody else interested in "interfacing shaarli with ArchiveBox". Back in August, see above, I asked how to change the shaarli php code so that it would ALSO point to an URL having a structure like: https://example.com/WEBARCHIVE/289/index.html

Last week I figured out how to do this. I changed the two lines in the file shaarli/tpl/default/linklist.html that call the "pencil-square-o-edit-link" icon:

<a href="?edit_link={$value.id}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link"></i></a>

in this way:

<a href="?edit_link={$value.id}" title="{$strEdit}"><i class="fa fa-pencil-square-o edit-link"></i></a><a href="https://example.com/WEBARCHIVE/{$value.id}/" target="_blank">AchiveBox</a>

The result is not pretty, visually, but works exactly as I need. Comments and suggestions of better ways are very welcome, of course. What I would really need, however, is help to put, after WEBARCHIVE/, a string of constant length, left-padded with zeroes. That is, I would like to have WEBARCHIVE/000009/... WEBARCHIVE/000289/ instead of WEBARCHIVE/9/... WEBARCHIVE/289/ . Is it possible to process {$value.id} in this way, in the code above? Thanks

The Doctor
@virtadpt
o7
M. Fioretti
@mfioretti_en_twitter
Hello again and... sorry for nagging but is there any way, inside shaarli/tpl/default/linklist.html , to call or process {$value.id} so that it is left padded with zeroes to a fixed length? So that, for example, $value.id = 3 it returns 00003, if it is 231 it returns 00231 and so on? Thank you in advance for any help!
M. Fioretti
@mfioretti_en_twitter
In case anyone is interested in knowing how my request in the previous comment ends up, or prefers to answer it on github... you can now follow it up here shaarli/Shaarli#1370
gkoerk
@gkoerk
Hey folks - am I the only one running Shaarli in Docker who keeps having the admin password reset to admin every time the service is restarted?
ArthurHoaro
@ArthurHoaro
@gkoerk Shaarli does not have a default password, so there might be an issue with your configuration.
gkoerk
@gkoerk
Hello again, friends!
Is there a proper way to bind mount the plugins directory to allow the installation of plugins not included in the docker image?