get id from config file
This commit is contained in:
parent
c944d4c5e9
commit
e1e5912423
2 changed files with 10 additions and 3 deletions
0
__init__.py
Normal file
0
__init__.py
Normal file
13
install.py
13
install.py
|
@ -1,10 +1,11 @@
|
|||
#!/usr/bin/python3
|
||||
#!/srv/pandora/bin/python3
|
||||
|
||||
import os
|
||||
from os.path import join, abspath, basename, dirname
|
||||
|
||||
# change this
|
||||
name = 'placeholder'
|
||||
import ox
|
||||
|
||||
|
||||
overwrite = (
|
||||
#('home', 'indiancinema'),
|
||||
#('infoView', 'indiancinema'),
|
||||
|
@ -13,6 +14,12 @@ overwrite = (
|
|||
base = abspath(dirname(__file__))
|
||||
os.chdir(base)
|
||||
|
||||
name = os.path.basename(base)
|
||||
config = join(base, 'config.jsonc')
|
||||
if os.path.exists(config):
|
||||
with open('/srv/pandora/northeast/config.jsonc') as fd:
|
||||
name = ox.jsonc.load(fd)['site']['id']
|
||||
|
||||
for root, folders, files in os.walk(join(base, 'static')):
|
||||
for f in files:
|
||||
src = join(root, f)
|
||||
|
|
Loading…
Reference in a new issue