#! /usr/bin/env python3 import pcb_parser import pcb_types import ezdxf import sys def read_footprint(file_name: str) -> pcb_types.Element: with open(file_name, 'r') as f: s = f.read() parser = pcb_parser.PcbFootprintParser(s) element = parser.parseElementBlock() return element def write_dxf(file_name: str): doc = ezdxf.new('R12') msp = doc.modelspace() msp.add_circle((1, 2), radius=3) doc.saveas(file_name) def main(): fp = read_footprint(sys.argv[1]) print(fp) if __name__ == '__main__': main()