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

Simplification of portable USB creation #461

Closed
kelson42 opened this issue Jun 9, 2020 · 19 comments · Fixed by #1209
Closed

Simplification of portable USB creation #461

kelson42 opened this issue Jun 9, 2020 · 19 comments · Fixed by #1209

Comments

@kelson42
Copy link
Collaborator

kelson42 commented Jun 9, 2020

For people wanting to distribute USB flash drives with Kiwix AND ZIM files, we have a working process. The process is documented at https://github.com/kiwix/kiwix-desktop/wiki/Kiwix-desktop-on-an-USB-Drive-(Portable-version).

The problem is that this is still a bit complicated. This ticket requires to simplify it and has this new workflow proposal: The local library.xml would be automatically based on ZIM files available at the same level like the binary if:

  • There is no local library.xml already
  • There is no other library.xml which include known local ZIM files.
@kelson42
Copy link
Collaborator Author

kelson42 commented Jun 9, 2020

@mgautierfr Does that sound reasonable?

@mgautierfr
Copy link
Member

Does it means that the "library discovering" order should be :

  • library.xml in local directory.
  • Default library.xml (in user directory)
  • Temporary generated one from zim files in local directory ?

What happen if a user get a portable kiwix on a usb key and uses it on a computer where kiwix is already installed ?

@kelson42
Copy link
Collaborator Author

Another way to formulate the request is do like before and if there is no local library.xml and no other library.xml (on the system) which are not empty, then create the local library.xml from the local ZIM files (just aside the binary).

This does not change the discovery system order (even if a newly created library.xml) should be loaded obviously. The generation of the local library.xml is not temprary (even if this might be an idea....).

I think the local library.xml has anyway always priority on any other one of the system?! So this would not change.

@mgautierfr
Copy link
Member

Another way to formulate the request is do like before

This is not a spec :)
But it seems that you agree with the order I've given.

  1. Use library.xml in local directory if it exists
  2. Use system/user library.xml if it exists
  3. Move library.xml from old/wrong directory to new/good one. (Compatibility with a bug about a wrong directory on windows).
  4. If no library.xml exists (local and system) and local zim files exists. Create a local library.xml with local zim files and use it.
  5. Else, create a system library.xml and use it.

What missing is the step 4.

@stale
Copy link

stale bot commented Aug 15, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

@stale stale bot added the stale label Aug 15, 2020
@rocky-III
Copy link

rocky-III commented Oct 1, 2020

Hi,
first of all: I LOVE KIWIX - thanks so much, I´m using it for quid some time now.

Now I want to use kiwix for offline content on a LIVE USB MX-Linux system with persistent. https://mxlinux.org/
unfortunate this does not work - I can install kiwix by appimage or flatpack and the app does start as well. I can download content but if I try to open the downloaded and installed ZIM files kiwix crashes all the time. This does also happend with smale ZIM files..

I studied this page:
https://github.com/kiwix/kiwix-desktop/wiki/Kiwix-desktop-on-an-USB-Drive-(Portable-version)

any of this "Kiwix manage" files:
https://download.kiwix.org/release/kiwix-tools/kiwix-tools_linux-x86_64.tar.gz
do not work
I can´t start them... don´t now why... do I need this files to work in order to open the ZIM files?
thanks for your Help.

@stale stale bot removed the stale label Oct 1, 2020
@kelson42
Copy link
Collaborator Author

kelson42 commented Oct 1, 2020

@rocky-III Can you please open a new ticket with the exact step-by-step procedure you do and then the result? We don't need the whole story we just need one concrete example of something not working, but in detail.

@rocky-III
Copy link

will open a new ticket - what kind of details you need? is there e.g. a log file I could look for?

@kelson42
Copy link
Collaborator Author

kelson42 commented Oct 1, 2020

@rocky-III For example if it crash, what is written on the terminal.

@stale
Copy link

stale bot commented Nov 30, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions.

@sgourdas
Copy link
Collaborator

@kelson42 is this a good next issue to work on?

If no library.xml exists (local and system) and local zim files exists. Create a local library.xml with local zim files and use it.

If yes, is this what there is to do?

@sgourdas
Copy link
Collaborator

@kelson42 is this a good place to continue to?

@kelson42
Copy link
Collaborator Author

kelson42 commented Aug 16, 2024

Once #1166 will be implemented, things will look differently. That said we still have to update the documentation and configure things in a way that for example the "data" directory is monitored. I will probably revamp this tickets one we have a PR about #1166.

@kelson42 kelson42 self-assigned this Aug 16, 2024
@kelson42 kelson42 removed their assignment Sep 9, 2024
@kelson42
Copy link
Collaborator Author

kelson42 commented Sep 9, 2024

@sgourdas Here I believe there is two things to do:

  • Updating the wiki page
  • Securing that the local storage directory for ZIM is monitored per default in portable mode. Is that the case?

@sgourdas
Copy link
Collaborator

Securing that the local storage directory for ZIM is monitored per default in portable mode. Is that the case?

Which directory are you referring to with "local storage directory for ZIM"?

@kelson42
Copy link
Collaborator Author

Securing that the local storage directory for ZIM is monitored per default in portable mode. Is that the case?

Which directory are you referring to with "local storage directory for ZIM"?

./data

@sgourdas
Copy link
Collaborator

Securing that the local storage directory for ZIM is monitored per default in portable mode. Is that the case?

Which directory are you referring to with "local storage directory for ZIM"?

./data

This is not the case currently. What exactly is the point to this though? Wouldn't it be more beneficial to monitor a different location or maybe even clear it?

@kelson42
Copy link
Collaborator Author

Securing that the local storage directory for ZIM is monitored per default in portable mode. Is that the case?

Which directory are you referring to with "local storage directory for ZIM"?

./data

This is not the case currently. What exactly is the point to this though? Wouldn't it be more beneficial to monitor a different location or maybe even clear it?

The point is that you can create an USB drive preconfigured with your content without having to create the library.xml manually. If "./data" is monitored automatically in portable mode then you just have to add ZIM files there and they will be available.

@sgourdas
Copy link
Collaborator

Got it. That is a great idea. Will make the PR soon.

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

Successfully merging a pull request may close this issue.

4 participants