stringandstickytape / RegulatedNoise

20 stars 16 forks source link

Add Import.Prices export? Does anyone know the details of this file format, is it defined anywhere? #42

Open stringandstickytape opened 9 years ago

Lknechtli commented 9 years ago

Import / export prices from what?

stringandstickytape commented 9 years ago

I think the req was to support exporting *.PRICES files for TradeDangerous... => https://forums.frontier.co.uk/showthread.php?t=34986

mschuett commented 9 years ago

I found .prices files on http://www.davek.com.au/td/ -- they are well documented (with comments inside the file). Here is a small Python script to read these files and output a CSV: https://gist.github.com/mschuett/f416301a24a10cdbd1a4

bambi72 commented 9 years ago

Magic! I have just been googling this exact thing off to give it a go now.

Probably me being a fool, but this gives me errors. I am no python genius though, just enough to get TD working ;-) I'll leave it to the experts to work out... If I run this: python conv_prices.py td.prices tdprices.csv I get this: File "conv_prices.py", line 51 print "{};{};{};{};{};{};{};{};{};{};{}".format( ^ SyntaxError: invalid syntax But If I run this: python < conv_prices.py td.prices > tdprices.csv I get: File "td.prices", line 17 @ 1 G. CAELI/Smoot Gateway ^ SyntaxError: invalid syntax

Running python 3.4.2.

mschuett commented 9 years ago

Sorry, the script was written for Python 2. I just fixed that; the latest revision should work with Python 2.7 and 3.x.

bambi72 commented 9 years ago

Thanks!

I thought it would probably be something like that, I wasn't expecting a fix!

Appreciated...

From: Martin Schütte [mailto:notifications@github.com] Sent: 15 February 2015 18:58 To: stringandstickytape/RegulatedNoise Cc: bambi72 Subject: Re: [RegulatedNoise] Add Import.Prices export? Does anyone know the details of this file format, is it defined anywhere? (#42)

Sorry, the script was written for Python 2. I just fixed that; the latest revision should work with Python 2.7 and 3.x.

— Reply to this email directly or view it on GitHub https://github.com/stringandstickytape/RegulatedNoise/issues/42#issuecomment-74431003 .Image removed by sender.