misc: add --overlay flag to create_themes_json.py (#29692)
This commit is contained in:
parent
c95d995a27
commit
bec5949f81
|
@ -1,8 +1,13 @@
|
|||
#! /usr/bin/env python
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--overlay', dest='overlay', type=str)
|
||||
args = parser.parse_args()
|
||||
|
||||
themes = []
|
||||
for dirname in sorted(os.listdir('static')):
|
||||
config = os.path.join('static', dirname, 'config.json')
|
||||
|
@ -18,6 +23,9 @@ for dirname in sorted(os.listdir('static')):
|
|||
theme['variables']['no_extra_js'] = False
|
||||
else:
|
||||
theme['variables']['no_extra_js'] = True
|
||||
if args.overlay:
|
||||
theme['module'] = 'publik-base'
|
||||
theme['overlay'] = args.overlay
|
||||
themes.append(theme)
|
||||
|
||||
with open('themes.json', 'w') as fd:
|
||||
|
|
Loading…
Reference in New Issue