Skip to content

Commit 9b20717

Browse files
authored
Merge pull request #47 from openzim/rgaudin/various_impr
2 parents 334c0e0 + 52e9e38 commit 9b20717

File tree

5 files changed

+396
-360
lines changed

5 files changed

+396
-360
lines changed

libzim/reader.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
# flake8: noqa
1+
""" libzim reader module
2+
3+
- File to open and read ZIM files
4+
- Article are returned by File on get_article() and get_article_by_id()
5+
- NotFound is raised on incorrect article URL query
6+
7+
Usage:
28
3-
from .wrapper import FilePy as File
9+
with File(pathlib.Path("myfile.zim")) as zf:
10+
article = zf.get_article(zf.main_page_url)
11+
print(f"Article {article.title} at {article.url} is {article.content.nbytes}b")
12+
"""
13+
14+
# flake8: noqa
15+
from .wrapper import FilePy as File, NotFound
416
from .wrapper import ReadArticle as Article

0 commit comments

Comments
 (0)