Merge pull request #19 from fin-tic/dev

1.3.6 update
This commit is contained in:
Justin 2023-07-05 23:23:57 +08:00 committed by GitHub
commit a336cd1ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
53 changed files with 1375 additions and 691 deletions

View File

@ -1 +0,0 @@
{"feature": "Stocks", "speed": "fast", "speed2": "fast", "animation": "down", "percent": true, "point": true, "logos": true, "chart": false, "title": true, "symbols": {"BRENTOIL": {"current": "123.053", "unit": "bbl", "24hr_change": "1.0150", "percent_change": "0.83"}, "WTIOIL": {"current": "121.588", "unit": "bbl", "24hr_change": "0.8902", "percent_change": "0.74"}, "XAU": {"current": "1821.205", "unit": "oz", "24hr_change": "4.0045", "percent_change": "0.22"}, "XAG": {"current": "21.1034", "unit": "oz", "24hr_change": "-0.0550", "percent_change": "-0.26"}, "XCU": {"current": "0.2633", "unit": "oz", "24hr_change": "-0.0006", "percent_change": "-0.22"}, "NG": {"current": "8.6595", "unit": "mmbtu", "24hr_change": "-0.0236", "percent_change": "-0.27"}, "WHEAT": {"current": "393.123", "unit": "ton", "24hr_change": "-1.2642", "percent_change": "-0.32"}, "COTTON": {"current": "1.4494", "unit": "lb", "24hr_change": "0.0004", "percent_change": "0.03"}, "RICE": {"current": "16.3849", "unit": "cwt", "24hr_change": "0.0093", "percent_change": "0.06"}, "SUGAR": {"current": "0.1866", "unit": "lb", "24hr_change": "-0.0007", "percent_change": "-0.40"}, "COCOA": {"current": "2374.074", "unit": "ton", "24hr_change": "2.5206", "percent_change": "0.11"}, "LUMBER": {"current": "527.842", "unit": "oz", "24hr_change": "0.2641", "percent_change": "0.05"}, "SOYBEAN": {"current": "17.1621", "unit": "bu", "24hr_change": "0.0270", "percent_change": "0.16"}}}

View File

@ -1 +0,0 @@
{"feature": "Stocks", "speed": "fast", "speed2": "slow", "animation": "up", "percent": true, "point": true, "logos": true, "chart": false, "title": true, "symbols": {"^HSI": {"name": "HSI", "current": "18083.06", "point_change": "1003.55", "percent_change": "5.88"}, "^GSPC": {"name": "S&P 500", "current": "3790.93", "point_change": "112.50", "percent_change": "3.06"}, "^RUT": {"name": "RUSSELL 2000", "current": "1775.77", "point_change": "66.90", "percent_change": "3.91"}, "^GDAXI": {"name": "DAX", "current": "12648.95", "point_change": "-21.53", "percent_change": "-0.17"}, "^FTSE": {"name": "FTSE 100", "current": "7058.68", "point_change": "-27.82", "percent_change": "-0.39"}, "^FCHI": {"name": "CAC 40", "current": "6031.45", "point_change": "-8.24", "percent_change": "-0.14"}, "399001.SZ": {"name": "SZSE", "current": "10778.61", "point_change": "-140.83", "percent_change": "-1.29"}, "^STOXX50E": {"name": "STOXX 50", "current": "3476.55", "point_change": "-7.93", "percent_change": "-0.23"}, "^AXJO": {"name": "ASX 200", "current": "6815.70", "point_change": "116.40", "percent_change": "1.74"}, "^DJI": {"name": "DOW JONES", "current": "30316.32", "point_change": "825.43", "percent_change": "2.80"}, "^STOXX": {"name": "STOXX 600", "current": "402.33", "point_change": "-0.70", "percent_change": "-0.17"}}}

View File

@ -1 +0,0 @@
{"feature": "IPO", "speed": "medium", "speed2": "medium", "animation": "down", "title": true, "symbols": ["No Data"]}

View File

