zimscraperlib.zim.archive
ZIM Archive helper
Convenient subclass of libzim.reader.Archive with: - direct access to Item from path - direct access to suggestions and suggestions count - direct access to search results and number of results - public Entry access by Id
Classes:
-
Archive–
Archive
Bases: Archive
Methods:
-
get_content–Actual content from a path
-
get_entry_by_id–Entry from its Id in ZIM
-
get_item–Item from a path
-
get_search_results–paths iterator over search results for query
-
get_search_results_count–Estimated number of search results for query
-
get_suggestions–paths iterator over suggestion matches for query
-
get_suggestions_count–Estimated number of suggestion matches for query
-
get_tags–List of ZIM tags, optionnaly expanded with libkiwix's hints
-
get_text_metadata–Decoded value of a text metadata
Attributes:
-
counters(CounterMap) – -
metadata(dict[str, str]) –key: value for all non-illustration metadata listed in .metadata_keys
-
tags–
counters
property
counters: CounterMap
metadata
property
key: value for all non-illustration metadata listed in .metadata_keys
tags
property
tags
get_content
Actual content from a path
Source code in src/zimscraperlib/zim/archive.py
68 69 70 | |
get_entry_by_id
get_entry_by_id(id_: int) -> Entry
Entry from its Id in ZIM
Source code in src/zimscraperlib/zim/archive.py
60 61 62 | |
get_item
get_item(path: str) -> Item
Item from a path
Source code in src/zimscraperlib/zim/archive.py
64 65 66 | |
get_search_results
paths iterator over search results for query
Source code in src/zimscraperlib/zim/archive.py
86 87 88 89 90 91 92 93 94 95 | |
get_search_results_count
Estimated number of search results for query
Source code in src/zimscraperlib/zim/archive.py
97 98 99 100 101 102 | |
get_suggestions
paths iterator over suggestion matches for query
Source code in src/zimscraperlib/zim/archive.py
72 73 74 75 76 77 78 79 | |
get_suggestions_count
Estimated number of suggestion matches for query
Source code in src/zimscraperlib/zim/archive.py
81 82 83 84 | |
get_tags
List of ZIM tags, optionnaly expanded with libkiwix's hints
Source code in src/zimscraperlib/zim/archive.py
44 45 46 47 48 49 50 51 52 53 54 | |