Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/zimscraperlib/zim/creator.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(
self,
filename: pathlib.Path,
main_path: str = None,
language: Optional[str] = "eng",
language: Optional[str] = None,
compression: Optional[str] = None,
workaround_nocancel: Optional[bool] = True,
**metadata: Dict[str, Union[str, datetime.date, datetime.datetime]]
Expand All @@ -91,13 +91,17 @@ def __init__(
metadata.update(ld)
else:
metadata = ld
else:
self.config_indexing(False, language)

if compression:
self.config_compression(
getattr(libzim.writer.Compression, compression.lower())
if isinstance(compression, str)
else compression
)
else:
self.config_compression('None')

if metadata:
self.metadata = metadata
Expand Down
4 changes: 2 additions & 2 deletions src/zimscraperlib/zim/filesystem.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def make_zim_file(
source: str = None,
flavour: str = None,
scraper: str = None,
without_fulltext_index: bool = False,
without_fulltext_index: bool = True,
redirects: Sequence[Tuple[str, str, str]] = None,
redirects_file: pathlib.Path = None,
rewrite_links: bool = True,
Expand All @@ -152,7 +152,7 @@ def make_zim_file(
zim_file = Creator(
filename=fpath,
main_path=main_page,
index_language="" if without_fulltext_index else language,
index_language=None if without_fulltext_index else language,
**{
k: v
for k, v in {
Expand Down