diff options
Diffstat (limited to 'lib/gir.py')
-rw-r--r-- | lib/gir.py | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -10,7 +10,7 @@ import sys import subprocess -def fix_gir(name: str, gir: str): +def fix_gir(name: str, gir: str, out: str): namespaces = { "": "http://www.gtk.org/introspection/core/1.0", "c": "http://www.gtk.org/introspection/c/1.0", @@ -34,7 +34,7 @@ def fix_gir(name: str, gir: str): print("no c:include tag found", file=sys.stderr) exit(1) - tree.write(gir, encoding="utf-8", xml_declaration=True) + tree.write(out, encoding="utf-8", xml_declaration=True) def valadoc(name: str, gir: str, args: list[str]): @@ -48,8 +48,11 @@ def valadoc(name: str, gir: str, args: list[str]): if __name__ == "__main__": name = sys.argv[1] - gir = sys.argv[2] + in_out = sys.argv[2].split(":") args = sys.argv[3:] + gir = in_out[0] + out = in_out[1] if len(in_out) > 1 else gir + valadoc(name, gir, args) - fix_gir(name, gir) + fix_gir(name, gir, out) |