Small Python CLI to modify Therion .th2 files generated from TopoDroid to work better with Therion cartography style.
Run the script directly:
python3 th2_edit.py <file.th2> [command] [options]From this folder:
python3 -m unittest discover -s testsIf no command is provided, the script applies all default conversions:
line pit->line floor-stepline chimney->line ceiling-step -reverse online rock-border-> add or force-close on
th2_edit.py: main CLI script.tests/: unit tests for conversion and CLI behavior.data/: sample and working.th2files (for exampledata/AS-1p.th2).
Run commands from the repository root so paths like ./data/AS-1p.th2 work as shown.
Default conversion (no command):
python3 th2_edit.py ./data/AS-1p.th2 --in-place--in-placeand--outputare mutually exclusive.- By default,
--in-placecreates<name>.th2.bak. - Use
--no-backupto disable backup creation.