===============================
KiPart
===============================
.. image:: https://img.shields.io/pypi/v/kipart.svg
:target: https://pypi.python.org/pypi/kipart
Generate multi-unit schematic symbols for KiCad from a CSV, text, or Excel file.
* Free software: MIT license
* Documentation: https://devbisme.github.io/KiPart.
Features
--------
* Generates schematic part libraries for KiCad from CSV/text/Excel files.
* Converts lists of pins in a file into a multi-unit schematic part symbol.
* Converts multiple files stored in .zip archives.
* Each row of the file lists the number, name, type, style, unit and side of a pin.
* Pins on a unit with the same name (e.g., GND) can be placed at the same location
so they can all be tied to the same net with a single connection.
* Also includes ``kilib2csv`` for converting schematic part libraries into
CSV files suitable for input to KiPart.
Example Use Case
----------------
From a user:
I had a very complex library for a microprocessor that I needed to refactor—
I needed to reorder hundreds of pins in a sane human-usable format. I thought
I was going to have do it by hand in KiCAD's graphical symbol editor. I tried
that, got very frustrated with all the clicking and dragging.
So I then:
* searched and found this tool,
* used ``kilib2csv`` to export my KiCAD lib to CSV,
* imported the CSV in a spreadsheet program
* edited the spreadsheet (mainly sorting the pins by function using the
spreadsheet's ``sort()`` function),
* exported the spreadsheet back to CSV,
* used ``kipart`` to export back to KiCAD.
Boom! Usable part in minutes.
History
-------
1.4.2 (2023-07-26)
__________________
* Prevent bundling of spacer pins.
1.4.1 (2023-01-05)
__________________
* Swapped test on -a and -w flags so appending with overwrite doesn't erase all the existing parts.
1.4.0 (2022-11-23)
__________________
* Pin lengths are scaled to fit the size of the pin numbers.
* Part information is placed consistently regardless of part origin (either pin #1 or center).
* Fixed exceptions caused by malformed input pin data.
1.3.0 (2022-10-23)
__________________
* Multiple asterisks can be prepended to pin numbers to create more than one blank pin location.
1.2.0 (2022-08-25)
__________________
* Added ability to process KiCad V6 symbol libraries to kilib2csv.
1.1.0 (2022-07-21)
__________________
* No-connect pins were added to the types of pins that can be bundled.
* Option was added to select the suffix for bundled pins: none, count (`[n]`), or range (`[n:0]`).
* Option was added to center the symbol on the origin.
* Option was added to "scrunch" pin columns closer together between top/bottom pin rows.
* Changes made to conform to KiCad Library Conventions.
1.0.0 (2021-09-17)
__________________
* Decided this tool has matured to the point it could be called 1.0.0.
0.1.45 (2020-11-18)
______________________
* Added option to set thickness of schematic symbol box.
* Added option to push pins left/up or right/down on the sides of the schematic symbol box.
* Removed reference to Lattice Diamond tool since it's no longer supported.
0.1.44 (2020-07-21)
______________________
* Added "other" category to stm32cube_reader.py to remain compatible with new STM32cube software.
* KiPart will now use a <name>_reader.py file in the current directory to process part information.
* Cleaned up tests directory.
0.1.43 (2020-05-25)
______________________
* Fixed missing field label for description in F5.
0.1.42 (2020-04-30)
______________________
* Updated Lattice FPGA pinout reader.
0.1.41 (2020-04-07)
______________________
* Added option to select schematic symbol fill style.
0.1.40 (2020-02-26)
______________________
* Handled differing line terminations between Python 2/3 when converting XLSX to CSV file.
0.1.39 (2020-02-25)
______________________
* Fixed Python 2 str.lower() error requiring conversion of str to unicode.
0.1.38 (2020-02-24)
______________________
* Added missing parameter to stm32cube_reader().
0.1.37 (2020-01-28)
______________________
* Added requirement for openpyxl.
0.1.36 (2019-10-31)
______________________
* KiPart now accepts part data stored in Excel .xlsx files.
* Added reader for GOWIN FPGA pin tables.
0.1.35 (2019-09-19)
______________________
* Kipart now creates individual .lib files if given multiple .csv files with no global output .lib file specified using the -o option.
* kilib2csv now creates individual .csv files if given multiple .lib files with no global output .csv file specified using the -o option.
0.1.34 (2019-06-27)
______________________
* All symbols now include F2 (package) and F3 (datasheet) fields.
* Datasheet link and part description can be entered on the first line of a part description in the CSV file.
0.1.33 (2018-01-03)
______________________
* Fixed error in field syntax for part manufacturer number.
* No-connect pins can no longer be bundled because it is marked as an ERC error by EESCHEMA.
0.1.32 (2017-12-08)
______________________
* Pins sorted by name or row are now pplaced top-to-bottom on left/right sides and left-to-right on top/bottom sides.
0.1.31 (2017-10-10)
______________________
* Removed \*_ in statement that caused an error in Python2.
* Removed duplicated entries in pin-style table.
* ~ and # are now allowed in pin-style keys.
* Parts dictionary changed to OrderedDict so it retains the order parts were entered in. Important for passing random part generation tests.
0.1.30 (2017-10-05)
______________________
* Specifying ``-a`` option allows new parts to be written to an existing library but prevents overwriting existing parts.
Using ``-w`` in conjunction with ``-a`` allows added parts to overwrite existing parts.
* Part name, reference prefix, footprint, and manf. part num. are now allowed on beginning row of part info in a CSV file.
* Expanded the lists of mnemonics for pin types and styles.
0.1.29 (2017-07-31)
______________________
* Fixed erroneous library generation when part number is omitted from first line of CSV file.
* Changed default output library to ``kipart.lib`` if no output library is specified.
* Changed default output CSV file of kilib2csv to ``kipart.csv`` if no output CSV file is specified.
0.1.28 (2017-07-27)
______________________
* Added reader for Lattice FPGA devices (except iCE40). (Thanks, Adrien Descamps!)
0.1.27 (2017-05-24)
______________________
* Fixed issue #11 (blank lines in CSV file were skipped and multiple parts ran together).
0.1.26 (2017-05-21)
______________________
* Fixed issue #18 (crash when symbol side for pin was left blank).
0.1.25 (2017-05-03)
______________________
* Fixed problem caused by pin side designators not being lower-case (e.g., "Left").
0.1.24 (2016-12-22)
______________________
* Fixed Xilinx reader function to parse leading comments in their FPGA pin files.
0.1.23 (2016-12-13)
______________________
* Added ability to create hidden pins.
0.1.22 (2016-11-29)
______________________
* Fixed readers for Xilinx, STM32, PSoC devices.
* Pins on multiple sides of a symbol are now distributed in a more attractive manner.
0.1.21 (2016-09-20)
______________________
* Extra stuff on starting line of library no longer kill kilib2csv.
0.1.20 (2016-09-16)
______________________
* Fixed bug where kilib2csv was choking on footprint lists in part definitions.
0.1.19 (2016-09-16)
______________________
* Added utility to test kilib2csv and kipart on randomly-generated CSV part files.
0.1.18 (2016-09-14)
______________________
* kilib2csv utility added to convert KiCad schematic symbol libraries into CSV files suitable for input to KiPart.
0.1.17 (2016-06-15)
______________________
* Use same type of sorting for unit names as for pin names so (for example) unit 'ADC_12' comes before unit 'ADC_2'.
0.1.16 (2016-06-12)
______________________
* Added reader for CSV-formatted pinout files exported from the STM32CubeMx tool. (Thanks, Hasan Yavuz OZDERYA!)
0.1.15 (2016-02-17)
______________________
* Added reader for Xilinx Ultrascale FPGAs.
* Fixed insertion of spaces between groups of pins when pin number starts with '*'.
* Replaced call to warnings.warn with issues() function.
* fix_pin_data() now strips leading/trailing spaces from pin information.
0.1.14 (2016-01-30)
______________________
* Fixed incorrect y-offset of pins for symbols that only have pins along the right side.
0.1.13 (2015-09-09)
______________________
* The number of pins in a bundle is now appended to the pin name instead of an '*'.
0.1.12 (2015-09-03)
______________________
* Added capability to insert non-existent "gap" pins that divide groups of pins into sections.
0.1.11 (2015-09-02)
______________________
* future module requirement added to setup.py.
0.1.10 (2015-08-26)
______________________
* Now runs under both Python 2.7 and 3.4.
0.1.9 (2015-08-21)
______________________
* The bundling option now only bundles pins where that operation makes sense:
power input pins (e.g., VCC and GND) and no-connect pins.
0.1.8 (2015-08-17)
______________________
* Input data from the CSV file is now scanned for errors and fixed before it can cause problems
in the library file.
0.1.7 (2015-08-14)
______________________
* Added reader functions for Xilinx Virtex-6 and Spartan-6.
* Broke-out reader functions into separate modules.
* TXT and CSV files are now acceptable as part data files, but the reader has to be built to handle it.
0.1.6 (2015-08-13)
______________________
* Fuzzy string matching is now used for the column headers.
* Choice-type options are now case-insensitive.
0.1.5 (2015-07-29)
______________________
* Multiple parts can now be described in a single CSV file.
* Added function and option for reading Cypress PSoC5LP CSV files.
* Simplified key generators for sorting pins by name or number.
* Improved ordering of pins by name.
0.1.4 (2015-07-27)
______________________
* Added option for approximate (fuzzy) matching for pin types, styles and orientations (sides).
0.1.3 (2015-07-26)
______________________
* Multiple pins with the same name are now hidden by reducing their pin number size to zero
(rather than enabling the hidden flag which can cause problems with power-in pins).
0.1.2 (2015-07-24)
______________________
* Symbols can now have pins on any combination of left, right, top and bottom sides.
* Added option to append parts to an existing library.
* Refactored kipart routine into subroutines.
* Added documentation.
0.1.1 (2015-07-21)
______________________
* Fixed calculation of pin name widths.
* Made CSV row order the default for arranging pins on the schematic symbol.
* Fixed sorting key routine for numeric pin numbers.
* Spaces are now stripped between fields in a CSV file.
0.1.0 (2015-07-20)
______________________
* First release on PyPI.
Raw data
{
"_id": null,
"home_page": "https://github.com/devbisme/kipart",
"name": "kipart",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "kipart kicad electronic circuit schematics",
"author": "Dave Vandenbout",
"author_email": "devb@xess.com",
"download_url": "https://files.pythonhosted.org/packages/bf/74/81b3fd838d30ecfd46ee1161db8bc18cb8a5a1b2ed23699a2101665c6699/kipart-1.4.2.tar.gz",
"platform": null,
"description": "===============================\nKiPart\n===============================\n\n.. image:: https://img.shields.io/pypi/v/kipart.svg\n :target: https://pypi.python.org/pypi/kipart\n\nGenerate multi-unit schematic symbols for KiCad from a CSV, text, or Excel file.\n\n* Free software: MIT license\n* Documentation: https://devbisme.github.io/KiPart.\n\nFeatures\n--------\n\n* Generates schematic part libraries for KiCad from CSV/text/Excel files.\n* Converts lists of pins in a file into a multi-unit schematic part symbol.\n* Converts multiple files stored in .zip archives.\n* Each row of the file lists the number, name, type, style, unit and side of a pin.\n* Pins on a unit with the same name (e.g., GND) can be placed at the same location\n so they can all be tied to the same net with a single connection.\n* Also includes ``kilib2csv`` for converting schematic part libraries into\n CSV files suitable for input to KiPart.\n\nExample Use Case\n----------------\n\nFrom a user:\n\nI had a very complex library for a microprocessor that I needed to refactor\u2014\nI needed to reorder hundreds of pins in a sane human-usable format. I thought\nI was going to have do it by hand in KiCAD's graphical symbol editor. I tried\nthat, got very frustrated with all the clicking and dragging. \n\nSo I then:\n\n* searched and found this tool,\n* used ``kilib2csv`` to export my KiCAD lib to CSV, \n* imported the CSV in a spreadsheet program \n* edited the spreadsheet (mainly sorting the pins by function using the \n spreadsheet's ``sort()`` function), \n* exported the spreadsheet back to CSV, \n* used ``kipart`` to export back to KiCAD. \n \nBoom! Usable part in minutes.\n\n\n\n\n\n\nHistory\n-------\n\n1.4.2 (2023-07-26)\n__________________\n\n* Prevent bundling of spacer pins.\n\n\n1.4.1 (2023-01-05)\n__________________\n\n* Swapped test on -a and -w flags so appending with overwrite doesn't erase all the existing parts.\n\n\n1.4.0 (2022-11-23)\n__________________\n\n* Pin lengths are scaled to fit the size of the pin numbers.\n* Part information is placed consistently regardless of part origin (either pin #1 or center).\n* Fixed exceptions caused by malformed input pin data.\n\n\n1.3.0 (2022-10-23)\n__________________\n\n* Multiple asterisks can be prepended to pin numbers to create more than one blank pin location.\n\n\n1.2.0 (2022-08-25)\n__________________\n\n* Added ability to process KiCad V6 symbol libraries to kilib2csv.\n\n\n1.1.0 (2022-07-21)\n__________________\n\n* No-connect pins were added to the types of pins that can be bundled.\n* Option was added to select the suffix for bundled pins: none, count (`[n]`), or range (`[n:0]`).\n* Option was added to center the symbol on the origin.\n* Option was added to \"scrunch\" pin columns closer together between top/bottom pin rows.\n* Changes made to conform to KiCad Library Conventions.\n\n\n1.0.0 (2021-09-17)\n__________________\n\n* Decided this tool has matured to the point it could be called 1.0.0.\n\n\n0.1.45 (2020-11-18)\n______________________\n\n* Added option to set thickness of schematic symbol box.\n* Added option to push pins left/up or right/down on the sides of the schematic symbol box.\n* Removed reference to Lattice Diamond tool since it's no longer supported.\n\n\n0.1.44 (2020-07-21)\n______________________\n\n* Added \"other\" category to stm32cube_reader.py to remain compatible with new STM32cube software.\n* KiPart will now use a <name>_reader.py file in the current directory to process part information.\n* Cleaned up tests directory.\n\n\n0.1.43 (2020-05-25)\n______________________\n\n* Fixed missing field label for description in F5.\n\n\n0.1.42 (2020-04-30)\n______________________\n\n* Updated Lattice FPGA pinout reader.\n\n\n0.1.41 (2020-04-07)\n______________________\n\n* Added option to select schematic symbol fill style.\n\n\n0.1.40 (2020-02-26)\n______________________\n\n* Handled differing line terminations between Python 2/3 when converting XLSX to CSV file.\n\n\n0.1.39 (2020-02-25)\n______________________\n\n* Fixed Python 2 str.lower() error requiring conversion of str to unicode.\n\n\n0.1.38 (2020-02-24)\n______________________\n\n* Added missing parameter to stm32cube_reader().\n\n\n0.1.37 (2020-01-28)\n______________________\n\n* Added requirement for openpyxl.\n\n\n0.1.36 (2019-10-31)\n______________________\n\n* KiPart now accepts part data stored in Excel .xlsx files.\n* Added reader for GOWIN FPGA pin tables.\n\n\n0.1.35 (2019-09-19)\n______________________\n\n* Kipart now creates individual .lib files if given multiple .csv files with no global output .lib file specified using the -o option.\n* kilib2csv now creates individual .csv files if given multiple .lib files with no global output .csv file specified using the -o option.\n\n\n0.1.34 (2019-06-27)\n______________________\n\n* All symbols now include F2 (package) and F3 (datasheet) fields.\n* Datasheet link and part description can be entered on the first line of a part description in the CSV file.\n\n\n0.1.33 (2018-01-03)\n______________________\n\n* Fixed error in field syntax for part manufacturer number.\n* No-connect pins can no longer be bundled because it is marked as an ERC error by EESCHEMA.\n\n\n0.1.32 (2017-12-08)\n______________________\n\n* Pins sorted by name or row are now pplaced top-to-bottom on left/right sides and left-to-right on top/bottom sides.\n\n\n0.1.31 (2017-10-10)\n______________________\n\n* Removed \\*_ in statement that caused an error in Python2.\n* Removed duplicated entries in pin-style table.\n* ~ and # are now allowed in pin-style keys.\n* Parts dictionary changed to OrderedDict so it retains the order parts were entered in. Important for passing random part generation tests.\n\n\n0.1.30 (2017-10-05)\n______________________\n\n* Specifying ``-a`` option allows new parts to be written to an existing library but prevents overwriting existing parts.\n Using ``-w`` in conjunction with ``-a`` allows added parts to overwrite existing parts.\n* Part name, reference prefix, footprint, and manf. part num. are now allowed on beginning row of part info in a CSV file.\n* Expanded the lists of mnemonics for pin types and styles.\n\n\n0.1.29 (2017-07-31)\n______________________\n\n* Fixed erroneous library generation when part number is omitted from first line of CSV file.\n* Changed default output library to ``kipart.lib`` if no output library is specified.\n* Changed default output CSV file of kilib2csv to ``kipart.csv`` if no output CSV file is specified.\n\n\n0.1.28 (2017-07-27)\n______________________\n\n* Added reader for Lattice FPGA devices (except iCE40). (Thanks, Adrien Descamps!)\n\n\n0.1.27 (2017-05-24)\n______________________\n\n* Fixed issue #11 (blank lines in CSV file were skipped and multiple parts ran together).\n\n\n0.1.26 (2017-05-21)\n______________________\n\n* Fixed issue #18 (crash when symbol side for pin was left blank).\n\n\n0.1.25 (2017-05-03)\n______________________\n\n* Fixed problem caused by pin side designators not being lower-case (e.g., \"Left\").\n\n\n0.1.24 (2016-12-22)\n______________________\n\n* Fixed Xilinx reader function to parse leading comments in their FPGA pin files.\n\n\n0.1.23 (2016-12-13)\n______________________\n\n* Added ability to create hidden pins.\n\n\n0.1.22 (2016-11-29)\n______________________\n\n* Fixed readers for Xilinx, STM32, PSoC devices.\n* Pins on multiple sides of a symbol are now distributed in a more attractive manner.\n\n\n0.1.21 (2016-09-20)\n______________________\n\n* Extra stuff on starting line of library no longer kill kilib2csv.\n\n\n0.1.20 (2016-09-16)\n______________________\n\n* Fixed bug where kilib2csv was choking on footprint lists in part definitions.\n\n\n0.1.19 (2016-09-16)\n______________________\n\n* Added utility to test kilib2csv and kipart on randomly-generated CSV part files.\n\n\n0.1.18 (2016-09-14)\n______________________\n\n* kilib2csv utility added to convert KiCad schematic symbol libraries into CSV files suitable for input to KiPart.\n\n\n0.1.17 (2016-06-15)\n______________________\n\n* Use same type of sorting for unit names as for pin names so (for example) unit 'ADC_12' comes before unit 'ADC_2'.\n\n\n0.1.16 (2016-06-12)\n______________________\n\n* Added reader for CSV-formatted pinout files exported from the STM32CubeMx tool. (Thanks, Hasan Yavuz OZDERYA!)\n\n\n0.1.15 (2016-02-17)\n______________________\n\n* Added reader for Xilinx Ultrascale FPGAs.\n* Fixed insertion of spaces between groups of pins when pin number starts with '*'.\n* Replaced call to warnings.warn with issues() function.\n* fix_pin_data() now strips leading/trailing spaces from pin information.\n\n\n0.1.14 (2016-01-30)\n______________________\n\n* Fixed incorrect y-offset of pins for symbols that only have pins along the right side.\n\n\n0.1.13 (2015-09-09)\n______________________\n\n* The number of pins in a bundle is now appended to the pin name instead of an '*'.\n\n\n0.1.12 (2015-09-03)\n______________________\n\n* Added capability to insert non-existent \"gap\" pins that divide groups of pins into sections.\n\n\n0.1.11 (2015-09-02)\n______________________\n\n* future module requirement added to setup.py.\n\n\n0.1.10 (2015-08-26)\n______________________\n\n* Now runs under both Python 2.7 and 3.4.\n\n\n0.1.9 (2015-08-21)\n______________________\n\n* The bundling option now only bundles pins where that operation makes sense:\n power input pins (e.g., VCC and GND) and no-connect pins.\n\n\n0.1.8 (2015-08-17)\n______________________\n\n* Input data from the CSV file is now scanned for errors and fixed before it can cause problems\n in the library file.\n\n\n0.1.7 (2015-08-14)\n______________________\n\n* Added reader functions for Xilinx Virtex-6 and Spartan-6.\n* Broke-out reader functions into separate modules.\n* TXT and CSV files are now acceptable as part data files, but the reader has to be built to handle it.\n\n\n0.1.6 (2015-08-13)\n______________________\n\n* Fuzzy string matching is now used for the column headers.\n* Choice-type options are now case-insensitive.\n\n\n0.1.5 (2015-07-29)\n______________________\n\n* Multiple parts can now be described in a single CSV file.\n* Added function and option for reading Cypress PSoC5LP CSV files.\n* Simplified key generators for sorting pins by name or number.\n* Improved ordering of pins by name.\n\n\n0.1.4 (2015-07-27)\n______________________\n\n* Added option for approximate (fuzzy) matching for pin types, styles and orientations (sides).\n\n\n0.1.3 (2015-07-26)\n______________________\n\n* Multiple pins with the same name are now hidden by reducing their pin number size to zero\n (rather than enabling the hidden flag which can cause problems with power-in pins).\n\n\n0.1.2 (2015-07-24)\n______________________\n\n* Symbols can now have pins on any combination of left, right, top and bottom sides.\n* Added option to append parts to an existing library.\n* Refactored kipart routine into subroutines.\n* Added documentation.\n\n\n0.1.1 (2015-07-21)\n______________________\n\n* Fixed calculation of pin name widths.\n* Made CSV row order the default for arranging pins on the schematic symbol.\n* Fixed sorting key routine for numeric pin numbers.\n* Spaces are now stripped between fields in a CSV file.\n\n\n0.1.0 (2015-07-20)\n______________________\n\n* First release on PyPI.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Part creator for KiCad.",
"version": "1.4.2",
"project_urls": {
"Changelog": "https://github.com/devbisme/kipart/blob/master/HISTORY.rst",
"Documentation": "https://devbisme.github.io/KiPart",
"Homepage": "https://github.com/devbisme/kipart",
"Source": "https://github.com/devbisme/kipart",
"Tracker": "https://github.com/devbisme/kipart/issues"
},
"split_keywords": [
"kipart",
"kicad",
"electronic",
"circuit",
"schematics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "bf7481b3fd838d30ecfd46ee1161db8bc18cb8a5a1b2ed23699a2101665c6699",
"md5": "402b80b687d63c3d175a612088be8977",
"sha256": "947ca5cc2c9fcb90e3b63769e0e6603c7a93d26088c30ee3496f4291e01bff7b"
},
"downloads": -1,
"filename": "kipart-1.4.2.tar.gz",
"has_sig": false,
"md5_digest": "402b80b687d63c3d175a612088be8977",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 983130,
"upload_time": "2023-07-26T19:53:28",
"upload_time_iso_8601": "2023-07-26T19:53:28.297818Z",
"url": "https://files.pythonhosted.org/packages/bf/74/81b3fd838d30ecfd46ee1161db8bc18cb8a5a1b2ed23699a2101665c6699/kipart-1.4.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-26 19:53:28",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "devbisme",
"github_project": "kipart",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [],
"tox": true,
"lcname": "kipart"
}