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

zimdump show weird behaviour #315

Closed
kelson42 opened this issue Aug 13, 2022 · 3 comments · Fixed by #316
Closed

zimdump show weird behaviour #315

kelson42 opened this issue Aug 13, 2022 · 3 comments · Fixed by #316
Assignees
Milestone

Comments

@kelson42
Copy link
Contributor

$ zimdump show --ns=M --url=Name gutenberg_fa_all_2022-01.zim 
Entry not found

is wrong, it should deliver the name like:

$ zimdump show --url=M/Name gutenberg_fa_all_2022-01.zim 
gutenberg_fa_all_2022-01
@mgautierfr
Copy link
Collaborator

I wonder if keeping the --ns option is a good thing.

Libzim moved to an API where we remove/hide the namespace, it is a bit odd (and buggy) to keep the concept in zimdump.

  • The dump command only "user" entries (in C namespace) for new zim files. So the --ns option is useless.
  • The PR Respecting the --ns option in zimdump show #316 works only because of the compatibility layer to support old bookmarks (including the ns) with old zimfiles (even if it works with new zim files)

It would be better to ask ourselves how we provide a better api to display metadata (and other non user entries ?)
Maybe a zimdump metadata --name=Name gutenberg_fa_all_2022-01.zim ?

@kelson42
Copy link
Contributor Author

Either ways are OK, but having both seems indeed a bit confusing.

@kelson42 kelson42 modified the milestones: 3.2.0, 3.3.0 Aug 23, 2022
@kelson42
Copy link
Contributor Author

kelson42 commented Sep 2, 2022

The right approach is probably to remove fully the namespace concept IMO... and create the appropriate function to access other namespaces. This is how the libzim works and zimdump should work like this probably.

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.

3 participants