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

Edit ZIM content "in-place" #935

Open
benoit74 opened this issue Oct 17, 2024 · 3 comments
Open

Edit ZIM content "in-place" #935

benoit74 opened this issue Oct 17, 2024 · 3 comments

Comments

@benoit74
Copy link

We regularly face situation where one would like to edit one file stored in the ZIM.

The typical situation I have in mind ATM is Zimit where we regularly have to put a custom CSS in the ZIM, and it sometimes require some iterations to make it right.

Currently we recreate the whole ZIM from scratch, which is not very convenient / satisfying.

While developing scrapers this is also a situation I regularly face where I would like to fix a single file because I realized there is a bug in the scraper code, and doing it directly in the ZIM would allow me to confirm which modification would be right, and then update scraper code, where now I have to do the whole loop (modify scraper code and run it - might take too much time).

What are the possibilities of modifying / updating the ZIM in-place? Just like #934 (which is a bit related tbh), we might add updated versions of the file in the ZIM, update pointers, and leave the old one as-is. We can easily imagine a first version where we suppose that Zapian indexes do not have to be updated. Files which have to be updated are anyway either not indexed or the things we modify do not incur changes to indexed content.

@rgaudin
Copy link
Member

rgaudin commented Oct 17, 2024

Currently we recreate the whole ZIM from scratch, which is not very convenient / satisfying.

This is very odd (and lazy). You short term solution for both #934 and #935 is zimrecreate. You can already do that with current tooling and the libzim provides a lot of flexibility.

It sure takes more time and resources to recreate than what an update should but it's a zero cost compared to the new effort (and maintenance) required for this.

@benoit74
Copy link
Author

I know we have tooling in place to "workaround" the libzim missing this. I just feel like libzim should implement this at some point, and not just work around this. Or at least I enjoy the fact that there is an issue opened stating this is missing (or closed if decision is "we will never do that"). No hurry as you can imagine, I already use the workaround.

@rgaudin
Copy link
Member

rgaudin commented Oct 17, 2024

Well, you justified the need with “Currently we recreate the whole ZIM from scratch”… 🙃

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