-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
kiwix-serve: start even when one ZIM is damaged #658
Comments
@schuellerf Whatbis the use case? Why such an option is necessary? |
Use case has been given in the linked PR: skip files which are downlaoding. Seems a weak reason to me, problem can be simpler an better solved other ways. |
@kelson42 |
Use a downloader which makes the file renaming at the end... or do it yourself. |
The only argument against accepting this feature proposal from a user who also kindly implemented it is that the short option names are a limited resource that should be expended sparingly. That's all I was able to come up with. |
I agree with @veloman-yunkan, I don't see real reason to not accept this feature. |
I believe the presented use case does not justify it: kiwix-serve expects ZIM files and @schuellerf knowingly feeds it with files that are not ZIM (yet). That said, I believe having the ability to start kiwix-serve ignoring broken ZIMs (whatever the reason) would be valuable. I don't know about our end users but found myself several times in need of moving around erroneous ZIMs or playing with the CLI to get it to start. It's easy to implement as suggested but many many kiwix-serve instances are unattended and simply printing a warning on stderr seems insuffiscient in those cases. Now adding an endpoint for this means design, code and maintenance… 🤷♂️ |
@rgaudin exactly my point - a "background service" should try it's best to just start. I can have a quick look if it is sane (in terms of design, code and potential maintenance) to keep track of broken files and show them in the UI? Maybe as disabled buttons with this short explanation as alt-text or similar 🤔 |
Which ones ?
They all have option to change the output filename, but you will have to rename the file to |
If you're using CLI ; just use appropriate flags and/or rename on success. What does it have to do with kiwix-serve? Interactive softwares expect valid files on opening. Daemons may behave differently as already discussed. As I wrote, I think it's safe to assume that broken ZIMs make it to Kiwix reader and kiwix-serve especially. That's no reason to pass it files that are being downloaded… as it will anyway only appear on restart. |
It has nothing to do with kiwix-serve. Original PR is not about downloader. You (and @kelson42) say that user is using the wrong tool and that it should use the right one instead of changing kiwix-serve. I'm asking you which one.
oocalc (open office calc), evince (pdf), totem (video) correctly open valid files if we pass them valid and invalid files on the command line.
The PR add an option to skip invalid zim and continue opening valid ones.
I'm not sure to understand if you are for or against this feature. |
|
@schuellerf We finally agreed to integrate the feature. I don't do technical code review but one thing is missing: the man page update |
Please add a command line switch, maybe "--skip-broken" to skip broken ZIM files and continue startup
I guess the command line option just has to change this to a warning and skip the exit(1)
https://github.com/kiwix/kiwix-tools/blob/main/src/server/kiwix-serve.cpp#L353
The text was updated successfully, but these errors were encountered: