mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-10 01:26:35 +00:00

Added small script that will be expanded to give backend web scripts info on the map being parsed. Grid alignment is still incorrect and the actual hexes are not exactly the right shape.
9 lines
195 B
Python
9 lines
195 B
Python
import os,sys
|
|
|
|
for infile in sys.argv[1:]:
|
|
map = open(infile,"r")
|
|
lines = map.readlines()
|
|
rows = len(lines) - 3
|
|
columns = lines[3].count(',')+1
|
|
print "%d rows x %d columns" % (rows,columns)
|