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

How to handle bookmarks #840

Closed
kelson42 opened this issue Oct 24, 2022 · 5 comments
Closed

How to handle bookmarks #840

kelson42 opened this issue Oct 24, 2022 · 5 comments
Assignees
Milestone

Comments

@kelson42
Copy link
Collaborator

Each Kiwix reader handles bookmarks on its own although this is always the same:

  • Add
  • Get
  • Remove
  • Export
  • Import

I wonder if this would be a smart idea to propose the primitive in the libkiwix?

@mgautierfr
Copy link
Member

This is already the case.
Search for bookmark in library.h

@kelson42
Copy link
Collaborator Author

@mgautierfr Really good, do we have a storage backend in it? An xml/json file for bookmarks (something like for the local library)?

@mgautierfr
Copy link
Member

Yes, kiwix-desktop should write a xml file along with your library.xml file.
Something like ~/.local/share/kiwix/library/library.bookmarks.xml (or another path if you are on Windows or using flatpak)

@kelson42
Copy link
Collaborator Author

kelson42 commented Oct 24, 2022

@mgautierfr Actually all this is for kiwix-android. Wonder how much we could/should share with other readers like kiwix-desktop. Wouldn't be good to have the reader/writer within libkiwix? Actually I have the sqme question for the library.xml?

@mgautierfr
Copy link
Member

Saving the bookmarks is made with kiwix::Library::writeBookmarksToFile and reading a bookmark file is done with kiwix::Manager::readBookmarkFile. This follow the same convention than for writing/reading library.xml.

Other projects just have to use the methods.

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

No branches or pull requests

2 participants