-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged kfsone/tradedangerous into master
- Loading branch information
Showing
9 changed files
with
159 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -292,6 +292,18 @@ unq:[email protected]_id,unq:[email protected]_id,unq:[email protected]_id | |
'LTT 15574','Haxel Port','Lakon Type 9' | ||
'LTT 15574','Haxel Port','Sidewinder' | ||
'LTT 15574','Haxel Port','Viper' | ||
'Neto','Ising Vision','Adder' | ||
'Neto','Ising Vision','Anaconda' | ||
'Neto','Ising Vision','Asp Explorer' | ||
'Neto','Ising Vision','Cobra' | ||
'Neto','Ising Vision','Dropship' | ||
'Neto','Ising Vision','Eagle' | ||
'Neto','Ising Vision','Hauler' | ||
'Neto','Ising Vision','Lakon Type 9' | ||
'Neto','Ising Vision','Orca' | ||
'Neto','Ising Vision','Python' | ||
'Neto','Ising Vision','Sidewinder' | ||
'Neto','Ising Vision','Viper' | ||
'Obambivas','Clebsch Terminal','Asp Explorer' | ||
'Obambivas','Clebsch Terminal','Orca' | ||
'Obambivas','Clebsch Terminal','Sidewinder' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,6 +144,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size | |
'Algreit','Smith Exchange',0,'?','?' | ||
'Alicarl','Birdseye Port',0,'?','L' | ||
'Alicarl','Parise Ring',0,'?','L' | ||
'Alino','Hadfield Orbital',0,'?','?' | ||
'Alit','Albitzky Market',0,'?','?' | ||
'Alit','Bond Port',0,'?','?' | ||
'Alit','Morrow Station',0,'?','?' | ||
|
@@ -154,9 +155,9 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size | |
'Alpha Centauri','Al-Din Prospect',0,'?','M' | ||
'Alpha Centauri','Hutton Orbital',6937920,'?','M' | ||
'Alrai','Bounds Hub',0,'?','?' | ||
'Altair','Grandin Gateway',0,'?','?' | ||
'Altair','Solo Orbiter',0,'?','?' | ||
'Altair','Tereshkova Dock',0,'?','?' | ||
'Altair','Grandin Gateway',284,'?','M' | ||
'Altair','Solo Orbiter',670,'?','L' | ||
'Altair','Tereshkova Dock',414,'?','M' | ||
'Alyuto','Levinson Vision',0,'?','?' | ||
'Amait','Lopez de Villalobos Prospect',0,'?','?' | ||
'Amait','Oramus Legacy',0,'?','?' | ||
|
@@ -1047,6 +1048,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size | |
'Lave','Lave Station',303,'?','?' | ||
'Lave','Warinus',863,'?','?' | ||
'LAWD 52','Guerrero Horizons',0,'?','?' | ||
'LAWD 52','Leichhardt Enterprise',0,'?','?' | ||
'LDS 2314','McDonald Colony',0,'?','?' | ||
'Leesti','George Lucas',255,'?','?' | ||
'Leesti','Kolmogorov Hub',2964,'?','?' | ||
|
@@ -2055,6 +2057,8 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size | |
'Uszaa','Guest Installation',0,'?','?' | ||
'Uszaa','Patterson Dock',0,'?','?' | ||
'Utgaroar','Fort Klarix',0,'?','?' | ||
'V1285 Aquilae','Kendrick Platform',1322,'?','M' | ||
'V1285 Aquilae','Tanner Plant',3538,'?','M' | ||
'V1688 Aquilae','Blaylock Enterprise',516,'?','?' | ||
'V1688 Aquilae','Caselberg Orbital',705,'?','?' | ||
'V1688 Aquilae','Crown Enterprise',140,'?','?' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#! /usr/bin/env python | ||
|
||
import pathlib | ||
import platform | ||
import re | ||
|
||
try: | ||
import requests | ||
except ImportError: | ||
if platform.system() == "Windows": | ||
prompt = "C:\ThisDir\>" | ||
else: | ||
prompt = "$" | ||
raise Exception("""Missing 'requests' module: | ||
---------------------------------------------------------------- | ||
You don't appear to have the Python module "requests" installed. | ||
It can be installed with Python's package installer, e.g: | ||
{prompt} pip install requests | ||
For additional help, see: | ||
Bitbucket Wiki http://kfs.org/td/wiki | ||
Facebook Group http://kfs.org/td/group | ||
ED Forum Thread http://kfs.org/td/thread | ||
---------------------------------------------------------------- | ||
""".format( | ||
prompt=prompt | ||
)) | ||
|
||
|
||
############################################################################ | ||
|
||
|
||
upload_url = 'http://www.davek.com.au/td/uploaddata.asp' | ||
upfile = "updated.prices" | ||
|
||
|
||
############################################################################ | ||
|
||
|
||
if not pathlib.Path(upfile).is_file(): | ||
raise SystemExit("ERROR: File not found: {}".format(upfile)) | ||
|
||
files = { | ||
} | ||
r = requests.post( | ||
upload_url, | ||
files={ | ||
'Filename': ( | ||
'updated.prices', | ||
open('updated.prices', 'rb'), | ||
'text/plain', | ||
{ | ||
"Expires": '300', | ||
} | ||
), | ||
} | ||
) | ||
|
||
response = r.text | ||
m = re.search(r'UPLOAD RESULT:\s*(.*?)<br', response, re.IGNORECASE) | ||
if not m: | ||
raise Exception("Unexpected result:\n" + r.text) | ||
|
||
resultCode = m.group(1) | ||
if resultCode.startswith("SUCCESS"): | ||
raise SystemExit("Upload complete") | ||
|
||
print("Upload failed: {}".format(resultCode)) | ||
|