-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Support iterators #94
Comments
Awaiting this to remove |
It would be nice to have a "default" iterator (iterEfficient?) on Archive itself. This way we could iterate over archive with : archive = Archive("foo.zim")
for entry in archive:
print(entry.title) |
absolutely 👍 |
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. |
1 similar comment
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. |
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. |
Turns out zim-tools can list all the articles you need |
This feature is not directly of interest for us but is a MUST for people using python-libzim to ready/inspect ZIM files. How much effort would be needed to implement it? |
It is of interest to us. We're using the workaround. I can't do it on my own in a reasonable time but I think it would be easy for @mgautierfr |
@mgautierfr How much work woukd be needed to get this feature implemented? |
Should be pretty straightforward. Few hours, a day at most. |
What's the work around? |
I suppose is referring to this |
Thanks for the very quick response! Here's what that looks like in practice, in case this feature isn't added soon. zim = Archive(os.path.expanduser("~/test.zim"))
for i in range(0,zim.all_entry_count):
entry = zim._get_entry_by_id(i)
print(entry)
|
We will implement it soon |
Archive needs support for a few iterators:
Archive.iterByPath()
Archive.iterByTitle()
Archive.iterEfficient()
(arguable)Archive.findByPath(path)
Archive.findByTitle(title)
The text was updated successfully, but these errors were encountered: