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

Monitor ZIM files from a user-chosen directory #713

Closed
juuz0 opened this issue Nov 1, 2021 · 10 comments · Fixed by #743
Closed

Monitor ZIM files from a user-chosen directory #713

juuz0 opened this issue Nov 1, 2021 · 10 comments · Fixed by #743

Comments

@juuz0
Copy link
Collaborator

juuz0 commented Nov 1, 2021

Some people like to put all of their files at a different directory (usually case with windows users).
If I'm not mistaken, the current way right now is to open each zim file so it adds that in the local library.

A good way could be to :
Add an option in Settings to import all zim files from a directory (user chooses dialog box) [check the load local zim files option]
Settings (1)

In a way, this can also simplify https://github.com/kiwix/kiwix-desktop/wiki/Kiwix-desktop-on-an-USB-Drive-(Portable-version)

This is a follow-up of #644 (comment)

@kelson42
Copy link
Collaborator

kelson42 commented Nov 1, 2021

Does not sound a bad idea... but need to be confirmed first. I need to think more about it.

@kelson42
Copy link
Collaborator

kelson42 commented Nov 1, 2021

For the moment I think this is actually a good idea and would allow (like written in the description) to solve #461 as well. For that we should have the following workflow:

  • Per default the "local directory"(we need probably to rething a bit the naming/wording) would be the one of the binary.
  • I someone changes it, then it looks to another place
  • There is a button reset/browse like for the download directory.

@kelson42
Copy link
Collaborator

kelson42 commented Nov 1, 2021

Regarding the naming, one idea would be "Monitor Directory". We could add a hint on it to help users to understand what this is about.

@kelson42
Copy link
Collaborator

kelson42 commented Nov 27, 2021

@juuz0 With @mgautierfr we agree to do so. I propose to call is « Monitored Directory ». Per default it should be not defined. Probably a tooltip or a small question mark badge should be added, proposing a simgle sentence explanation of what it is. We should wait that libkiwix proposed all the primitives to live update the library before first working on it.

@juuz0
Copy link
Collaborator Author

juuz0 commented Nov 27, 2021

Noted 👍

@kelson42
Copy link
Collaborator

kelson42 commented Dec 4, 2021

@juuz0 kiwix/libkiwix#636 has been merged, so libkiwix should provide the necessary to implement this feature properly, ie.:

  • dedicated settings entry
  • Check periodically the directory for new files (non recursively, only first level)
  • Add new files to library and ask refresh (to remove automatically the ZIM files which have been removed)

@juuz0
Copy link
Collaborator Author

juuz0 commented Dec 4, 2021

@kelson42 Thanks 👍 Will do it

@juuz0
Copy link
Collaborator Author

juuz0 commented Dec 11, 2021

@kelson42
How do the changes in kiwix/libkiwix#636 work?
The library isnt reloading for me in kiwix-serve :/
Steps I followed:

  • Downloaded a small zim file from the wiki
  • Put it in download directory
  • Start kiwix-serve

The book wasnt visible

@kelson42
Copy link
Collaborator

@juuz0 It should work that way:

  • configure directory to monitor in kiwix-desktop
  • monitor directory changes in kiwix-desktop (add/remove/update of zim files)
  • if change detected, update library with libkiwix (not sure exactly how to do, but look how it is done with kiwix-serve news library monitoring option).

Have you done the first 2 bullets laready?

@juuz0
Copy link
Collaborator Author

juuz0 commented Dec 11, 2021

@kelson42 Yes, I've done the first two.
Only a trivial amount is remaining - to reload the library.
That should be easy since it's already done in libkiwix and kiwix serve (which somehow isn't working for me - library doesn't reload, I'll check again)

@kelson42 kelson42 modified the milestones: 2.2.0, 2.1.0 Dec 13, 2021
@kelson42 kelson42 changed the title Import all zim files from a user-chosen directory Monitor ZIM files from a user-chosen directory Dec 13, 2021
@kelson42 kelson42 modified the milestones: 2.1.0, 2.2.0 Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants