Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Jared Buntain committed Jan 6, 2015
2 parents c73af31 + 9f5c266 commit 58aaa0c
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 104 deletions.
2 changes: 1 addition & 1 deletion commands/export_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,4 @@ def run(results, cmdenv, tdb):
filePath.unlink()
cmdenv.DEBUG0("Delete empty file {file}'".format(file=filePath))

return None
return None
2 changes: 1 addition & 1 deletion commands/import_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,4 @@ def run(results, cmdenv, tdb):
cache.importDataFromFile(tdb, cmdenv, filePath, pricesFh=fh)

return None

38 changes: 16 additions & 22 deletions commands/station_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,19 +198,7 @@ def checkSystemAndStation(tdb, cmdenv):
# can be arrays. We need to make strings out of the arrays,
# and then sanitize them for the '@SYS/STN' format, and
# build a separate system and station name out of that.
envStnName = ' '.join(cmdenv.station).strip()
if cmdenv.system:
envSysName = ' '.join(cmdenv.system).strip().upper()
while envSysName.startswith('@'):
envSysName = envSysName[1:]
if not envSysName:
raise CommandLineError("Invalid system name: {}".format(
' '.join(cmdenv.system).strip()
))
else:
envSysName = None

sysName, stnName = envSysName or "", envStnName or ""
stnName = ' '.join(cmdenv.station).strip()

# Clean up the station name and potentially lift the system
# name out of it.
Expand All @@ -222,21 +210,27 @@ def checkSystemAndStation(tdb, cmdenv):
if slashPos > 0:
sysName, stnName = stnName[:slashPos], stnName[slashPos+1:]
sysName = sysName.upper()
else:
sysName = None

if not stnName:
raise CommandLineError("Invalid station name: {}".format(
envStnName
))

# Check for the case of different system names specified via
# --system and --station SYS/STN. But if the user does
# --system SYS --station SYS/STN then we allow that.
if envSysName and sysName != envSysName:
raise CommandLineError(
"Mismatch between --system {} and "
"system specified in station name ({})".format(
envSysName, envStnName
))
if cmdenv.system:
envSysName = ' '.join(cmdenv.system).upper()
if envSysName != sysName:
raise CommandLineError(
"Mismatch between \"--system {}\" and "
"system name in station specifier "
"(\"{}\")".format(
envSysName, sysName,
))
sysName = envSysName

if not sysName:
raise CommandLineError("No system name specified")

cmdenv.system, cmdenv.station = sysName, titleFixup(stnName)

Expand Down
65 changes: 47 additions & 18 deletions corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,60 @@
}

