fintic-tracker/setup_config_files.sh

85 lines
13 KiB
Bash
Raw Normal View History

2021-11-26 15:14:03 +00:00
#!/bin/bash
2021-12-01 15:57:44 +00:00
2021-12-15 11:06:54 +00:00
touch log.txt
2022-01-31 19:11:01 +00:00
touch api_keys.txt
rm -rf user_uploads
2021-12-21 17:24:58 +00:00
mkdir user_uploads
2022-03-05 10:37:22 +00:00
2021-11-24 20:54:03 +00:00
mkdir csv
cd csv
2022-03-05 10:37:22 +00:00
rm *.json
2022-06-12 17:04:23 +00:00
touch crypto_settings.json last_updates.json system_info.json
2022-03-05 10:37:22 +00:00
touch league_tables.json
2021-11-24 20:54:03 +00:00
mkdir sports
2022-06-12 17:04:23 +00:00
touch current_weather.json stocks_settings.json daily_weather.json live_games.json commodities_settings.json
2022-03-05 10:37:22 +00:00
touch display_settings.json message_settings.json upcoming_games.json forex_settings.json
2021-12-06 20:10:14 +00:00
touch GIF_settings.json news_settings.json image_settings.json past_games.json general_settings.json
2021-11-24 20:54:03 +00:00
2022-06-12 17:04:23 +00:00
filenames="crypto_settings.json last_updates.json league_tables.json current_weather.json stocks_settings.json daily_weather.json live_games.json commodities_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"
2021-11-24 20:54:03 +00:00
echo '{"update_available": false, "first_boot": true}' >> system_info.json
echo [\"Standard\", [[\"Stocks\", \"Crypto\", \"Forex\"]]] >> display_settings.json
2022-06-12 17:04:23 +00:00
echo '{"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}}' >> last_updates.json
2022-03-05 10:37:22 +00:00
2022-03-07 16:48:11 +00:00
2022-03-07 16:47:07 +00:00
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
2022-06-14 09:48:44 +00:00
echo '{"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"}}}' >> commodities_settings.json
2022-03-07 16:47:07 +00:00
echo '{"feature": "Sports (Team Stats)", "speed": "medium", "speed2": "medium","animation": "down", "title": true, "leagues": {}}' >> league_tables.json
2022-06-24 04:52:15 +00:00
echo {\"feature\": \"Current Weather\", \"speed\": \"medium\", \"animation\": \"down\", \"temp\": \"celsius\", \"wind_speed\": \"miles/sec\", \"colour\": \"white\", \"city_colour\": \"yellow\", \"title\": true, \"locations\": {}, \"current_weather\": true} >> current_weather.json
2022-03-07 16:47:07 +00:00
echo '{"feature": "Stocks", "speed": "medium", "speed2": "medium", "animation": "down", "percent": false, "point": true, "logos": true, "chart": false, "title": true, "symbols": {"AAPL": {"current": "164.02", "change": "-1.59", "percent_change": "-0.97"}, "MSFT": {"current": "288.29", "change": "-1.32", "percent_change": "-0.46"}, "GOOG": {"current": "2586.74", "change": "-34.01", "percent_change": "-1.31"}, "NFLX": {"current": "380.52", "change": "-7.59", "percent_change": "-1.99"}}}' >> stocks_settings.json
2022-06-24 04:52:15 +00:00
echo {\"feature\": \"Current Weather\", \"speed\": \"medium\", \"animation\": \"down\", \"temp\": \"celsius\", \"wind_speed\": \"miles/sec\", \"colour\": \"white\", \"city_colour\": \"yellow\", \"title\": true, \"locations\": {}, \"current_weather\": true} >> daily_weather.json
2022-03-07 16:47:07 +00:00
echo '{"feature": "Sports (Live Games)", "speed": "medium", "speed2": "medium", "animation": "down", "title": true, "leagues": {}}' >> live_games.json
echo '{"feature": "Custom Messages", "speed": "Medium", "speed2": "medium", "animation": "Down", "title": false, "messages": [{"name": "welcome", "text": "Welcome to Fintic!", "text_colour": "White", "size": "Large", "background_colour": "Black"}, {"name": "get_started", "text": "To get started, connect your device to the \"Fintic Hotspot\" and access \"fintic.local:1024\" on your web browser. You can connect your ticker to Wi-Fi there.", "text_colour": "White", "size": "Small", "background_colour": "Black"}]}' >> message_settings.json
echo '{"feature": "Sports (Upcoming Games)", "speed": "medium", "speed2": "medium", "animation": "down", "title": true, "leagues": {"NFL": [{"date": "2021-11-22", "time": "01:20:00", "round": "11", "home_team": "Los Angeles Chargers", "home_score": "41", "away_team": "Pittsburgh Steelers", "away_score": "37"}, {"date": "2021-11-23", "time": "01:15:00", "round": "11", "home_team": "Tampa Bay Buccaneers", "home_score": "0", "away_team": "New York Giants", "away_score": "0"}, {"date": "2021-11-25", "time": "17:30:00", "round": "12", "home_team": "Detroit Lions", "home_score": null, "away_team": "Chicago Bears", "away_score": null}, {"date": "2021-11-25", "time": "21:30:00", "round": "12", "home_team": "Dallas Cowboys", "home_score": null, "away_team": "Las Vegas Raiders", "away_score": null}, {"date": "2021-11-26", "time": "01:20:00", "round": "12", "home_team": "New Orleans Saints", "home_score": null, "away_team": "Buffalo Bills", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "Cincinnati Bengals", "home_score": null, "away_team": "Pittsburgh Steelers", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "Houston Texans", "home_score": null, "away_team": "New York Jets", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "Indianapolis Colts", "home_score": null, "away_team": "Tampa Bay Buccaneers", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "Jacksonville Jaguars", "home_score": null, "away_team": "Atlanta Falcons", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "Miami Dolphins", "home_score": null, "away_team": "Carolina Panthers", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "New England Patriots", "home_score": null, "away_team": "Tennessee Titans", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "New York Giants", "home_score": null, "away_team": "Philadelphia Eagles", "away_score": null}, {"date": "2021-11-28", "time": "21:05:00", "round": "12", "home_team": "Denver Broncos", "home_score": null, "away_team": "Los Angeles Chargers", "away_score": null}, {"date": "2021-11-28", "time": "21:25:00", "round": "12", "home_team": "Green Bay Packers", "home_score": null, "away_team": "Los Angeles Rams", "away_score": null}, {"date": "2021-11-28", "time": "21:25:00", "round": "12", "home_team": "San Francisco 49ers", "home_score": null, "away_team": "Minnesota Vikings", "away_score": null}], "NBA": [{"date": "2021-11-22", "time": "01:20:00", "round": "11", "home_team": "Los Angeles Chargers", "home_score": "41", "away_team": "Pittsburgh Steelers", "away_score": "37"}, {"date": "2021-11-23", "time": "01:15:00", "round": "11", "home_team": "Tampa Bay Buccaneers", "home_score": "0", "away_team": "New York Giants", "away_score": "0"}, {"date": "2021-11-25", "time": "17:30:00", "round": "12", "home_team": "Detroit Lions", "home_score": null, "away_team": "Chicago Bears", "away_score": null}, {"date": "2021-11-25", "time": "21:30:00", "round": "12", "home_team": "Dallas Cowboys", "home_score": null, "away_team": "Las Vegas Raiders", "away_score": null}, {"date": "2021-11-26", "time": "01:20:00", "round": "12", "home_team": "New Orleans Saints", "home_score": null, "away_team": "Buffalo Bills", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "Cincinnati Bengals", "home_score": null, "away_team": "Pittsburgh Steelers", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "Houston Texans", "home_score": null, "away_team": "New York Jets", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "Indianapolis Colts", "home_score": null, "away_team": "Tampa Bay Buccaneers", "away_score": null}, {"date": "2021-11-28", "time": "18:00:00", "round": "12", "home_team": "Jacksonville Jaguars", "home_score": null, "away_tea
echo '{"feature": "Stocks", "speed": "medium", "speed2": "medium", "animation": "down", "percent": false, "point": true, "logos": true, "chart": false, "title": true, "symbols": {"EUR,USD": {"current": "1.1334", "24hr_change": "-0.0003", "percent_change": "0.00"}, "USD,JPY": {"current": "114.960", "24hr_change": "0.1600", "percent_change": "0.14"}, "GBP,USD": {"current": "1.3577", "24hr_change": "-0.0031", "percent_change": "-0.23"}, "USD,CHF": {"current": "0.9198", "24hr_change": "0.0029", "percent_change": "0.32"}}}' >> forex_settings.json
echo '{"speed": "medium", "speed2": "medium", "animation": "down", "title": true, "pause": "2", "images": []}'>> GIF_settings.json
echo '{"feature": "News", "speed": "medium", "speed2": "medium", "animation": "down", "country": "US", "category": "General", "title": true, "headlines": [], "use_category": true, "use_country": false, "num_headlines": "10"}' >> news_settings.json
echo '{"speed": "slow", "speed2": "medium","animation": "down", "title": true, "pause": "/", "images": []}' >> image_settings.json
echo '{"feature": "Sports (Past Games)", "speed2": "medium", "speed": "medium", "animation": "down", "title": true, "leagues": {}}' >> past_games.json
2022-03-07 16:48:11 +00:00
2021-12-06 20:10:14 +00:00
echo '{"brightness": 10, "country_code": "GB", "hostname": "fintic"}' >> general_settings.json
2022-03-06 09:48:54 +00:00
chmod 777 *
2021-11-24 20:54:03 +00:00
2021-11-29 15:02:59 +00:00
cd ../../..
sudo chmod -R ugo+rwx csv
2021-12-01 15:57:44 +00:00
rm -rf display_images
mkdir display_images
cd display_images
touch 'Crypto Prof.ppm'
touch 'Crypto.ppm'
touch 'Current Weather Prof.ppm'
touch 'Current Weather.ppm'
touch 'Custom GIFs.gif'
touch 'Custom Images.ppm'
touch 'Custom Messages.ppm'
touch 'Daily Forecast.ppm'
touch 'Forex Prof.ppm'
touch 'Forex.ppm'
touch 'News Prof.ppm'
touch 'News.ppm'
touch 'Sports (Live Games).ppm'
touch 'Sports (Past Games).ppm'
touch 'Sports (Team Stats).ppm'
touch 'Sports (Upcoming Games).ppm'
touch 'Stocks Prof.ppm'
touch 'Stocks.ppm'
touch 'daily_weather.ppm'
touch 'display_gif.gif'
touch 'display_gif.ppm'
touch 'display_image.ppm'
2022-06-12 17:04:23 +00:00
touch 'Commodities.ppm'
touch 'Commodities Prof.ppm'
2022-03-06 09:48:54 +00:00
chmod 777 *
2021-12-01 15:57:44 +00:00
cd ..
sudo chmod -R ugo+rwx display_images