This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python | |
# usage: if you have an xxx.odg, then execute `./odg2svgs.py xxx` | |
import sys | |
import subprocess | |
import xml.etree.ElementTree as ET | |
kBASENAME = sys.argv[1] | |
subprocess.run(["libreoffice", "--draw", "--headless", "--convert-to", "svg", kBASENAME+".odg"], check=True) | |
tree = ET.parse(kBASENAME + ".svg") |