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 # fintic
## Install instructions ## 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 Run these commands in the directory you want to put the app and press enter during the setup whenever it asks for confirmation
```console ```console
sudo apt-get update sudo apt-get update

View File

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

@ -362,7 +362,6 @@ def updateWeather(api_key, logf):
all_current_settings['locations'] = current_weathers all_current_settings['locations'] = current_weathers
all_daily_settings['locations'] = daily_weathers all_daily_settings['locations'] = daily_weathers
f = open( "csv/current_weather.json", 'w+' ) f = open( "csv/current_weather.json", 'w+' )
@ -382,8 +381,10 @@ def updateWeather(api_key, logf):
logf.write('. line: ' + str(exc_tb.tb_lineno)) logf.write('. line: ' + str(exc_tb.tb_lineno))
logf.write('. type: ' + str(exc_type)) 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.write('\n ' + "".join(traceback.format_exception(sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2])))
logf.close() logf.close()
def updateLeagueTables(api_key, logf): def updateLeagueTables(api_key, logf):
url = 'https://bm7p954xoh.execute-api.us-east-2.amazonaws.com/default/ScriptsAPI/sports?stats=' url = 'https://bm7p954xoh.execute-api.us-east-2.amazonaws.com/default/ScriptsAPI/sports?stats='

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

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/sh
cd /home/pi/fintic 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> </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> </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> </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> </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> </select>
@ -2865,7 +2865,7 @@
<div class="col-auto"> <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> </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> </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> </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> </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> </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> </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> </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> </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> </select>