Merge branch 'master' into dev

This commit is contained in:
Neythen Treloar 2022-04-11 18:33:28 +01:00 committed by GitHub
commit 409b7e01a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 58 additions and 47 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -1,6 +1,7 @@
# fintic
## Install instructions
Run these commands in the directory you want to put the app and press enter during the setup whenever it asks for confirmation
```console
sudo apt-get update

View File

@ -1,5 +1,7 @@
#!/bin/bash
sleep 80
value=$(<csv/system_info.json)
echo "${value}"
@ -28,13 +30,14 @@ done
str=$(IFS=,; echo "${ar2[*]}")
sudo chmod 777 csv/system_info.json
rm csv/system_info.json
echo "$str" >> csv/system_info.json
echo "$str"
chmod 777 csv/system_info.json
sudo chmod 777 csv/system_info.json

View File

@ -359,8 +359,7 @@ def updateWeather(api_key, logf):
if location in daily_locations:
daily_weathers[location] = daily_weather
all_current_settings['locations'] = current_weathers
@ -382,7 +381,9 @@ def updateWeather(api_key, logf):
logf.write('. line: ' + str(exc_tb.tb_lineno))
logf.write('. type: ' + str(exc_type))
logf.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
logf.close()
def updateLeagueTables(api_key, logf):

BIN
logos/.DS_Store vendored

Binary file not shown.

BIN
logos/currencies/bgn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

BIN
logos/currencies/brl.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
logos/currencies/cny.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

BIN
logos/currencies/czk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 746 B

BIN
logos/currencies/dkk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

BIN
logos/currencies/hkd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
logos/currencies/hrk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
logos/currencies/huf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 657 B

BIN
logos/currencies/idr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

BIN
logos/currencies/ils.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 856 B

BIN
logos/currencies/inr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

BIN
logos/currencies/isk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

BIN
logos/currencies/krw.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

BIN
logos/currencies/mxn.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

BIN
logos/currencies/myr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
logos/currencies/nok.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 788 B

BIN
logos/currencies/php.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
logos/currencies/pln.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

BIN
logos/currencies/ron.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 B

BIN
logos/currencies/rub.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

BIN
logos/currencies/sek.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

BIN
logos/currencies/sgd.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 B

BIN
logos/currencies/thb.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

BIN
logos/currencies/try.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

BIN
logos/currencies/zar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
logos/sports/.DS_Store vendored

Binary file not shown.

BIN
logos/stocks/.DS_Store vendored Normal file

Binary file not shown.

View File

@ -36,7 +36,7 @@ import sys
#api_caller.sendline('A')
os.system("./check_update.sh")
#pexpect.spawn("./check_update.sh")
displaying_screensaver = False
uploading = False
@ -135,6 +135,7 @@ def index():
timeString = now.strftime("%Y-%m-%d %H:%M")
logos_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'logos')
LogoList = os.listdir(logos_path)
f = open('csv/stocks_settings.json', 'r')
stocks_settings = json.load(f)
f.close()
@ -190,6 +191,9 @@ def index():
f = open('csv/general_settings.json', 'r')
general_settings = json.load(f)
f.close()
try: # incase this doesnt exist
api_keys = api_key2[1]
except:
@ -322,6 +326,7 @@ def stop():
@app.route("/update", methods=['PUT','POST'])
def update():
f = open('csv/system_info.json', 'w+')
try:
@ -334,6 +339,7 @@ def update():
json.dump(system_info, f)
f.close()
os.system("./update.sh")
os.system("sudo reboot now")
return index()

View File

@ -1,3 +1,3 @@
#!/bin/sh
cd /home/pi/fintic
sudo -E taskset -c 3 python3 database_caller.py & sudo -E python3 server.py
sudo -E taskset -c 3 python3 database_caller.py & sudo -E python3 server.py & ./check_update.sh

View File

@ -751,11 +751,11 @@
>
<option>Medium</option>
<option {%if stocks_settings.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if stocks_settings.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if stocks_settings.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -1221,11 +1221,11 @@
>
<option>Medium</option>
<option {%if crypto_settings.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if crypto_settings.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if crypto_settings.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -1693,11 +1693,11 @@
>
<option>Medium</option>
<option {%if forex_settings.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if forex_settings.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if forex_settings.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -2167,11 +2167,11 @@
>
<option>Medium</option>
<option {%if current_weather.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if current_weather.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if current_weather.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -2591,11 +2591,11 @@
>
<option>Medium</option>
<option {%if daily_weather.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if daily_weather.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if daily_weather.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -2865,7 +2865,7 @@
<div class="col-auto">
<button id="weather-api-btn" class="btn set-btn">Add</button>
<!-- <button id="weather-api-btn" class="btn set-btn">Add</button> -->
</div>
@ -3045,11 +3045,11 @@
>
<option>Medium</option>
<option {%if news_settings.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if news_settings.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if news_settings.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -3568,11 +3568,11 @@
>
<option>Medium</option>
<option {%if upcoming_games.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if upcoming_games.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if upcoming_games.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -3870,11 +3870,11 @@
>
<option>Medium</option>
<option {%if past_games.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if past_games.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if past_games.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -4172,11 +4172,11 @@
>
<option>Medium</option>
<option {%if live_games.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if live_games.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if live_games.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -4470,11 +4470,11 @@
>
<option>Medium</option>
<option {%if team_stats.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if team_stats.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if team_stats.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -4818,11 +4818,11 @@
>
<option>Medium</option>
<option {%if image_settings.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if image_settings.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if image_settings.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -5184,11 +5184,11 @@
>
<option>Medium</option>
<option {%if GIF_settings.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if GIF_settings.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if GIF_settings.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
@ -5546,11 +5546,11 @@
>
<option>Medium</option>
<option {%if message_settings.speed2 == 'Medium' %} selected {% endif %}>Medium</option>
<option>Slow</option>
<option {%if message_settings.speed2 == 'Slow' %} selected {% endif %}>Slow</option>
<option>Fast</option>
<option {%if message_settings.speed2 == 'Fast' %} selected {% endif %}>Fast</option>
</select>