Skip to content

Commit

Permalink
Merged kfsone/tradedangerous into master
Browse files Browse the repository at this point in the history
  • Loading branch information
maddavo committed Mar 11, 2015
2 parents f5cd784 + 35c0ebb commit cbe7d4b
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 5 deletions.
10 changes: 10 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
TradeDangerous, Copyright (C) Oliver "kfsone" Smith, July 2014
==============================================================================

v6.13.2 Mar 10 2015
. (Tromador) Added "Painite" to Item.csv
. (kfsone) import plugin now allows you to separate --opt values with ,
e.g. trade.py import --plug=maddavo --opt=csvs,csvonly
will import mad's csv files without importing his prices
. (kfsone) 112 new systems

v6.13.1 Mar 06 2015
. (kfsone) "shipvendor" command:
- Default action is now to list ships at given station, e.g.
Expand All @@ -20,6 +27,9 @@ v6.13.0 Mar 03 2015
- Added "--opt=csvonly" to stop after importing any csv files (no prices),
- Added "--opt=csvs" to import all the csvs
(equivalent to typing --opt=systems --opt=stations --opt=shipvendor)
e.g.
trade.py import --plug=maddavo --opt=csvs --opt=csvonly
trade.py import --plug=maddavo --opt=stations
. (kfsone) "market" sub-command:
- Default behavior is equivalent to "--buy --sell",
- You now only need to specify --buy (-B) or --sell (-S) to list ONLY
Expand Down
5 changes: 5 additions & 0 deletions commands/import_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from commands.exceptions import *
from commands.parsing import MutuallyExclusiveGroup, ParseArgument
from itertools import chain
from pathlib import Path

import cache
Expand Down Expand Up @@ -87,6 +88,10 @@
def run(results, cmdenv, tdb):
# If we're using a plugin, initialize that first.
if cmdenv.plug:
if cmdenv.pluginOptions:
cmdenv.pluginOptions = chain.from_iterable(
opt.split(',') for opt in cmdenv.pluginOptions
)
try:
pluginClass = plugins.load(cmdenv.plug, "ImportPlugin")
except plugins.PluginException as e:
Expand Down
2 changes: 2 additions & 0 deletions corrections.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"TAVYTERE": "ALRAI SECTOR ON-T B3-2",
"BODB DJEDI": "BODEDI",
"HIP 101110": "NEW YEMBO",
"ICV HR-V B2-0": "ICZ HR-V B2-0",

#ADD_SYSTEMS_HERE
}
Expand Down Expand Up @@ -95,6 +96,7 @@
"SAMBURITJA/PTEYN LANDING": DELETED,
"SAMBURITJA/RPTEYN LANDING": DELETED,
"CHICK EK/WH IEELOCK GATEWAY": DELETED,
"LHS 3006/WCM Transfer Orbital": "Leonard Nimoy Station",
}

categories = {
Expand Down
5 changes: 3 additions & 2 deletions data/Item.csv
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ unq:[email protected]_id,unq:name,ui_order
'Minerals','Gallite',4
'Minerals','Indite',5
'Minerals','Lepidolite',6
'Minerals','Rutile',7
'Minerals','Uraninite',8
'Minerals','Painite',7
'Minerals','Rutile',8
'Minerals','Uraninite',9
'Slavery','Imperial Slaves',1
'Slavery','Slaves',2
'Technology','Advanced Catalysers',1
Expand Down
2 changes: 1 addition & 1 deletion data/Station.csv
Original file line number Diff line number Diff line change
Expand Up @@ -7274,7 +7274,7 @@ unq:[email protected]_id,unq:name,ls_from_star,blackmarket,max_pad_size,market,
'LHS 295','White Settlement',0,'?','?','?','?','2015-02-23 23:54:35'
'LHS 2995','Schmitt Station',0,'?','?','Y','?','2015-02-23 23:54:35'
'LHS 3006','Frimout Legacy',452,'Y','M','?','?','2015-02-23 23:54:35'
'LHS 3006','WCM Transfer Orbital',65,'Y','L','Y','Y','2015-02-25 01:31:50'
'LHS 3006','Leonard Nimoy Station',65,'Y','L','Y','Y','2015-02-25 01:31:50'
'LHS 301','O''Connor Terminal',0,'?','L','Y','?','2015-02-23 23:54:35'
'LHS 302','Chapman Orbital',730,'?','M','?','?','2015-02-23 23:54:35'
'LHS 302','Kavandi Dock',9184,'?','L','?','?','2015-02-23 23:54:35'
Expand Down
113 changes: 111 additions & 2 deletions data/System.csv

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions edscupdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
"THETA CARINE",
"CORE SYS HH-M A7-3",
"OI-T B3-9",
"IDZ DL-X B1-1",
"PHE ZHUA",
"LP 937-98",
]


Expand Down
3 changes: 3 additions & 0 deletions plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def usage(self):
for opt in sorted(options.keys()):
text += "--opt={:<12} ".format(opt)
text += tw.fill(options[opt].strip()) + "\n"
text += "\n"
text += "You can also chain options together, e.g.:\n"
text += " --opt=systems,stations,csvonly\n"

return text

Expand Down

0 comments on commit cbe7d4b

Please sign in to comment.