Quote:
Gandalf Parker said:
Oohhh name of the province? Much variable there. That is difficult to parse. How about if as much as possible, which can easily be parsed, be on one line. Then the difficult to parse can be seperated by "newline" as long as they always can be found on that line each time. Such as...
Line 1: Name
Line 2: id, Terrain, NOSTART, VP, etc
Line 3: Neighbors
That way even if there are no Neighbors it should still have a line which says Neighbors with no other output.
Quote:
Line 5->: commanders, features, population, buildings
|
OUCH that puts a wrench into the whole thing. It means that I cant just count lines and say "if line 2 has NOSTART skip next 2 lines and check again".
OK now Im thinking there are two ways to go. One is to have a unique character or Groups of characters flagging the begining of each province output. Such as -=- which can be used to count from or jump to the next province. The problem is finding something which in a script environment such as linux doesnt mean something special already. OR add a switch such as -v for more verbose output and have two outputs. One for all info, and the other for easy-parse info. Hmmm wait, the more casual user should always be considered for defaults. So maybe have the fully englished curious-user output be default with a -s short-Version for script programmers.
|
Version 0.6.0 is now available. Take a look at it.
I decided to move the province id first in the first line of province info to make parsing easier. Just look for lines starting with "(". some basic neighbour info is also added.
For details & download see first post.