Browse Source

Removing PushBullet support

I can longer recommend PushBullet, poorly maintained, switch to the Telegram integration.
No longer needed
pull/86/head
Jack Sweeney 2 years ago
parent
commit
82b1c2f272
  1. 214
      aircraft_type_fuel_consumption_rates.json
  2. 6
      configs/plane1.ini.example
  3. 11
      planeClass.py

214
aircraft_type_fuel_consumption_rates.json

@ -73,29 +73,33 @@
"name": "Global",
"galph": 500,
"category": "Ultra Long Range"
}
,
},
"CL30": {
"name": "Challenger 300",
"galph": 295,
"category": "Super Midsize"
}, "B742": {
},
"B742": {
"name": "Boeing 747-200",
"galph": 3830,
"category": "Large"
}, "T38": {
},
"T38": {
"name": "T-38 Talon",
"galph": 375,
"category": "Fighter"
}, "WB57": {
},
"WB57": {
"name": "Martin B-57 Canberra",
"galph": 531,
"category": "Twinjet Tactical Bomber and Reconnaissance"
}, "B74S": {
},
"B74S": {
"name": "747 SP",
"galph": 2289,
"category": "Large"
}, "B752": {
},
"B752": {
"name": "757 200",
"galph": 877,
"category": "Large"
@ -209,6 +213,200 @@
"name": "Boeing 777 200",
"galph": 2300,
"category": "Wide-body"
},
"SLCH": {
"name": "Stratolaunch",
"galph": 2396,
"category": "Special"
},
"P51": {
"name": "P51 Mustang",
"galph": 65,
"category": "Fighter"
},
"HDJT": {
"name": "Honda Jet",
"galph": 90,
"category": "Light Jet"
},
"B744": {
"name": "Boeing 747-400",
"galph": 3700,
"category": "Heavy Airliner"
},
"E190": {
"name": "Embrar E190",
"galph": 469,
"category": "Heavy Jet"
},
"FA50": {
"name": "Falcon 50",
"galph": 229,
"category": "Heavy Jet"
},
"GL7T": {
"name": "Global 7000",
"galph": 460,
"category": "Heavy Jet"
},
"GL6T": {
"name": "",
"galph": 455.0,
"category": ""
},
"C68A": {
"name": "",
"galph": 212.0,
"category": ""
},
"C56X": {
"name": "",
"galph": 217.0,
"category": ""
},
"B763": {
"name": "",
"galph": 1320.0,
"category": ""
},
"A310": {
"name": "",
"galph": 1189.0,
"category": ""
},
"A330": {
"name": "",
"galph": 1505.0,
"category": ""
},
"A380": {
"name": "",
"galph": 4062.0,
"category": ""
},
"E170": {
"name": "",
"galph": 469.0,
"category": ""
},
"DC87": {
"name": "",
"galph": 1250.0,
"category": ""
},
"SGUP": {
"name": "",
"galph": 1156.0,
"category": ""
},
"WHK2": {
"name": "",
"galph": 500.0,
"category": ""
},
"B350": {
"name": "",
"galph": 122.0,
"category": ""
},
"BE30": {
"name": "",
"galph": 121.0,
"category": ""
},
"FA8X": {
"name": "",
"galph": 380.0,
"category": ""
},
"E550": {
"name": "",
"galph": 280.0,
"category": ""
},
"E55P": {
"name": "",
"galph": 166.0,
"category": ""
},
"A332": {
"name": "",
"galph": 1480,
"category": ""
},
"GA7C": {
"name": "",
"galph": 382.0,
"category": ""
},
"FA6X": {
"name": "",
"galph": 419.0,
"category": ""
},
"B3XM": {
"name": "",
"galph": 716.0,
"category": ""
},
"B779": {
"name": "",
"galph": 2250.0,
"category": ""
},
"BE22": {
"name": "",
"galph": 60.0,
"category": ""
},
"C560": {
"name": "",
"galph": 182.0,
"category": ""
},
"E145": {
"name": "",
"galph": 284.0,
"category": ""
},
"C25C": {
"name": "",
"galph": 110.0,
"category": ""
},
"C25B": {
"name": "",
"galph": 110.0,
"category": ""
},
"C441": {
"name": "",
"galph": 57.0,
"category": ""
},
"E50P": {
"name": "",
"galph": 109.0,
"category": ""
},
"CRJ2": {
"name": "",
"galph": 325.0,
"category": ""
},
"CRJ7": {
"name": "",
"galph": 444.0,
"category": ""
},
"BE40": {
"name": "",
"galph": 220.0,
"category": ""
},
"C700": {
"name": "",
"galph": 288.0,
"category": ""
}
}

6
configs/plane1.ini.example

@ -31,12 +31,6 @@ TITLE =
ACCESS_TOKEN = athere
ACCESS_TOKEN_SECRET = atshere
[PUSHBULLET]
ENABLE = FALSE
TITLE = Title Of Pushbullet message
API_KEY = apikey
CHANNEL_TAG = channeltag
[DISCORD]
ENABLE = FALSE
#WEBHOOK URL https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks

11
planeClass.py

@ -79,11 +79,6 @@ class Plane:
self.latest_tweet_id = self.tweet_api.user_timeline(count = 1)[0]
except IndexError:
self.latest_tweet_id = None
#Setup PushBullet
if self.config.getboolean('PUSHBULLET', 'ENABLE'):
from pushbullet import Pushbullet
self.pb = Pushbullet(self.config['PUSHBULLET']['API_KEY'])
self.pb_channel = self.pb.get_channel(self.config.get('PUSHBULLET', 'CHANNEL_TAG'))
def run_opens(self, ac_dict):
#Parse OpenSky Vector
from colorama import Fore, Back, Style
@ -472,12 +467,6 @@ class Plane:
if self.config.getboolean('DISCORD', 'ENABLE'):
role_id = self.config.get('DISCORD', 'ROLE_ID') if self.config.has_option('DISCORD', 'ROLE_ID') and self.config.get('DISCORD', 'ROLE_ID').strip() != "" else None
sendDis(message, self.config, role_id, self.map_file_name)
#PushBullet
if self.config.getboolean('PUSHBULLET', 'ENABLE'):
with open(self.map_file_name, "rb") as pic:
map_data = self.pb.upload_file(pic, "Tookoff IMG" if self.tookoff else "Landed IMG")
self.pb_channel.push_note(self.config.get('PUSHBULLET', 'TITLE'), message)
self.pb_channel.push_file(**map_data)
#Twitter
if self.config.getboolean('TWITTER', 'ENABLE'):
import tweepy

Loading…
Cancel
Save