Updated to capture Holiday json files.

This commit is contained in:
ccostan 2018-03-01 01:41:49 -05:00
parent 97e4a82644
commit 1005a4ee1d
4 changed files with 194 additions and 45 deletions

1
.gitignore vendored
View File

@ -5,7 +5,6 @@
*.key
*.conf
*.pickle
*.json
.cloud
OZW_Log.txt
home-assistant.log

View File

@ -1,44 +0,0 @@
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
SELENIUM_STANDALONE_VERSION=3.4.0
SELENIUM_SUBDIR=$(echo "$SELENIUM_STANDALONE_VERSION" | cut -d"." -f-2)
# Remove existing downloads and binaries so we can start from scratch.
apt-get remove google-chrome-stable
rm ~/selenium-server-standalone-*.jar
rm ~/chromedriver_linux64.zip
rm /usr/local/bin/chromedriver
rm /usr/local/bin/selenium-server-standalone.jar
# Install dependencies.
apt-get update
apt-get install -y unzip openjdk-8-jre-headless xvfb libxi6 libgconf-2-4
# Install Chrome.
curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
apt-get -y update
apt-get -y install google-chrome-stable
# Install ChromeDriver.
wget -N http://chromedriver.storage.googleapis.com/$CHROME_DRIVER_VERSION/chromedriver_linux64.zip -P ~/
unzip ~/chromedriver_linux64.zip -d ~/
rm ~/chromedriver_linux64.zip
mv -f ~/chromedriver /usr/local/bin/chromedriver
chown root:root /usr/local/bin/chromedriver
chmod 0755 /usr/local/bin/chromedriver
# Install Selenium.
wget -N http://selenium-release.storage.googleapis.com/$SELENIUM_SUBDIR/selenium-server-standalone-$SELENIUM_STANDALONE_VERSION.jar -P ~/
mv -f ~/selenium-server-standalone-$SELENIUM_STANDALONE_VERSION.jar /usr/local/bin/selenium-server-standalone.jar
chown root:root /usr/local/bin/selenium-server-standalone.jar
chmod 0755 /usr/local/bin/selenium-server-standalone.jar

85
config/json_data/holidays.json Executable file
View File

@ -0,0 +1,85 @@
{
"MAJOR_US": {
"static": {
"1/1": "New Year's Day",
"2/2": "Groundhog Day",
"2/3": "Stacey's Birthday",
"2/14": "Valentine's Day",
"3/14": "Pi Day",
"3/17": "St. Patrick's Day",
"3/26": "Justin's Birthday",
"4/22": "Earth Day",
"5/4": "Star Wars Day",
"5/5": "Cinco de Mayo",
"7/4": "Independence Day",
"8/30": "Paige's Birthday",
"9/11": "Patriot Day",
"10/31": "Halloween",
"11/11": "Veterans' Day",
"11/16": "Carlo's Birthday",
"12/7": "Pearl Harbor Day",
"12/24": "Christmas Eve",
"12/25": "Christmas Day",
"12/31": "New Year's Eve"
},
"dynamic": {
"1/19/2015": "MLK Day",
"1/18/2016": "MLK Day",
"1/16/2017": "MLK Day",
"1/15/2018": "MLK Day",
"1/21/2019": "MLK Day",
"1/20/2020": "MLK Day",
"2/16/2015": "Presidents' Day",
"2/15/2016": "Presidents' Day",
"2/20/2017": "Presidents' Day",
"2/19/2018": "Presidents' Day",
"2/18/2019": "Presidents' Day",
"2/17/2020": "Presidents' Day",
"3/25/2018": "Palm Sunday",
"4/14/2019": "Palm Sunday",
"4/5/2020": "Palm Sunday",
"3/30/2018": "Good Friday",
"4/19/2019": "Good Friday",
"4/10/2020": "Good Friday",
"4/1/2018": "Easter Sunday",
"4/21/2019": "Easter Sunday",
"4/12/2020": "Easter Sunday",
"5/10/2015": "Mother's Day",
"5/8/2016": "Mother's Day",
"5/14/2017": "Mother's Day",
"5/13/2018": "Mother's Day",
"5/12/2019": "Mother's Day",
"5/10/2020": "Mother's Day",
"5/25/2015": "Memorial Day",
"5/30/2016": "Memorial Day",
"5/29/2017": "Memorial Day",
"5/28/2018": "Memorial Day",
"5/27/2019": "Memorial Day",
"5/25/2020": "Memorial Day",
"6/21/2015": "Father's Day",
"6/19/2016": "Father's Day",
"6/18/2017": "Father's Day",
"6/17/2018": "Father's Day",
"6/16/2019": "Father's Day",
"6/21/2020": "Father's Day",
"9/7/2015": "Labor Day",
"9/5/2016": "Labor Day",
"9/4/2017": "Labor Day",
"9/3/2018": "Labor Day",
"9/2/2019": "Labor Day",
"9/7/2020": "Labor Day",
"10/12/2015": "Columbus Day",
"10/10/2016": "Columbus Day",
"10/9/2017": "Columbus Day",
"10/8/2018": "Columbus Day",
"10/14/2019": "Columbus Day",
"10/12/2020": "Columbus Day",
"11/26/2015": "Thanksgiving Day",
"11/24/2016": "Thanksgiving Day",
"11/23/2017": "Thanksgiving Day",
"11/22/2018": "Thanksgiving Day",
"11/28/2019": "Thanksgiving Day",
"11/26/2020": "Thanksgiving Day"
}
}
}