stations = {
"37 XI BOOTIS/SCHIRRA PLANT": "Schirba Plant",
"ALBICEVCI/DUBROVOLSKI SURVEY": "Dobrovolski Survey",
"AMAIT/LOPEZ DE VILLALOBOS": "Lopez De Villalobos Prospect",
"AMARAK/WERNER VON SIEMENS VISON": "Werner Von Siemens Vision",
"ANAPOS/HERSCHEL PLATFORM": "Herschel Plant",
"APOYOTA/FLINTSTATION": "Flint Station",
"APOYOTA/HAHNRELAY": "Hahn Relay",
"EKONIR/MOREYVISION": "Morey Vision",
"TRELLA/TITTO COLONY": "Tito Colony",
"ORERVE/WATSON SATION": "Watson Station",
"MCC 467/ROB HUBBARD RING": "Ron Hubbard Ring",
"GCRV 4654/HERZEFELD LANDING": DELETED,
"LHS 220/CULPEPERCOLONY": DELETED,
"LHS 64/WIBERG HANGAR": DELETED, # "Hanger",
"LP 862-184/MAYR HANGAR": "Mayr Hanger",
"TYR/GLASHOW": DELETED,
"AULIN/ALUIN ENTERPIRSE": "Aulin Enterprise",
"BD+13 693/DRUMMOND`S PROGRESS": "Drummond's Progress",
"BOLG/MOXONS MOJO": "Moxon's Mojo",
"CEMIESS/TITUS STATION": "Titius Station",
"DT VIRGINIS/CHUN STATION": "Chun Vision",
"EGOVAE/ENOATE MARKET": "Endate Market",
"WOLF 1301/SAUNDER'S DIVE": "Saunders's Dive",
"VEQUESS/AGNEWS FOLLY": "Agnews' Folly",
"ONGKAMPAN/PATTERSON STATION:274": DELETED,
"ZETA AQUILAE/OEFELIEN": DELETED,
"ZETA AQUILAE/JULIAN GATEWAY": DELETED,
"EKONIR/MOREYVISION": "Morey Vision",
"GCRV 4654/HERZEFELD LANDING": "Herzfeld Landing",
"GROOMBRIDGE 1618/FRANKUN RING": "Franklin Ring",
"WOLF 46/FISCHER CITY": DELETED,
"LTT 9455/OLEARY VISION": DELETED,
"HR 5451/MACDONALO HUB": DELETED,
"HR 5451/MACOONALO HUB": DELETED,
"HR 5451/MACDONALO HUB": "MacDonald Hub",
"HR 5451/MACOONALO HUB": "MacDonald Hub",
"HR 5451/MACOONALD HUB": "MacDonald Hub",
"JAWOLA/SUTCLIFFEPLATFORM": "Sutcliffe Platform",
"LEESTI/GEORGELUCAS": "George Lucas",
"LHS 220/CULPEPERCOLONY": "Culpeper Colony",
"LHS 250/KOVALESKY ENTERPRISE": "Kovalevsky Enterprise",
"LHS 2884/ABNETT PLATEFORM": "Abnett Platform",
"LHS 64/WIBERG HANGAR": "Wiberg Hanger", # "Hanger",
"LP 862-184/MAYR HANGAR": "Mayr Hanger",
"LTT 15449/REILLI DOCK": "Reilly Dock",
"LTT 9455/OLEARY VISION": "O'Leary Vision",
"MANNONA/THORNYCROFY PENAL COLONY": "Thornycroft Penal Colony",
"MCC 467/ROB HUBBARD RING": "Ron Hubbard Ring",
"MOKOSH/LUBEN ORBITAL": "Lubin Orbital",
"NLTT 49528/O‹CONNOR LANDING": "O'Connor Landing",
"ONGKAMPAN/PATTERSON STATION:274": "Patterson Station",
"OPALA/ZAMK PLATFORM": "Zamka Platform",
"ORERVE/WATSON SATION": "Watson Station",
"PANGLUYA/BRADBURYWORKS": "Bradbury Works",
"PERENDI/Shepherd Installation": DELETED,
"RHO CANCRI/HAMILTON R,SERVE": "Hamilton Reserve",
"RHO CANCRI/HAMILTON R�SERVE": "Hamilton Reserve",
"TENG YEH/GARAN SURVERY": "Garan Survey",
"TRELLA/TITTO COLONY": "Tito Colony",
"TYR/GLASHOW": "Glashow Dock",
"V774 HERCULIS/MENDEL MINES'": "Mendel Mines",
"V774 HERCULIS/MENOEL MINES": "Mendel Mines",
"VALDA/CLAIRAUT OOCK": "Clairaut Dock",
"VEQUESS/AGNEWS FOLLY": "Agnews' Folly",
"WOLF 1301/SAUNDER'S DIVE": "Saunders's Dive",
"WOLF 46/FISCHER CITY": "Fischer Station",
"YAKABUGAI/SEREBOV STATION": "Serebrov Station",
"YAKABUGAI/SEREBROV": "Serebrov Station",
"YANYAN/MORYN CITY": "Morin City",
"ZETA AQUILAE/JULIAN GATEWAY": DELETED,
"ZETA AQUILAE/OEFELIEN": "Oefelein Plant",
"ZETA TRIANGULI AUSTRALIS/GUEST CITY2": "Guest City",

#ADD_STATIONS_HERE
}
Expand Down
12 changes: 12 additions & 0 deletions data/ShipVendor.csv
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,18 @@ unq:[email protected]_id,unq:[email protected]_id,unq:[email protected]_id
'SKEGGIKO O','Kuo Terminal','Lakon Type 7'
'SKEGGIKO O','Kuo Terminal','Sidewinder'
'SKEGGIKO O','Kuo Terminal','Viper'
'SOCH','Whitcomb Ring','Sidewinder'
'SOCH','Whitcomb Ring','Clipper'
'SOCH','Whitcomb Ring','Python'
'SOCH','Whitcomb Ring','Viper'
'SOCH','Whitcomb Ring','Cobra'
'SOCH','Whitcomb Ring','Lakon Type 6'
'SOCH','Whitcomb Ring','Lakon Type 9'
'SOCH','Whitcomb Ring','Orca'
'SOCH','Whitcomb Ring','Lakon Type 7'
'SOCH','Whitcomb Ring','Hauler'
'SOCH','Whitcomb Ring','Eagle'
'SOCH','Whitcomb Ring','Adder'
'SOL','Columbus','Adder'
'SOL','Columbus','Hauler'
'SOL','Columbus','Lakon Type 6'
Expand Down
Loading

0 comments on commit 58aaa0c

Please sign in to comment.