You're over-complicating it a bit there, Dry. What I tend to do is this:
. Pull from mad periodically, e.g. before I dock,
. Update prices for the station I'm at,
. misc/madupload,
Mad will automatically add a "stub" entry for any stations you upload prices for, the only time you need to upload your Station.csv is when you have extra data:
Code:
trade.py station -a "someplace/somewhere" # No need to puload
trade.py station -a "someplace/otherwhere" --ls=123 --pad=m # upload-worthy
trade.py station -u "someplace/otherwhere" --bm=n # upload-worth
trade.py station -a "someplace/somewhere" --ls=0 --pad=? --bm=? # not upload-worthy
In terms of "import". When you use the 'update' command, you're actually creating a small .prices file which TD then "imports". Everything else about how "import" works is based on this. Do this:
Code:
trade.py update --notepad Sol/Abraham Lincoln
That text you are seeing? That's an import file. It's just plain, clear, text, designed to match up with the in-game UI as much as possible.
This allows you to remove an item by "update"ing the station and removing the line for that item. When you're done, type:
Code:
start notepad updated.prices
See how that's full of lines with 0s? That's the alternative form, and it's a lot harder to match up visually against the in-game UI.
Key things to note:
- Only the stations listed in the .import are affected, so it *is* partial,
- Only the lines that appear in your modified .prices file are retained, that's where it is "concrete".
When TD imports a .prices file, it treats the data for each station it encounters as concrete/absolute.
If I have:
Code:
@ Sol/Alpha
Algae 100 123 ...
Food 300 312 ...
@ Sol/Bravo
Algae 150 0 ...
Biscuits 1200 1234 ...
Haddock 1 2 ...
and I import
Code:
@ Sol/Bravo
Algae 150 0 ...
Biscuits 1200 1234 ...
@ Sol/Charlie
Biscuits 1500 0 ...
The "Alpha" entries will be untouched, the station wasn't listed. The "Haddock" error for "Bravo" is removed and "Charlie" is populated.
Mad's system uses a different approach, by necessity.
In your case, I would:
. pull maddavo,
. upload my ocr,
. import to td
I'm going to change the "madupload" script to
require that you specify a file.