misc: add --overlay flag to create_themes_json.py (#29692)

This commit is contained in:
Frédéric Péters 2019-01-13 14:12:39 +01:00
parent c95d995a27
commit bec5949f81
1 changed files with 8 additions and 0 deletions

View File

@ -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: