Download scripts/_paths.py from Jannchie/danbooru_metadata: direct link, hf CLI and curl.
- Browser
- Download file 566 Bytes
-
https://huggingface.co/datasets/Jannchie/danbooru_metadata/resolve/main/scripts/_paths.py
- Command line
-
hf download hf://datasets/Jannchie/danbooru_metadata/scripts/_paths.py
-
curl -L -o _paths.py https://huggingface.co/datasets/Jannchie/danbooru_metadata/resolve/main/scripts/_paths.py
566 Bytes
| 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 | |