Files
Inkycal/inkycal/config/__pycache__/settings_parser.cpython-37.pyc

26 lines
3.7 KiB
Plaintext
Raw Normal View History

B
<00>C<EFBFBD>^2<00>@sLdZddlZddlmZddlmZGdd<06>d<06>Zdd<08>Zed krHe<06>dS)
zA
Json settings parser. Currently in alpha!
Copyright by aceisace
<EFBFBD>N)<01>chdir)<01>pathc@szeZdZdZdddddddd d
d d d dddddgZddgZddgZddgZdddddddd gZd!d"<22>Z d#d$<24>Z
d%d&<26>Z d'S)(<28>settingsz1Load and validate settings from the settings file<6C>en<65>de<64>ru<72>it<69>es<65>fr<66>el<65>sv<73>nl<6E>plZua<75>nb<6E>vi<76>zh_twzzh-cn<63>ja<6A>ko<6B>metricZimperial<61> <00><00>normalZ upside_downZepd_7_in_5_v2_colourZ epd_7_in_5_v2Zepd_7_in_5_colour<75>
epd_7_in_5Zepd_5_in_83_colourZ epd_5_in_83Zepd_4_in_2_colourZ
epd_4_in_2c
Cs<>yJ|<01>d<01>r|<01>d<02>d}n|}t|<02>td<01><01>}t<04>|<03>|_WdQRXWntk
rftd<05>YnX<00>y|jd|_ |j |j
ks<>t |j <09>t kr<>td<07> t <09><01>d|_ |jd |_|j|jks<>t |j<0E>t kr<>td
<EFBFBD> t<0E><01>d |_|jd |_|j|jk<07>s
t |j<10>tk<03>rtd <0A> t<10><01>d|_|jd|_|j|jk<07>sHt |j<13>t k<03>rdtd<10> t<13><01>td<11>d|_|jd|_|j<15>r<>t |j<15>tk<03>r<>td<14> t<15><01>td<15>dddg|_|jd|_|j|jk<07>s<>t |j<17>t k<03>r<>td<19> t<17><01>td<1A>d|_x~|jdD]p}|ddk<02>r$|d|_|d |_nF|dd!k<02>rH|d|_|d |_n"|dd"k<02>r<>|d|_|d |_<1E>q<>Wtd#<23>Wn.tk
<EFBFBD>r<>}zt|j <20>Wdd}~XYnXdS)$z6Load settings from path (folder or settings.json file)z settings.jsonz/settings.jsonrNz,No settings file found in specified location<6F>languagez/Unsupported language: {}!. Switching to englishr<00>unitsz-Units ({}) not supported, using metric units.r<00>hoursz0Selected hours: {} not supported, using 24-hours<72>24<32>modelz5Model: {} not supported. Please select a valid optionz4Switching to 7.5" ePaper black-white (v1) (fallback)r<00>calibration_hourszInvalid calibration hours: {}z"Using default option, 0am,12am,6pmr<00><00>display_orientationz!Invalid ({}) display orientation.z-Switching to default orientation, normal-moder<00>panels<6C>location<6F>top<6F>type<70>configZmiddle<6C>bottomzsettings loaded)!<21>endswith<74>splitr<00>open<65>json<6F>load<61> raw_settings<67>FileNotFoundError<6F>printr<00>_settings__supported_languagesr$<00>str<74>formatr<00>_settings__supported_unitsr<00>_settings__supported_hours<72>intr<00>_settings__supported_modelsr<00>listr <00>(_settings__supported_display_orientation<6F> top_section<6F>top_section_config<69>middle_section<6F>middle_section_config<69>bottom_section<6F>bottom_section_config<69> Exception<6F>reason)<06>selfZsettings_file_path<74>folder<65>file<6C>sections<6E>e<>rE<00>A/home/pi/Desktop/Inkycal/inkycal/configuration/settings_parser.py<70>__init__!sf

       
 
 
 zsettings.__init__cCsr||jkr|j}n0||jkr$|j}n||jkr6|j}n td<01>d}x&|jdD]}||dkrN|d}qNW||fS)z<Get all data from settings file by providing the module namezInvalid module name!Nr!r$r")r8r9r:r;r<r=r.r,)r@<00> module_namer%<00>moduler"rErErF<00> module_initls


  zsettings.module_initcCs|j|j|jg}|S)zRReturns a list of modules (from settings file) which should be loaded
on start)r8r:r<)r@<00>lstrErErF<00> which_modules~szsettings.which_modulesN) <0C>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__r/r2r3r7r5rGrJrLrErErErFrsKrcCs td<01>dS)Nz(running settings parser as standalone...)r.rErErErF<00>main<69>srQ<00>__main__)rPr*<00>osrrrrQrMrErErErF<00><module>s  s