109
config/json_data/test_launch.json Executable file
View File

@ -0,0 +1,109 @@
{
"total": 1,
"launches": [
{
"id": 1079,
"name": "Minotaur-C (Taurus XL) | 6 x SkySat & 4 x Dove",
"windowstart": "November 1, 2017 21:22:00 UTC",
"windowend": "November 1, 2017 22:22:00 UTC",
"net": "October 31, 2017 21:37:00 UTC",
"wsstamp": 1509589742,
"westamp": 1509488520,
"netstamp": 1509485820,
"isostart": "2017111T152200Z",
"isoend": "20171111T222200Z",
"isonet": "20171031T213700Z",
"status": 3,
"inhold": 0,
"tbdtime": 0,
"vidURLs": [
"https://www.youtube.com/watch?v=xP_xWX9RqYU",
"https://www.youtube.com/watch?v=eWsxNGD3fPE"
],
"vidURL": null,
"infoURLs": [],
"infoURL": null,
"holdreason": null,
"failreason": null,
"tbddate": 0,
"probability": 100,
"hashtag": null,
"location": {
"pads": [
{
"id": 179,
"name": "Space Launch Complex 576E, Vandenberg AFB, CA",
"infoURL": null,
"wikiURL": null,
"mapURL": "http://maps.google.com/maps?q=34.739444+N,+120.619167+W",
"latitude": 34.739444,
"longitude": -120.619167,
"agencies": [
{
"id": 161,
"name": "United States Air Force",
"abbrev": "USAF",
"countryCode": "USA",
"type": 1,
"infoURL": "http://www.af.mil",
"wikiURL": "http://en.wikipedia.org/wiki/United_States_Air_Force",
"infoURLs": [
"http://www.af.mil"
]
}
]
}
],
"id": 16,
"name": "Carlo's house, FL, USA",
"infoURL": "",
"wikiURL": "",
"countryCode": "USA"
},
"rocket": {
"id": 105,
"name": "Minotaur-C",
"configuration": "Minotaur-C",
"familyname": "Pegasus",
"agencies": [
{
"id": 179,
"name": "Orbital ATK",
"abbrev": "OA",
"countryCode": "USA",
"type": 3,
"infoURL": "https://www.orbitalatk.com/",
"wikiURL": "https://en.wikipedia.org/wiki/Orbital_ATK",
"infoURLs": [
"https://www.orbitalatk.com/"
]
}
],
"wikiURL": "https://en.wikipedia.org/wiki/Minotaur-C",
"infoURLs": [],
"imageSizes": [
320
],
"imageURL": "Array"
},
"missions": [
{
"id": 348,
"name": "Dedicated rideshare",
"description": "Dedicated rideshare",
"type": 14,
"typeName": "Dedicated Rideshare"
},
{
"id": 605,
"name": "6 x SkySat & 4 x Dove",
"description": "SkySat is a series of commercial Earth observation satellites, which operate in 500 km sun-synchronous orbit. Each satellite weighs about 120 kg and is intended for 6 years of operation.",
"type": 1,
"typeName": "Earth Science"
}
]
}
],
"offset": 0,
"count": 1
}