diff --git a/kiplot/__main__.py b/kiplot/__main__.py index 83c4c8cd..e06a2a40 100644 --- a/kiplot/__main__.py +++ b/kiplot/__main__.py @@ -1,4 +1,10 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2018 John Beard +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/johnbeard/kiplot """KiPlot: Command-line Plotting for KiCad Usage: @@ -164,8 +170,8 @@ def solve_board_file(schematic, a_board_file): def set_locale(): - """ Try to se the locale for all the cataegories. - If it fails try for LC_NUMERIC (the one we need for tests). """ + """ Try to set the locale for all the cataegories. + If it fails try with LC_NUMERIC (the one we need for tests). """ try: locale.setlocale(locale.LC_ALL, '') return diff --git a/kiplot/bom/bom.py b/kiplot/bom/bom.py index eaafec0b..efe2129d 100644 --- a/kiplot/bom/bom.py +++ b/kiplot/bom/bom.py @@ -1,8 +1,13 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2016-2020 Oliver Henry Walters (@SchrodingersGat) +# License: MIT +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/SchrodingersGat/KiBoM +# Contributors: Kenny Huynh (@hkennyv) """ -BoM -This code is adapted from https://github.com/SchrodingersGat/KiBoM by Oliver Henry Walters. - -Here is all the logic to convert a list of components into the rows and columns used to create the BoM. +All the logic to convert a list of components into the rows and columns used to create the BoM. """ import locale from copy import deepcopy diff --git a/kiplot/bom/bom_writer.py b/kiplot/bom/bom_writer.py index f583f1fc..244c61e2 100644 --- a/kiplot/bom/bom_writer.py +++ b/kiplot/bom/bom_writer.py @@ -1,7 +1,12 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2016-2020 Oliver Henry Walters (@SchrodingersGat) +# License: MIT +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/SchrodingersGat/KiBoM """ BoM Writer. -This code is adapted from https://github.com/SchrodingersGat/KiBoM by Oliver Henry Walters. This is just a hub that calls the real BoM writer: - csv_writer.py @@ -13,7 +18,6 @@ from .csv_writer import write_csv from .html_writer import write_html from .xml_writer import write_xml from .xlsx_writer import write_xlsx -# from . import utils from .. import log logger = log.get_logger(__name__) diff --git a/kiplot/bom/columnlist.py b/kiplot/bom/columnlist.py index 77e93523..2a01147a 100644 --- a/kiplot/bom/columnlist.py +++ b/kiplot/bom/columnlist.py @@ -1,8 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2016-2020 Oliver Henry Walters (@SchrodingersGat) +# License: MIT +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/SchrodingersGat/KiBoM """ ColumnList -This code is adapted from https://github.com/SchrodingersGat/KiBoM by Oliver Henry Walters. This is a class to hold the names of the fields and columns of the BoM. +In KiBoM it has some logic, here is just a collection of constants. +We also declare the BoMError here. """ diff --git a/kiplot/bom/csv_writer.py b/kiplot/bom/csv_writer.py index 2c35697c..748dc85c 100644 --- a/kiplot/bom/csv_writer.py +++ b/kiplot/bom/csv_writer.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2016-2020 Oliver Henry Walters (@SchrodingersGat) +# License: MIT +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/SchrodingersGat/KiBoM """ -CSV Writer: -This code is adapted from https://github.com/SchrodingersGat/KiBoM by Oliver Henry Walters. - -Generates a CSV, TSV or TXT file. +CSV Writer: Generates a CSV, TSV or TXT BoM file. """ import csv @@ -15,7 +18,7 @@ def write_csv(filename, ext, groups, headings, head_names, cfg): groups = [list of ComponentGroup groups] headings = [list of headings to search for data in the BoM file] head_names = [list of headings to display in the BoM file] - prefs = BomPref object + cfg = BoMOptions object with all the configuration """ # Delimeter is assumed from file extension # Override delimiter if separator specified diff --git a/kiplot/bom/html_writer.py b/kiplot/bom/html_writer.py index a882e0aa..93778fc0 100644 --- a/kiplot/bom/html_writer.py +++ b/kiplot/bom/html_writer.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2016-2020 Oliver Henry Walters (@SchrodingersGat) +# License: MIT +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/SchrodingersGat/KiBoM """ -HTML Writer: -This code is adapted from https://github.com/SchrodingersGat/KiBoM by Oliver Henry Walters. - -Generates a HTML file. +HTML Writer: Generates a HTML BoM file. """ import os from base64 import b64encode @@ -140,11 +143,11 @@ def embed_image(file): def write_html(filename, groups, headings, head_names, cfg): """ Write BoM out to a HTML file - filename = path to output file (must be a .htm or .html file) + filename = path to output file (must be a .csv, .txt or .tsv file) groups = [list of ComponentGroup groups] headings = [list of headings to search for data in the BoM file] head_names = [list of headings to display in the BoM file] - prefs = BomPref object + cfg = BoMOptions object with all the configuration """ link_datasheet = -1 if cfg.html.datasheet_as_link and cfg.html.datasheet_as_link in headings: diff --git a/kiplot/bom/kibot_logo.py b/kiplot/bom/kibot_logo.py index e4539e89..f392d881 100644 --- a/kiplot/bom/kibot_logo.py +++ b/kiplot/bom/kibot_logo.py @@ -1,3 +1,14 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: MIT +# Project: KiBot (formerly KiPlot) +""" +A funny logo, composition of 'Ki' KiCad logo and a robot from internet, +is a free robot that is claimed by various authors with minimal +variations and available as public domain. +If you really know the original author let me know. """ + KIBOT_LOGO_W = 370 KIBOT_LOGO_H = 200 KIBOT_LOGO = """iVBORw0KGgoAAAANSUhEUgAAAXIAAADICAYAAAD1AmquAAAdIHpUWHRSYXcgcHJvZmlsZSB0eXBl diff --git a/kiplot/bom/units.py b/kiplot/bom/units.py index 94209b81..125f1c71 100644 --- a/kiplot/bom/units.py +++ b/kiplot/bom/units.py @@ -1,14 +1,17 @@ # -*- coding: utf-8 -*- - +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2016-2020 Oliver Henry Walters (@SchrodingersGat) +# License: MIT +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/SchrodingersGat/KiBoM """ Units: -This code is adapted from https://github.com/SchrodingersGat/KiBoM by Oliver Henry Walters. - This file contains a set of functions for matching values which may be written in different formats e.g. 0.1uF = 100n (different suffix specified, one has missing unit) 0R1 = 0.1Ohm (Unit replaces decimal, different units) - +Oriented to normalize and sort R, L and C values. """ import re import locale diff --git a/kiplot/bom/xlsx_writer.py b/kiplot/bom/xlsx_writer.py index 0fddc5ed..551e65a0 100644 --- a/kiplot/bom/xlsx_writer.py +++ b/kiplot/bom/xlsx_writer.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2016-2020 Oliver Henry Walters (@SchrodingersGat) +# License: MIT +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/SchrodingersGat/KiBoM """ -XLSX Writer: -This code is adapted from https://github.com/SchrodingersGat/KiBoM by Oliver Henry Walters. - -Generates an XLSX file. +XLSX Writer: Generates an XLSX BoM file. """ import io from textwrap import wrap @@ -14,7 +17,7 @@ from .. import log try: from xlsxwriter import Workbook XLSX_SUPPORT = True -except ModuleNotFoundError: # pragma: no cover +except ModuleNotFoundError: XLSX_SUPPORT = False class Workbook(): @@ -202,13 +205,13 @@ def adjust_heights(worksheet, rows, max_width, head_size): def write_xlsx(filename, groups, col_fields, head_names, cfg): """ Write BoM out to a XLSX file - filename = path to output file (must be a .xlsx file) + filename = path to output file (must be a .csv, .txt or .tsv file) groups = [list of ComponentGroup groups] - col_fields = [list of col_fields to search for data in the BoM file] - head_names = [list of col_fields to display in the BoM file] - prefs = BomPref object + col_fields = [list of headings to search for data in the BoM file] + head_names = [list of headings to display in the BoM file] + cfg = BoMOptions object with all the configuration """ - if not XLSX_SUPPORT: # pragma: no cover + if not XLSX_SUPPORT: logger.error('Python xlsxwriter module not installed (Debian: python3-xlsxwriter)') return False diff --git a/kiplot/bom/xml_writer.py b/kiplot/bom/xml_writer.py index abd498b0..5bb2f3e0 100644 --- a/kiplot/bom/xml_writer.py +++ b/kiplot/bom/xml_writer.py @@ -1,9 +1,13 @@ # -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2016-2020 Oliver Henry Walters (@SchrodingersGat) +# License: MIT +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/SchrodingersGat/KiBoM +# Contributors: Geoffrey Hunter (@gbmhunter) """ -XML Writer: -This code is adapted from https://github.com/SchrodingersGat/KiBoM by Oliver Henry Walters. - -Generates an XML file. +XML Writer: Generates an XML BoM file. """ from xml.etree import ElementTree from xml.dom import minidom @@ -12,10 +16,11 @@ from xml.dom import minidom def write_xml(filename, groups, headings, head_names, cfg): """ Write BoM out to an XML file - filename = path to output file (must be a .xml) + filename = path to output file (must be a .csv, .txt or .tsv file) groups = [list of ComponentGroup groups] - headings = [list of headings to display in the BoM file] - cfg = BomPref object + headings = [list of headings to search for data in the BoM file] + head_names = [list of headings to display in the BoM file] + cfg = BoMOptions object with all the configuration """ attrib = {} attrib['Schematic_Source'] = cfg.source diff --git a/kiplot/config_reader.py b/kiplot/config_reader.py index 3d5673a6..7a6506c4 100644 --- a/kiplot/config_reader.py +++ b/kiplot/config_reader.py @@ -1,3 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2018 John Beard +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/johnbeard/kiplot """ Class to read KiPlot config files """ diff --git a/kiplot/drill_marks.py b/kiplot/drill_marks.py index 3034b9b9..bec923b6 100644 --- a/kiplot/drill_marks.py +++ b/kiplot/drill_marks.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from pcbnew import (PCB_PLOT_PARAMS) from .error import KiPlotConfigurationError from .out_any_layer import AnyLayerOptions diff --git a/kiplot/error.py b/kiplot/error.py index 8dfaa6a3..54b8bbec 100644 --- a/kiplot/error.py +++ b/kiplot/error.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) """ KiPlot errors """ diff --git a/kiplot/gs.py b/kiplot/gs.py index af83c9b3..e1e859cc 100644 --- a/kiplot/gs.py +++ b/kiplot/gs.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) import os import re from datetime import datetime diff --git a/kiplot/kicad/config.py b/kiplot/kicad/config.py index 1bd3f08a..e300fa03 100644 --- a/kiplot/kicad/config.py +++ b/kiplot/kicad/config.py @@ -1,5 +1,14 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) """ KiCad configuration classes. +Reads the KiCad's configuration files. +In particular: +- kicad_common to know about the 'environment' variables +- The `sym-lib-table` files to map library aliases Notes about coverage: I'm excluding all the Darwin and Windows code from coverage. diff --git a/kiplot/kicad/v5_sch.py b/kiplot/kicad/v5_sch.py index ad667b44..1dd9ffca 100644 --- a/kiplot/kicad/v5_sch.py +++ b/kiplot/kicad/v5_sch.py @@ -1,7 +1,12 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) """ KiCad v5 (and older) Schematic format. - A basic implementation of the .sch file format. +Currently oriented to collect the components for the BoM. """ # Encapsulate file/line import re diff --git a/kiplot/kiplot.py b/kiplot/kiplot.py index 52e53557..95eec00f 100644 --- a/kiplot/kiplot.py +++ b/kiplot/kiplot.py @@ -1,3 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2018 John Beard +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/johnbeard/kiplot """ Main Kiplot code """ diff --git a/kiplot/layer.py b/kiplot/layer.py index 6e721ed4..88346626 100644 --- a/kiplot/layer.py +++ b/kiplot/layer.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) import pcbnew from .optionable import Optionable from .gs import GS diff --git a/kiplot/log.py b/kiplot/log.py index 8ef525a7..ebc3f6e5 100644 --- a/kiplot/log.py +++ b/kiplot/log.py @@ -1,4 +1,11 @@ -"""Log module +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://stackoverflow.com/questions/384076/how-can-i-color-python-logging-output +""" +Log module Handles logging initialization and formating. """ diff --git a/kiplot/macros.py b/kiplot/macros.py index 18738c7f..4745886c 100644 --- a/kiplot/macros.py +++ b/kiplot/macros.py @@ -1,3 +1,11 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +""" +Macros to make the output plug-ins cleaner. +""" from .gs import GS # noqa: F401 from ast import (Assign, Name, Attribute, Expr, Num, Str, NameConstant, Load, Store, UnaryOp, USub, ClassDef, Call, ImportFrom, alias) diff --git a/kiplot/misc.py b/kiplot/misc.py index 6d609b69..65c87006 100644 --- a/kiplot/misc.py +++ b/kiplot/misc.py @@ -1,5 +1,9 @@ -"""Miscellaneous definitions -""" +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +""" Miscellaneous definitions """ # Error levels INTERNAL_ERROR = 1 # Unhandled exceptions diff --git a/kiplot/optionable.py b/kiplot/optionable.py index 26ea9203..ed3ee5bb 100644 --- a/kiplot/optionable.py +++ b/kiplot/optionable.py @@ -1,3 +1,9 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +""" Base class for output options """ import os import re import inspect diff --git a/kiplot/out_any_drill.py b/kiplot/out_any_drill.py index 5e7431bf..ce459f11 100644 --- a/kiplot/out_any_drill.py +++ b/kiplot/out_any_drill.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) import os from pcbnew import (PLOT_FORMAT_HPGL, PLOT_FORMAT_POST, PLOT_FORMAT_GERBER, PLOT_FORMAT_DXF, PLOT_FORMAT_SVG, PLOT_FORMAT_PDF, wxPoint) diff --git a/kiplot/out_any_layer.py b/kiplot/out_any_layer.py index 8424d066..e04fcf15 100644 --- a/kiplot/out_any_layer.py +++ b/kiplot/out_any_layer.py @@ -1,3 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2018 John Beard +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/johnbeard/kiplot import os from pcbnew import (GERBER_JOBFILE_WRITER, PLOT_CONTROLLER, IsCopperLayer) from .out_base import (BaseOutput) diff --git a/kiplot/out_base.py b/kiplot/out_base.py index 3b33dead..7353968a 100644 --- a/kiplot/out_base.py +++ b/kiplot/out_base.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from .reg_out import RegOutput from kiplot.macros import macros, document # noqa: F401 from . import log diff --git a/kiplot/out_bom.py b/kiplot/out_bom.py index e16d2ccb..3cf1ba4b 100644 --- a/kiplot/out_bom.py +++ b/kiplot/out_bom.py @@ -1,3 +1,12 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: MIT +# Project: KiBot (formerly KiPlot) +""" +Internal BoM (Bill of Materials) output for KiBot. +This is somehow compatible with KiBoM. +""" import os from re import compile, IGNORECASE from .gs import GS diff --git a/kiplot/out_dxf.py b/kiplot/out_dxf.py index 3dbc258c..d6cc6345 100644 --- a/kiplot/out_dxf.py +++ b/kiplot/out_dxf.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from pcbnew import (PLOT_FORMAT_DXF, SKETCH, FILLED) from kiplot.out_any_layer import AnyLayer from kiplot.drill_marks import DrillMarks diff --git a/kiplot/out_excellon.py b/kiplot/out_excellon.py index a2197700..3c0f925c 100644 --- a/kiplot/out_excellon.py +++ b/kiplot/out_excellon.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from pcbnew import EXCELLON_WRITER from .out_any_drill import AnyDrill from kiplot.macros import macros, document, output_class # noqa: F401 diff --git a/kiplot/out_gerb_drill.py b/kiplot/out_gerb_drill.py index 8cae6c6b..9b8b2bb6 100644 --- a/kiplot/out_gerb_drill.py +++ b/kiplot/out_gerb_drill.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from pcbnew import GERBER_WRITER from .out_any_drill import AnyDrill from kiplot.macros import macros, document, output_class # noqa: F401 diff --git a/kiplot/out_gerber.py b/kiplot/out_gerber.py index 513d333f..1dac3643 100644 --- a/kiplot/out_gerber.py +++ b/kiplot/out_gerber.py @@ -1,3 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2018 John Beard +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/johnbeard/kiplot from pcbnew import (PLOT_FORMAT_GERBER, FromMM, ToMM) from .out_any_layer import (AnyLayer, AnyLayerOptions) from .error import KiPlotConfigurationError diff --git a/kiplot/out_hpgl.py b/kiplot/out_hpgl.py index 46fc3bae..aeea5e8a 100644 --- a/kiplot/out_hpgl.py +++ b/kiplot/out_hpgl.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from pcbnew import (PLOT_FORMAT_HPGL, SKETCH, FILLED) from kiplot.misc import AUTO_SCALE from kiplot.out_any_layer import AnyLayer diff --git a/kiplot/out_kibom.py b/kiplot/out_kibom.py index 4dcbb8e5..3c6f4fb8 100644 --- a/kiplot/out_kibom.py +++ b/kiplot/out_kibom.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) import os from re import search from tempfile import NamedTemporaryFile diff --git a/kiplot/out_pcbdraw.py b/kiplot/out_pcbdraw.py index 6eac10f6..eee17fb9 100644 --- a/kiplot/out_pcbdraw.py +++ b/kiplot/out_pcbdraw.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) import os import re from tempfile import (NamedTemporaryFile) diff --git a/kiplot/out_pdf.py b/kiplot/out_pdf.py index 0fb399f8..a23b5636 100644 --- a/kiplot/out_pdf.py +++ b/kiplot/out_pdf.py @@ -1,3 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2018 John Beard +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/johnbeard/kiplot from pcbnew import (PLOT_FORMAT_PDF, FromMM, ToMM) from kiplot.out_any_layer import AnyLayer from kiplot.drill_marks import DrillMarks diff --git a/kiplot/out_pdf_pcb_print.py b/kiplot/out_pdf_pcb_print.py index 95ef3ece..a0572257 100644 --- a/kiplot/out_pdf_pcb_print.py +++ b/kiplot/out_pdf_pcb_print.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from subprocess import (call) from .pre_base import BasePreFlight from .error import (KiPlotConfigurationError) diff --git a/kiplot/out_pdf_sch_print.py b/kiplot/out_pdf_sch_print.py index 933b8c86..8cbb02be 100644 --- a/kiplot/out_pdf_sch_print.py +++ b/kiplot/out_pdf_sch_print.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) import os from subprocess import (call) from .gs import (GS) diff --git a/kiplot/out_position.py b/kiplot/out_position.py index b7854300..56e6ce0f 100644 --- a/kiplot/out_position.py +++ b/kiplot/out_position.py @@ -1,3 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2019 Romain Deterre (@rdeterre) +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/johnbeard/kiplot/pull/10 import operator from datetime import datetime from pcbnew import (IU_PER_MM, IU_PER_MILS) diff --git a/kiplot/out_ps.py b/kiplot/out_ps.py index 5c9f46d0..99142ee1 100644 --- a/kiplot/out_ps.py +++ b/kiplot/out_ps.py @@ -1,3 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2018 John Beard +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/johnbeard/kiplot from pcbnew import (PLOT_FORMAT_POST, SKETCH, FILLED, FromMM, ToMM) from kiplot.misc import AUTO_SCALE from kiplot.out_any_layer import AnyLayer diff --git a/kiplot/out_step.py b/kiplot/out_step.py index 993ac8e3..dc02c2e6 100644 --- a/kiplot/out_step.py +++ b/kiplot/out_step.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) import re from subprocess import (check_output, STDOUT, CalledProcessError) from .error import KiPlotConfigurationError diff --git a/kiplot/out_svg.py b/kiplot/out_svg.py index 61882c4a..92009e39 100644 --- a/kiplot/out_svg.py +++ b/kiplot/out_svg.py @@ -1,3 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2018 John Beard +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/johnbeard/kiplot from pcbnew import (PLOT_FORMAT_SVG, FromMM, ToMM) from kiplot.out_any_layer import AnyLayer from kiplot.drill_marks import DrillMarks diff --git a/kiplot/pre_base.py b/kiplot/pre_base.py index 052c19aa..3e94f73f 100644 --- a/kiplot/pre_base.py +++ b/kiplot/pre_base.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from .gs import (GS) from .log import (get_logger) diff --git a/kiplot/pre_check_zone_fills.py b/kiplot/pre_check_zone_fills.py index 1a161f57..d7a8b597 100644 --- a/kiplot/pre_check_zone_fills.py +++ b/kiplot/pre_check_zone_fills.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from .error import (KiPlotConfigurationError) from kiplot.macros import macros, pre_class # noqa: F401 diff --git a/kiplot/pre_drc.py b/kiplot/pre_drc.py index 7e5c8d6b..3c93f0b1 100644 --- a/kiplot/pre_drc.py +++ b/kiplot/pre_drc.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from sys import (exit) from subprocess import (call) from kiplot.macros import macros, pre_class # noqa: F401 diff --git a/kiplot/pre_erc.py b/kiplot/pre_erc.py index 73d28968..bd413c85 100644 --- a/kiplot/pre_erc.py +++ b/kiplot/pre_erc.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from sys import (exit) from subprocess import (call) from kiplot.macros import macros, pre_class # noqa: F401 diff --git a/kiplot/pre_filters.py b/kiplot/pre_filters.py index 9b091ba4..d9352735 100644 --- a/kiplot/pre_filters.py +++ b/kiplot/pre_filters.py @@ -1,3 +1,9 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Contributors: Leandro Heck (@leoheck) import os from kiplot.gs import GS from kiplot.error import KiPlotConfigurationError diff --git a/kiplot/pre_ignore_unconnected.py b/kiplot/pre_ignore_unconnected.py index ef92fd4d..dbd30e4a 100644 --- a/kiplot/pre_ignore_unconnected.py +++ b/kiplot/pre_ignore_unconnected.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from kiplot.macros import macros, pre_class # noqa: F401 from .error import (KiPlotConfigurationError) diff --git a/kiplot/pre_update_xml.py b/kiplot/pre_update_xml.py index b0ac852c..f6f98125 100644 --- a/kiplot/pre_update_xml.py +++ b/kiplot/pre_update_xml.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from sys import (exit) from subprocess import (call) from kiplot.macros import macros, pre_class # noqa: F401 diff --git a/kiplot/reg_out.py b/kiplot/reg_out.py index 43b71518..2f8d8dda 100644 --- a/kiplot/reg_out.py +++ b/kiplot/reg_out.py @@ -1,3 +1,8 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) from .optionable import Optionable diff --git a/src/kiplot b/src/kiplot index 97b9a692..c284b98d 100755 --- a/src/kiplot +++ b/src/kiplot @@ -1,4 +1,11 @@ -#!/usr/bin/env python3 +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +# Copyright (c) 2020 Salvador E. Tropea +# Copyright (c) 2020 Instituto Nacional de Tecnología Industrial +# Copyright (c) 2018 John Beard +# License: GPL-3.0 +# Project: KiBot (formerly KiPlot) +# Adapted from: https://github.com/johnbeard/kiplot """ @package KiPlot - KiCad Python API plotter