Download stories and build epubs with FanFicFare

FanFicFare adapters fetch metadata and chapters, and its epub writer
builds each book from the store. Environment variables configure the
app, and a default personal.ini is copied to the config folder on first
start.
This commit is contained in:
tim
2026-09-27 23:38:28 +02:00
parent 6c2574cf0f
commit c30622e3a0
7 changed files with 844 additions and 0 deletions
+18
View File
@@ -7,3 +7,21 @@ from pathlib import Path
_tmp = Path(tempfile.mkdtemp(prefix="bindery-tests-"))
for name, sub in [("CONFIG_DIR", "config"), ("INGEST_DIR", "ingest"), ("TMP_DIR", "tmp")]:
os.environ[name] = str(_tmp / sub)
os.environ["BINDERY_START_THREADS"] = "false"
os.environ["UPDATE_INTERVAL_HOURS"] = "0"
for name in (
"CWA_URL",
"CWA_USERNAME",
"CWA_PASSWORD",
"CWA_DB_PATH",
"CALIBRE_DB_PATH",
"AUTH_METHOD",
"BINDERY_API_KEY",
"URL_BASE",
"CWA_ALLOWED_USERS",
):
os.environ.pop(name, None)
from bindery import config # noqa: E402
config.prepare()