tomswartz07 / spacelaunchslackbot Goto Github PK
View Code? Open in Web Editor NEWPython Script to post notifications of upcoming rocket launches to a custom Slack Channel
License: MIT License
Python Script to post notifications of upcoming rocket launches to a custom Slack Channel
License: MIT License
Make it portable with a docker container or something that will also sets up Cron rules.
It would be great if the project was set up with some sort of CI/CD pipeline to automatically update the instance and run the code when triggered by merges to master
We should log the launch id to a file so we know if the launch was already sent to the slack channel
A launch is scheduled to occur within 24h or 1h
Script runs
Message is posted
A launch is scheduled to occur 1 week from current time
Script runs
Message is not posted
Message is posted regarding next launch, no matter the timeframe
Using the current API, there is a vast amount of data that is returned from various sources.
Current implementation has quite a few of them displayed, but items such as Launch Hold, Probability of Launch, etc. could be implemented as well.
A sample return of a single launch:
{
"total": 1,
"launches": [
{
"id": 1263,
"name": "Long March 3B/E | Chinasat-9A",
"windowstart": "May 10, 2017 00:00:00 UTC",
"windowend": "May 10, 2017 00:00:00 UTC",
"net": "May 10, 2017 00:00:00 UTC",
"wsstamp": 0,
"westamp": 0,
"netstamp": 0,
"isostart": "20170510T000000Z",
"isoend": "20170510T000000Z",
"isonet": "20170510T000000Z",
"status": 2,
"inhold": 0,
"tbdtime": 1,
"vidURLs": [],
"vidURL": null,
"infoURLs": [],
"infoURL": null,
"holdreason": null,
"failreason": null,
"tbddate": 1,
"probability": -1,
"hashtag": null,
"location": {
"pads": [
{
"id": 147,
"name": "Unknown, Xichang Satellite Launch Center",
"infoURL": "Unknown",
"wikiURL": "https://en.wikipedia.org/wiki/Xichang_Satellite_Launch_Center",
"mapURL": "https://www.google.com/maps?ll=28.246017,102.026556&q=28.246017,102.026556&hl=en&t=m&z=15",
"latitude": 28.246017,
"longitude": 102.026556,
"agencies": [
{
"id": 17,
"name": "China National Space Administration",
"abbrev": "CNSA",
"countryCode": "CHN",
"type": 1,
"infoURL": "http://www.cnsa.gov.cn/",
"wikiURL": "http://en.wikipedia.org/wiki/China_National_Space_Administration",
"infoURLs": [
"http://www.cnsa.gov.cn/"
]
}
]
}
],
"id": 25,
"name": "Xichang Satellite Launch Center, People's Republic of China",
"infoURL": "",
"wikiURL": "",
"countryCode": "CHN"
},
"rocket": {
"id": 69,
"name": "Long March 3B/E",
"configuration": "B/E",
"familyname": "Long March 3",
"agencies": [
{
"id": 88,
"name": "China Academy of Space Technology",
"abbrev": "CASC",
"countryCode": "CHN",
"type": 3,
"infoURL": "http://www.cast.cn/CastEn/",
"wikiURL": "http://en.wikipedia.org/wiki/China_Academy_of_Space_Technology",
"infoURLs": [
"http://www.cast.cn/CastEn/"
]
}
],
"wikiURL": "https://en.wikipedia.org/wiki/Long_March_3B",
"infoURLs": [],
"imageURL": "https://s3.amazonaws.com/launchlibrary/RocketImages/placeholder_1920.png",
"imageSizes": [
320,
480,
640,
720,
768,
800,
960,
1024,
1080,
1280,
1440,
1920
]
},
"missions": [
{
"id": 559,
"name": "Chinasat-9A",
"description": "ChinaSat-9A is based on the DFH-4 satellite platform and is to provide direct broadcast services with eighteen 36MHz and four 54MHz BSS Ku band transponders. Together with ChinaSat-9 direct broadcast satellite, ChinaSat 9A is designed to serve the radio and TV transmission, digital film and digital broadband multi-media system as well as information and entertainment broadcasting market.",
"type": 10,
"typeName": "Communications"
}
]
}
],
"offset": 0,
"count": 1
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.