Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does Buku support adding images to bookmarks? #724

Open
YousufSSyed opened this issue Mar 10, 2024 · 5 comments
Open

Does Buku support adding images to bookmarks? #724

YousufSSyed opened this issue Mar 10, 2024 · 5 comments

Comments

@YousufSSyed
Copy link

I did some searching and it doesn't seem to.

@LeXofLeviafan
Copy link
Collaborator

At this moment, only the following fields exist:

  • ID/index (non-editable, can change when a bookmark is deleted)
  • URL
  • Title
  • Description
  • Tags (sorted, lowercase)

Additionally, a metadata flag "Immutable" exists, for the purpose of excluding the bookmark from batch updates.


I've got some ideas on implementing extended bookmark records by adding support for custom fields (including images, at least as remote URLs); but at the moment there's no such thing and it's probably not gonna be a thing for a while.

There is, however, a good chance that I'll be adding support for rendering descriptions as Markdown to the webUI (bukuserver) fairly soon; in which case, it would be possible to include an externally-hosted image.

(Markdown image example)
![optional alt text](https://remote.site/path/to/image.jpg "optional tooltip")
![Markdown](https://upload.wikimedia.org/wikipedia/commons/thumb/4/48/Markdown-mark.svg/175px-Markdown-mark.svg.png
 "Markdown logo, from Wikipedia")

optional alt text
Markdown logo

@YousufSSyed
Copy link
Author

What do you think about having screenshots of pages with bookmarks that could be viewed in the web UI? I would help with searching.

@LeXofLeviafan
Copy link
Collaborator

…Alright, I didn't quite get that.

Do you mean some sort of a feature to generate such a screenshot automatically? (And storing such a screenshot in the DB as binary data, I presume?)
And what is this "searching" you are offering your help with? 🤔

@YousufSSyed
Copy link
Author

Yeah, a feature to generate or get a photo of the page and show it in the web ui with the bookmark, and show the images when searching for bookmarks after entering something in the search bar (I haven't used the web ui, I'm just looking at the screenshots here: https://github.com/jarun/buku/tree/master/bukuserver#readme).

@LeXofLeviafan
Copy link
Collaborator

There's a concern of size when storing images in a DB file (though using WebP and smaller resolution reduces the image size, this screenshot converted to WebP would take up about 30Kb… multiply that by the number of bookmarks you're expecting to have, and I give no promises on performance when the file is that large 😅). Using an external site (e.g. Imgur or ImageChest) for hosting images might be a better choice for such a use 🤔

That said, there's also the question of how to take such screenshots. I can name 3 possible solutions here:

  • Manually: user makes a screenshot, then copy-pastes it into the input (assuming such an action can be implemented with existing limitations on the browser), or "uploads" it from a saved file. This is the most technically feasible option, but not particularly convenient.
  • With a script: using JavaScript running on the website you're making a bookmark for. I'm not sure if this would work completely correctly (JS is rather limited), and this would most likely require a companion userscript to be installed; on the upside, taking such a screenshot could be done automatically when invoking the bookmarklet dialog.
  • With a service: using API of a remote service that generates such screenshots. This is basically the same exact JS solution, except instead of capturing it from your browser it would be done on a remote computer (and might not look the same way as in your browser). …Also, it appears that all such services require payment for long-term use (and of course they all have different APIs, if any at all).

I'm guessing it would be possible to implement the 1st and 2nd option (take the screenshot with JS if possible, but allow providing a user-made one as well), but the 3rd one doesn't really seem like a way to go.

…Either way, this is unlikely to be supported until/unless I implement extended records.
And I guess I'd need to redesign how the bookmark are rendered in UI first (…though that would probably be necessary regardless).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants