I have spreadsheets for modifying data structures in old video games, which, when edited, concatenate all the edited data together into another worksheet, which is then saved as a *.csv (comma separated value).
I need a cross-platform script that will grab the data from the *.csv, and write it to the appropriate files, provided those files are in the same directory as the python script and the *.csv.
The .csv files look like this:
Code:
(filename),(address, in hexadecimal),(bytes to write, in hexadecimal)
SCUS_942.30,9EE0,300001C08000140000000000FFFFFFFF6581FFFFFFFFFFFFFFFFFFFF
SCUS_942.30,9EFC,300001C08000280000000000FFFFFFFF6581FFFFFFFFFFFFFFFFFFFF
SCUS_942.30,9F18,300001C08000640000000000FFFFFFFF6581FFFFFFFFFFFFFFFFFFFF
SCUS_942.30,9F34,300001C08000140000000000FFFFFFFFF481FFFFFFFFFFFFFFFFFFFF
SCUS_942.30,9F50,300001C08000000000000000FFFFFFFF6981FFFFFFFFFFFFFFFFFFFF
SCUS_942.30,9F6C,300001C08000010000000000FFFFFFFF6881FFFFFFFFFFFFFFFFFFFF
As there will probably be multiple *.csv files for editing different data structures in these games, I need the python script to be able to select the *.csv to use, when using the python script in terminal.
Code:
python csv_writer.py saga_item_data.csv
I don't need to select the file(s) to write it to, as they are part of the *.csv; and because some of my spreadsheets work with hundreds of files, and selecting the file to which to write would only hinder me.
The *.csv files are simply plain text.
- Probably UTF-8 on Linux, (using Gnumeric or Calc) and ISO-8859-1* on Windows(using Excel).
- It's probably okay to use Windows CR+LF (which is the Windows line-break character), but don't quote me on that.
I'm not a programmer; just a data diver who knows how to search for things using a hex editor.
Bookmarks