def export_schematic(): schematic_file = os.path.join(electronics_root, 'splitflap.sch') output_dir = os.path.join(electronics_root, 'build') file_util.mkdir_p(output_dir) screencast_output_file = os.path.join(output_dir, 'export_schematic_screencast.ogv') schematic_output_pdf_file = os.path.join(output_dir, 'splitflap.pdf') schematic_output_png_file = os.path.join(output_dir, 'schematic.png') with versioned_schematic(schematic_file): with recorded_xvfb(screencast_output_file, width=800, height=600, colordepth=24): with PopenContext(['eeschema', schematic_file], close_fds=True) as eeschema_proc: eeschema_plot_schematic(output_dir) eeschema_proc.terminate() logger.info('Rasterize') subprocess.check_call([ 'convert', '-density', '96', schematic_output_pdf_file, '-background', 'white', '-alpha', 'remove', schematic_output_png_file, ])
def export_bom(schematic_file): output_dir = os.path.join(electronics_root, 'build') file_util.mkdir_p(output_dir) screencast_output_file = os.path.join(output_dir, 'export_bom_screencast.ogv') with versioned_schematic(schematic_file): with recorded_xvfb(screencast_output_file, width=800, height=600, colordepth=24): with PopenContext(['eeschema', schematic_file], close_fds=True) as eeschema_proc: eeschema_export_bom() eeschema_proc.terminate()
def export_bom(): schematic_file = os.path.join(electronics_root, 'splitflap.sch') output_dir = os.path.join(electronics_root, 'build') file_util.mkdir_p(output_dir) screencast_output_file = os.path.join(output_dir, 'export_bom_screencast.ogv') with versioned_schematic(schematic_file): with recorded_xvfb(screencast_output_file, width=800, height=600, colordepth=24): with PopenContext(['eeschema', schematic_file], close_fds=True) as eeschema_proc: eeschema_export_bom(output_dir) eeschema_proc.terminate() logger.info('Convert component XML to useful BOM CSV file...') subprocess.check_call([ 'python', '-u', os.path.join(electronics_root, 'bom', 'generate_bom_csv.py'), os.path.join(electronics_root, 'splitflap.xml'), os.path.join(output_dir, 'bom.csv'), ])
def export_bom(): schematic_file = os.path.join(electronics_root, "splitflap.sch") output_dir = os.path.join(electronics_root, "build") file_util.mkdir_p(output_dir) screencast_output_file = os.path.join(output_dir, "export_bom_screencast.ogv") with versioned_schematic(schematic_file): with recorded_xvfb(screencast_output_file, width=800, height=600, colordepth=24): with PopenContext(["eeschema", schematic_file], close_fds=True) as eeschema_proc: eeschema_export_bom(output_dir) eeschema_proc.terminate() logger.info("Convert component XML to useful BOM CSV file...") subprocess.check_call( [ "python", "-u", os.path.join(electronics_root, "bom", "generate_bom_csv.py"), os.path.join(electronics_root, "splitflap.xml"), os.path.join(output_dir, "bom.csv"), ] )