Skip to content

Commit

Permalink
v4.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Smith committed Oct 17, 2014
1 parent a1bbb28 commit 2aab8ef
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ files from other commanders to fill out your database.
== CHANGE LOG
==============================================================================

v4.3.0 Oct 17/2014
. (gazelle) Added "--zero" option to "update --all" which makes the default
value for prices "0" instead of "-1". (-1 means 'unknown'. use this option
if you are editing timestamps and stock levels and all those -s get in your
way)

v4.2.3 Oct 17/2014
. (ShadowGar, Smacker65) Imported Harbinger and RedWizzard system data,
also added tracking of where data has come from. Thanks also to Wolverine
Expand Down Expand Up @@ -362,6 +368,15 @@ UPDATE sub-command:
Saves the prices in a human-readable format and loads that into
an editor. Make changes and save to update the database.

--all
Exposes timestamp, demand and stock value columns.

--zero
Requires --all
Causes unknown demand/stock levels to show as 0 instead of -1.
Use this when you are actively editing those fields and the -1s
get in your way.

--sublime
--subl
Like "--editor" but finds and uses the Sublime Text editor (2 and 3).
Expand Down
5 changes: 4 additions & 1 deletion trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,9 @@ def updateCommand(args):
station = tdb.lookupStation(args.station)
stationID = station.ID

if args.zero and not args.all:
raise CommandLineError("TEMPORARY: --zero requires --all for the time being, just so you understand the connection.")

if args._editing:
# User specified one of the options to use an editor.
return editUpdate(args, stationID)
Expand Down Expand Up @@ -998,7 +1001,7 @@ def main():
switches = [
ParseArgument('--editor', help='Generates a text file containing the prices for the station and loads it into the specified editor.', default=None, type=str, action=EditAction),
ParseArgument('--all', help='Generates the temporary file with all columns and new timestamp.', action='store_true', default=False),
ParseArgument('--zero', help='Default to 0 for demand/stock values.', action='store_true', default=False),
ParseArgument('--zero', help='(with --all) Show "0" for unknown demand/stock values instead of "-1".', action='store_true', default=False),
[ # Mutually exclusive group:
ParseArgument('--sublime', help='Like --editor but uses Sublime Text (2 or 3), which is nice.', action=EditActionStoreTrue),
ParseArgument('--notepad', help='Like --editor but uses Notepad.', action=EditActionStoreTrue),
Expand Down

0 comments on commit 2aab8ef

Please sign in to comment.