Files
wordarr/wordarr/config.py
T
SteppenstreunerandClaude Fable 5 508ae5f26e Add wordarr: request & import manager for ebooks, comics and audiobooks
FastAPI + SQLite backend with vanilla-JS web UI. Requests via Open
Library / Audible / AniList metadata search (or manual entry) with
per-request target library selection. Manual import flow: scan the
download dir, fuzzy-match files against missing requests, review,
then move+rename into the library per configurable naming templates.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-28 12:34:07 +02:00

27 lines
854 B
Python

import os
from pathlib import Path
DOWNLOAD_DIR = Path(os.environ.get("WORDARR_DOWNLOAD_DIR", "/mnt/downloads"))
CONFIG_DIR = Path(os.environ.get("WORDARR_CONFIG_DIR", "/config"))
DB_PATH = Path(os.environ.get("WORDARR_DB_PATH", str(CONFIG_DIR / "wordarr.db")))
EBOOK_EXTENSIONS = {".epub", ".pdf", ".mobi", ".azw3", ".azw", ".fb2", ".djvu"}
AUDIOBOOK_EXTENSIONS = {".m4b", ".m4a", ".mp3", ".flac", ".ogg", ".opus"}
COMIC_EXTENSIONS = {".cbz", ".cbr", ".cb7"}
ALL_EXTENSIONS = EBOOK_EXTENSIONS | AUDIOBOOK_EXTENSIONS | COMIC_EXTENSIONS
DEFAULT_NAMING = {
"ebook": {
"folder": "{Author}/{Title} ({Year})",
"file": "{Author} - {Title}",
},
"audiobook": {
"folder": "{Author}/{Title}",
"file": "{Title}",
},
"comic": {
"folder": "{Series}",
"file": "{Series} - Band {Volume}",
},
}