Feature request: Hooks on saving a bookmark #826
Replies: 2 comments 3 replies
-
i thinking about a plugin system for Shiori. this keeps Shiori simpler to maintain in long term. and user can add this kind of feature too.
maybe we should solve this in obelisk that Shiori should move to that instead of warc or go-readability for better handling readable version. |
Beta Was this translation helpful? Give feedback.
-
Ideally I was thinking more of letting using create webhooks on actions, URLs that would be called on bookmark creation for example, and those webhooks perform the action or maybe we could support some directly ourselves. The Plugin API may be possible but it would need to be maintained too, and I haven't thought on how to properly implement it and how contributors could create their own plugins. I think letting Shiori run arbitrary scripts in a bad idea, even if those are set up by the instance admin/local user. |
Beta Was this translation helpful? Give feedback.
-
Hi!
I think Shiori would be more flexible/extensible if it had a hook mechanism upon saving a bookmark, new or otherwise.
Ideally, the Shiori server would call a script (whose path would be set in the configuration) right after it has set the various metadata for a given bookmark, and override those automatically. How that would be handled is to be determined (maybe allow the script to call the Shiori API by passing it a temporary token and the ID/metadata of the bookmark, as arguments?).
I have few use cases:
Shiori won’t archive Youtube pages, nor any other pages that require JavaScript, so I could implement a script that handles that and feeds Shiori with the right data.
I would like to grab whatever contents Shiori has detected on the page and index it, in another database (e.g. Sonic).
Anything else that requires logic, e.g.
I’m willing to get a PR going once the details are ironed-out, if you agree with the feature proposal.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions