cdosea-play/cdoseaplay/config.py

27 lines
539 B
Python
Raw Normal View History

2017-10-12 16:45:57 +00:00
import json
2017-10-16 18:31:44 +00:00
import os
import sys
2017-10-12 16:45:57 +00:00
base = 'https://cdosea.0x2620.org/static/render/'
lang = '1080p'
start = ''
2017-10-16 18:31:44 +00:00
lights = False
2023-10-06 22:21:26 +00:00
lanbox = False
2018-07-02 14:54:12 +00:00
font = 'Menlo'
2021-12-29 10:47:31 +00:00
# SimHei for chinese
2018-07-31 07:37:42 +00:00
font_size = 28
2021-12-29 10:47:31 +00:00
# 30 for chinese
2017-10-16 18:31:44 +00:00
2023-12-19 13:26:25 +00:00
letter_offset = False
2024-01-22 09:03:48 +00:00
lights_brightness = 255
2024-06-17 15:49:55 +00:00
led_lights = 24
letter_base_light = 25
2023-12-19 13:26:25 +00:00
2017-10-12 16:45:57 +00:00
conf = os.path.expanduser('~/.config/cdosea.json')
if os.path.exists(conf):
with open(conf) as fd:
config = json.load(fd)
2017-10-16 18:31:44 +00:00
_this = sys.modules[__name__]
for key in config:
setattr(_this, key, config[key])