File size: 566 Bytes
62a4c39 a3caf4c 62a4c39 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import sys
from pathlib import Path
SCRIPTS_DIR = Path(__file__).resolve().parent
ROOT = SCRIPTS_DIR.parent
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
DATA_DIR = ROOT / "data"
DB_DIR = DATA_DIR / "db"
OUTPUTS_DIR = DATA_DIR / "outputs"
TAGS_DIR = OUTPUTS_DIR / "tags"
TRANSLATIONS_DIR = OUTPUTS_DIR / "translations"
DANBOORU_DB_PATH = DB_DIR / "danbooru_metadata.db"
LEGACY_DANBOORU_DB_PATH = ROOT / "danbooru_metadata.db"
if not DANBOORU_DB_PATH.exists() and LEGACY_DANBOORU_DB_PATH.exists():
DANBOORU_DB_PATH = LEGACY_DANBOORU_DB_PATH
|