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
2 changes: 2 additions & 0 deletions src/sotoki/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ class Sotoconf:
author: Optional[str] = ""
publisher: Optional[str] = ""
fname: Optional[str] = ""
compression: Optional[str] = None
tag: List[str] = field(default_factory=list)
iso_lang_1: str = "en" # ISO-639-1
iso_lang_3: str = "eng" # ISO-639-3
Expand All @@ -113,6 +114,7 @@ class Sotoconf:
nb_threads: Optional[int] = -1
s3_url_with_credentials: Optional[str] = ""
mirror: Optional[str] = ""
make_fulltext_index: Optional[bool] = False

# censorship
censor_words_list: Optional[str] = ""
Expand Down
13 changes: 13 additions & 0 deletions src/sotoki/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,19 @@ def main():

advanced = parser.add_argument_group("Advanced")

metadata.add_argument(
"--make_fulltext_index",
action="store_true",
default=False,
help="Activate the generation of the fulltext index, expect high ram usage with big sites",
)

metadata.add_argument(
"--compression",
help="Activate the compression of the generated zim file, expect high ram usage with big sites",
dest="compression",
)

advanced.add_argument(
"--output",
help="Output folder for ZIM file",
Expand Down
3 changes: 2 additions & 1 deletion src/sotoki/utils/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ def setup():
filename=Global.conf.output_dir.joinpath(Global.conf.fname),
main_path="questions",
favicon_path="illustration",
language=Global.conf.iso_lang_3,
language=Global.conf.iso_lang_3 if Global.conf.make_fulltext_index else None,
compression=Global.conf.compression,
title=Global.conf.title,
description=Global.conf.description,
creator=Global.conf.author,
Expand Down