mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-22 06:22:16 +00:00
set version
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
from pprint import pprint
|
||||
|
||||
|
||||
class Configuration:
|
||||
@@ -14,8 +17,19 @@ class Configuration:
|
||||
|
||||
runs_dir = tile_gen_dir / 'runs'
|
||||
|
||||
ofm_config_dir = Path('/data/ofm/config')
|
||||
if Path('/data/ofm').exists():
|
||||
ofm_config_dir = Path('/data/ofm/config')
|
||||
else:
|
||||
repo_root = Path(__file__).parent.parent.parent.parent
|
||||
|
||||
ofm_config_dir = repo_root / 'config'
|
||||
|
||||
ofm_config = json.loads((ofm_config_dir / 'config.json').read_text())
|
||||
pprint(ofm_config)
|
||||
|
||||
rclone_config = ofm_config_dir / 'rclone.conf'
|
||||
|
||||
rclone_bin = subprocess.run(['which', 'rclone'], capture_output=True, text=True).stdout.strip()
|
||||
|
||||
|
||||
config = Configuration()
|
||||
|
||||
Reference in New Issue
Block a user