@ -1 +1 @@
{"scheduler":{"force": false}, "stocks": {"time": "14/06/2022 06:42:06", "force": false}, "crypto": {"time": "14/06/2022 06:58:18", "force": false}, "news": {"time": "14/06/2022 05:29:08", "force": false}, "weather": {"time": "14/06/2022 05:29:08", "force": false}, "forex": {"time": "14/06/2022 05:29:14", "force": false}, "sports_l": {"time": "14/06/2022 04:42:37", "force": false}, "sports_p": {"time": "14/06/2022 06:27:34", "force": false}, "sports_u": {"time": "14/06/2022 06:28:34", "force": false}, "sports_t": {"time": "14/06/2022 06:26:23", "force": false}, "commodities": {"time": "14/06/2022 06:51:07", "force": false}, "indices": {"time": "05/10/2022 04:06:10", "force": false}, "movies": {"time": "05/10/2022 02:31:40", "force": false}, "ipo": {"time": "05/10/2022 02:31:40", "force": false}, "prepost": {"time": "05/10/2022 02:31:40", "force": false}}
{"scheduler":{"force": false}, "stocks": {"time": "14/06/2022 06:42:06", "force": false}, "crypto": {"time": "14/06/2022 06:58:18", "force": false}, "news": {"time": "14/06/2022 05:29:08", "force": false}, "weather": {"time": "14/06/2022 05:29:08", "force": false}, "forex": {"time": "14/06/2022 05:29:14", "force": false}, "sports_l": {"time": "14/06/2022 04:42:37", "force": false}, "sports_p": {"time": "14/06/2022 06:27:34", "force": false}, "sports_u": {"time": "14/06/2022 06:28:34", "force": false}, "sports_t": {"time": "14/06/2022 06:26:23", "force": false}, "commodities": {"time": "14/06/2022 06:51:07", "force": false}, "indices": {"time": "05/10/2022 04:06:10", "force": false}, "movies": {"time": "05/10/2022 02:31:40", "force": false}, "ipo": {"time": "05/10/2022 02:31:40", "force": false}, "prepost": {"time": "05/10/2022 02:31:40", "force": false}, "economic": {"time": "05/10/2022 02:31:40", "force": false}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

BIN
feature_titles/economy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 477 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

BIN
logos/economic_logos/AT.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

BIN
logos/economic_logos/AU.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
logos/economic_logos/BE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

BIN
logos/economic_logos/BR.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
logos/economic_logos/CA.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
logos/economic_logos/CH.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

BIN
logos/economic_logos/CN.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
logos/economic_logos/DE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 924 B

BIN
logos/economic_logos/DK.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 972 B

BIN
logos/economic_logos/ES.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
logos/economic_logos/EU.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
logos/economic_logos/FI.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

BIN
logos/economic_logos/FR.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1008 B

BIN
logos/economic_logos/GB.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

BIN
logos/economic_logos/HK.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
logos/economic_logos/ID.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 773 B

BIN
logos/economic_logos/IN.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
logos/economic_logos/IT.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

BIN
logos/economic_logos/JP.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
logos/economic_logos/KR.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
logos/economic_logos/MX.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
logos/economic_logos/NL.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 B

BIN
logos/economic_logos/NO.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

BIN
logos/economic_logos/NZ.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
logos/economic_logos/PH.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
logos/economic_logos/PT.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
logos/economic_logos/SE.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 932 B

BIN
logos/economic_logos/SG.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
logos/economic_logos/TH.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

BIN
logos/economic_logos/TR.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
logos/economic_logos/TW.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
logos/economic_logos/US.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
logos/economic_logos/ZA.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
logos/high_imp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

BIN
logos/indicator.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

BIN
logos/indices/DX-Y.NYB.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
logos/low_imp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

BIN
logos/med_imp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

BIN
logos/period.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

468
server.py

File diff suppressed because one or more lines are too long

View File

@ -14,14 +14,14 @@ touch crypto_settings.json last_updates.json system_info.json
touch league_tables.json
mkdir sports
touch current_weather.json stocks_settings.json daily_weather.json live_games.json live_mlb.json live_mls.json live_nba.json live_nfl.json live_nhl.json live_pl.json commodities_settings.json indices_settings.json movie_settings.json ipo_settings.json
touch display_settings.json message_settings.json upcoming_games.json forex_settings.json prepost_settings.json scheduler.json
touch display_settings.json message_settings.json upcoming_games.json forex_settings.json prepost_settings.json scheduler.json economic_settings.json
touch GIF_settings.json news_settings.json image_settings.json past_games.json general_settings.json portfolio_settings.json portfolio_crypto_settings.json
filenames="crypto_settings.json last_updates.json league_tables.json current_weather.json stocks_settings.json daily_weather.json live_games.json live_mlb.json live_mls.json live_nba.json live_nfl.json live_nhl.json live_pl.json commodities_settings.json indices_settings.json movie_settings.json ipo_settings.json display_settings.json message_settings.json upcoming_games.json forex_settings.json GIF_settings.json news_settings.json image_settings.json past_games.json portfolio_settings.json portfolio_crypto_settings.json prepost_settings.json scheduler.json"
filenames="crypto_settings.json last_updates.json league_tables.json current_weather.json stocks_settings.json daily_weather.json live_games.json live_mlb.json live_mls.json live_nba.json live_nfl.json live_nhl.json live_pl.json commodities_settings.json indices_settings.json movie_settings.json ipo_settings.json economic_settings.json display_settings.json message_settings.json upcoming_games.json forex_settings.json GIF_settings.json news_settings.json image_settings.json past_games.json portfolio_settings.json portfolio_crypto_settings.json prepost_settings.json scheduler.json"
echo '{"update_available": false, "first_boot": true}' >> system_info.json
echo [\"Standard\", [[\"Stocks\", \"Crypto\", \"Forex\"]]] >> display_settings.json
echo '{"scheduler":{"force": false}, "stocks": {"time": "07/03/2022 12:33:06", "force": true}, "crypto": {"time": "07/03/2022 12:28:51", "force": true}, "news": {"time": "07/03/2022 12:28:51", "force": true}, "weather": {"time": "07/03/2022 12:28:51", "force": true}, "forex": {"time": "07/03/2022 12:28:51", "force": true}, "sports_l": {"time": "07/03/2022 12:32:46", "force": true}, "sports_p": {"time": "07/03/2022 12:32:26", "force": true}, "sports_u": {"time": "07/03/2022 12:31:55", "force": true}, "sports_t": {"time": "07/03/2022 12:32:56", "force": true}, "commodities": {"time": "07/03/2022 12:32:56", "force": true}, "indices": {"time": "07/03/2022 12:32:56", "force": true}, "movies": {"time": "07/03/2022 12:32:56", "force": true}, "ipo": {"time": "05/10/2022 02:31:40", "force": false}, "prepost": {"time": "05/10/2022 02:31:40", "force": false}}' >> last_updates.json
echo '{"scheduler":{"force": false}, "stocks": {"time": "07/03/2022 12:33:06", "force": true}, "crypto": {"time": "07/03/2022 12:28:51", "force": true}, "news": {"time": "07/03/2022 12:28:51", "force": true}, "weather": {"time": "07/03/2022 12:28:51", "force": true}, "forex": {"time": "07/03/2022 12:28:51", "force": true}, "sports_l": {"time": "07/03/2022 12:32:46", "force": true}, "sports_p": {"time": "07/03/2022 12:32:26", "force": true}, "sports_u": {"time": "07/03/2022 12:31:55", "force": true}, "sports_t": {"time": "07/03/2022 12:32:56", "force": true}, "commodities": {"time": "07/03/2022 12:32:56", "force": true}, "indices": {"time": "07/03/2022 12:32:56", "force": true}, "movies": {"time": "07/03/2022 12:32:56", "force": true}, "ipo": {"time": "05/10/2022 02:31:40", "force": false}, "prepost": {"time": "05/10/2022 02:31:40", "force": false}, "economic": {"time": "05/10/2022 02:31:40", "force": false}}' >> last_updates.json
echo '{"feature": "Stocks", "speed": "medium","speed2": "medium", "animation": "down", "percent": false, "point": true, "logos": true, "chart": false, "title": true, "symbols": {"ETH,USD": {"current": "2629.32", "24hr_change": "-27.6432", "percent_change": "-1.04"}, "BTC,USD": {"current": "38161.00", "24hr_change": "-50.8386", "percent_change": "-0.13"}, "BNB,USD": {"current": "372.57", "24hr_change": "0.4140", "percent_change": "0.11"}, "ADA,BTC": {"current": "0.0000", "24hr_change": "-0.0000", "percent_change": "-3.74"}}}' >> crypto_settings.json
@ -52,6 +52,7 @@ echo '{"symbols": {}}' >> portfolio_settings.json
echo '{"symbols": {}}' >> portfolio_crypto_settings.json
echo '{}' >> prepost_settings.json
echo '{"shutdown": {"hour": "00", "minute": "00", "enabled": false}, "reboot":{"hour": "00", "minute": "00", "enabled": false}, "timezone": "GMT", "brightness1":{"hour": "00", "minute": "00", "bright": "10", "enabled": false}, "brightness2":{"hour": "00", "minute": "00", "bright": "10", "enabled": false}}, "brightness3":{"hour": "00", "minute": "00", "bright": "10", "enabled": false}}, "brightness4":{"hour": "00", "minute": "00", "bright": "10", "enabled": false}}' >> scheduler.json
echo '{"feature": "Economic Calendar", "speed": "medium", "speed2": "medium", "animation": "up", "importance": "Med - High", "title": true, "timezone": "US/Eastern", "countries": ["United States"], "events": []}' >> economic_settings.json
echo '{"brightness": 10, "country_code": "GB", "hostname": "fintic"}' >> general_settings.json
chmod 777 *
@ -102,6 +103,8 @@ touch 'Movies.ppm'
touch 'Movies Prof.ppm'
touch 'IPO Calendar.ppm'
touch 'IPO Calendar Prof.ppm'
touch 'Economic Calendar.ppm'
touch 'Economic Calendar Prof.ppm'
chmod 777 *

View File

@ -48,6 +48,7 @@ var commoditiesFeatures = document.querySelectorAll("#commodities-features li");
var indicesFeatures = document.querySelectorAll("#indices-features li");
var moviesFeatures = document.querySelectorAll("#movies-features li");
var ipoFeatures = document.querySelectorAll("#ipo-features li");
var economicFeatures = document.querySelectorAll("#economic-list li");
var allFeaturesList = [
stocksFeatures,
@ -67,6 +68,7 @@ var allFeaturesList = [
indicesFeatures,
moviesFeatures,
ipoFeatures,
economicFeatures,
];
// features remove buttons
@ -93,6 +95,7 @@ var commoditiesRemoveBtn = document.getElementById("commodities-remove-btn");
var indicesRemoveBtn = document.getElementById("indices-remove-btn");
var moviesRemoveBtn = document.getElementById("movies-remove-btn");
var ipoRemoveBtn = document.getElementById("ipo-remove-btn");
var economicRemoveBtn = document.getElementById("economic-remove-btn");
var allFeaturesRemoveBtns = [
stocksRemoveBtn,
@ -112,6 +115,7 @@ var allFeaturesRemoveBtns = [
indicesRemoveBtn,
moviesRemoveBtn,
ipoRemoveBtn,
economicRemoveBtn,
];
// features increase buttons
var stocksincreaseBtn = document.getElementById("stocks-increase-btn");
@ -137,6 +141,7 @@ var commoditiesincreaseBtn = document.getElementById("commodities-increase-btn")
var indicesincreaseBtn = document.getElementById("indices-increase-btn");
var moviesincreaseBtn = document.getElementById("movies-increase-btn");
var ipoincreaseBtn = document.getElementById("ipo-increase-btn");
var economicincreaseBtn = document.getElementById("economic-increase-btn");
var allFeaturesIncreaseBtns = [
stocksincreaseBtn,
@ -156,6 +161,7 @@ var allFeaturesIncreaseBtns = [
indicesincreaseBtn,
moviesincreaseBtn,
ipoincreaseBtn,
economicincreaseBtn,
];
// features decrease buttons
@ -182,6 +188,7 @@ var commoditiesDecreaseBtn = document.getElementById("commodities-decrease-btn")
var indicesDecreaseBtn = document.getElementById("indices-decrease-btn");
var moviesDecreaseBtn = document.getElementById("movies-decrease-btn");
var ipoDecreaseBtn = document.getElementById("ipo-decrease-btn");
var economicDecreaseBtn = document.getElementById("economic-decrease-btn");
var allFeaturesDecreaseBtns = [
stocksDecreaseBtn,
@ -201,6 +208,7 @@ var allFeaturesDecreaseBtns = [
indicesDecreaseBtn,
moviesDecreaseBtn,
ipoDecreaseBtn,
economicDecreaseBtn,
];
const changeVarValue = () => {
@ -227,6 +235,7 @@ const changeVarValue = () => {
indicesFeatures = document.querySelectorAll("#indices-features li");
moviesFeatures = document.querySelectorAll("#movies-features li");
ipoFeatures = document.querySelectorAll("#ipo-features li");
economicFeatures = document.querySelectorAll("#economic-list li");
allFeaturesList = [
stocksFeatures,
@ -246,6 +255,7 @@ const changeVarValue = () => {
indicesFeatures,
moviesFeatures,
ipoFeatures,
economicFeatures,
];
};
@ -610,6 +620,7 @@ var commodities = document.getElementById("commodities-features");
var indices = document.getElementById("indices-features");
var movies = document.getElementById("movies-features");
var ipos = document.getElementById("ipo-features");
var economics = document.getElementById("economic-list");
var allFeatures = [
stocks,
@ -629,6 +640,7 @@ var allFeatures = [
indices,
movies,
ipos,
economics,
];
// features select box
@ -638,6 +650,7 @@ var pastGamesSelect = document.getElementById("inputTransition83");
var liveGamesSelect = document.getElementById("inputTransition93");
var teamStatsSelect = document.getElementById("inputTransition103");
var moviesSelect = document.getElementById("inputTransition64");
var economicSelect = document.getElementById("inputTransition2222");
var allFeaturesSelectBox = [
null,
null,
@ -656,6 +669,7 @@ var allFeaturesSelectBox = [
null,
moviesSelect,
null,
economicSelect,
];
// features select add buttons
@ -664,6 +678,8 @@ var upcomingGamesAddBtn = document.getElementById("inputTransitionBtn73");
var pastGamesAddBtn = document.getElementById("inputTransitionBtn83");
var liveGamesAddBtn = document.getElementById("inputTransitionBtn93");
var teamStatsAddBtn = document.getElementById("inputTransitionBtn103");
var economicAddBtn = document.getElementById("economic-countries-btn");
var allFeaturesSelectAddBtn = [
null,
null,
@ -682,6 +698,7 @@ var allFeaturesSelectAddBtn = [
null,
null,
null,
economicAddBtn,
];
allFeaturesSelectAddBtn.map((value, index) => {
@ -718,6 +735,7 @@ var allFeaturesFile = [
null,
null,
null,
null,
];
// features file add button
var imagesFileAddBtn = document.getElementById("inputTextBtn11");
@ -741,17 +759,18 @@ var allFeaturesFileAddBtn = [
null,
null,
null,
null,
];
// features input text
var stocksText = document.getElementById("inputText3");
var cryptoText = document.getElementById("inputText4");
var forexText = document.getElementById("inputText5");
var forexText = document.getElementById("base-select").value + ',' + document.getElementById("quote-select").value;
var currentWeatherText = document.getElementById("inputText6");
var dailyForecastText = document.getElementById("inputText7");
var messagesText = document.getElementById("inputText13");
var commoditiesText = document.getElementById("inputText20");
var indicesText = document.getElementById("inputText21");
var indicesText = document.getElementById("indices-items");
var commoditiesText = document.getElementById("commodities-items");
var allFeaturesText = [
stocksText,
@ -771,6 +790,7 @@ var allFeaturesText = [
indicesText,
null,
null,
null,
];
// features text add button
@ -801,6 +821,7 @@ var allFeaturesTextAddBtn = [
indicesTextAddBtn,
null,
null,
null,
];
@ -822,6 +843,7 @@ var allFeaturesLimit = [
40,
null,
null,
null,
];
@ -903,10 +925,13 @@ allFeaturesTextAddBtn.map((value, index) => {
}
else{
if (createLi === true) {
var tag = document.createElement("li");
tag.innerHTML = allFeaturesText[index].value;
if (index == 2) {
tag.innerHTML= document.getElementById("base-select").value + ',' + document.getElementById("quote-select").value;
} else{
tag.innerHTML = allFeaturesText[index].value;
}
allFeatures[index].appendChild(tag);
changeVarValue();
addEventOnFeaturesList();
@ -1083,6 +1108,7 @@ function getFeatureSettings() {
"Indices",
"Movies",
"IPO Calendar",
"Economic Calendar",
];
let pageNum = features.indexOf(feature) + 1;
let pageSelector = "Page" + pageNum.toString();
@ -1145,6 +1171,9 @@ function getFeatureSettings() {
case 17:
s = getIpoSettings(page);
break;
case 18:
s = getEconomicSettings(page);
break;
}
settings = { ...settings, ...s }; // merge both sets of settings
@ -1336,6 +1365,7 @@ function saveMovieAPIKey(){
"Indices",
"Movies",
"IPO Calendar",
"Economic Calendar",
];
let pageNum = features.indexOf(feature) + 1;
let pageSelector = "Page" + pageNum.toString();
@ -1377,6 +1407,7 @@ function saveIpoAPIKey(){
"Indices",
"Movies",
"IPO Calendar",
"Economic Calendar",
];
let pageNum = features.indexOf(feature) + 1;
let pageSelector = "Page" + pageNum.toString();
@ -1627,6 +1658,25 @@ function getMessageSettings(page) {
return { title: title, messages: new_messages };
}
// economic settings
function getEconomicSettings(page) {
let title = page.querySelectorAll(".title-select")[0].checked;
let countries = getListItems(page.querySelectorAll(".symbol-list")[0]);
let importance = page.querySelectorAll(".economic-importance-select")[0].value;
let timezone = page.querySelectorAll(".economic-tz-select")[0].value;
settings = {
title: title,
countries: countries,
importance: importance,
timezone: timezone,
};
console.log(settings);
return settings;
}
// Join Network
let wifiSsidInput = document.getElementById("wifi-ssid-input");
@ -1758,7 +1808,7 @@ inputAnimationBtn.addEventListener("click", () => {
// scroll speed row two
let inputScrollSpeedRow = [];
for (let i = 1; i <= 17; i++) {
for (let i = 1; i <= 18; i++) {
inputScrollSpeedRow.push(
document.getElementById(
i === 1 ? "inputScrollSpeedRow" : `inputScrollSpeedRow${i}`
@ -2245,95 +2295,96 @@ var specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|<>\/?~]/;
// Forex validation
function forexValidate() {
createLi = true;
}
var specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|<>\/?~]/;
// var specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|<>\/?~]/;
let x = document.getElementById("inputText5").value;
let quoteCurrency = x.split(",")[1];
let baseCurrency = x.split(",")[0];
// let x = document.getElementById("inputText5").value;
// let quoteCurrency = x.split(",")[1];
// let baseCurrency = x.split(",")[0];
// console.log("base"+baseCurrency);
// console.log("quote"+quoteCurrency);
// // console.log("base"+baseCurrency);
// // console.log("quote"+quoteCurrency);
let text;
if (x.toUpperCase() != x) {
document.getElementById('demo3').style.display = "block";
text = "Base and quote must be uppercase";
document.getElementById("inputText5").value = '';
// createLi = false;
}
else if (x === '') {
document.getElementById('demo3').style.display = "block";
text = "No blanks"
}
// let text;
// if (x.toUpperCase() != x) {
// document.getElementById('demo3').style.display = "block";
// text = "Base and quote must be uppercase";
// document.getElementById("inputText5").value = '';
// // createLi = false;
// }
// else if (x === '') {
// document.getElementById('demo3').style.display = "block";
// text = "No blanks"
// }
else if (x.includes(' ')) {
text = "No spaces";
document.getElementById('demo3').style.display = "block";
document.getElementById("inputText5").value = '';
}
// else if (x.includes(' ')) {
// text = "No spaces";
// document.getElementById('demo3').style.display = "block";
// document.getElementById("inputText5").value = '';
// }
else if (/\d/.test(x)) {
document.getElementById('demo3').style.display = "block";
text = "No numbers allowed";
document.getElementById("inputText5").value = '';
}
// CAREFUL TO DELETE THE BACKEND LIST ITEMS, JUST DELETING THE VALUE LIKE THIS ISN"T 100% ACCURATE
// else if (/\d/.test(x)) {
// document.getElementById('demo3').style.display = "block";
// text = "No numbers allowed";
// document.getElementById("inputText5").value = '';
// }
// // CAREFUL TO DELETE THE BACKEND LIST ITEMS, JUST DELETING THE VALUE LIKE THIS ISN"T 100% ACCURATE
else if (specialChars.test(x)) {
document.getElementById('demo3').style.display = "block";
text = "No special characters allowed";
document.getElementById("inputText5").value = '';
}
// else if (specialChars.test(x)) {
// document.getElementById('demo3').style.display = "block";
// text = "No special characters allowed";
// document.getElementById("inputText5").value = '';
// }
else if (!x.includes(',')) {
document.getElementById('demo3').style.display = "block";
document.getElementById("inputText5").value = '';
text = "Missing ',' (e.g. EUR,USD)"
}
// else if (!x.includes(',')) {
// document.getElementById('demo3').style.display = "block";
// document.getElementById("inputText5").value = '';
// text = "Missing ',' (e.g. EUR,USD)"
// }
else if (x.length > 7) {
document.getElementById('demo3').style.display = "block";
text = "No more than 7 characters";
document.getElementById("inputText5").value = '';
}
// else if (x.length > 7) {
// document.getElementById('demo3').style.display = "block";
// text = "No more than 7 characters";
// document.getElementById("inputText5").value = '';
// }
else if (!["USD","EUR","JPY","GBP","AUD","CAD","CHF","CNY","HKD","NZD","SEK","KRW","SGD","NOK","MXN","INR","RUB","ZAR","TRY","BRL",
"TWD","DKK","PLN","THB","IDR","HUF","ILS","CLP","PHP","AED","CZK","COP","SAR","MYR","RON","CLP","ARS","VND","QAR","KWD"].includes(baseCurrency)) {
document.getElementById('demo3').style.display = "block";
document.getElementById("inputText5").value = '';
text = "Invalid base currency"
// else if (!["USD","EUR","JPY","GBP","AUD","CAD","CHF","CNY","HKD","NZD","SEK","KRW","SGD","NOK","MXN","INR","RUB","ZAR","TRY","BRL",
// "TWD","DKK","PLN","THB","IDR","HUF","ILS","CLP","PHP","AED","CZK","COP","SAR","MYR","RON","CLP","ARS","VND","QAR","KWD"].includes(baseCurrency)) {
// document.getElementById('demo3').style.display = "block";
// document.getElementById("inputText5").value = '';
// text = "Invalid base currency"
}
// }
else if (!["AED","AFN","ALL","AMD","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BMD","BND","BOB","BRL","BSD", "BTN", "BWP", "BYN",
"BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR",
"FJD", "FKP", "FOK", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP",
"INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY","KES","KGS","KHR","KID","KMF","KRW","KWD", "KYD","KZT","LAK","LBP","LKR","LRD","LSL", "LYD",
"MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN",
"PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STN","SYP","SZL",
"THB","TJS","TMT","TND","TOP","TRY","TTD","TVD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VES","VND","VUV","WST","YER","ZAR"].includes(quoteCurrency)) {
document.getElementById('demo3').style.display = "block";
document.getElementById("inputText5").value = '';
text = "Invalid quote currency"
// else if (!["AED","AFN","ALL","AMD","AOA","ARS","AUD","AWG","AZN","BAM","BBD","BDT","BGN","BHD","BMD","BND","BOB","BRL","BSD", "BTN", "BWP", "BYN",
// "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR",
// "FJD", "FKP", "FOK", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP",
// "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY","KES","KGS","KHR","KID","KMF","KRW","KWD", "KYD","KZT","LAK","LBP","LKR","LRD","LSL", "LYD",
// "MAD","MDL","MGA","MKD","MMK","MNT","MOP","MRU","MUR","MVR","MWK","MXN","MYR","MZN","NAD","NGN","NIO","NOK","NPR","NZD","OMR","PAB","PEN",
// "PGK","PHP","PKR","PLN","PYG","QAR","RON","RSD","RUB","RWF","SAR","SBD","SCR","SDG","SEK","SGD","SHP","SLL","SOS","SRD","SSP","STN","SYP","SZL",
// "THB","TJS","TMT","TND","TOP","TRY","TTD","TVD","TWD","TZS","UAH","UGX","USD","UYU","UZS","VES","VND","VUV","WST","YER","ZAR"].includes(quoteCurrency)) {
// document.getElementById('demo3').style.display = "block";
// document.getElementById("inputText5").value = '';
// text = "Invalid quote currency"
}
// }
else {
text = "Input OK";
document.getElementById('demo3').style.display = "none";
createLi = true;
// CALL ADDING ITEMS FUNCTION SO THAT ONLY VALIDATED ITEMS CAN GET ADDED TO LIST
// addingItems();
setTimeout(
function() {
document.getElementById('inputText5').value="";
}, 100);
}
document.getElementById("demo3").innerHTML = text;
}
// else {
// text = "Input OK";
// document.getElementById('demo3').style.display = "none";
// createLi = true;
// // CALL ADDING ITEMS FUNCTION SO THAT ONLY VALIDATED ITEMS CAN GET ADDED TO LIST
// // addingItems();
// setTimeout(
// function() {
// document.getElementById('inputText5').value="";
// }, 100);
// }
// document.getElementById("demo3").innerHTML = text;
// }
// Custom messages validation
@ -2461,115 +2512,116 @@ function dailyWeatherValidate() {
// Commodities validation
function commoditiesValidate() {
createLi = true;
}
// var specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|<>\/?~]/;
var specialChars = /[`!@#$%^&*()_+\-=\[\]{};':"\\|<>\/?~]/;
// let x = document.getElementById("inputText20").value;
let x = document.getElementById("inputText20").value;
// let text;
// if (x.toUpperCase() != x) {
// document.getElementById('demo8').style.display = "block";
// text = "Commodity symbol must be uppercase";
// document.getElementById("inputText20").value = '';
// // createLi = false;
// }
// else if (x === '') {
// document.getElementById('demo8').style.display = "block";
// text = "No blanks"
// // createLi = false;
// }
let text;
if (x.toUpperCase() != x) {
document.getElementById('demo8').style.display = "block";
text = "Commodity symbol must be uppercase";
document.getElementById("inputText20").value = '';
// createLi = false;
}
else if (x === '') {
document.getElementById('demo8').style.display = "block";
text = "No blanks"
// createLi = false;
}
// else if (x.includes(' ')) {
// text = "No spaces";
// document.getElementById('demo8').style.display = "block";
// document.getElementById("inputText20").value = '';
// // createLi = false;
// }
else if (x.includes(' ')) {
text = "No spaces";
document.getElementById('demo8').style.display = "block";
document.getElementById("inputText20").value = '';
// createLi = false;
}
// else if (specialChars.test(x)) {
// document.getElementById('demo8').style.display = "block";
// text = "No special characters allowed";
// document.getElementById("inputText20").value = '';
// // createLi = false;
// }
else if (specialChars.test(x)) {
document.getElementById('demo8').style.display = "block";
text = "No special characters allowed";
document.getElementById("inputText20").value = '';
// createLi = false;
}
// else if (!["ALU","BRENTOIL","LCO","COFFEE","XCU","CORN","COTTON","XAU","IRD","NI","XPD","XPT","XRH","RICE","RUTH","XAG","SOYBEAN",
// "XDR","SUGAR","TIN","WHEAT","WTIOIL","ZNC","ETHANOL","CPO","NG","COCOA","ROBUSTA","LUMBER","RUBBER","HOG","CATTLE"].includes(x)) {
// document.getElementById('demo8').style.display = "block";
// document.getElementById("inputText20").value = '';
// text = "Invalid commodity symbol"
else if (!["ALU","BRENTOIL","LCO","COFFEE","XCU","CORN","COTTON","XAU","IRD","NI","XPD","XPT","XRH","RICE","RUTH","XAG","SOYBEAN",
"XDR","SUGAR","TIN","WHEAT","WTIOIL","ZNC","ETHANOL","CPO","NG","COCOA","ROBUSTA","LUMBER","RUBBER","HOG","CATTLE"].includes(x)) {
document.getElementById('demo8').style.display = "block";
document.getElementById("inputText20").value = '';
text = "Invalid commodity symbol"
// }
}
else {
text = "Input OK";
document.getElementById('demo8').style.display = "none";
createLi = true;
// CALL ADDING ITEMS FUNCTION SO THAT ONLY VALIDATED ITEMS CAN GET ADDED TO LIST
setTimeout(
function() {
document.getElementById('inputText20').value="";
}, 100);
}
document.getElementById("demo8").innerHTML = text;
}
// else {
// text = "Input OK";
// document.getElementById('demo8').style.display = "none";
// createLi = true;
// // CALL ADDING ITEMS FUNCTION SO THAT ONLY VALIDATED ITEMS CAN GET ADDED TO LIST
// setTimeout(
// function() {
// document.getElementById('inputText20').value="";
// }, 100);
// }
// document.getElementById("demo8").innerHTML = text;
// }
// Indices validation
function indicesValidate() {
createLi = true
};
// var specialChars = /[`!@#$%&*()_+\-=\[\]{};':"\\|<>\/?~]/;
var specialChars = /[`!@#$%&*()_+\-=\[\]{};':"\\|<>\/?~]/;
// let x = document.getElementById("inputText21").value;
let x = document.getElementById("inputText21").value;
// let text;
// if (x.toUpperCase() != x) {
// document.getElementById('demo9').style.display = "block";
// text = "Index symbol must be uppercase";
// document.getElementById("inputText21").value = '';
// // createLi = false;
// }
// else if (x === '') {
// document.getElementById('demo9').style.display = "block";
// text = "No blanks"
// // createLi = false;
// }
let text;
if (x.toUpperCase() != x) {
document.getElementById('demo9').style.display = "block";
text = "Index symbol must be uppercase";
document.getElementById("inputText21").value = '';
// createLi = false;
}
else if (x === '') {
document.getElementById('demo9').style.display = "block";
text = "No blanks"
// createLi = false;
}
// else if (x.includes(' ')) {
// text = "No spaces";
// document.getElementById('demo9').style.display = "block";
// document.getElementById("inputText21").value = '';
// // createLi = false;
// }
else if (x.includes(' ')) {
text = "No spaces";
document.getElementById('demo9').style.display = "block";
document.getElementById("inputText21").value = '';
// createLi = false;
}
// else if (specialChars.test(x)) {
// document.getElementById('demo9').style.display = "block";
// text = "No special characters allowed";
// document.getElementById("inputText21").value = '';
// // createLi = false;
// }
else if (specialChars.test(x)) {
document.getElementById('demo9').style.display = "block";
text = "No special characters allowed";
document.getElementById("inputText21").value = '';
// createLi = false;
}
// else if (!["^DJI","^GSPC","^NDX","^RUT","^VIX","^GSPTSE","^MXX","^BVSP","^GDAXI","^FTSE","^IBEX","^FCHI","^SSMI","^BFX","^ATX","^AEX","^OMX","^IXIC","FTSEMIB.MI",
// "^OMXH25","PSI20.LS","^STOXX","^STOXX50E","^N100","^KS11","^NZ50","^AXJO","^STI","000001.SS","399001.SZ","^N225","^NSEI","^BSESN","^HSI","^TWII","^JKSE","PSEI.PS","^SET.BK","XU100.IS"].includes(x)) {
// document.getElementById('demo9').style.display = "block";
// document.getElementById("inputText21").value = '';
// text = "Invalid index symbol"
else if (!["^DJI","^GSPC","^NDX","^RUT","^VIX","^GSPTSE","^MXX","^BVSP","^GDAXI","^FTSE","^IBEX","^FCHI","^SSMI","^BFX","^ATX","^AEX","^OMX","^IXIC","FTSEMIB.MI",
"^OMXH25","PSI20.LS","^STOXX","^STOXX50E","^N100","^KS11","^NZ50","^AXJO","^STI","000001.SS","399001.SZ","^N225","^NSEI","^BSESN","^HSI","^TWII","^JKSE","PSEI.PS","^SET.BK","XU100.IS"].includes(x)) {
document.getElementById('demo9').style.display = "block";
document.getElementById("inputText21").value = '';
text = "Invalid index symbol"
// }
}
else {
text = "Input OK";
document.getElementById('demo9').style.display = "none";
createLi = true;
// CALL ADDING ITEMS FUNCTION SO THAT ONLY VALIDATED ITEMS CAN GET ADDED TO LIST
setTimeout(
function() {
document.getElementById('inputText21').value="";
}, 100);
}
document.getElementById("demo9").innerHTML = text;
}
// else {
// text = "Input OK";
// document.getElementById('demo9').style.display = "none";
// createLi = true;
// // CALL ADDING ITEMS FUNCTION SO THAT ONLY VALIDATED ITEMS CAN GET ADDED TO LIST
// setTimeout(
// function() {
// document.getElementById('inputText21').value="";
// }, 100);
// }
// document.getElementById("demo9").innerHTML = text;
// }
// portoflio stuff

View File

@ -71,7 +71,7 @@ class StockTicker():
'Sports (Team Stats)':lambda : self.getLeagueTableImage('premier_league'), 'Sports (Past Games)': lambda:self.getLeagueImage('NBA', 'past'),
'Sports (Upcoming Games)': lambda : self.getLeagueImage('NHL', 'future'), 'Sports (Live Games)': lambda: self.getLeagueImage('NBA', 'live'),
'News':self.getNewsImage, 'Custom Messages': self.getUserMessages, 'Commodities': self.getCommoditiesImage, 'Indices': self.getIndicesImage, 'Movies': self.getMoviesImage,
'IPO Calendar':self.getIpoImage, 'IPO Calendar Prof':self.getIpoProfessional,
'Economic Calendar': self.getEconomicImage, 'IPO Calendar':self.getIpoImage, 'IPO Calendar Prof':self.getIpoProfessional, 'Economic Calendar Prof': self.getEconomicProfessional,
'Stocks Prof': self.getStockProfessional, 'Crypto Prof': self.getCryptoProfessional, 'Forex Prof': self.getForexProfessional,
'Current Weather Prof': self.getTodayWeatherProfessional, 'News Prof':self.getNewsProfessional, 'Commodities Prof':self.getCommoditiesProfessional, 'Indices Prof': self.getIndicesProfessional,
@ -80,12 +80,12 @@ class StockTicker():
self.JSONs = {'Stocks': 'csv/stocks_settings.json', 'Crypto': 'csv/crypto_settings.json', 'Forex': 'csv/forex_settings.json',
'Daily Forecast':'csv/daily_weather.json', 'Current Weather': 'csv/current_weather.json', 'Commodities':'csv/commodities_settings.json', 'Indices': 'csv/indices_settings.json',
'Sports (Team Stats)': 'csv/league_tables.json', 'Sports (Past Games)': 'csv/past_games.json', 'IPO Calendar': 'csv/ipo_settings.json',
'Sports (Team Stats)': 'csv/league_tables.json', 'Sports (Past Games)': 'csv/past_games.json', 'IPO Calendar': 'csv/ipo_settings.json', 'Economic Calendar': 'csv/economic_settings.json',
'Sports (Upcoming Games)': 'csv/upcoming_games.json', 'Sports (Live Games)': 'csv/live_games.json', 'Movies': 'csv/movie_settings.json',
'News':'csv/news_settings.json', 'Custom Images': 'csv/image_settings.json', 'Custom GIFs': 'csv/GIF_settings.json', 'Custom Messages': 'csv/message_settings.json',
'Stocks Prof': 'csv/stocks_settings.json', 'Crypto Prof': 'csv/crypto_settings.json', 'Forex Prof': 'csv/forex_settings.json',
'Current Weather Prof': 'csv/current_weather.json', 'News Prof':'csv/news_settings.json', 'Commodities Prof':'csv/commodities_settings.json', 'Indices Prof': 'csv/indices_settings.json',
'Daily Forecast Prof':'csv/daily_weather.json', 'Sports (Team Stats) Prof': 'csv/league_tables.json', 'Sports (Upcoming Games) Prof': 'csv/upcoming_games.json', 'Sports (Past Games) Prof': 'csv/past_games.json', 'Custom Messages Prof': 'csv/message_settings.json', 'Custom Images Prof': 'csv/image_settings.json', 'Movies Prof': 'csv/movie_settings.json', 'Sports (Live Games) Prof': 'csv/live_games.json', 'IPO Calendar Prof': 'csv/ipo_settings.json'}
'Daily Forecast Prof':'csv/daily_weather.json', 'Sports (Team Stats) Prof': 'csv/league_tables.json', 'Sports (Upcoming Games) Prof': 'csv/upcoming_games.json', 'Sports (Past Games) Prof': 'csv/past_games.json', 'Custom Messages Prof': 'csv/message_settings.json', 'Custom Images Prof': 'csv/image_settings.json', 'Movies Prof': 'csv/movie_settings.json', 'Sports (Live Games) Prof': 'csv/live_games.json', 'IPO Calendar Prof': 'csv/ipo_settings.json', 'Economic Calendar Prof': 'csv/economic_settings.json'}
def openImage(self, image_file):
@ -5812,6 +5812,268 @@ class StockTicker():
return self.stitchImage(image_list)
def getEconomicImage(self):
f = open('csv/economic_settings.json', 'r')
econ_settings = json.load(f)
f.close()
if econ_settings['title']:
title_img = self.openImage('feature_titles/economy.png')
image_list = [title_img]
else:
image_list = []
font = ImageFont.load("./fonts/7x14B.pil")
font2 = ImageFont.load("./fonts/6x12.pil")
small_font = ImageFont.load("./fonts/6x10.pil")
if len(econ_settings['events']) != 0:
try:
for event in econ_settings['events']:
if event['importance'] == -1:
imp_img = Image.open('logos/low_imp.png')
elif event['importance'] == 0:
imp_img = Image.open('logos/med_imp.png')
elif event['importance'] == 1:
imp_img = Image.open('logos/high_imp.png')
x_offset = 15
if event['period'] != "":
clock_img = Image.open('logos/period.png')
period_img = self.textImage(event['period'].upper(), small_font, r=255, g= 255, b =255)
else:
clock_img = None
period_img = None
flag_img = Image.open('logos/economic_logos/' + event['country'] + '.png')
circle_img = Image.open('logos/indicator.png')
title_img = self.textImage((event['title'].upper()).replace("(", '').replace(")", '').replace("/", " "), font, r = 255, g = 255, b = 255)
country_img = self.textImage(event['country'].upper(), font2, r= 255, g = 255, b = 0)
date_img = self.textImage(event['time'], small_font, r=0, g=150, b=255)
indicator_img = self.textImage(event['indicator'], font2, r=255, g=255, b=255)
after_offset = 0
if event['forecast'] != None or event['previous'] != None or event['actual'] != None:
tiny_font = ImageFont.load("./fonts/5x7.pil")
try:
if event['forecast'] != None:
fore_img = self.textImage('Forecast', tiny_font, r=255,g=255,b=255)
fore2_img = self.textImage(str(event['forecast']), tiny_font, r=0, g=255, b=0)
after_offset += max(fore_img.size[0], fore2_img.size[0]) + 3
if event['previous'] != None:
prev_img = self.textImage('Prior', tiny_font, r=255,g=255,b=255)
prev2_img = self.textImage(str(event['previous']), tiny_font, r=0, g=255, b=0)
after_offset += max(prev_img.size[0], prev2_img.size[0]) + 3
actual_img = self.textImage('Actual', tiny_font, r=255,g=255,b=255)
if event['actual'] == None:
actual2_img = self.textImage('Soon', tiny_font, r=255, g=40, b=40)
else:
actual2_img = self.textImage(str(event['actual']), tiny_font, r=0, g=255, b=0)
after_offset += max(actual_img.size[0], actual2_img.size[0]) + 3
except:
pass
try:
img = Image.new('RGB', (
max(flag_img.size[0] + x_offset + 5 + 3 + title_img.size[0] + country_img.size[0],
max(flag_img.size[0] + x_offset + 5 + 1 + circle_img.size[0] + 2 + indicator_img.size[0] + 2 + imp_img.size[0],
flag_img.size[0] + x_offset + 5 + 1 + date_img.size[0] + 3 + 2 + clock_img.size[0] + period_img.size[0]) + 10 + after_offset
)
,32))
except:
img = Image.new('RGB', (
max(flag_img.size[0] + x_offset + 5 + 3 + title_img.size[0] + country_img.size[0],
max(flag_img.size[0] + x_offset + 5 + 1 + circle_img.size[0] + 2 + indicator_img.size[0] + 2 + imp_img.size[0],
flag_img.size[0] + x_offset + 5 + 1 + date_img.size[0]) + 10 + after_offset
)
,32))
img.paste(flag_img,(x_offset, 0))
x_offset += flag_img.size[0] + 5
x_offset2 = x_offset + 1
img.paste(circle_img, (x_offset2, 15))
img.paste(indicator_img, (x_offset2 + circle_img.size[0] + 2, 11))
img.paste(imp_img, (x_offset2 + circle_img.size[0] + 2 + indicator_img.size[0] + 2, 15))
img.paste(title_img, (x_offset , 0))
x_offset += title_img.size[0] + 3
img.paste(country_img, (x_offset, 2))
x_offset += country_img.size[0]
img.paste(date_img, (x_offset2, 23))
try:
img.paste(clock_img, (x_offset2 + 3 + date_img.size[0], 24))
img.paste(period_img, (x_offset2 + 3 + date_img.size[0] + 2 + clock_img.size[0], 23))
x_offset2 += max(circle_img.size[0] + 2 + indicator_img.size[0] + 2 + imp_img.size[0],
date_img.size[0] + clock_img.size[0] + 3 + 2 + period_img.size[0]) + 10
except:
x_offset2 += max(circle_img.size[0] + 2 + indicator_img.size[0] + 2 + imp_img.size[0], date_img.size[0]) + 10
try:
if event['forecast'] != None:
img.paste(fore_img, (x_offset2, 14))
img.paste(fore2_img, (x_offset2, 22))
x_offset2 += max(fore_img.size[0], fore2_img.size[0]) + 3
except:
pass
try:
if event['previous'] != None:
img.paste(prev_img, (x_offset2, 14))
img.paste(prev2_img, (x_offset2, 22))
x_offset2 += max(prev_img.size[0], prev2_img.size[0]) + 3
img.paste(actual_img, (x_offset2, 14))
img.paste(actual2_img, (x_offset2, 22))
x_offset2 += max(actual_img.size[0], actual2_img.size[0]) + 3
except:
pass
image_list.append(img)
except:
pass
elif len(econ_settings['events']) == 0:
time.sleep(0.1)
no_econ = self.textImage('No upcoming economic events today.', font, r = 255, g = 255, b = 255)
img = Image.new('RGB', (no_econ.size[0] + 15, 32))
img.paste(no_econ, (10, 10))
image_list.append(img)
return self.stitchImage(image_list)
def getEconomicProfessional(self):
f = open('csv/economic_settings.json', 'r')
econ_settings = json.load(f)
f.close()
if econ_settings['title']:
title_img = self.openImage('feature_titles/small_feature_titles/economy.png')
image_list = [title_img]
else:
image_list = []
font = ImageFont.load("./fonts/5x8.pil")
small_font = ImageFont.load("./fonts/4x6.pil")
if len(econ_settings['events']) != 0:
try:
for event in econ_settings['events']:
x_offset = 5
if event['importance'] == -1:
imp_img = Image.open('logos/low_imp.png')
elif event['importance'] == 0:
imp_img = Image.open('logos/med_imp.png')
elif event['importance'] == 1:
imp_img = Image.open('logos/high_imp.png')
if event['period'] != "":
clock_img = Image.open('logos/period.png')
period_img = self.textImage(event['period'].upper(), small_font, r=255, g= 85, b =0)
else:
clock_img = None
period_img = None
flag_img = Image.open('logos/economic_logos/' + event['country'] + '.png')
width, height = flag_img.size
flag_img = flag_img.resize((int(width/2), int(height/2)))
circle_img = Image.open('logos/indicator.png')
title_img = self.textImage((event['title'].upper()).replace("(", '').replace(")", '').replace("/", " "), font, r = 255, g = 255, b = 255)
country_img = self.textImage(event['country'].upper(), small_font, r= 255, g = 255, b = 0)
date_img = self.textImage(event['time'].split(' ')[2], small_font, r=0, g=150, b=255)
indicator_img = self.textImage(event['indicator'], small_font, r=255, g=255, b=255)
if event['forecast'] != None or event['previous'] != None or event['actual'] != None:
try:
if event['forecast'] != None:
fore_img = self.textImage('Forecast', small_font, r=255,g=255,b=255)
fore2_img = self.textImage(str(event['forecast']), small_font, r=0, g=255, b=0)
if event['previous'] != None:
prev_img = self.textImage('Prior', small_font, r=255,g=255,b=255)
prev2_img = self.textImage(str(event['previous']), small_font, r=0, g=255, b=0)
actual_img = self.textImage('Actual', small_font, r=255,g=255,b=255)
if event['actual'] == None:
actual2_img = self.textImage('Soon', small_font, r=255, g=40, b=40)
else:
actual2_img = self.textImage(str(event['actual']), small_font, r=0, g=255, b=0)
except:
pass
x_off1 = x_offset + flag_img.size[0] + 2 + title_img.size[0] + 2 + country_img.size[0] + imp_img.size[0] + 2
x_off2 = x_offset + flag_img.size[0] + 2 + circle_img.size[0] + 2 + indicator_img.size[0] + 2 + date_img.size[0] + 2
try:
x_off2 += clock_img.size[0] + 2 + period_img.size[0] + 2
except:
pass
x_off3 = max(x_off1, x_off2)
try:
if event['forecast'] != None:
x_off3 += max(fore_img.size[0], fore2_img.size[0]) + 2
except:
pass
try:
if event['previous'] != None:
x_off3 += max(prev_img.size[0], prev2_img.size[0]) + 2
x_off3 += max(actual_img.size[0], actual2_img.size[0]) + 2
except:
pass
img = Image.new('RGB', (x_off3 + 5,16))
img.paste(flag_img, (x_offset, 0))
x_offset += flag_img.size[0] + 2
x_offset2 = x_offset
img.paste(title_img, (x_offset, 0))
x_offset += title_img.size[0] +2
img.paste(country_img, (x_offset, 2))
x_offset += country_img.size[0]
img.paste(imp_img, (x_offset, 1))
x_offset += imp_img.size[0] + 2
img.paste(circle_img, (x_offset2, 9))
x_offset2 += circle_img.size[0] + 2
img.paste(indicator_img, (x_offset2, 9))
x_offset2 += indicator_img.size[0] + 2
img.paste(date_img, (x_offset2, 9))
x_offset2 += date_img.size[0] + 2
try:
img.paste(clock_img, (x_offset2, 8))
x_offset2 += clock_img.size[0] + 2
img.paste(period_img, (x_offset2, 9))
x_offset2 += period_img.size[0] + 2
except:
pass
x_offset3 = max(x_offset, x_offset2)
try:
if event['forecast'] != None:
img.paste(fore_img, (x_offset3, 3))
img.paste(fore2_img, (x_offset3, 9))
x_offset3 += max(fore_img.size[0], fore2_img.size[0]) + 2
except:
pass
try:
if event['previous'] != None:
img.paste(prev_img, (x_offset3, 3))
img.paste(prev2_img, (x_offset3, 9))
x_offset3 += max(prev_img.size[0], prev2_img.size[0]) + 2
img.paste(actual_img, (x_offset3, 3))
img.paste(actual2_img, (x_offset3, 9))
x_offset3 += max(actual_img.size[0], actual2_img.size[0]) + 2
except:
pass
image_list.append(img)
except:
time.sleep(0.1)
no_econ = self.textImage('No upcoming economic events today.', font, r = 255, g = 255, b = 255)
img = Image.new('RGB', (no_econ.size[0] + 15, 16))
img.paste(no_econ, (10, 1))
image_list.append(img)
elif len(econ_settings['events']) == 0:
time.sleep(0.1)
no_econ = self.textImage('No upcoming economic events today.', font, r = 255, g = 255, b = 255)
img = Image.new('RGB', (no_econ.size[0] + 15, 16))
img.paste(no_econ, (10, 1))
image_list.append(img)
return self.stitchImage(image_list)
def ip_viewer(self):
font = ImageFont.load("./fonts/6x10.pil")
@ -5887,6 +6149,8 @@ class StockTicker():
x_offset += images.size[0]
news.paste(ipo, (x_offset, 16))
x_offset += ipo.size[0]
news.paste(economic, (x_offset, 16))
x_offset += economic.size[0]
self.double_buffer = self.matrix.CreateFrameCanvas()
while True:
kill = stock_ticker.scrollImage(news, offset_x = 128)
@ -5970,6 +6234,9 @@ class StockTicker():
elif msg == 'IPO': #ipo
self.scrollFunctionsAnimated(['ipo', 'ipo'],animation = 'traditional')
elif msg == 'EC': #economic calendar
self.scrollFunctionsAnimated(['economic', 'economic'],animation = 'traditional')
elif msg == 'A': #everything
#userSettings = ['display_gif', 'text', 'display_image', 'stocks', 'crypto', 'forex', 'today_weather', 'daily_weather', 'league_table', 'league_games', 'news'] # these wil be read from csv, just for demo

View File

@ -39,7 +39,7 @@
<!-- CSS Stylesheet linking -->
<!-- <link href="{{ url_for('static', filename='style.css') }}" type="text/css" rel="stylesheet" /> ALWAYS CHANGE VERSIONING WHENEVER CHANGES ARE MADE TO AVOID BAD CACHING -->
<link rel="stylesheet" type="text/css" href="../static/style.css?ver=1.3.5"/>
<link rel="stylesheet" type="text/css" href="../static/style.css?ver=1.3.6"/>
</head>
@ -99,7 +99,7 @@
</div>
</div>
<p class="text-white" id="version-text">Version 1.3.5</p>
<p class="text-white" id="version-text">Version 1.3.6</p>
<p class="text-white" id="version-text"><a href="https://docs.google.com/document/d/1TzvukZv_0Pd3TUM6Xe2wEkymn9uIT2qXUBFnMCQwp5g/edit?usp=sharing" target="_blank" id="footerlinks">Changelog</a></p>
</nav>
@ -1204,49 +1204,29 @@
class="display-features-list text-white">
{%if professional%}
{% for f in not_displaying2 %}
<li>{{f}}</li>
{% endfor%}
{%else%}
<li>Stocks</li>
<li>Crypto</li>
<li>Forex</li>
<li>Commodities</li>
<li>Indices</li>
<li>Current Weather</li>
<li>Daily Forecast</li>
<li>News</li>
<li>Custom Images</li>
<li>Custom Messages</li>
<li>Custom Gifs</li>
<li>Sports (Upcoming Games)</li>
<li>Sports (Live Games)</li>
<li>Sports (Past Games)</li>
<li>Sports (Team Stats)</li>
<li>Movies</li>
<li>IPO Calendar</li>
<li>Economic Calendar</li>
{%endif%}
@ -1329,59 +1309,36 @@
<!-- What to Display in Each Feature -->
<div class="row" style="padding:2%">
<h3 class="pt-3">What to Display in Each Feature</h3>
</div>
<div class="row justify-content-center">
<div class="col-auto">
<label for="dropZ" class="col-form-label">Feature:</label>
</div>
<div class="col-auto">
<select id="drop" class="form-select">
<option value="1">Stocks</option>
<option value="2">Crypto</option>
<option value="3">Forex</option>
<option value="14">Commodities</option>
<option value="15">Indices</option>
<option value="4">Current Weather</option>
<option value="5">Daily Forecast</option>
<option value="6">News</option>
<option value="7">Sports (Upcoming Games)</option>
<option value="8">Sports (Past Games)</option>
<option value="9">Sports (Live Games)</option>
<option value="10">Sports (Team Stats)</option>
<option value="11">Custom Images</option>
<option value="12">Custom GIFs</option>
<option value="13">Custom Messages</option>
<option value="16">Movies</option>
<option value="17">IPO Calendar</option>
<option value="18">Economic Calendar</option>
</select>
</div>
</div><!-- End Row Dropdown Display Feature -->
@ -1799,19 +1756,11 @@
<div class="features-div-two">
<ul
id="stocks-features"
class="display-features-list text-white symbol-list"
>
class="display-features-list text-white symbol-list">
{% for f in stocks_settings.symbols %}
<li>{{f}}</li>
{% endfor%}
</ul>
</div>
@ -2536,30 +2485,24 @@
</div>
<div class="col-auto">
<input
<!-- <input
type="text"
id="inputText20"
class="form-control"
aria-describedby="TextHelpInline"
placeholder="e.g. BRENTOIL"
/>
placeholder="e.g. BRENTOIL"/> -->
<select id="commodities-items" class="form-select animation-select">
<option>Aluminum</option><option>Brent Crude Oil</option><option>Coffee</option><option>Copper</option><option>Corn</option>
<option>Cotton</option><option>Gold</option><option>Palladium</option><option>Platinum</option><option>Rice</option>
<option>Silver</option><option>Soybean</option><option>Sugar</option><option>Wheat</option><option>WTI Crude Oil</option>
<option>Ethanol</option><option>Natural Gas</option><option>Cocoa</option><option>Lumber</option><option>Live Cattle</option>
<option>Lean Hog</option>
</select>
</div>
<div class="col-auto">
<button id="inputTextBtn20" class="btn set-btn" onclick="commoditiesValidate()">Add</button>
</div>
<p id="demo8" style="display: none"></p>
</div>
@ -2966,30 +2909,36 @@
</div>
<div class="col-auto">
<!--
<input
type="text"
id="inputText21"
class="form-control"
aria-describedby="TextHelpInline"
placeholder="e.g. ^DJI"
/>
/> -->
<select id="indices-items" class="form-select animation-select">
<option>Dow Jones - USA</option><option>S&P 500 - USA</option><option>Nasdaq 100 - USA</option>
<option>Nasdaq Composite - USA</option><option>Russell 2000 - USA</option><option>VIX - USA</option>
<option>U.S. Dollar (DXY) - USA</option>
<option>S&P/TSX - Canada</option><option>IPC - Mexico</option><option>Bovespa - Brazil</option>
<option>Dax - Germany</option><option>FTSE 100 - UK</option><option>IBEX 35 - Spain</option>
<option>CAC 40 - France</option><option>SSMI - Switzerland</option><option>BEL 20 - Brussels</option>
<option>ATX - Austria</option><option>AEX - Amsterdam</option><option>OMXS30 - Stockholm</option>
<option>OMXH25 - Helsinki</option><option>FTSE MIB - Italy</option><option>PSI 20 - Lisbon</option>
<option>STOXX 600 - EU</option><option>STOXX 50 - EU</option><option>Euronext 100 - EU</option>
<option>KOSPI - South Korea</option><option>NZX 50 - New Zealand</option><option>ASX 200 - Australia</option>
<option>STI - Singapore</option><option>SSE - Shanghai</option><option>SZSE - Shenzhen</option>
<option>Nikkei 225 - Japan</option><option>NIFTY 50 - India</option><option>SENSEX - India</option>
<option>HSI - Hong Kong</option><option>TAIEX - Taiwan</option><option>JKSE - Jakarta</option>
<option>PSEI - Philippines</option><option>SET - Bangkok</option><option>BIST 100 - Istanbul</option>
</select>
</div>
<div class="col-auto">
<button id="inputTextBtn21" class="btn set-btn" onclick="indicesValidate()">Add</button>
</div>
<p id="demo9" style="display: none"></p>
</div>
@ -3271,155 +3220,130 @@
<!-- Forex -->
<div class="page" id="Page3" style="display: none">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="row g-3 align-items-center mt-3">
<div class="col-auto">
<label for="inputScrollSpeed3Z" class="col-form-label"
>Scroll Speed:
</label>
</div>
<div class="col-auto">
<select
id="inputScrollSpeed3"
class="form-select speed-select"
>
class="form-select speed-select">
<option {%if forex_settings.speed == 'medium' %} selected {% endif %}>Medium</option>
<option {%if forex_settings.speed == 'slow' %} selected {% endif %}>Slow</option>
<option {%if forex_settings.speed == 'fast' %} selected {% endif %}>Fast</option>
</select>
</div>
</div>
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputScrollSpeedRowZ3" class="col-form-label"
>Scroll Speed (Row 2):
</label>
</div>
<div class="col-auto">
<select
id="inputScrollSpeedRow3"
class="form-select speed-select"
>
class="form-select speed-select">
<option {%if forex_settings.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option {%if forex_settings.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option {%if forex_settings.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
</div>
</div>
<div class="row g-3 align-items-center mt-3">
<div class="col-auto">
<label for="inputTransition" class="col-form-label"
>Intro Transition:
</label>
</div>
<div class="col-auto">
<select
id="inputTransition3"
class="form-select animation-select"
>
class="form-select animation-select">
<option {%if forex_settings.animation == 'down' %} selected {% endif %}>Down</option>
<option {%if forex_settings.animation == 'up' %} selected {% endif %}>Up</option>
<option {%if forex_settings.animation == 'continuous' %} selected {% endif %}>Continuous</option>
</select>
</div>
</div>
<div class="row g-3 align-items-center mt-3">
<div class="col-auto">
<!-- <div class="col-auto">
<label for="inputText" class="col-form-label"
>Base,Quote:
</label>
</div>
</div> -->
<div class="col-auto">
<input
<!-- <input
type="text"
id="inputText5"
class="form-control"
aria-describedby="TextHelpInline"
placeholder="e.g. JPY,EUR"
/>
placeholder="e.g. JPY,EUR"/> -->
<label for="inputText" class="col-form-label"
>Base:
</label>
<select id="base-select" class="form-select animation-select">
<option>USD</option><option>EUR</option><option>JPY</option><option>GBP</option><option>AUD</option><option>CAD</option>
<option>CHF</option><option>CNY</option><option>HKD</option><option>NZD</option><option>SEK</option><option>KRW</option>
<option>SGD</option><option>NOK</option><option>MXN</option><option>INR</option><option>RUB</option><option>ZAR</option>
<option>TRY</option><option>BRL</option><option>TWD</option><option>DKK</option><option>PLN</option><option>THB</option>
<option>IDR</option><option>HUF</option><option>ILS</option><option>CLP</option><option>PHP</option><option>AED</option>
<option>CZK</option><option>COP</option><option>SAR</option><option>MYR</option><option>RON</option><option>CLP</option>
<option>ARS</option><option>VND</option><option>QAR</option><option>KWD</option>
</select>
</div>
<div class="col-auto">
<label for="inputText" class="col-form-label"
>Quote:
</label>
<select id="quote-select" class="form-select animation-select">
<option>AED</option><option>AFN</option><option>ALL</option><option>AMD</option><option>AOA</option><option>ARS</option>
<option>AUD</option><option>AWG</option><option>AZN</option><option>BAM</option><option>BBD</option><option>BDT</option>
<option>BGN</option><option>BHD</option><option>BMD</option><option>BND</option><option>BOB</option><option>BRL</option>
<option>BSD</option><option>BTN</option><option>BWP</option><option>BYN</option><option>BZD</option><option>CAD</option>
<option>CDF</option><option>CHF</option><option>CLP</option><option>CNY</option><option>COP</option><option>CRC</option>
<option>CUC</option><option>CUP</option><option>CVE</option><option>CZK</option><option>DJF</option><option>DKK</option>
<option>DOP</option><option>DZD</option><option>EGP</option><option>ERN</option><option>ETB</option><option>EUR</option>
<option>FJD</option><option>FKP</option><option>FOK</option><option>GBP</option><option>GEL</option><option>GGP</option>
<option>GHS</option><option>GIP</option><option>GMD</option><option>GNF</option><option>GTQ</option><option>GYD</option>
<option>HKD</option><option>HNL</option><option>HRK</option><option>HTG</option><option>HUF</option><option>IDR</option>
<option>ILS</option><option>IMP</option><option>INR</option><option>IQD</option><option>IRR</option><option>ISK</option>
<option>JMD</option><option>JOD</option><option>JPY</option><option>KES</option><option>KGS</option><option>KHR</option>
<option>KID</option><option>KMF</option><option>KRW</option><option>KWD</option><option>KYD</option><option>KZT</option>
<option>LAK</option><option>LBP</option><option>LKR</option><option>LRD</option><option>LSL</option><option>LYD</option>
<option>MAD</option><option>MDL</option><option>MGA</option><option>MKD</option><option>MMK</option><option>MNT</option>
<option>MOP</option><option>MRU</option><option>MUR</option><option>MVR</option><option>MWK</option><option>MXN</option>
<option>MYR</option><option>MZN</option><option>NAD</option><option>NGN</option><option>NIO</option><option>NOK</option>
<option>NPR</option><option>NZD</option><option>OMR</option><option>PAB</option><option>PEN</option><option>PGK</option>
<option>PHP</option><option>PKR</option><option>PLN</option><option>PYG</option><option>QAR</option><option>RON</option>
<option>RSD</option><option>RUB</option><option>RWF</option><option>SAR</option><option>SBD</option><option>SCR</option>
<option>SDG</option><option>SEK</option><option>SGD</option><option>SHP</option><option>SLL</option><option>SOS</option>
<option>SRD</option><option>SSP</option><option>STN</option><option>SYP</option><option>SZL</option><option>THB</option>
<option>TJS</option><option>TMT</option><option>TND</option><option>TOP</option><option>TRY</option><option>TTD</option>
<option>TVD</option><option>TWD</option><option>TZS</option><option>UAH</option><option>UGX</option><option>USD</option>
<option>UYU</option><option>UZS</option><option>VES</option><option>VND</option><option>VUV</option><option>WST</option>
<option>YER</option><option>ZAR</option>
</select>
</div>
<div class="col-auto" style="padding-top: 7%;">
<button id="inputTextBtn5" class="btn set-btn" onclick="forexValidate()">Add</button>
</div>
<p id="demo3" style="display: none"></p>
@ -3427,13 +3351,10 @@
</div>
<div id="limit-msg">
</div>
<div class="row g-3 align-items-center mt-3">
<div class="col-auto">
@ -6686,6 +6607,201 @@
</div>
<!-- Economic Calendar -->
<div class="page" id="Page18" style="display: none">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="row g-3 align-items-center mt-3">
<div class="col-auto">
<label for="inputScrollSpeedZ222" class="col-form-label">Scroll Speed:</label>
</div>
<div class="col-auto">
<select
id="inputScrollSpeed18"
class="form-select speed-select">
<option {%if economic_settings.speed == 'medium' %} selected {% endif %}>Medium</option>
<option {%if economic_settings.speed == 'slow' %} selected {% endif %}>Slow</option>
<option {%if economic_settings.speed == 'fast' %} selected {% endif %}>Fast</option>
</select>
</div>
</div>
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputScrollSpeedRowZ222" class="col-form-label">Scroll Speed (Row 2):</label>
</div>
<div class="col-auto">
<select
id="inputScrollSpeedRow18"
class="form-select speed-select">
<option {%if economic_settings.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option {%if economic_settings.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option {%if economic_settings.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
</div>
</div>
<div class="row g-3 align-items-center mt-3">
<div class="col-auto">
<label for="inputTransitionZ222" class="col-form-label">Intro Transition:
</label>
</div>
<div class="col-auto">
<select id="inputTransition18" class="form-select animation-select">
<option {%if economic_settings.animation == 'down' %} selected {% endif %}>Down</option>
<option {%if economic_settings.animation == 'up' %} selected {% endif %}>Up</option>
<option {%if economic_settings.animation == 'continuous' %} selected {% endif %}>Continuous</option>
</select>
</div>
</div>
<div class="row g-3 align-items-center left-div" style="padding-top: 25px;">
<div class="col-auto">
<label for="inputTransitionZ222" class="col-form-label">
Display Feature Title
</label>
</div>
<div class="col-auto">
<input
class="form-check-input title-select"
type="checkbox"
value=""
id="economic_settings_title"
{% if economic_settings.title%}
checked
{%endif%}
/>
</div>
</div>
<div class="row g-3 align-items-center mt-3">
<div class="col-auto">
<label for="inputText" class="col-form-label">Countries: </label>
</div>
<div class="col-auto">
<select id="inputTransition2222" class="form-select economic-countries-select">
<option>United States</option><option>Canada</option><option>United Kingdom</option><option>China</option>
<option>Germany</option><option>France</option><option>Italy</option><option>Singapore</option><option>South Korea</option>
<option>Japan</option><option>Australia</option><option>New Zealand</option><option>India</option><option>Switzerland</option>
<option>Spain</option><option>Hong Kong</option><option>Portugal</option><option>Netherlands</option><option>Belgium</option>
<option>Austria</option><option>Denmark</option><option>Turkey</option><option>Brazil</option><option>Mexico</option>
<option>Sweden</option><option>Finland</option><option>Norway</option><option>Taiwan</option><option>Indonesia</option>
<option>Philippines</option><option>Thailand</option><option>South Africa</option>
</select>
</div>
<div class="col-auto">
<button id="economic-countries-btn" class="btn set-btn">Add</button>
</div>
</div>
<div class="row g-3 align-items-center mt-3">
<div class="col-auto">
<label for="inputText" class="col-form-label">Importance: </label>
</div>
<div class="col-auto">
<select id="inputTransition2225" class="form-select economic-importance-select">
<option {%if economic_settings.importance == 'Low - High' %} selected {% endif %}>Low - High</option>
<option {%if economic_settings.importance == 'Med - High' %} selected {% endif %}>Med - High</option>
<option {%if economic_settings.importance == 'High' %} selected {% endif %}>High</option>
</select>
</div>
</div>
<div class="row g-3 align-items-center mt-3">
<div class="col-auto">
<label for="inputText" class="col-form-label">Timezone: </label>
</div>
<div class="col-auto">
<select id="inputTransition22259" class="form-select economic-tz-select">
<option {%if economic_settings.timezone == 'US/Eastern' %} selected {% endif %}>US/Eastern</option>
<option {%if economic_settings.timezone == 'US/Central' %} selected {% endif %}>US/Central</option>
<option {%if economic_settings.timezone == 'US/Pacific' %} selected {% endif %}>US/Pacific</option>
<option {%if economic_settings.timezone == 'GMT' %} selected {% endif %}>GMT</option>
<option {%if economic_settings.timezone == 'CET' %} selected {% endif %}>CET</option>
<option {%if economic_settings.timezone == 'GB' %} selected {% endif %}>GB</option>
<option {%if economic_settings.timezone == 'NZ' %} selected {% endif %}>NZ</option>
<option {%if economic_settings.timezone == 'Australia/ACT' %} selected {% endif %}>Australia/ACT</option>
<option {%if economic_settings.timezone == 'Japan' %} selected {% endif %}>Japan</option>
<option {%if economic_settings.timezone == 'Asia/Singapore' %} selected {% endif %}>Asia/Singapore</option>
<option {%if economic_settings.timezone == 'Asia/Dubai' %} selected {% endif %}>Asia/Dubai</option>
</select>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12">
<h6 class="mt-3">List:</h6>
<div class="features-div-two">
<ul
id="economic-list"
class="display-features-list text-white symbol-list"
>
{% for f in economic_settings.countries %}
<li>{{f}}</li>
{% endfor%}
</ul>
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-12">
<div class="icons-list">
<i
id="economic-increase-btn"
class="upbutton fa fa-chevron-up"
aria-hidden="true"
></i>
<br />
<br />
<i
id="economic-decrease-btn"
class="downbutton fa fa-chevron-down"
aria-hidden="true"
></i>
<a style="position: relative; bottom: 30px; left: 10px">Sort Order</a>
<br />
<br />
<i
id="economic-remove-btn"
class="fa fa-minus"
aria-hidden="true"
></i>
<span style="position: relative; bottom: 0; left: 10px">Remove</span>
</div>
</div>
</div>
<div class="save-btn-div">
<a href="#" class="btn save-btn">Save</a>
</div>
</div>
<!-- IPO Calendar -->
<div class="page" id="Page17" style="display: none">
@ -8453,7 +8569,7 @@
<p>&copy; 2020-2023 Fintic Limited., All Rights Reserved. <a href="mailto:info@fintic.io" id="footerlinks">Contact Us.</a></p>
<p>Data Provided by IEX Cloud, Open-Meteo, CoinGecko, Exchangerate-API, TheSportsDB, Google News, Yahoo Finance, ESPN, The Movie DB, Finnhub</p>
<p>Data Provided by TradingView, IEX Cloud, Open-Meteo, CoinGecko, Exchangerate-API, TheSportsDB, Google News, Yahoo Finance, ESPN, The Movie DB, Finnhub</p>
<p>Useful resources: <a href="https://www.youtube.com/playlist?list=PLf8pW0bNjnebNZh3y0AsY18sxJj6IhAsv" id="footerlinks" target="_blank">YouTube Tutorials</a> , <a href="https://docs.google.com/spreadsheets/d/1IZkEl49j97xvG8jcEdWc5XdOLOUb_-ZLVHle2vezWCc/edit?usp=sharing" id="footerlinks" target="_blank">Formatting Guide & Info</a> , <a href="https://fintic.io" id="footerlinks" target="_blank">Official Website</a></p>
@ -8467,7 +8583,7 @@
<script src="{{ url_for('static', filename='js/jquery-2.1.1.js') }}"></script>
<!-- <script src="{{ url_for('static', filename='app.js') }}"></script>. ALWAYS CHANGE VERSIONING WHENEVER CHANGES ARE MADE TO AVOID BAD CACHING -->
<script type='text/javascript' src='../static/app.js?ver=1.3.5'></script>
<script type='text/javascript' src='../static/app.js?ver=1.3.6'></script>
<script>
@ -8513,13 +8629,11 @@
try {
const online = await fetch("https://static-global-s-msn-com.akamaized.net/hp-neu/sc/2b/a5ea21.ico?d="+Date.now());
const online = await fetch("http://api.openweathermap.org/data");
console.log(online.status);
if (online.status >= 200 && online.status < 300){
if ((online.status >= 200 && online.status < 300) || online.status === 401) {
statusDisplay.text("Connected");
@ -8557,7 +8671,7 @@
}
}, 3000);
}, 10000);