Open rgaudin opened 3 years ago
Awaiting this to remove Archive.get_entry_by_id()
, Entry.index
and Item.index
as it's the only way to loop over the zim content at the moment and we use it in tests.
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.
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.
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
What's the work around?
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
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)