def save(self): f = FileConfig(localFilename=self.config_file) f.SetPath('/html_defaults') f.WriteBool('dark_mode', self.dark_mode) f.WriteBool('show_silkscreen', self.show_silkscreen) f.WriteBool('highlight_pin1', self.highlight_pin1) f.WriteBool('redraw_on_drag', self.redraw_on_drag) f.WriteInt('board_rotation', self.board_rotation) f.Write('checkboxes', self.checkboxes) f.Write('bom_view', self.bom_view) f.Write('layer_view', self.layer_view) f.WriteBool('open_browser', self.open_browser) f.SetPath('/general') bom_dest_dir = self.bom_dest_dir if bom_dest_dir.startswith(self.netlist_initial_directory): bom_dest_dir = os.path.relpath(bom_dest_dir, self.netlist_initial_directory) f.Write('bom_dest_dir', bom_dest_dir) f.Write('component_sort_order', ','.join(self.component_sort_order)) f.Write('component_blacklist', ','.join(self.component_blacklist)) f.WriteBool('blacklist_virtual', self.blacklist_virtual) f.SetPath('/extra_fields') f.Write('extra_fields', ','.join(self.extra_fields)) f.Write('board_variant_field', self.board_variant_field) f.Write('board_variant_whitelist', ','.join(self.board_variant_whitelist)) f.Write('board_variant_blacklist', ','.join(self.board_variant_blacklist)) f.Write('dnp_field', self.dnp_field) f.Flush()
def save(self): f = FileConfig(localFilename=self.config_file) f.SetPath('/general') gcode_dest_dir = self.gcode_dest_dir if gcode_dest_dir.startswith(self.netlist_initial_directory): gcode_dest_dir = os.path.relpath(gcode_dest_dir, self.netlist_initial_directory) f.Write('gcode_dest_dir', gcode_dest_dir) f.Write('gcode_name_format', self.gcode_name_format) f.Write('laser_x_width', str(self.laser_x_width)) f.Write('laser_y_width', str(self.laser_y_width)) f.Write('laser_pad_passes', str(self.laser_pad_passes)) f.Write('laser_pad_intensity', str(self.laser_pad_intensity)) f.Write('laser_border_intensity', str(self.laser_border_intensity)) f.Write('laser_speed', str(self.laser_speed)) f.Write('laser_border_speed', str(self.laser_border_speed)) f.Write('component_blacklist', ','.join(self.component_blacklist)) f.WriteBool('blacklist_virtual', self.blacklist_virtual) f.WriteBool('blacklist_empty_val', self.blacklist_empty_val) f.Flush()
def save(self): f = FileConfig(localFilename=self.config_file) f.SetPath('/general') output_dest_dir = self.output_dest_dir if output_dest_dir.startswith(self.rel_directory): output_dest_dir = os.path.relpath(output_dest_dir, self.rel_directory) f.Write('output_dest_dir', output_dest_dir) f.Write('output_name_format', self.output_name_format) f.SetPath("/layers") for index in range(len(self.layers)): l = self.layers[index] f.WriteBool(f'layer{l.id}_enabled', l.enabled) f.Write(f'layer{l.id}_ext', l.ext) f.Flush()
def save(self, locally): file = self.local_config_file if locally else self.global_config_file print('Saving to', file) f = FileConfig(localFilename=file) f.SetPath('/html_defaults') f.WriteBool('dark_mode', self.dark_mode) f.WriteBool('show_pads', self.show_pads) f.WriteBool('show_fabrication', self.show_fabrication) f.WriteBool('show_silkscreen', self.show_silkscreen) f.WriteBool('highlight_pin1', self.highlight_pin1) f.WriteBool('redraw_on_drag', self.redraw_on_drag) f.WriteInt('board_rotation', self.board_rotation) f.Write('checkboxes', self.checkboxes) f.Write('bom_view', self.bom_view) f.Write('layer_view', self.layer_view) f.WriteBool('compression', self.compression) f.WriteBool('open_browser', self.open_browser) f.SetPath('/general') bom_dest_dir = self.bom_dest_dir if bom_dest_dir.startswith(self.netlist_initial_directory): bom_dest_dir = os.path.relpath( bom_dest_dir, self.netlist_initial_directory) f.Write('bom_dest_dir', bom_dest_dir) f.Write('bom_name_format', self.bom_name_format) f.Write('component_sort_order', ','.join(self.component_sort_order)) f.Write('component_blacklist', ','.join(self.component_blacklist)) f.WriteBool('blacklist_virtual', self.blacklist_virtual) f.WriteBool('blacklist_empty_val', self.blacklist_empty_val) f.WriteBool('include_tracks', self.include_tracks) f.WriteBool('include_nets', self.include_nets) f.SetPath('/fields') f.Write('show_fields', self._join(self.show_fields)) f.Write('group_fields', self._join(self.group_fields)) f.WriteBool('normalize_field_case', self.normalize_field_case) f.Write('board_variant_field', self.board_variant_field) f.Write('board_variant_whitelist', self._join(self.board_variant_whitelist)) f.Write('board_variant_blacklist', self._join(self.board_variant_blacklist)) f.Write('dnp_field', self.dnp_field) f.Flush()