PCGen / pcgen

Main code and data development for pcgen program release
http://pcgen.org
GNU Lesser General Public License v2.1
432 stars 339 forks source link

PC-Gen LST Data Portability. #5926

Closed grabear closed 4 years ago

grabear commented 5 years ago

Can .LST files be converted to other formats? Is there an existing way for me to parse this data in another language such as python?

LegacyKing commented 5 years ago

Yes. The files are tab delimited text files. Any language should be able to parse the data in theory.

grabear commented 5 years ago

Hi @LegacyKing 😄

So (assuming there isn't a .LST parser out there already) I've begun working on my own via Python.

The data I'm using to experiment with is in the cr_equip_general.lst file.

This seemed like an easy place to start, because of the way each block is formatted (granted I haven't really explored the other LST files yet). I'm essentially able to produce 1 csv file per block. So the Adventuring Gear block looks like this:

.LST equipment parser gist

Potential Issues

Some of the columns like the QUALITY column have "multiple values" so they have been grouped as a list.

Question

LegacyKing commented 4 years ago

Sorry, sure share if you like. I'm sure someone would like it. I don't have any advice. Good luck! Just follow the licenses that are put into place.