diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index b95b4b5..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/README.md b/README.md index 354d366..b8d7a52 100755 --- a/README.md +++ b/README.md @@ -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 diff --git a/check_update.sh b/check_update.sh index 88ca69c..6ed30dc 100755 --- a/check_update.sh +++ b/check_update.sh @@ -1,5 +1,7 @@ #!/bin/bash +sleep 80 + value=$(> csv/system_info.json -echo "$str" -chmod 777 csv/system_info.json +sudo chmod 777 csv/system_info.json + diff --git a/database_caller.py b/database_caller.py index d9f5817..0ce053d 100755 --- a/database_caller.py +++ b/database_caller.py @@ -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): diff --git a/logos/.DS_Store b/logos/.DS_Store deleted file mode 100644 index 6fbf3f9..0000000 Binary files a/logos/.DS_Store and /dev/null differ diff --git a/logos/currencies/bgn.png b/logos/currencies/bgn.png new file mode 100644 index 0000000..9407e9c Binary files /dev/null and b/logos/currencies/bgn.png differ diff --git a/logos/currencies/brl.png b/logos/currencies/brl.png new file mode 100644 index 0000000..183582b Binary files /dev/null and b/logos/currencies/brl.png differ diff --git a/logos/currencies/cny.png b/logos/currencies/cny.png new file mode 100644 index 0000000..8580469 Binary files /dev/null and b/logos/currencies/cny.png differ diff --git a/logos/currencies/czk.png b/logos/currencies/czk.png new file mode 100644 index 0000000..e15299c Binary files /dev/null and b/logos/currencies/czk.png differ diff --git a/logos/currencies/dkk.png b/logos/currencies/dkk.png new file mode 100644 index 0000000..5b61679 Binary files /dev/null and b/logos/currencies/dkk.png differ diff --git a/logos/currencies/hkd.png b/logos/currencies/hkd.png new file mode 100644 index 0000000..95e953e Binary files /dev/null and b/logos/currencies/hkd.png differ diff --git a/logos/currencies/hrk.png b/logos/currencies/hrk.png new file mode 100644 index 0000000..5160042 Binary files /dev/null and b/logos/currencies/hrk.png differ diff --git a/logos/currencies/huf.png b/logos/currencies/huf.png new file mode 100644 index 0000000..ddbd3ed Binary files /dev/null and b/logos/currencies/huf.png differ diff --git a/logos/currencies/idr.png b/logos/currencies/idr.png new file mode 100644 index 0000000..f8a14e3 Binary files /dev/null and b/logos/currencies/idr.png differ diff --git a/logos/currencies/ils.png b/logos/currencies/ils.png new file mode 100644 index 0000000..74952a4 Binary files /dev/null and b/logos/currencies/ils.png differ diff --git a/logos/currencies/inr.png b/logos/currencies/inr.png new file mode 100644 index 0000000..ae8e2c9 Binary files /dev/null and b/logos/currencies/inr.png differ diff --git a/logos/currencies/isk.png b/logos/currencies/isk.png new file mode 100644 index 0000000..441ced5 Binary files /dev/null and b/logos/currencies/isk.png differ diff --git a/logos/currencies/krw.png b/logos/currencies/krw.png new file mode 100644 index 0000000..e229f11 Binary files /dev/null and b/logos/currencies/krw.png differ diff --git a/logos/currencies/mxn.png b/logos/currencies/mxn.png new file mode 100644 index 0000000..14a6673 Binary files /dev/null and b/logos/currencies/mxn.png differ diff --git a/logos/currencies/myr.png b/logos/currencies/myr.png new file mode 100644 index 0000000..de1291b Binary files /dev/null and b/logos/currencies/myr.png differ diff --git a/logos/currencies/nok.png b/logos/currencies/nok.png new file mode 100644 index 0000000..b60b679 Binary files /dev/null and b/logos/currencies/nok.png differ diff --git a/logos/currencies/php.png b/logos/currencies/php.png new file mode 100644 index 0000000..d3f5ec0 Binary files /dev/null and b/logos/currencies/php.png differ diff --git a/logos/currencies/pln.png b/logos/currencies/pln.png new file mode 100644 index 0000000..11b6bf6 Binary files /dev/null and b/logos/currencies/pln.png differ diff --git a/logos/currencies/ron.png b/logos/currencies/ron.png new file mode 100644 index 0000000..3d6123d Binary files /dev/null and b/logos/currencies/ron.png differ diff --git a/logos/currencies/rub.png b/logos/currencies/rub.png new file mode 100644 index 0000000..1d29815 Binary files /dev/null and b/logos/currencies/rub.png differ diff --git a/logos/currencies/sek.png b/logos/currencies/sek.png new file mode 100644 index 0000000..efc577b Binary files /dev/null and b/logos/currencies/sek.png differ diff --git a/logos/currencies/sgd.png b/logos/currencies/sgd.png new file mode 100644 index 0000000..fb1ffa4 Binary files /dev/null and b/logos/currencies/sgd.png differ diff --git a/logos/currencies/thb.png b/logos/currencies/thb.png new file mode 100644 index 0000000..dbd7936 Binary files /dev/null and b/logos/currencies/thb.png differ diff --git a/logos/currencies/try.png b/logos/currencies/try.png new file mode 100644 index 0000000..9d5d748 Binary files /dev/null and b/logos/currencies/try.png differ diff --git a/logos/currencies/zar.png b/logos/currencies/zar.png new file mode 100644 index 0000000..a13235a Binary files /dev/null and b/logos/currencies/zar.png differ diff --git a/logos/sports/.DS_Store b/logos/sports/.DS_Store deleted file mode 100644 index eaa6841..0000000 Binary files a/logos/sports/.DS_Store and /dev/null differ diff --git a/logos/currencies/.DS_Store b/logos/sports/NHL/.DS_Store similarity index 65% rename from logos/currencies/.DS_Store rename to logos/sports/NHL/.DS_Store index da6d005..2376b20 100644 Binary files a/logos/currencies/.DS_Store and b/logos/sports/NHL/.DS_Store differ diff --git a/logos/stocks/.DS_Store b/logos/stocks/.DS_Store new file mode 100644 index 0000000..1ff19cd Binary files /dev/null and b/logos/stocks/.DS_Store differ diff --git a/server.py b/server.py index acc3bd5..836183d 100755 --- a/server.py +++ b/server.py @@ -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() diff --git a/startup.sh b/startup.sh index bca32b3..d475069 100755 --- a/startup.sh +++ b/startup.sh @@ -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 diff --git a/templates/index.html b/templates/index.html index 2524d68..ef73b89 100644 --- a/templates/index.html +++ b/templates/index.html @@ -751,11 +751,11 @@ > - + - + - + @@ -1221,11 +1221,11 @@ > - + - + - + @@ -1693,11 +1693,11 @@ > - + - + - + @@ -2167,11 +2167,11 @@ > - + - + - + @@ -2591,11 +2591,11 @@ > - + - + - + @@ -2865,7 +2865,7 @@
- +
@@ -3045,11 +3045,11 @@ > - + - + - + @@ -3568,11 +3568,11 @@ > - + - + - + @@ -3870,11 +3870,11 @@ > - + - + - + @@ -4172,11 +4172,11 @@ > - + - + - + @@ -4470,11 +4470,11 @@ > - + - + - + @@ -4818,11 +4818,11 @@ > - + - + - + @@ -5184,11 +5184,11 @@ > - + - + - + @@ -5546,11 +5546,11 @@ > - + - + - +