0001-misc-add-overlay-flag-to-create_themes_json.py-29692.patch
create_themes_json.py | ||
---|---|---|
1 | 1 |
#! /usr/bin/env python |
2 | 2 | |
3 |
import argparse |
|
3 | 4 |
import json |
4 | 5 |
import os |
5 | 6 | |
7 |
parser = argparse.ArgumentParser() |
|
8 |
parser.add_argument('--overlay', dest='overlay', type=str) |
|
9 |
args = parser.parse_args() |
|
10 | ||
6 | 11 |
themes = [] |
7 | 12 |
for dirname in sorted(os.listdir('static')): |
8 | 13 |
config = os.path.join('static', dirname, 'config.json') |
... | ... | |
18 | 23 |
theme['variables']['no_extra_js'] = False |
19 | 24 |
else: |
20 | 25 |
theme['variables']['no_extra_js'] = True |
26 |
if args.overlay: |
|
27 |
theme['module'] = 'publik-base' |
|
28 |
theme['overlay'] = args.overlay |
|
21 | 29 |
themes.append(theme) |
22 | 30 | |
23 | 31 |
with open('themes.json', 'w') as fd: |
24 |
- |