File: sab-dump.py

package info (click to toggle)
ezdxf 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 104,528 kB
  • sloc: python: 182,341; makefile: 116; lisp: 20; ansic: 4
file content (18 lines) | stat: -rw-r--r-- 431 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#  Copyright (c) 2022, Manfred Moitzi
#  License: MIT License
from argparse import ArgumentParser
from ezdxf.acis import api as acis


def main():
    parser = ArgumentParser()
    parser.add_argument("file", nargs=1)
    args = parser.parse_args()
    if args.file:
        with open(args.file[0], "rb") as fp:
            data = fp.read()
    print("\n".join(acis.dump_sab_as_text(data)))


if __name__ == "__main__":
    main()