Files
2026-07-30 10:51:43 +09:00

37 lines
955 B
Python
Executable File

#!/usr/bin/env python3
"""config.py の設定値を表示する互換ユーティリティ。"""
from __future__ import annotations
import argparse
import json
from common import CONFIG
def main() -> int:
parser = argparse.ArgumentParser()
parser.add_argument("--json", action="store_true")
args = parser.parse_args()
data = {
"PDF_ROOT": str(CONFIG.path.pdf_root),
"SCAN_DIRECTORIES": list(
CONFIG.processing.scan_directories
),
"REMOTE": CONFIG.remote.host,
"REMOTE_DB": CONFIG.remote.database_dir,
"REMOTE_PDF": CONFIG.remote.pdf_dir,
"MAX_PAPERS": CONFIG.processing.max_papers,
"AI_BACKEND": CONFIG.ai.backend,
}
if args.json:
print(json.dumps(data, ensure_ascii=False, indent=2))
else:
for key, value in data.items():
print(f"{key}={value}")
return 0
if __name__ == "__main__":
raise SystemExit(main())