├── .editorconfig ├── .gitignore ├── .nojekyll ├── AUTHORS.rst ├── CONTRIBUTING.rst ├── HISTORY.rst ├── LICENSE ├── MANIFEST.in ├── Makefile ├── README.rst ├── docs ├── Makefile ├── _build │ ├── doctrees │ │ ├── authors.doctree │ │ ├── contributing.doctree │ │ ├── environment.pickle │ │ ├── history.doctree │ │ ├── index.doctree │ │ ├── installation.doctree │ │ ├── readme.doctree │ │ └── usage.doctree │ └── singlehtml │ │ ├── .buildinfo │ │ ├── _static │ │ ├── ajax-loader.gif │ │ ├── basic.css │ │ ├── classic.css │ │ ├── comment-bright.png │ │ ├── comment-close.png │ │ ├── comment.png │ │ ├── default.css │ │ ├── doctools.js │ │ ├── down-pressed.png │ │ ├── down.png │ │ ├── file.png │ │ ├── jquery-1.11.1.js │ │ ├── jquery.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── sidebar.js │ │ ├── underscore-1.3.1.js │ │ ├── underscore.js │ │ ├── up-pressed.png │ │ ├── up.png │ │ └── websupport.js │ │ ├── index.html │ │ └── objects.inv ├── authors.rst ├── conf.py ├── contributing.rst ├── history.rst ├── index.rst ├── installation.rst ├── make.bat ├── readme.rst ├── usage.rst ├── xess.ico └── xess.png ├── index.html ├── kinparse ├── __init__.py ├── kinparse.py ├── pckg_info.py └── py_2_3.py ├── requirements.txt ├── setup.cfg ├── setup.py ├── tests ├── __init__.py ├── data │ ├── control_board.net │ ├── gaillard.net │ ├── gardenlight.net │ ├── kicad5_test.net │ ├── kicad5_test.sch │ ├── kicad6_test.kicad_sch │ ├── kicad6_test.net │ ├── kicad8_test.kicad_sch │ ├── kicad8_test.net │ ├── ref2by2.net │ ├── test.net │ └── test.py ├── setup_teardown.py └── test_kinparse.py └── tox.ini /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | indent_style = space 7 | indent_size = 4 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | charset = utf-8 11 | end_of_line = lf 12 | 13 | [*.bat] 14 | indent_style = tab 15 | end_of_line = crlf 16 | 17 | [LICENSE] 18 | insert_final_newline = false 19 | 20 | [Makefile] 21 | indent_style = tab 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[cod] 2 | 3 | # C extensions 4 | *.so 5 | 6 | # Packages 7 | *.egg 8 | *.egg-info 9 | dist 10 | build 11 | eggs 12 | parts 13 | bin 14 | var 15 | sdist 16 | develop-eggs 17 | .installed.cfg 18 | lib 19 | lib64 20 | 21 | .cache 22 | 23 | # Installer logs 24 | pip-log.txt 25 | 26 | # Unit test / coverage reports 27 | .coverage 28 | .tox 29 | nosetests.xml 30 | htmlcov 31 | 32 | # Translations 33 | *.mo 34 | 35 | # Mr Developer 36 | .mr.developer.cfg 37 | .project 38 | .pydevproject 39 | 40 | # Complexity 41 | output/*.html 42 | output/*/index.html 43 | 44 | # Sphinx 45 | # docs/_build 46 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/.nojekyll -------------------------------------------------------------------------------- /AUTHORS.rst: -------------------------------------------------------------------------------- 1 | ======= 2 | Credits 3 | ======= 4 | 5 | Development Lead 6 | ---------------- 7 | 8 | * Dave Vandenbout 9 | 10 | `Other Contributors `_ 11 | -------------------------------------------------------------------------------- 12 | -------------------------------------------------------------------------------- /CONTRIBUTING.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Contributing 3 | ============ 4 | 5 | Contributions are welcome, and they are greatly appreciated! Every 6 | little bit helps, and credit will always be given. 7 | 8 | You can contribute in many ways: 9 | 10 | Types of Contributions 11 | ---------------------- 12 | 13 | Report Bugs 14 | ~~~~~~~~~~~ 15 | 16 | Report bugs at https://github.com/devbisme/kinparse/issues. 17 | 18 | If you are reporting a bug, please include: 19 | 20 | * Your operating system name and version. 21 | * Any details about your local setup that might be helpful in troubleshooting. 22 | * Detailed steps to reproduce the bug. 23 | 24 | Fix Bugs 25 | ~~~~~~~~ 26 | 27 | Look through the GitHub issues for bugs. Anything tagged with "bug" 28 | is open to whoever wants to implement it. 29 | 30 | Implement Features 31 | ~~~~~~~~~~~~~~~~~~ 32 | 33 | Look through the GitHub issues for features. Anything tagged with "feature" 34 | is open to whoever wants to implement it. 35 | 36 | Write Documentation 37 | ~~~~~~~~~~~~~~~~~~~ 38 | 39 | kinparse could always use more documentation, whether as part of the 40 | official kinparse docs, in docstrings, or even on the web in blog posts, 41 | articles, and such. 42 | 43 | Submit Feedback 44 | ~~~~~~~~~~~~~~~ 45 | 46 | The best way to send feedback is to file an issue at https://github.com/devbisme/kinparse/issues. 47 | 48 | If you are proposing a feature: 49 | 50 | * Explain in detail how it would work. 51 | * Keep the scope as narrow as possible, to make it easier to implement. 52 | * Remember that this is a volunteer-driven project, and that contributions 53 | are welcome :) 54 | 55 | Get Started! 56 | ------------ 57 | 58 | Ready to contribute? Here's how to set up `kinparse` for local development. 59 | 60 | 1. Fork the `kinparse` repo on GitHub. 61 | 2. Clone your fork locally:: 62 | 63 | $ git clone git@github.com:your_name_here/kinparse.git 64 | 65 | 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: 66 | 67 | $ mkvirtualenv kinparse 68 | $ cd kinparse/ 69 | $ python setup.py develop 70 | 71 | 4. Create a branch for local development:: 72 | 73 | $ git checkout -b name-of-your-bugfix-or-feature 74 | 75 | Now you can make your changes locally. 76 | 77 | 5. When you're done making changes, check that your changes pass the tests, including testing other Python versions with tox:: 78 | 79 | $ tox 80 | 81 | To get tox, just pip install it into your virtualenv. 82 | 83 | 6. Commit your changes and push your branch to GitHub:: 84 | 85 | $ git add . 86 | $ git commit -m "Your detailed description of your changes." 87 | $ git push origin name-of-your-bugfix-or-feature 88 | 89 | 7. Submit a pull request through the GitHub website. 90 | 91 | Pull Request Guidelines 92 | ----------------------- 93 | 94 | Before you submit a pull request, check that it meets these guidelines: 95 | 96 | 1. The pull request should include tests if you've added functionality. 97 | 2. If the pull request adds functionality, the docs should be updated. Put 98 | your new functionality into a function with a docstring, and add the 99 | feature to the list in README.rst. 100 | 3. The pull request should work for all the Python versions in the tox.ini file. 101 | -------------------------------------------------------------------------------- /HISTORY.rst: -------------------------------------------------------------------------------- 1 | .. :changelog: 2 | 3 | History 4 | ------- 5 | 6 | 7 | 1.2.3 (2025-02-01) 8 | ______________________ 9 | 10 | * Fixed to handle textvar fields in KiCad V8 netlist files. 11 | 12 | 13 | 1.2.2 (2024-09-22) 14 | ______________________ 15 | 16 | * Updated to handle KiCad V8 netlist files. 17 | 18 | 19 | 1.2.1 (2023-10-12) 20 | ______________________ 21 | 22 | * Ignore future module ImportError exception that aborts execution with Python 3.12. 23 | 24 | 25 | 1.2.0 (2022-11-7) 26 | ______________________ 27 | 28 | * Updated to handle exclude_from_bom in KiCad V6 netlist files. 29 | 30 | 31 | 1.1.0 (2022-03-23) 32 | ______________________ 33 | 34 | * Updated to handle both KiCad V5 and V6 netlist files. 35 | 36 | 37 | 1.0.0 (2021-09-17) 38 | ______________________ 39 | 40 | * Decided this tool was mature enough that it could be called 1.0.0. 41 | 42 | 43 | 0.1.2 (2019-02-23) 44 | ______________________ 45 | 46 | * Files are now opened with latin_1 encoding to allow special symbols used by KiCad. 47 | 48 | 49 | 0.1.1 (2019-01-28) 50 | ______________________ 51 | 52 | * Fixed problem where sheetpath.names and sheetpath.tstamps were not retrievable. 53 | 54 | 55 | 0.1.0 (2019-01-24) 56 | ______________________ 57 | 58 | * Restructured the parser to make it work with the current version of pyparsing. 59 | 60 | 61 | 0.0.5 (2018-12-30) 62 | ______________________ 63 | 64 | * Restricted pyparsing package to version < 2.3.0 because that one started breaking things. 65 | 66 | 67 | 0.0.4 (2018-08-27) 68 | ______________________ 69 | 70 | * KiCad V5 started putting description fields in component libsource. 71 | 72 | 73 | 0.0.3 (2018-02-14) 74 | ______________________ 75 | 76 | * Non-numeric revision is now allowed in the netlist rev field. 77 | 78 | 79 | 0.0.2 (2017-12-21) 80 | ______________________ 81 | 82 | * Fixed parse errors caused by fields with labels but no data like "(date)" . 83 | 84 | 85 | 0.0.1 (2017-07-12) 86 | ______________________ 87 | 88 | * First release on PyPI. 89 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017-2021, Dave Vandenbout. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include AUTHORS.rst 2 | include CONTRIBUTING.rst 3 | include HISTORY.rst 4 | include LICENSE 5 | include README.rst 6 | 7 | recursive-include tests * 8 | recursive-exclude * __pycache__ 9 | recursive-exclude * *.py[co] 10 | 11 | recursive-include docs *.rst conf.py Makefile make.bat 12 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: clean-pyc clean-build docs clean 2 | 3 | help: 4 | @echo "clean - remove all build, test, coverage and Python artifacts" 5 | @echo "clean-build - remove build artifacts" 6 | @echo "clean-pyc - remove Python file artifacts" 7 | @echo "clean-test - remove test and coverage artifacts" 8 | @echo "lint - check style with flake8" 9 | @echo "test - run tests quickly with the default Python" 10 | @echo "test-all - run tests on every Python version with tox" 11 | @echo "coverage - check code coverage quickly with the default Python" 12 | @echo "docs - generate Sphinx HTML documentation, including API docs" 13 | @echo "release - package and upload a release" 14 | @echo "dist - package" 15 | @echo "install - install the package to the active Python's site-packages" 16 | 17 | clean: clean-build clean-pyc clean-test 18 | 19 | clean-build: 20 | rm -fr build/ 21 | rm -fr dist/ 22 | rm -fr .eggs/ 23 | find . -name '*.egg-info' -exec rm -fr {} + 24 | find . -name '*.egg' -exec rm -f {} + 25 | 26 | clean-pyc: 27 | find . -name '*.pyc' -exec rm -f {} + 28 | find . -name '*.pyo' -exec rm -f {} + 29 | find . -name '*~' -exec rm -f {} + 30 | find . -name '__pycache__' -exec rm -fr {} + 31 | 32 | clean-test: 33 | rm -fr .tox/ 34 | rm -f .coverage 35 | rm -fr htmlcov/ 36 | 37 | lint: 38 | flake8 kinparse tests 39 | 40 | test: 41 | python setup.py test 42 | 43 | test-all: 44 | tox 45 | 46 | coverage: 47 | coverage run --source kinparse setup.py test 48 | coverage report -m 49 | coverage html 50 | open htmlcov/index.html 51 | 52 | docs: 53 | rm -f docs/kinparse.rst 54 | rm -f docs/modules.rst 55 | sphinx-apidoc -o docs/ kinparse 56 | $(MAKE) -C docs clean 57 | $(MAKE) -C docs html 58 | open docs/_build/html/index.html 59 | 60 | release: clean 61 | python setup.py sdist upload 62 | python setup.py bdist_wheel upload 63 | 64 | dist: clean 65 | python setup.py sdist 66 | python setup.py bdist_wheel 67 | ls -l dist 68 | 69 | install: clean 70 | python setup.py install 71 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | =============================== 2 | kinparse 3 | =============================== 4 | 5 | .. image:: https://img.shields.io/pypi/v/kinparse.svg 6 | :target: https://pypi.python.org/pypi/kinparse 7 | 8 | This is a parser for KiCad V5 through V8 schematic netlist files that are output by EESCHEMA. 9 | Just pass a file containing a netlist to the `parse_netlist()` function and 10 | it will deliver a `pyparsing object `_ 11 | containing all the netlist's information. 12 | 13 | * Free software: MIT license 14 | * Documentation: http://devbisme.github.io/kinparse 15 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # User-friendly check for sphinx-build 11 | ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) 12 | $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) 13 | endif 14 | 15 | # Internal variables. 16 | PAPEROPT_a4 = -D latex_paper_size=a4 17 | PAPEROPT_letter = -D latex_paper_size=letter 18 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 19 | # the i18n builder cannot share the environment and doctrees with the others 20 | I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 21 | 22 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext 23 | 24 | help: 25 | @echo "Please use \`make ' where is one of" 26 | @echo " html to make standalone HTML files" 27 | @echo " dirhtml to make HTML files named index.html in directories" 28 | @echo " singlehtml to make a single large HTML file" 29 | @echo " pickle to make pickle files" 30 | @echo " json to make JSON files" 31 | @echo " htmlhelp to make HTML files and a HTML help project" 32 | @echo " qthelp to make HTML files and a qthelp project" 33 | @echo " devhelp to make HTML files and a Devhelp project" 34 | @echo " epub to make an epub" 35 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 36 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 37 | @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" 38 | @echo " text to make text files" 39 | @echo " man to make manual pages" 40 | @echo " texinfo to make Texinfo files" 41 | @echo " info to make Texinfo files and run them through makeinfo" 42 | @echo " gettext to make PO message catalogs" 43 | @echo " changes to make an overview of all changed/added/deprecated items" 44 | @echo " xml to make Docutils-native XML files" 45 | @echo " pseudoxml to make pseudoxml-XML files for display purposes" 46 | @echo " linkcheck to check all external links for integrity" 47 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 48 | 49 | clean: 50 | rm -rf $(BUILDDIR)/* 51 | 52 | html: 53 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 54 | @echo 55 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 56 | 57 | dirhtml: 58 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 59 | @echo 60 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 61 | 62 | singlehtml: 63 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 64 | @echo 65 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 66 | 67 | pickle: 68 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 69 | @echo 70 | @echo "Build finished; now you can process the pickle files." 71 | 72 | json: 73 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 74 | @echo 75 | @echo "Build finished; now you can process the JSON files." 76 | 77 | htmlhelp: 78 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 79 | @echo 80 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 81 | ".hhp project file in $(BUILDDIR)/htmlhelp." 82 | 83 | qthelp: 84 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 85 | @echo 86 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 87 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 88 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/kinparse.qhcp" 89 | @echo "To view the help file:" 90 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/kinparse.qhc" 91 | 92 | devhelp: 93 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 94 | @echo 95 | @echo "Build finished." 96 | @echo "To view the help file:" 97 | @echo "# mkdir -p $$HOME/.local/share/devhelp/kinparse" 98 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/kinparse" 99 | @echo "# devhelp" 100 | 101 | epub: 102 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 103 | @echo 104 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 105 | 106 | latex: 107 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 108 | @echo 109 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 110 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 111 | "(use \`make latexpdf' here to do that automatically)." 112 | 113 | latexpdf: 114 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 115 | @echo "Running LaTeX files through pdflatex..." 116 | $(MAKE) -C $(BUILDDIR)/latex all-pdf 117 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 118 | 119 | latexpdfja: 120 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 121 | @echo "Running LaTeX files through platex and dvipdfmx..." 122 | $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja 123 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 124 | 125 | text: 126 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 127 | @echo 128 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 129 | 130 | man: 131 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 132 | @echo 133 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 134 | 135 | texinfo: 136 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 137 | @echo 138 | @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." 139 | @echo "Run \`make' in that directory to run these through makeinfo" \ 140 | "(use \`make info' here to do that automatically)." 141 | 142 | info: 143 | $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo 144 | @echo "Running Texinfo files through makeinfo..." 145 | make -C $(BUILDDIR)/texinfo info 146 | @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." 147 | 148 | gettext: 149 | $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale 150 | @echo 151 | @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." 152 | 153 | changes: 154 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 155 | @echo 156 | @echo "The overview file is in $(BUILDDIR)/changes." 157 | 158 | linkcheck: 159 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 160 | @echo 161 | @echo "Link check complete; look for any errors in the above output " \ 162 | "or in $(BUILDDIR)/linkcheck/output.txt." 163 | 164 | doctest: 165 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 166 | @echo "Testing of doctests in the sources finished, look at the " \ 167 | "results in $(BUILDDIR)/doctest/output.txt." 168 | 169 | xml: 170 | $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml 171 | @echo 172 | @echo "Build finished. The XML files are in $(BUILDDIR)/xml." 173 | 174 | pseudoxml: 175 | $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml 176 | @echo 177 | @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." 178 | -------------------------------------------------------------------------------- /docs/_build/doctrees/authors.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/doctrees/authors.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/contributing.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/doctrees/contributing.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/_build/doctrees/history.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/doctrees/history.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/installation.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/doctrees/installation.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/readme.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/doctrees/readme.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/usage.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/doctrees/usage.doctree -------------------------------------------------------------------------------- /docs/_build/singlehtml/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: ecccafe48cc1930afcdd4a62c9165506 4 | tags: 33eac41acc08762151beb8f3b7b86c8f 5 | -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/singlehtml/_static/ajax-loader.gif -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * basic.css 3 | * ~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- basic theme. 6 | * 7 | * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /* -- main layout ----------------------------------------------------------- */ 13 | 14 | div.clearer { 15 | clear: both; 16 | } 17 | 18 | div.section::after { 19 | display: block; 20 | content: ''; 21 | clear: left; 22 | } 23 | 24 | /* -- relbar ---------------------------------------------------------------- */ 25 | 26 | div.related { 27 | width: 100%; 28 | font-size: 90%; 29 | } 30 | 31 | div.related h3 { 32 | display: none; 33 | } 34 | 35 | div.related ul { 36 | margin: 0; 37 | padding: 0 0 0 10px; 38 | list-style: none; 39 | } 40 | 41 | div.related li { 42 | display: inline; 43 | } 44 | 45 | div.related li.right { 46 | float: right; 47 | margin-right: 5px; 48 | } 49 | 50 | /* -- sidebar --------------------------------------------------------------- */ 51 | 52 | div.sphinxsidebarwrapper { 53 | padding: 10px 5px 0 10px; 54 | } 55 | 56 | div.sphinxsidebar { 57 | float: left; 58 | width: 230px; 59 | margin-left: -100%; 60 | font-size: 90%; 61 | word-wrap: break-word; 62 | overflow-wrap : break-word; 63 | } 64 | 65 | div.sphinxsidebar ul { 66 | list-style: none; 67 | } 68 | 69 | div.sphinxsidebar ul ul, 70 | div.sphinxsidebar ul.want-points { 71 | margin-left: 20px; 72 | list-style: square; 73 | } 74 | 75 | div.sphinxsidebar ul ul { 76 | margin-top: 0; 77 | margin-bottom: 0; 78 | } 79 | 80 | div.sphinxsidebar form { 81 | margin-top: 10px; 82 | } 83 | 84 | div.sphinxsidebar input { 85 | border: 1px solid #98dbcc; 86 | font-family: sans-serif; 87 | font-size: 1em; 88 | } 89 | 90 | div.sphinxsidebar #searchbox form.search { 91 | overflow: hidden; 92 | } 93 | 94 | div.sphinxsidebar #searchbox input[type="text"] { 95 | float: left; 96 | width: 80%; 97 | padding: 0.25em; 98 | box-sizing: border-box; 99 | } 100 | 101 | div.sphinxsidebar #searchbox input[type="submit"] { 102 | float: left; 103 | width: 20%; 104 | border-left: none; 105 | padding: 0.25em; 106 | box-sizing: border-box; 107 | } 108 | 109 | 110 | img { 111 | border: 0; 112 | max-width: 100%; 113 | } 114 | 115 | /* -- search page ----------------------------------------------------------- */ 116 | 117 | ul.search { 118 | margin: 10px 0 0 20px; 119 | padding: 0; 120 | } 121 | 122 | ul.search li { 123 | padding: 5px 0 5px 20px; 124 | background-image: url(file.png); 125 | background-repeat: no-repeat; 126 | background-position: 0 7px; 127 | } 128 | 129 | ul.search li a { 130 | font-weight: bold; 131 | } 132 | 133 | ul.search li p.context { 134 | color: #888; 135 | margin: 2px 0 0 30px; 136 | text-align: left; 137 | } 138 | 139 | ul.keywordmatches li.goodmatch a { 140 | font-weight: bold; 141 | } 142 | 143 | /* -- index page ------------------------------------------------------------ */ 144 | 145 | table.contentstable { 146 | width: 90%; 147 | margin-left: auto; 148 | margin-right: auto; 149 | } 150 | 151 | table.contentstable p.biglink { 152 | line-height: 150%; 153 | } 154 | 155 | a.biglink { 156 | font-size: 1.3em; 157 | } 158 | 159 | span.linkdescr { 160 | font-style: italic; 161 | padding-top: 5px; 162 | font-size: 90%; 163 | } 164 | 165 | /* -- general index --------------------------------------------------------- */ 166 | 167 | table.indextable { 168 | width: 100%; 169 | } 170 | 171 | table.indextable td { 172 | text-align: left; 173 | vertical-align: top; 174 | } 175 | 176 | table.indextable ul { 177 | margin-top: 0; 178 | margin-bottom: 0; 179 | list-style-type: none; 180 | } 181 | 182 | table.indextable > tbody > tr > td > ul { 183 | padding-left: 0em; 184 | } 185 | 186 | table.indextable tr.pcap { 187 | height: 10px; 188 | } 189 | 190 | table.indextable tr.cap { 191 | margin-top: 10px; 192 | background-color: #f2f2f2; 193 | } 194 | 195 | img.toggler { 196 | margin-right: 3px; 197 | margin-top: 3px; 198 | cursor: pointer; 199 | } 200 | 201 | div.modindex-jumpbox { 202 | border-top: 1px solid #ddd; 203 | border-bottom: 1px solid #ddd; 204 | margin: 1em 0 1em 0; 205 | padding: 0.4em; 206 | } 207 | 208 | div.genindex-jumpbox { 209 | border-top: 1px solid #ddd; 210 | border-bottom: 1px solid #ddd; 211 | margin: 1em 0 1em 0; 212 | padding: 0.4em; 213 | } 214 | 215 | /* -- domain module index --------------------------------------------------- */ 216 | 217 | table.modindextable td { 218 | padding: 2px; 219 | border-collapse: collapse; 220 | } 221 | 222 | /* -- general body styles --------------------------------------------------- */ 223 | 224 | div.body { 225 | min-width: 360px; 226 | max-width: 800px; 227 | } 228 | 229 | div.body p, div.body dd, div.body li, div.body blockquote { 230 | -moz-hyphens: auto; 231 | -ms-hyphens: auto; 232 | -webkit-hyphens: auto; 233 | hyphens: auto; 234 | } 235 | 236 | a.headerlink { 237 | visibility: hidden; 238 | } 239 | 240 | a:visited { 241 | color: #551A8B; 242 | } 243 | 244 | h1:hover > a.headerlink, 245 | h2:hover > a.headerlink, 246 | h3:hover > a.headerlink, 247 | h4:hover > a.headerlink, 248 | h5:hover > a.headerlink, 249 | h6:hover > a.headerlink, 250 | dt:hover > a.headerlink, 251 | caption:hover > a.headerlink, 252 | p.caption:hover > a.headerlink, 253 | div.code-block-caption:hover > a.headerlink { 254 | visibility: visible; 255 | } 256 | 257 | div.body p.caption { 258 | text-align: inherit; 259 | } 260 | 261 | div.body td { 262 | text-align: left; 263 | } 264 | 265 | .first { 266 | margin-top: 0 !important; 267 | } 268 | 269 | p.rubric { 270 | margin-top: 30px; 271 | font-weight: bold; 272 | } 273 | 274 | img.align-left, figure.align-left, .figure.align-left, object.align-left { 275 | clear: left; 276 | float: left; 277 | margin-right: 1em; 278 | } 279 | 280 | img.align-right, figure.align-right, .figure.align-right, object.align-right { 281 | clear: right; 282 | float: right; 283 | margin-left: 1em; 284 | } 285 | 286 | img.align-center, figure.align-center, .figure.align-center, object.align-center { 287 | display: block; 288 | margin-left: auto; 289 | margin-right: auto; 290 | } 291 | 292 | img.align-default, figure.align-default, .figure.align-default { 293 | display: block; 294 | margin-left: auto; 295 | margin-right: auto; 296 | } 297 | 298 | .align-left { 299 | text-align: left; 300 | } 301 | 302 | .align-center { 303 | text-align: center; 304 | } 305 | 306 | .align-default { 307 | text-align: center; 308 | } 309 | 310 | .align-right { 311 | text-align: right; 312 | } 313 | 314 | /* -- sidebars -------------------------------------------------------------- */ 315 | 316 | div.sidebar, 317 | aside.sidebar { 318 | margin: 0 0 0.5em 1em; 319 | border: 1px solid #ddb; 320 | padding: 7px; 321 | background-color: #ffe; 322 | width: 40%; 323 | float: right; 324 | clear: right; 325 | overflow-x: auto; 326 | } 327 | 328 | p.sidebar-title { 329 | font-weight: bold; 330 | } 331 | 332 | nav.contents, 333 | aside.topic, 334 | div.admonition, div.topic, blockquote { 335 | clear: left; 336 | } 337 | 338 | /* -- topics ---------------------------------------------------------------- */ 339 | 340 | nav.contents, 341 | aside.topic, 342 | div.topic { 343 | border: 1px solid #ccc; 344 | padding: 7px; 345 | margin: 10px 0 10px 0; 346 | } 347 | 348 | p.topic-title { 349 | font-size: 1.1em; 350 | font-weight: bold; 351 | margin-top: 10px; 352 | } 353 | 354 | /* -- admonitions ----------------------------------------------------------- */ 355 | 356 | div.admonition { 357 | margin-top: 10px; 358 | margin-bottom: 10px; 359 | padding: 7px; 360 | } 361 | 362 | div.admonition dt { 363 | font-weight: bold; 364 | } 365 | 366 | p.admonition-title { 367 | margin: 0px 10px 5px 0px; 368 | font-weight: bold; 369 | } 370 | 371 | div.body p.centered { 372 | text-align: center; 373 | margin-top: 25px; 374 | } 375 | 376 | /* -- content of sidebars/topics/admonitions -------------------------------- */ 377 | 378 | div.sidebar > :last-child, 379 | aside.sidebar > :last-child, 380 | nav.contents > :last-child, 381 | aside.topic > :last-child, 382 | div.topic > :last-child, 383 | div.admonition > :last-child { 384 | margin-bottom: 0; 385 | } 386 | 387 | div.sidebar::after, 388 | aside.sidebar::after, 389 | nav.contents::after, 390 | aside.topic::after, 391 | div.topic::after, 392 | div.admonition::after, 393 | blockquote::after { 394 | display: block; 395 | content: ''; 396 | clear: both; 397 | } 398 | 399 | /* -- tables ---------------------------------------------------------------- */ 400 | 401 | table.docutils { 402 | margin-top: 10px; 403 | margin-bottom: 10px; 404 | border: 0; 405 | border-collapse: collapse; 406 | } 407 | 408 | table.align-center { 409 | margin-left: auto; 410 | margin-right: auto; 411 | } 412 | 413 | table.align-default { 414 | margin-left: auto; 415 | margin-right: auto; 416 | } 417 | 418 | table caption span.caption-number { 419 | font-style: italic; 420 | } 421 | 422 | table caption span.caption-text { 423 | } 424 | 425 | table.docutils td, table.docutils th { 426 | padding: 1px 8px 1px 5px; 427 | border-top: 0; 428 | border-left: 0; 429 | border-right: 0; 430 | border-bottom: 1px solid #aaa; 431 | } 432 | 433 | th { 434 | text-align: left; 435 | padding-right: 5px; 436 | } 437 | 438 | table.citation { 439 | border-left: solid 1px gray; 440 | margin-left: 1px; 441 | } 442 | 443 | table.citation td { 444 | border-bottom: none; 445 | } 446 | 447 | th > :first-child, 448 | td > :first-child { 449 | margin-top: 0px; 450 | } 451 | 452 | th > :last-child, 453 | td > :last-child { 454 | margin-bottom: 0px; 455 | } 456 | 457 | /* -- figures --------------------------------------------------------------- */ 458 | 459 | div.figure, figure { 460 | margin: 0.5em; 461 | padding: 0.5em; 462 | } 463 | 464 | div.figure p.caption, figcaption { 465 | padding: 0.3em; 466 | } 467 | 468 | div.figure p.caption span.caption-number, 469 | figcaption span.caption-number { 470 | font-style: italic; 471 | } 472 | 473 | div.figure p.caption span.caption-text, 474 | figcaption span.caption-text { 475 | } 476 | 477 | /* -- field list styles ----------------------------------------------------- */ 478 | 479 | table.field-list td, table.field-list th { 480 | border: 0 !important; 481 | } 482 | 483 | .field-list ul { 484 | margin: 0; 485 | padding-left: 1em; 486 | } 487 | 488 | .field-list p { 489 | margin: 0; 490 | } 491 | 492 | .field-name { 493 | -moz-hyphens: manual; 494 | -ms-hyphens: manual; 495 | -webkit-hyphens: manual; 496 | hyphens: manual; 497 | } 498 | 499 | /* -- hlist styles ---------------------------------------------------------- */ 500 | 501 | table.hlist { 502 | margin: 1em 0; 503 | } 504 | 505 | table.hlist td { 506 | vertical-align: top; 507 | } 508 | 509 | /* -- object description styles --------------------------------------------- */ 510 | 511 | .sig { 512 | font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; 513 | } 514 | 515 | .sig-name, code.descname { 516 | background-color: transparent; 517 | font-weight: bold; 518 | } 519 | 520 | .sig-name { 521 | font-size: 1.1em; 522 | } 523 | 524 | code.descname { 525 | font-size: 1.2em; 526 | } 527 | 528 | .sig-prename, code.descclassname { 529 | background-color: transparent; 530 | } 531 | 532 | .optional { 533 | font-size: 1.3em; 534 | } 535 | 536 | .sig-paren { 537 | font-size: larger; 538 | } 539 | 540 | .sig-param.n { 541 | font-style: italic; 542 | } 543 | 544 | /* C++ specific styling */ 545 | 546 | .sig-inline.c-texpr, 547 | .sig-inline.cpp-texpr { 548 | font-family: unset; 549 | } 550 | 551 | .sig.c .k, .sig.c .kt, 552 | .sig.cpp .k, .sig.cpp .kt { 553 | color: #0033B3; 554 | } 555 | 556 | .sig.c .m, 557 | .sig.cpp .m { 558 | color: #1750EB; 559 | } 560 | 561 | .sig.c .s, .sig.c .sc, 562 | .sig.cpp .s, .sig.cpp .sc { 563 | color: #067D17; 564 | } 565 | 566 | 567 | /* -- other body styles ----------------------------------------------------- */ 568 | 569 | ol.arabic { 570 | list-style: decimal; 571 | } 572 | 573 | ol.loweralpha { 574 | list-style: lower-alpha; 575 | } 576 | 577 | ol.upperalpha { 578 | list-style: upper-alpha; 579 | } 580 | 581 | ol.lowerroman { 582 | list-style: lower-roman; 583 | } 584 | 585 | ol.upperroman { 586 | list-style: upper-roman; 587 | } 588 | 589 | :not(li) > ol > li:first-child > :first-child, 590 | :not(li) > ul > li:first-child > :first-child { 591 | margin-top: 0px; 592 | } 593 | 594 | :not(li) > ol > li:last-child > :last-child, 595 | :not(li) > ul > li:last-child > :last-child { 596 | margin-bottom: 0px; 597 | } 598 | 599 | ol.simple ol p, 600 | ol.simple ul p, 601 | ul.simple ol p, 602 | ul.simple ul p { 603 | margin-top: 0; 604 | } 605 | 606 | ol.simple > li:not(:first-child) > p, 607 | ul.simple > li:not(:first-child) > p { 608 | margin-top: 0; 609 | } 610 | 611 | ol.simple p, 612 | ul.simple p { 613 | margin-bottom: 0; 614 | } 615 | 616 | aside.footnote > span, 617 | div.citation > span { 618 | float: left; 619 | } 620 | aside.footnote > span:last-of-type, 621 | div.citation > span:last-of-type { 622 | padding-right: 0.5em; 623 | } 624 | aside.footnote > p { 625 | margin-left: 2em; 626 | } 627 | div.citation > p { 628 | margin-left: 4em; 629 | } 630 | aside.footnote > p:last-of-type, 631 | div.citation > p:last-of-type { 632 | margin-bottom: 0em; 633 | } 634 | aside.footnote > p:last-of-type:after, 635 | div.citation > p:last-of-type:after { 636 | content: ""; 637 | clear: both; 638 | } 639 | 640 | dl.field-list { 641 | display: grid; 642 | grid-template-columns: fit-content(30%) auto; 643 | } 644 | 645 | dl.field-list > dt { 646 | font-weight: bold; 647 | word-break: break-word; 648 | padding-left: 0.5em; 649 | padding-right: 5px; 650 | } 651 | 652 | dl.field-list > dd { 653 | padding-left: 0.5em; 654 | margin-top: 0em; 655 | margin-left: 0em; 656 | margin-bottom: 0em; 657 | } 658 | 659 | dl { 660 | margin-bottom: 15px; 661 | } 662 | 663 | dd > :first-child { 664 | margin-top: 0px; 665 | } 666 | 667 | dd ul, dd table { 668 | margin-bottom: 10px; 669 | } 670 | 671 | dd { 672 | margin-top: 3px; 673 | margin-bottom: 10px; 674 | margin-left: 30px; 675 | } 676 | 677 | .sig dd { 678 | margin-top: 0px; 679 | margin-bottom: 0px; 680 | } 681 | 682 | .sig dl { 683 | margin-top: 0px; 684 | margin-bottom: 0px; 685 | } 686 | 687 | dl > dd:last-child, 688 | dl > dd:last-child > :last-child { 689 | margin-bottom: 0; 690 | } 691 | 692 | dt:target, span.highlighted { 693 | background-color: #fbe54e; 694 | } 695 | 696 | rect.highlighted { 697 | fill: #fbe54e; 698 | } 699 | 700 | dl.glossary dt { 701 | font-weight: bold; 702 | font-size: 1.1em; 703 | } 704 | 705 | .versionmodified { 706 | font-style: italic; 707 | } 708 | 709 | .system-message { 710 | background-color: #fda; 711 | padding: 5px; 712 | border: 3px solid red; 713 | } 714 | 715 | .footnote:target { 716 | background-color: #ffa; 717 | } 718 | 719 | .line-block { 720 | display: block; 721 | margin-top: 1em; 722 | margin-bottom: 1em; 723 | } 724 | 725 | .line-block .line-block { 726 | margin-top: 0; 727 | margin-bottom: 0; 728 | margin-left: 1.5em; 729 | } 730 | 731 | .guilabel, .menuselection { 732 | font-family: sans-serif; 733 | } 734 | 735 | .accelerator { 736 | text-decoration: underline; 737 | } 738 | 739 | .classifier { 740 | font-style: oblique; 741 | } 742 | 743 | .classifier:before { 744 | font-style: normal; 745 | margin: 0 0.5em; 746 | content: ":"; 747 | display: inline-block; 748 | } 749 | 750 | abbr, acronym { 751 | border-bottom: dotted 1px; 752 | cursor: help; 753 | } 754 | 755 | .translated { 756 | background-color: rgba(207, 255, 207, 0.2) 757 | } 758 | 759 | .untranslated { 760 | background-color: rgba(255, 207, 207, 0.2) 761 | } 762 | 763 | /* -- code displays --------------------------------------------------------- */ 764 | 765 | pre { 766 | overflow: auto; 767 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 768 | } 769 | 770 | pre, div[class*="highlight-"] { 771 | clear: both; 772 | } 773 | 774 | span.pre { 775 | -moz-hyphens: none; 776 | -ms-hyphens: none; 777 | -webkit-hyphens: none; 778 | hyphens: none; 779 | white-space: nowrap; 780 | } 781 | 782 | div[class*="highlight-"] { 783 | margin: 1em 0; 784 | } 785 | 786 | td.linenos pre { 787 | border: 0; 788 | background-color: transparent; 789 | color: #aaa; 790 | } 791 | 792 | table.highlighttable { 793 | display: block; 794 | } 795 | 796 | table.highlighttable tbody { 797 | display: block; 798 | } 799 | 800 | table.highlighttable tr { 801 | display: flex; 802 | } 803 | 804 | table.highlighttable td { 805 | margin: 0; 806 | padding: 0; 807 | } 808 | 809 | table.highlighttable td.linenos { 810 | padding-right: 0.5em; 811 | } 812 | 813 | table.highlighttable td.code { 814 | flex: 1; 815 | overflow: hidden; 816 | } 817 | 818 | .highlight .hll { 819 | display: block; 820 | } 821 | 822 | div.highlight pre, 823 | table.highlighttable pre { 824 | margin: 0; 825 | } 826 | 827 | div.code-block-caption + div { 828 | margin-top: 0; 829 | } 830 | 831 | div.code-block-caption { 832 | margin-top: 1em; 833 | padding: 2px 5px; 834 | font-size: small; 835 | } 836 | 837 | div.code-block-caption code { 838 | background-color: transparent; 839 | } 840 | 841 | table.highlighttable td.linenos, 842 | span.linenos, 843 | div.highlight span.gp { /* gp: Generic.Prompt */ 844 | user-select: none; 845 | -webkit-user-select: text; /* Safari fallback only */ 846 | -webkit-user-select: none; /* Chrome/Safari */ 847 | -moz-user-select: none; /* Firefox */ 848 | -ms-user-select: none; /* IE10+ */ 849 | } 850 | 851 | div.code-block-caption span.caption-number { 852 | padding: 0.1em 0.3em; 853 | font-style: italic; 854 | } 855 | 856 | div.code-block-caption span.caption-text { 857 | } 858 | 859 | div.literal-block-wrapper { 860 | margin: 1em 0; 861 | } 862 | 863 | code.xref, a code { 864 | background-color: transparent; 865 | font-weight: bold; 866 | } 867 | 868 | h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { 869 | background-color: transparent; 870 | } 871 | 872 | .viewcode-link { 873 | float: right; 874 | } 875 | 876 | .viewcode-back { 877 | float: right; 878 | font-family: sans-serif; 879 | } 880 | 881 | div.viewcode-block:target { 882 | margin: -1px -10px; 883 | padding: 0 10px; 884 | } 885 | 886 | /* -- math display ---------------------------------------------------------- */ 887 | 888 | img.math { 889 | vertical-align: middle; 890 | } 891 | 892 | div.body div.math p { 893 | text-align: center; 894 | } 895 | 896 | span.eqno { 897 | float: right; 898 | } 899 | 900 | span.eqno a.headerlink { 901 | position: absolute; 902 | z-index: 1; 903 | } 904 | 905 | div.math:hover a.headerlink { 906 | visibility: visible; 907 | } 908 | 909 | /* -- printout stylesheet --------------------------------------------------- */ 910 | 911 | @media print { 912 | div.document, 913 | div.documentwrapper, 914 | div.bodywrapper { 915 | margin: 0 !important; 916 | width: 100%; 917 | } 918 | 919 | div.sphinxsidebar, 920 | div.related, 921 | div.footer, 922 | #top-link { 923 | display: none; 924 | } 925 | } -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/classic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * classic.css_t 3 | * ~~~~~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- classic theme. 6 | * 7 | * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | @import url("basic.css"); 13 | 14 | /* -- page layout ----------------------------------------------------------- */ 15 | 16 | html { 17 | /* CSS hack for macOS's scrollbar (see #1125) */ 18 | background-color: #FFFFFF; 19 | } 20 | 21 | body { 22 | font-family: sans-serif; 23 | font-size: 100%; 24 | background-color: #11303d; 25 | color: #000; 26 | margin: 0; 27 | padding: 0; 28 | } 29 | 30 | div.document { 31 | display: flex; 32 | background-color: #1c4e63; 33 | } 34 | 35 | div.documentwrapper { 36 | float: left; 37 | width: 100%; 38 | } 39 | 40 | div.bodywrapper { 41 | margin: 0 0 0 230px; 42 | } 43 | 44 | div.body { 45 | background-color: #ffffff; 46 | color: #000000; 47 | padding: 0 20px 30px 20px; 48 | } 49 | 50 | div.footer { 51 | color: #ffffff; 52 | width: 100%; 53 | padding: 9px 0 9px 0; 54 | text-align: center; 55 | font-size: 75%; 56 | } 57 | 58 | div.footer a { 59 | color: #ffffff; 60 | text-decoration: underline; 61 | } 62 | 63 | div.related { 64 | background-color: #133f52; 65 | line-height: 30px; 66 | color: #ffffff; 67 | } 68 | 69 | div.related a { 70 | color: #ffffff; 71 | } 72 | 73 | div.sphinxsidebar { 74 | } 75 | 76 | div.sphinxsidebar h3 { 77 | font-family: 'Trebuchet MS', sans-serif; 78 | color: #ffffff; 79 | font-size: 1.4em; 80 | font-weight: normal; 81 | margin: 0; 82 | padding: 0; 83 | } 84 | 85 | div.sphinxsidebar h3 a { 86 | color: #ffffff; 87 | } 88 | 89 | div.sphinxsidebar h4 { 90 | font-family: 'Trebuchet MS', sans-serif; 91 | color: #ffffff; 92 | font-size: 1.3em; 93 | font-weight: normal; 94 | margin: 5px 0 0 0; 95 | padding: 0; 96 | } 97 | 98 | div.sphinxsidebar p { 99 | color: #ffffff; 100 | } 101 | 102 | div.sphinxsidebar p.topless { 103 | margin: 5px 10px 10px 10px; 104 | } 105 | 106 | div.sphinxsidebar ul { 107 | margin: 10px; 108 | padding: 0; 109 | color: #ffffff; 110 | } 111 | 112 | div.sphinxsidebar a { 113 | color: #98dbcc; 114 | } 115 | 116 | div.sphinxsidebar input { 117 | border: 1px solid #98dbcc; 118 | font-family: sans-serif; 119 | font-size: 1em; 120 | } 121 | 122 | 123 | 124 | /* -- hyperlink styles ------------------------------------------------------ */ 125 | 126 | a { 127 | color: #355f7c; 128 | text-decoration: none; 129 | } 130 | 131 | a:visited { 132 | color: #551a8b; 133 | text-decoration: none; 134 | } 135 | 136 | a:hover { 137 | text-decoration: underline; 138 | } 139 | 140 | 141 | 142 | /* -- body styles ----------------------------------------------------------- */ 143 | 144 | div.body h1, 145 | div.body h2, 146 | div.body h3, 147 | div.body h4, 148 | div.body h5, 149 | div.body h6 { 150 | font-family: 'Trebuchet MS', sans-serif; 151 | background-color: #f2f2f2; 152 | font-weight: normal; 153 | color: #20435c; 154 | border-bottom: 1px solid #ccc; 155 | margin: 20px -20px 10px -20px; 156 | padding: 3px 0 3px 10px; 157 | } 158 | 159 | div.body h1 { margin-top: 0; font-size: 200%; } 160 | div.body h2 { font-size: 160%; } 161 | div.body h3 { font-size: 140%; } 162 | div.body h4 { font-size: 120%; } 163 | div.body h5 { font-size: 110%; } 164 | div.body h6 { font-size: 100%; } 165 | 166 | a.headerlink { 167 | color: #c60f0f; 168 | font-size: 0.8em; 169 | padding: 0 4px 0 4px; 170 | text-decoration: none; 171 | } 172 | 173 | a.headerlink:hover { 174 | background-color: #c60f0f; 175 | color: white; 176 | } 177 | 178 | div.body p, div.body dd, div.body li, div.body blockquote { 179 | text-align: justify; 180 | line-height: 130%; 181 | } 182 | 183 | div.admonition p.admonition-title + p { 184 | display: inline; 185 | } 186 | 187 | div.admonition p { 188 | margin-bottom: 5px; 189 | } 190 | 191 | div.admonition pre { 192 | margin-bottom: 5px; 193 | } 194 | 195 | div.admonition ul, div.admonition ol { 196 | margin-bottom: 5px; 197 | } 198 | 199 | div.note { 200 | background-color: #eee; 201 | border: 1px solid #ccc; 202 | } 203 | 204 | div.seealso { 205 | background-color: #ffc; 206 | border: 1px solid #ff6; 207 | } 208 | 209 | nav.contents, 210 | aside.topic, 211 | div.topic { 212 | background-color: #eee; 213 | } 214 | 215 | div.warning { 216 | background-color: #ffe4e4; 217 | border: 1px solid #f66; 218 | } 219 | 220 | p.admonition-title { 221 | display: inline; 222 | } 223 | 224 | p.admonition-title:after { 225 | content: ":"; 226 | } 227 | 228 | pre { 229 | padding: 5px; 230 | background-color: unset; 231 | color: unset; 232 | line-height: 120%; 233 | border: 1px solid #ac9; 234 | border-left: none; 235 | border-right: none; 236 | } 237 | 238 | code { 239 | background-color: #ecf0f3; 240 | padding: 0 1px 0 1px; 241 | font-size: 0.95em; 242 | } 243 | 244 | th, dl.field-list > dt { 245 | background-color: #ede; 246 | } 247 | 248 | .warning code { 249 | background: #efc2c2; 250 | } 251 | 252 | .note code { 253 | background: #d6d6d6; 254 | } 255 | 256 | .viewcode-back { 257 | font-family: sans-serif; 258 | } 259 | 260 | div.viewcode-block:target { 261 | background-color: #f4debf; 262 | border-top: 1px solid #ac9; 263 | border-bottom: 1px solid #ac9; 264 | } 265 | 266 | div.code-block-caption { 267 | color: #efefef; 268 | background-color: #1c4e63; 269 | } -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/comment-bright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/singlehtml/_static/comment-bright.png -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/comment-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/singlehtml/_static/comment-close.png -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/singlehtml/_static/comment.png -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/default.css: -------------------------------------------------------------------------------- 1 | @import url("classic.css"); 2 | -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Base JavaScript utilities for all Sphinx HTML documentation. 6 | * 7 | * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | "use strict"; 12 | 13 | const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ 14 | "TEXTAREA", 15 | "INPUT", 16 | "SELECT", 17 | "BUTTON", 18 | ]); 19 | 20 | const _ready = (callback) => { 21 | if (document.readyState !== "loading") { 22 | callback(); 23 | } else { 24 | document.addEventListener("DOMContentLoaded", callback); 25 | } 26 | }; 27 | 28 | /** 29 | * Small JavaScript module for the documentation. 30 | */ 31 | const Documentation = { 32 | init: () => { 33 | Documentation.initDomainIndexTable(); 34 | Documentation.initOnKeyListeners(); 35 | }, 36 | 37 | /** 38 | * i18n support 39 | */ 40 | TRANSLATIONS: {}, 41 | PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), 42 | LOCALE: "unknown", 43 | 44 | // gettext and ngettext don't access this so that the functions 45 | // can safely bound to a different name (_ = Documentation.gettext) 46 | gettext: (string) => { 47 | const translated = Documentation.TRANSLATIONS[string]; 48 | switch (typeof translated) { 49 | case "undefined": 50 | return string; // no translation 51 | case "string": 52 | return translated; // translation exists 53 | default: 54 | return translated[0]; // (singular, plural) translation tuple exists 55 | } 56 | }, 57 | 58 | ngettext: (singular, plural, n) => { 59 | const translated = Documentation.TRANSLATIONS[singular]; 60 | if (typeof translated !== "undefined") 61 | return translated[Documentation.PLURAL_EXPR(n)]; 62 | return n === 1 ? singular : plural; 63 | }, 64 | 65 | addTranslations: (catalog) => { 66 | Object.assign(Documentation.TRANSLATIONS, catalog.messages); 67 | Documentation.PLURAL_EXPR = new Function( 68 | "n", 69 | `return (${catalog.plural_expr})` 70 | ); 71 | Documentation.LOCALE = catalog.locale; 72 | }, 73 | 74 | /** 75 | * helper function to focus on search bar 76 | */ 77 | focusSearchBar: () => { 78 | document.querySelectorAll("input[name=q]")[0]?.focus(); 79 | }, 80 | 81 | /** 82 | * Initialise the domain index toggle buttons 83 | */ 84 | initDomainIndexTable: () => { 85 | const toggler = (el) => { 86 | const idNumber = el.id.substr(7); 87 | const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); 88 | if (el.src.substr(-9) === "minus.png") { 89 | el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; 90 | toggledRows.forEach((el) => (el.style.display = "none")); 91 | } else { 92 | el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; 93 | toggledRows.forEach((el) => (el.style.display = "")); 94 | } 95 | }; 96 | 97 | const togglerElements = document.querySelectorAll("img.toggler"); 98 | togglerElements.forEach((el) => 99 | el.addEventListener("click", (event) => toggler(event.currentTarget)) 100 | ); 101 | togglerElements.forEach((el) => (el.style.display = "")); 102 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); 103 | }, 104 | 105 | initOnKeyListeners: () => { 106 | // only install a listener if it is really needed 107 | if ( 108 | !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && 109 | !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS 110 | ) 111 | return; 112 | 113 | document.addEventListener("keydown", (event) => { 114 | // bail for input elements 115 | if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; 116 | // bail with special keys 117 | if (event.altKey || event.ctrlKey || event.metaKey) return; 118 | 119 | if (!event.shiftKey) { 120 | switch (event.key) { 121 | case "ArrowLeft": 122 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 123 | 124 | const prevLink = document.querySelector('link[rel="prev"]'); 125 | if (prevLink && prevLink.href) { 126 | window.location.href = prevLink.href; 127 | event.preventDefault(); 128 | } 129 | break; 130 | case "ArrowRight": 131 | if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; 132 | 133 | const nextLink = document.querySelector('link[rel="next"]'); 134 | if (nextLink && nextLink.href) { 135 | window.location.href = nextLink.href; 136 | event.preventDefault(); 137 | } 138 | break; 139 | } 140 | } 141 | 142 | // some keyboard layouts may need Shift to get / 143 | switch (event.key) { 144 | case "/": 145 | if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; 146 | Documentation.focusSearchBar(); 147 | event.preventDefault(); 148 | } 149 | }); 150 | }, 151 | }; 152 | 153 | // quick alias for translations 154 | const _ = Documentation.gettext; 155 | 156 | _ready(Documentation.init); 157 | -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/down-pressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/singlehtml/_static/down-pressed.png -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/singlehtml/_static/down.png -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/singlehtml/_static/file.png -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/singlehtml/_static/minus.png -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/_build/singlehtml/_static/plus.png -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/pygments.css: -------------------------------------------------------------------------------- 1 | pre { line-height: 125%; } 2 | td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 3 | span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } 4 | td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 5 | span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } 6 | .highlight .hll { background-color: #ffffcc } 7 | .highlight { background: #eeffcc; } 8 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 9 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 10 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 11 | .highlight .o { color: #666666 } /* Operator */ 12 | .highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */ 13 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 14 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 15 | .highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */ 16 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 17 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 18 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 19 | .highlight .ge { font-style: italic } /* Generic.Emph */ 20 | .highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */ 21 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 22 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 23 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 24 | .highlight .go { color: #333333 } /* Generic.Output */ 25 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 26 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 27 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 28 | .highlight .gt { color: #0044DD } /* Generic.Traceback */ 29 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 30 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 31 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 32 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 33 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 34 | .highlight .kt { color: #902000 } /* Keyword.Type */ 35 | .highlight .m { color: #208050 } /* Literal.Number */ 36 | .highlight .s { color: #4070a0 } /* Literal.String */ 37 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 38 | .highlight .nb { color: #007020 } /* Name.Builtin */ 39 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 40 | .highlight .no { color: #60add5 } /* Name.Constant */ 41 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 42 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 43 | .highlight .ne { color: #007020 } /* Name.Exception */ 44 | .highlight .nf { color: #06287e } /* Name.Function */ 45 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 46 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 47 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 48 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 49 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 50 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 51 | .highlight .mb { color: #208050 } /* Literal.Number.Bin */ 52 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 53 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 54 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 55 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 56 | .highlight .sa { color: #4070a0 } /* Literal.String.Affix */ 57 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 58 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 59 | .highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */ 60 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 61 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 62 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 63 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 64 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 65 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 66 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 67 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 68 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 69 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 70 | .highlight .fm { color: #06287e } /* Name.Function.Magic */ 71 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 72 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 73 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 74 | .highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */ 75 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/sidebar.js: -------------------------------------------------------------------------------- 1 | /* 2 | * sidebar.js 3 | * ~~~~~~~~~~ 4 | * 5 | * This script makes the Sphinx sidebar collapsible. 6 | * 7 | * .sphinxsidebar contains .sphinxsidebarwrapper. This script adds 8 | * in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton 9 | * used to collapse and expand the sidebar. 10 | * 11 | * When the sidebar is collapsed the .sphinxsidebarwrapper is hidden 12 | * and the width of the sidebar and the margin-left of the document 13 | * are decreased. When the sidebar is expanded the opposite happens. 14 | * This script saves a per-browser/per-session cookie used to 15 | * remember the position of the sidebar among the pages. 16 | * Once the browser is closed the cookie is deleted and the position 17 | * reset to the default (expanded). 18 | * 19 | * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS. 20 | * :license: BSD, see LICENSE for details. 21 | * 22 | */ 23 | 24 | const initialiseSidebar = () => { 25 | 26 | 27 | 28 | 29 | // global elements used by the functions. 30 | const bodyWrapper = document.getElementsByClassName("bodywrapper")[0] 31 | const sidebar = document.getElementsByClassName("sphinxsidebar")[0] 32 | const sidebarWrapper = document.getElementsByClassName('sphinxsidebarwrapper')[0] 33 | const sidebarButton = document.getElementById("sidebarbutton") 34 | const sidebarArrow = sidebarButton.querySelector('span') 35 | 36 | // for some reason, the document has no sidebar; do not run into errors 37 | if (typeof sidebar === "undefined") return; 38 | 39 | const flipArrow = element => element.innerText = (element.innerText === "»") ? "«" : "»" 40 | 41 | const collapse_sidebar = () => { 42 | bodyWrapper.style.marginLeft = ".8em"; 43 | sidebar.style.width = ".8em" 44 | sidebarWrapper.style.display = "none" 45 | flipArrow(sidebarArrow) 46 | sidebarButton.title = _('Expand sidebar') 47 | window.localStorage.setItem("sidebar", "collapsed") 48 | } 49 | 50 | const expand_sidebar = () => { 51 | bodyWrapper.style.marginLeft = "" 52 | sidebar.style.removeProperty("width") 53 | sidebarWrapper.style.display = "" 54 | flipArrow(sidebarArrow) 55 | sidebarButton.title = _('Collapse sidebar') 56 | window.localStorage.setItem("sidebar", "expanded") 57 | } 58 | 59 | sidebarButton.addEventListener("click", () => { 60 | (sidebarWrapper.style.display === "none") ? expand_sidebar() : collapse_sidebar() 61 | }) 62 | 63 | if (!window.localStorage.getItem("sidebar")) return 64 | const value = window.localStorage.getItem("sidebar") 65 | if (value === "collapsed") collapse_sidebar(); 66 | else if (value === "expanded") expand_sidebar(); 67 | } 68 | 69 | if (document.readyState !== "loading") initialiseSidebar() 70 | else document.addEventListener("DOMContentLoaded", initialiseSidebar) -------------------------------------------------------------------------------- /docs/_build/singlehtml/_static/underscore.js: -------------------------------------------------------------------------------- 1 | !function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){ 2 | // Underscore.js 1.13.1 3 | // https://underscorejs.org 4 | // (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors 5 | // Underscore may be freely distributed under the MIT license. 6 | var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e":">",'"':""","'":"'","`":"`"},Cn=Ln($n),Kn=Ln(_n($n)),Jn=tn.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Gn=/(.)^/,Hn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qn=/\\|'|\r|\n|\u2028|\u2029/g;function Xn(n){return"\\"+Hn[n]}var Yn=/^\s*(\w|\$)+\s*$/;var Zn=0;function nr(n,r,t,e,u){if(!(e instanceof r))return n.apply(t,u);var o=Mn(n.prototype),i=n.apply(o,u);return _(i)?i:o}var rr=j((function(n,r){var t=rr.placeholder,e=function(){for(var u=0,o=r.length,i=Array(o),a=0;a1)ur(a,r-1,t,e),u=e.length;else for(var f=0,c=a.length;f0&&(t=r.apply(this,arguments)),n<=1&&(r=null),t}}var lr=rr(cr,2);function sr(n,r,t){r=qn(r,t);for(var e,u=nn(n),o=0,i=u.length;o0?0:u-1;o>=0&&o0?a=o>=0?o:Math.max(o+f,a):f=o>=0?Math.min(o+1,f):o+f+1;else if(t&&o&&f)return e[o=t(e,u)]===u?o:-1;if(u!=u)return(o=r(i.call(e,a,f),$))>=0?o+a:-1;for(o=n>0?a:f-1;o>=0&&o0?0:i-1;for(u||(e=r[o?o[a]:a],a+=n);a>=0&&a=3;return r(n,Fn(t,u,4),e,o)}}var Ar=wr(1),xr=wr(-1);function Sr(n,r,t){var e=[];return r=qn(r,t),jr(n,(function(n,t,u){r(n,t,u)&&e.push(n)})),e}function Or(n,r,t){r=qn(r,t);for(var e=!er(n)&&nn(n),u=(e||n).length,o=0;o=0}var Br=j((function(n,r,t){var e,u;return D(r)?u=r:(r=Nn(r),e=r.slice(0,-1),r=r[r.length-1]),_r(n,(function(n){var o=u;if(!o){if(e&&e.length&&(n=In(n,e)),null==n)return;o=n[r]}return null==o?o:o.apply(n,t)}))}));function Nr(n,r){return _r(n,Rn(r))}function Ir(n,r,t){var e,u,o=-1/0,i=-1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ao&&(o=e);else r=qn(r,t),jr(n,(function(n,t,e){((u=r(n,t,e))>i||u===-1/0&&o===-1/0)&&(o=n,i=u)}));return o}function Tr(n,r,t){if(null==r||t)return er(n)||(n=jn(n)),n[Wn(n.length-1)];var e=er(n)?En(n):jn(n),u=Y(e);r=Math.max(Math.min(r,u),0);for(var o=u-1,i=0;i1&&(e=Fn(e,r[1])),r=an(n)):(e=qr,r=ur(r,!1,!1),n=Object(n));for(var u=0,o=r.length;u1&&(t=r[1])):(r=_r(ur(r,!1,!1),String),e=function(n,t){return!Er(r,t)}),Ur(n,e,t)}));function zr(n,r,t){return i.call(n,0,Math.max(0,n.length-(null==r||t?1:r)))}function Lr(n,r,t){return null==n||n.length<1?null==r||t?void 0:[]:null==r||t?n[0]:zr(n,n.length-r)}function $r(n,r,t){return i.call(n,null==r||t?1:r)}var Cr=j((function(n,r){return r=ur(r,!0,!0),Sr(n,(function(n){return!Er(r,n)}))})),Kr=j((function(n,r){return Cr(n,r)}));function Jr(n,r,t,e){A(r)||(e=t,t=r,r=!1),null!=t&&(t=qn(t,e));for(var u=[],o=[],i=0,a=Y(n);ir?(e&&(clearTimeout(e),e=null),a=c,i=n.apply(u,o),e||(u=o=null)):e||!1===t.trailing||(e=setTimeout(f,l)),i};return c.cancel=function(){clearTimeout(e),a=0,e=u=o=null},c},debounce:function(n,r,t){var e,u,o,i,a,f=function(){var c=zn()-u;r>c?e=setTimeout(f,r-c):(e=null,t||(i=n.apply(a,o)),e||(o=a=null))},c=j((function(c){return a=this,o=c,u=zn(),e||(e=setTimeout(f,r),t&&(i=n.apply(a,o))),i}));return c.cancel=function(){clearTimeout(e),e=o=a=null},c},wrap:function(n,r){return rr(r,n)},negate:fr,compose:function(){var n=arguments,r=n.length-1;return function(){for(var t=r,e=n[r].apply(this,arguments);t--;)e=n[t].call(this,e);return e}},after:function(n,r){return function(){if(--n<1)return r.apply(this,arguments)}},before:cr,once:lr,findKey:sr,findIndex:vr,findLastIndex:hr,sortedIndex:yr,indexOf:gr,lastIndexOf:br,find:mr,detect:mr,findWhere:function(n,r){return mr(n,Dn(r))},each:jr,forEach:jr,map:_r,collect:_r,reduce:Ar,foldl:Ar,inject:Ar,reduceRight:xr,foldr:xr,filter:Sr,select:Sr,reject:function(n,r,t){return Sr(n,fr(qn(r)),t)},every:Or,all:Or,some:Mr,any:Mr,contains:Er,includes:Er,include:Er,invoke:Br,pluck:Nr,where:function(n,r){return Sr(n,Dn(r))},max:Ir,min:function(n,r,t){var e,u,o=1/0,i=1/0;if(null==r||"number"==typeof r&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=er(n)?n:jn(n)).length;ae||void 0===t)return 1;if(t v documentation". 125 | #html_title = None 126 | 127 | # A shorter title for the navigation bar. Default is the same as 128 | # html_title. 129 | #html_short_title = None 130 | 131 | # The name of an image file (relative to this directory) to place at the 132 | # top of the sidebar. 133 | #html_logo = None 134 | 135 | # The name of an image file (within the static path) to use as favicon 136 | # of the docs. This file should be a Windows icon file (.ico) being 137 | # 16x16 or 32x32 pixels large. 138 | #html_favicon = None 139 | 140 | # Add any paths that contain custom static files (such as style sheets) 141 | # here, relative to this directory. They are copied after the builtin 142 | # static files, so a file named "default.css" will overwrite the builtin 143 | # "default.css". 144 | html_static_path = ['_static'] 145 | 146 | # If not '', a 'Last updated on:' timestamp is inserted at every page 147 | # bottom, using the given strftime format. 148 | #html_last_updated_fmt = '%b %d, %Y' 149 | 150 | # If true, SmartyPants will be used to convert quotes and dashes to 151 | # typographically correct entities. 152 | #html_use_smartypants = True 153 | 154 | # Custom sidebar templates, maps document names to template names. 155 | #html_sidebars = {} 156 | 157 | # Additional templates that should be rendered to pages, maps page names 158 | # to template names. 159 | #html_additional_pages = {} 160 | 161 | # If false, no module index is generated. 162 | #html_domain_indices = True 163 | 164 | # If false, no index is generated. 165 | #html_use_index = True 166 | 167 | # If true, the index is split into individual pages for each letter. 168 | #html_split_index = False 169 | 170 | # If true, links to the reST sources are added to the pages. 171 | #html_show_sourcelink = True 172 | 173 | # If true, "Created using Sphinx" is shown in the HTML footer. 174 | # Default is True. 175 | #html_show_sphinx = True 176 | 177 | # If true, "(C) Copyright ..." is shown in the HTML footer. 178 | # Default is True. 179 | #html_show_copyright = True 180 | 181 | # If true, an OpenSearch description file will be output, and all pages 182 | # will contain a tag referring to it. The value of this option 183 | # must be the base URL from which the finished HTML is served. 184 | #html_use_opensearch = '' 185 | 186 | # This is the file name suffix for HTML files (e.g. ".xhtml"). 187 | #html_file_suffix = None 188 | 189 | # Output file base name for HTML help builder. 190 | htmlhelp_basename = 'kinparsedoc' 191 | 192 | 193 | # -- Options for LaTeX output ------------------------------------------ 194 | 195 | latex_elements = { 196 | # The paper size ('letterpaper' or 'a4paper'). 197 | #'papersize': 'letterpaper', 198 | 199 | # The font size ('10pt', '11pt' or '12pt'). 200 | #'pointsize': '10pt', 201 | 202 | # Additional stuff for the LaTeX preamble. 203 | #'preamble': '', 204 | } 205 | 206 | # Grouping the document tree into LaTeX files. List of tuples 207 | # (source start file, target name, title, author, documentclass 208 | # [howto/manual]). 209 | latex_documents = [ 210 | ('index', 'kinparse.tex', 211 | u'kinparse Documentation', 212 | u'Dave Vandenbout', 'manual'), 213 | ] 214 | 215 | # The name of an image file (relative to this directory) to place at 216 | # the top of the title page. 217 | #latex_logo = None 218 | 219 | # For "manual" documents, if this is true, then toplevel headings 220 | # are parts, not chapters. 221 | #latex_use_parts = False 222 | 223 | # If true, show page references after internal links. 224 | #latex_show_pagerefs = False 225 | 226 | # If true, show URL addresses after external links. 227 | #latex_show_urls = False 228 | 229 | # Documents to append as an appendix to all manuals. 230 | #latex_appendices = [] 231 | 232 | # If false, no module index is generated. 233 | #latex_domain_indices = True 234 | 235 | 236 | # -- Options for manual page output ------------------------------------ 237 | 238 | # One entry per manual page. List of tuples 239 | # (source start file, name, description, authors, manual section). 240 | man_pages = [ 241 | ('index', 'kinparse', 242 | u'kinparse Documentation', 243 | [u'Dave Vandenbout'], 1) 244 | ] 245 | 246 | # If true, show URL addresses after external links. 247 | #man_show_urls = False 248 | 249 | 250 | # -- Options for Texinfo output ---------------------------------------- 251 | 252 | # Grouping the document tree into Texinfo files. List of tuples 253 | # (source start file, target name, title, author, 254 | # dir menu entry, description, category) 255 | texinfo_documents = [ 256 | ('index', 'kinparse', 257 | u'kinparse Documentation', 258 | u'Dave Vandenbout', 259 | 'kinparse', 260 | 'One line description of project.', 261 | 'Miscellaneous'), 262 | ] 263 | 264 | # Documents to append as an appendix to all manuals. 265 | #texinfo_appendices = [] 266 | 267 | # If false, no module index is generated. 268 | #texinfo_domain_indices = True 269 | 270 | # How to display URL addresses: 'footnote', 'no', or 'inline'. 271 | #texinfo_show_urls = 'footnote' 272 | 273 | # If true, do not generate a @detailmenu in the "Top" node's menu. 274 | #texinfo_no_detailmenu = False 275 | -------------------------------------------------------------------------------- /docs/contributing.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../CONTRIBUTING.rst 2 | -------------------------------------------------------------------------------- /docs/history.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../HISTORY.rst 2 | -------------------------------------------------------------------------------- /docs/index.rst: -------------------------------------------------------------------------------- 1 | .. kinparse documentation master file, created by 2 | sphinx-quickstart on Tue Jul 9 22:26:36 2013. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Welcome to kinparse's documentation! 7 | ====================================== 8 | 9 | Contents: 10 | 11 | .. toctree:: 12 | :maxdepth: 2 13 | 14 | readme 15 | installation 16 | usage 17 | contributing 18 | authors 19 | history 20 | 21 | Indices and tables 22 | ================== 23 | 24 | * :ref:`genindex` 25 | * :ref:`modindex` 26 | * :ref:`search` 27 | 28 | -------------------------------------------------------------------------------- /docs/installation.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Installation 3 | ============ 4 | 5 | This is a Python package, so you'll need to have Python installed to use it. 6 | If you're using linux, you probably already have Python. 7 | If you're on Windows, you can download a Python installer from 8 | `Anaconda `_ , 9 | `Active State `_ , or even 10 | `WinPython `_ . 11 | 12 | Once you have Python, you can install this package by opening a terminal 13 | window and typing the command:: 14 | 15 | $ easy_install kinparse 16 | 17 | Or:: 18 | 19 | $ pip install kinparse 20 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | REM Command file for Sphinx documentation 4 | 5 | if "%SPHINXBUILD%" == "" ( 6 | set SPHINXBUILD=sphinx-build 7 | ) 8 | set BUILDDIR=_build 9 | set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . 10 | set I18NSPHINXOPTS=%SPHINXOPTS% . 11 | if NOT "%PAPER%" == "" ( 12 | set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% 13 | set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% 14 | ) 15 | 16 | if "%1" == "" goto help 17 | 18 | if "%1" == "help" ( 19 | :help 20 | echo.Please use `make ^` where ^ is one of 21 | echo. html to make standalone HTML files 22 | echo. dirhtml to make HTML files named index.html in directories 23 | echo. singlehtml to make a single large HTML file 24 | echo. pickle to make pickle files 25 | echo. json to make JSON files 26 | echo. htmlhelp to make HTML files and a HTML help project 27 | echo. qthelp to make HTML files and a qthelp project 28 | echo. devhelp to make HTML files and a Devhelp project 29 | echo. epub to make an epub 30 | echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter 31 | echo. text to make text files 32 | echo. man to make manual pages 33 | echo. texinfo to make Texinfo files 34 | echo. gettext to make PO message catalogs 35 | echo. changes to make an overview over all changed/added/deprecated items 36 | echo. xml to make Docutils-native XML files 37 | echo. pseudoxml to make pseudoxml-XML files for display purposes 38 | echo. linkcheck to check all external links for integrity 39 | echo. doctest to run all doctests embedded in the documentation if enabled 40 | goto end 41 | ) 42 | 43 | if "%1" == "clean" ( 44 | for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i 45 | del /q /s %BUILDDIR%\* 46 | goto end 47 | ) 48 | 49 | 50 | %SPHINXBUILD% 2> nul 51 | if errorlevel 9009 ( 52 | echo. 53 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 54 | echo.installed, then set the SPHINXBUILD environment variable to point 55 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 56 | echo.may add the Sphinx directory to PATH. 57 | echo. 58 | echo.If you don't have Sphinx installed, grab it from 59 | echo.http://sphinx-doc.org/ 60 | exit /b 1 61 | ) 62 | 63 | if "%1" == "html" ( 64 | %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html 65 | if errorlevel 1 exit /b 1 66 | echo. 67 | echo.Build finished. The HTML pages are in %BUILDDIR%/html. 68 | goto end 69 | ) 70 | 71 | if "%1" == "dirhtml" ( 72 | %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml 73 | if errorlevel 1 exit /b 1 74 | echo. 75 | echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. 76 | goto end 77 | ) 78 | 79 | if "%1" == "singlehtml" ( 80 | %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml 81 | if errorlevel 1 exit /b 1 82 | echo. 83 | echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. 84 | goto end 85 | ) 86 | 87 | if "%1" == "pickle" ( 88 | %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle 89 | if errorlevel 1 exit /b 1 90 | echo. 91 | echo.Build finished; now you can process the pickle files. 92 | goto end 93 | ) 94 | 95 | if "%1" == "json" ( 96 | %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json 97 | if errorlevel 1 exit /b 1 98 | echo. 99 | echo.Build finished; now you can process the JSON files. 100 | goto end 101 | ) 102 | 103 | if "%1" == "htmlhelp" ( 104 | %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp 105 | if errorlevel 1 exit /b 1 106 | echo. 107 | echo.Build finished; now you can run HTML Help Workshop with the ^ 108 | .hhp project file in %BUILDDIR%/htmlhelp. 109 | goto end 110 | ) 111 | 112 | if "%1" == "qthelp" ( 113 | %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp 114 | if errorlevel 1 exit /b 1 115 | echo. 116 | echo.Build finished; now you can run "qcollectiongenerator" with the ^ 117 | .qhcp project file in %BUILDDIR%/qthelp, like this: 118 | echo.^> qcollectiongenerator %BUILDDIR%\qthelp\kinparse.qhcp 119 | echo.To view the help file: 120 | echo.^> assistant -collectionFile %BUILDDIR%\qthelp\kinparse.ghc 121 | goto end 122 | ) 123 | 124 | if "%1" == "devhelp" ( 125 | %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp 126 | if errorlevel 1 exit /b 1 127 | echo. 128 | echo.Build finished. 129 | goto end 130 | ) 131 | 132 | if "%1" == "epub" ( 133 | %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub 134 | if errorlevel 1 exit /b 1 135 | echo. 136 | echo.Build finished. The epub file is in %BUILDDIR%/epub. 137 | goto end 138 | ) 139 | 140 | if "%1" == "latex" ( 141 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 142 | if errorlevel 1 exit /b 1 143 | echo. 144 | echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. 145 | goto end 146 | ) 147 | 148 | if "%1" == "latexpdf" ( 149 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 150 | cd %BUILDDIR%/latex 151 | make all-pdf 152 | cd %BUILDDIR%/.. 153 | echo. 154 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 155 | goto end 156 | ) 157 | 158 | if "%1" == "latexpdfja" ( 159 | %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex 160 | cd %BUILDDIR%/latex 161 | make all-pdf-ja 162 | cd %BUILDDIR%/.. 163 | echo. 164 | echo.Build finished; the PDF files are in %BUILDDIR%/latex. 165 | goto end 166 | ) 167 | 168 | if "%1" == "text" ( 169 | %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text 170 | if errorlevel 1 exit /b 1 171 | echo. 172 | echo.Build finished. The text files are in %BUILDDIR%/text. 173 | goto end 174 | ) 175 | 176 | if "%1" == "man" ( 177 | %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man 178 | if errorlevel 1 exit /b 1 179 | echo. 180 | echo.Build finished. The manual pages are in %BUILDDIR%/man. 181 | goto end 182 | ) 183 | 184 | if "%1" == "texinfo" ( 185 | %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo 186 | if errorlevel 1 exit /b 1 187 | echo. 188 | echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. 189 | goto end 190 | ) 191 | 192 | if "%1" == "gettext" ( 193 | %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale 194 | if errorlevel 1 exit /b 1 195 | echo. 196 | echo.Build finished. The message catalogs are in %BUILDDIR%/locale. 197 | goto end 198 | ) 199 | 200 | if "%1" == "changes" ( 201 | %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes 202 | if errorlevel 1 exit /b 1 203 | echo. 204 | echo.The overview file is in %BUILDDIR%/changes. 205 | goto end 206 | ) 207 | 208 | if "%1" == "linkcheck" ( 209 | %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck 210 | if errorlevel 1 exit /b 1 211 | echo. 212 | echo.Link check complete; look for any errors in the above output ^ 213 | or in %BUILDDIR%/linkcheck/output.txt. 214 | goto end 215 | ) 216 | 217 | if "%1" == "doctest" ( 218 | %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest 219 | if errorlevel 1 exit /b 1 220 | echo. 221 | echo.Testing of doctests in the sources finished, look at the ^ 222 | results in %BUILDDIR%/doctest/output.txt. 223 | goto end 224 | ) 225 | 226 | if "%1" == "xml" ( 227 | %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml 228 | if errorlevel 1 exit /b 1 229 | echo. 230 | echo.Build finished. The XML files are in %BUILDDIR%/xml. 231 | goto end 232 | ) 233 | 234 | if "%1" == "pseudoxml" ( 235 | %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml 236 | if errorlevel 1 exit /b 1 237 | echo. 238 | echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. 239 | goto end 240 | ) 241 | 242 | :end 243 | -------------------------------------------------------------------------------- /docs/readme.rst: -------------------------------------------------------------------------------- 1 | .. include:: ../README.rst 2 | -------------------------------------------------------------------------------- /docs/usage.rst: -------------------------------------------------------------------------------- 1 | ======== 2 | Usage 3 | ======== 4 | 5 | To use kinparse in a project:: 6 | 7 | from kinparse import parse_netlist 8 | 9 | There is a single function that will parse a KiCad EESCHEMA netlist file, a file object, or a text string 10 | and return a `pyparsing object `_ :: 11 | 12 | nlst = parse_netlist('my_schematic.net') 13 | 14 | Then you can query the parsing object as shown below to get information about the netlist. 15 | 16 | * Global netlist information: 17 | * ``nlst.version``: Netlist format version. 18 | 19 | * Global design information: 20 | * ``nlst.source``: File name for the top-level schematic that generated this netlist. 21 | * ``nlst.date``: Date the schematic was created. 22 | * ``nlst.tool``: Tool used to create the schematic. 23 | * ``nlst.textvars``: List of text variables used in the schematic. 24 | * ``len(nlst.textvars)``: Number of text variables in the list. 25 | * ``nlst.textvars[0].name``: Name of the first text variable. 26 | * ``nlst.textvars[0].value``: Value of the first text variable. 27 | 28 | * Schematic sheet information: 29 | * ``nlst.sheets``: List of sheets for the schematic. 30 | * ``len(nlst.sheets)``: Number of sheets in the list. 31 | * ``nlst.sheets[0].num``: Number of the first schematic sheet. 32 | * ``nlst.sheets[0].name``: Name of the first schematic sheet. 33 | * ``nlst.sheets[0].tstamps``: Time stamp of the first schematic sheet. 34 | * ``nlst.sheets[0].title``: Title of the first schematic sheet. 35 | * ``nlst.sheets[0].company``: Name of company. 36 | * ``nlst.sheets[0].rev``: Revision number of the first schematic sheet. 37 | * ``nlst.sheets[0].date``: Date of the first schematic sheet. 38 | * ``nlst.sheets[0].source``: Source file for the first schematic sheet. 39 | * ``nlst.sheets[0].comments``: List of comments for the first schematic sheet. 40 | * ``len(nlst.sheets[0].comments)``: Number of comments for the first schematic sheet. 41 | * ``nlst.sheets[0].comments[0].num``: Number of the first comment. 42 | * ``nlst.sheets[0].comments[0].text``: Text of the first comment. 43 | 44 | * Library information: 45 | * ``nlst.libraries``: List of libraries used in the netlist. 46 | * ``len(nlst.libraries)``: Number of libraries in the list. 47 | * ``nlst.libraries[0].name``: Name of the first library. 48 | * ``nlst.libraries[0].uri``: File location of the first library. 49 | 50 | * Library of components: 51 | * ``nlst.libparts``: List of part types used in the netlist. 52 | * ``len(nlst.libparts)``: Number of part types in the list. 53 | * ``nlst.libparts[0].lib``: Library containing the first part. 54 | * ``nlst.libparts[0].name``: Part type name of the first part. 55 | * ``nlst.libparts[0].desc``: Description of the first part. 56 | * ``nlst.libparts[0].docs``: Document file name for the first part. 57 | * ``nlst.libparts[0].fields``: List of fields for the first part. 58 | * ``len(nlst.libparts[0].fields)``: Number of fields for the first part. 59 | * ``nlst.libparts[0].fields[0].name``: Name of the first field of the first part. 60 | * ``nlst.libparts[0].fields[0].value``: Value assigned to the first field of the first part. 61 | * ``nlst.libparts[0].pins``: List of pins for the first part. 62 | * ``len(nlst.libparts[0].pins)``: Number of pins on the first part. 63 | * ``nlst.libparts[0].pins[0].num``: Pin number of the first pin of the first part. 64 | * ``nlst.libparts[0].pins[0].name``: Pin name of the first pin of the first part. 65 | * ``nlst.libparts[0].pins[0].type``: Electrical type of the first pin of the first part. 66 | * ``nlst.libparts[0].footprints``: List of footprints for the first part. 67 | * ``len(nlst.libparts[0].footprints)``: Number of footprints for the first part. 68 | * ``nlst.libparts[0].footprints[0]``: First footprint for the first part. 69 | * ``nlst.libparts[0].aliases``: List of aliases for the first part. 70 | * ``len(nlst.libparts[0].aliases)``: List of aliases for the first part. 71 | * ``nlst.libparts[0].aliases[0]``: First alias for the first part. 72 | 73 | * Parts: 74 | * ``nlst.parts``: List of part instances used in the netlist. 75 | * ``len(nlst.parts)``: Number of parts used in the list. 76 | * ``nlst.parts[0].ref``: Reference designator for the first part. 77 | * ``nlst.parts[0].value``: Value of the first part. 78 | * ``nlst.parts[0].tstamp``: Time stamp for the first part. 79 | * ``nlst.parts[0].datasheet``: File location of datasheet for the first part. 80 | * ``nlst.parts[0].lib``: Name of the library containing the first part. 81 | * ``nlst.parts[0].name``: Part type name for the first part. 82 | * ``nlst.parts[0].desc``: Description for the first part. 83 | * ``nlst.parts[0].footprint``: PCB footprint for the first part. 84 | * ``nlst.parts[0].sheetpath.names``: Sheet name on which the first part appears. 85 | * ``nlst.parts[0].sheetpath.tstamps``: Time stamp for the sheet on which the first part appears. 86 | * ``nlst.parts[0].fields``: List of fields for the first part. 87 | * ``len(nlst.parts[0].fields)``: Number of fields for the first part. 88 | * ``nlst.parts[0].fields[0].name``: Name of the first field of the first part. 89 | * ``nlst.parts[0].fields[0].value``: Value assigned to the first field of the first part. 90 | 91 | * Net connections: 92 | * ``nlst.nets``: List of nets connecting the component pins. 93 | * ``len(nlst.nets)``: Number of nets in the list. 94 | * ``nlst.nets[0].name``: Name of the first net. 95 | * ``nlst.nets[0].code``: Code number for the first net. 96 | * ``nlst.nets[0].pins``: List of pins attached to the first net. 97 | * ``len(nlst.nets[0].pins)``: Number of pins attached to the first net. 98 | * ``nlst.nets[0].pins[0].ref``: Part reference designator for first pin on the first net. 99 | * ``nlst.nets[0].pins[0].num``: Pin number of referenced part for the first pin on the first net. 100 | -------------------------------------------------------------------------------- /docs/xess.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/xess.ico -------------------------------------------------------------------------------- /docs/xess.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/devbisme/kinparse/244794cd25e885c14198d61f8543672613c81468/docs/xess.png -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | Page Redirection 10 | 11 | 12 | 13 | If you are not redirected automatically, follow the link to example 14 | 15 | -------------------------------------------------------------------------------- /kinparse/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from .kinparse import * 4 | from .pckg_info import version 5 | -------------------------------------------------------------------------------- /kinparse/kinparse.py: -------------------------------------------------------------------------------- 1 | # MIT license 2 | # 3 | # Copyright (C) 2017-2021 by Dave Vandenbout. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | 24 | """ 25 | Parsers for netlist files of various formats (only KiCad, at present). 26 | """ 27 | 28 | 29 | from __future__ import unicode_literals 30 | from __future__ import print_function 31 | from __future__ import division 32 | from __future__ import absolute_import 33 | from builtins import open 34 | 35 | try: 36 | from future import standard_library 37 | standard_library.install_aliases() 38 | except ImportError: 39 | pass 40 | 41 | from .py_2_3 import * 42 | 43 | from pyparsing import * 44 | 45 | 46 | THIS_MODULE = locals() 47 | 48 | 49 | def _parse_netlist_kicad(text): 50 | """ 51 | Return a pyparsing object storing the contents of a KiCad netlist. 52 | """ 53 | 54 | def _paren_clause(keyword, subclause): 55 | """ 56 | Create a parser for a parenthesized list with an initial keyword. 57 | """ 58 | lp = Literal('(').suppress() 59 | rp = Literal(')').suppress() 60 | kw = CaselessKeyword(keyword).suppress() 61 | clause = lp + kw + subclause + rp 62 | return clause 63 | 64 | #++++++++++++++++++++++++++++ Parser Definition +++++++++++++++++++++++++++ 65 | 66 | # Basic elements. 67 | string = ZeroOrMore(White()).suppress() + CharsNotIn('()') + ZeroOrMore(White()).suppress() 68 | qstring = dblQuotedString() ^ sglQuotedString() 69 | qstring.addParseAction(removeQuotes) 70 | anystring = Optional(qstring ^ string) # Don't know why Optional() is necessary to make the parser work. 71 | word = anystring 72 | inum = anystring 73 | 74 | # Design section. 75 | source = _paren_clause('source', Optional(anystring)('source')) 76 | date = _paren_clause('date', Optional(anystring)('date')) 77 | tool = _paren_clause('tool', Optional(anystring)('tool')) 78 | number = _paren_clause('number', inum('num')) 79 | name = _paren_clause('name', anystring('name')) | _paren_clause('names', anystring('names')) 80 | value = _paren_clause('value', anystring('value')) 81 | tstamp = _paren_clause('tstamp', anystring('tstamp')) | _paren_clause('tstamps', anystring('tstamps')) 82 | title = _paren_clause('title', Optional(anystring)('title')) 83 | company = _paren_clause('company', Optional(anystring)('company')) 84 | rev = _paren_clause('rev', Optional(anystring)('rev')) 85 | txt = _paren_clause('value', anystring('text')) 86 | textvar = _paren_clause('textvar', Group(name + anystring('value'))) 87 | textvars = Group(ZeroOrMore(textvar))('textvars') 88 | comment = _paren_clause('comment', Group(number & txt)) 89 | comments = Group(OneOrMore(comment))('comments') 90 | title_block = _paren_clause('title_block', Optional(title) & 91 | Optional(company) & Optional(rev) & 92 | Optional(date) & Optional(source) & comments) 93 | sheet = _paren_clause('sheet', Group(number + name + tstamp + Optional(title_block))) 94 | sheets = OneOrMore(sheet)('sheets') 95 | design = (_paren_clause('design', Optional(source) & Optional(date) & 96 | textvars & 97 | Optional(tool) & Optional(sheets))) 98 | 99 | # Components section. 100 | ref = _paren_clause('ref', anystring('ref')) 101 | datasheet = _paren_clause('datasheet', anystring('datasheet')) 102 | field = Group(_paren_clause('field', name & anystring('value'))) 103 | fields = _paren_clause('fields', ZeroOrMore(field)('fields')) 104 | property = Group(_paren_clause('property', name & Optional(value))) 105 | properties = OneOrMore(property)('properties') 106 | lib = _paren_clause('lib', anystring('lib')) 107 | part = _paren_clause('part', anystring('name')) 108 | footprint = _paren_clause('footprint', anystring('footprint')) 109 | description = _paren_clause('description', anystring('desc')) # Gets used here and in libparts. 110 | libsource = _paren_clause('libsource', lib & part & Optional(description)) 111 | sheetpath = Group(_paren_clause('sheetpath', name & tstamp))('sheetpath') 112 | comp = Group(_paren_clause('comp', ref & value & Optional(datasheet) & Optional(description) & 113 | Optional(fields) & Optional(libsource) & Optional(footprint) & 114 | Optional(sheetpath) & Optional(tstamp) & Optional(properties))) 115 | components = _paren_clause('components', ZeroOrMore(comp)('parts')) 116 | 117 | # Part library section. 118 | docs = _paren_clause('docs', anystring('docs')) 119 | pnum = _paren_clause('num', anystring('num')) 120 | ptype = _paren_clause('type', anystring('type')) 121 | pin = _paren_clause('pin', Group(pnum & name & ptype)) 122 | pins = _paren_clause('pins', ZeroOrMore(pin))('pins') 123 | alias = _paren_clause('alias', anystring('alias')) 124 | aliases = _paren_clause('aliases', ZeroOrMore(alias))('aliases') 125 | fp = _paren_clause('fp', anystring('fp')) 126 | footprints = _paren_clause('footprints', ZeroOrMore(fp))('footprints') 127 | libpart = Group(_paren_clause('libpart', lib & part & Optional(fields) & 128 | Optional(pins) & Optional(footprints) & Optional(aliases) & 129 | Optional(description) & Optional(docs))) 130 | libparts = _paren_clause('libparts', ZeroOrMore(libpart))('libparts') 131 | 132 | # Libraries section. 133 | logical = _paren_clause('logical', anystring('name')) 134 | uri = _paren_clause('uri', anystring('uri')) 135 | library = Group(_paren_clause('library', logical & uri)) 136 | libraries = _paren_clause('libraries', ZeroOrMore(library))('libraries') 137 | 138 | # Nets section. 139 | #code = _paren_clause('code', inum('val'))('code') 140 | code = _paren_clause('code', inum('code')) 141 | part_pin = _paren_clause('pin', anystring('num')) 142 | pin_type = _paren_clause('pintype', anystring('type')) 143 | pin_func = _paren_clause('pinfunction', anystring('function')) 144 | node = _paren_clause('node', Group(ref & part_pin & Optional(pin_func) & Optional(pin_type))) 145 | nodes = Group(OneOrMore(node))('pins') 146 | net = _paren_clause('net', Group(code & name & nodes)) 147 | nets = _paren_clause('nets', ZeroOrMore(net))('nets') 148 | 149 | # Entire netlist. 150 | version = _paren_clause('version', word('version')) 151 | end_of_file = ZeroOrMore(White()) + stringEnd 152 | parser = _paren_clause('export', version + 153 | (design & components & Optional(libparts) & Optional(libraries) & nets 154 | )) + end_of_file.suppress() 155 | 156 | return parser.parseString(text) 157 | 158 | 159 | def parse_netlist(src, tool='kicad'): 160 | """ 161 | Return a pyparsing object storing the contents of a netlist. 162 | 163 | Args: 164 | src: Either a text string, or a filename, or a file object that stores 165 | the netlist. 166 | 167 | Returns: 168 | A pyparsing object that stores the netlist contents. 169 | 170 | Exception: 171 | PyparsingException. 172 | """ 173 | 174 | try: 175 | text = src.read() 176 | except Exception: 177 | try: 178 | text = open(src,'r',encoding='latin_1').read() 179 | except Exception: 180 | text = src 181 | 182 | if not isinstance(text, basestring): 183 | raise Exception("What is this shit you're handing me? [{}]\n".format(src)) 184 | 185 | try: 186 | # Use the tool name to find the function for loading the library. 187 | func_name = '_parse_netlist_{}'.format(tool) 188 | parse_func = THIS_MODULE[func_name] 189 | return parse_func(text) 190 | except KeyError: 191 | # OK, that didn't work so well... 192 | logger.error('Unsupported ECAD tool library: {}'.format(tool)) 193 | raise Exception 194 | -------------------------------------------------------------------------------- /kinparse/pckg_info.py: -------------------------------------------------------------------------------- 1 | version = '1.2.3' 2 | author = 'Dave Vandenbout' 3 | email = 'devb@xess.com' 4 | -------------------------------------------------------------------------------- /kinparse/py_2_3.py: -------------------------------------------------------------------------------- 1 | # MIT license 2 | # 3 | # Copyright (C) 2017-2021 by Dave Vandenbout. 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | """ 24 | Some definitions to make stuff work with both Python 2 & 3. 25 | """ 26 | 27 | import sys 28 | 29 | USING_PYTHON2 = (sys.version_info.major == 2) 30 | USING_PYTHON3 = not USING_PYTHON2 31 | 32 | if USING_PYTHON2: 33 | class FileNotFoundError(OSError): 34 | pass 35 | 36 | if USING_PYTHON3: 37 | # Python 3 doesn't have basestring, 38 | # Python 2 doesn't work with type(''), 39 | # so.... 40 | basestring = type('') 41 | 42 | 43 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | wheel==0.38.1 2 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [wheel] 2 | universal = 1 3 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | import sys 5 | import setuptools 6 | 7 | 8 | author = 'Dave Vandenbout' 9 | email = 'devb@xess.com' 10 | version = '1.2.3' 11 | 12 | if 'sdist' in sys.argv[1:]: 13 | with open('kinparse/pckg_info.py','w') as f: 14 | for name in ['version','author','email']: 15 | f.write("{} = '{}'\n".format(name,locals()[name])) 16 | 17 | try: 18 | from setuptools import setup 19 | except ImportError: 20 | from distutils.core import setup 21 | 22 | 23 | with open('README.rst') as readme_file: 24 | readme = readme_file.read() 25 | 26 | with open('HISTORY.rst') as history_file: 27 | history = history_file.read().replace('.. :changelog:', '') 28 | 29 | requirements = [ 30 | # Put package requirements here 31 | 'future >= 0.15.0', 32 | 'pyparsing >= 2.1.1', 33 | ] 34 | 35 | test_requirements = [ 36 | # Put package test requirements here 37 | 'pytest', 38 | ] 39 | 40 | setup( 41 | name='kinparse', 42 | version = version, 43 | description="Parser for KiCad schematic netlists.", 44 | long_description=readme + '\n\n' + history, 45 | author = author, 46 | author_email= email, 47 | url='https://github.com/devbisme/kinparse', 48 | project_urls={ 49 | "Documentation": "https://devbisme.github.io/kinparse", 50 | "Source": "https://github.com/devbisme/kinparse", 51 | "Changelog": "https://github.com/devbisme/kinparse/blob/master/HISTORY.rst", 52 | "Tracker": "https://github.com/devbisme/kinparse/issues", 53 | }, 54 | # packages=['kinparse',], 55 | packages=setuptools.find_packages(exclude=['tests']), 56 | entry_points={'console_scripts':['kinparse = kinparse.__main__:main']}, 57 | package_dir={'kinparse': 58 | 'kinparse'}, 59 | include_package_data=True, 60 | package_data={'kinparse': ['*.gif', '*.png']}, 61 | scripts=[], 62 | install_requires=requirements, 63 | license="MIT", 64 | zip_safe=False, 65 | keywords='kinparse KiCad netlist parsing', 66 | classifiers=[ 67 | "Development Status :: 5 - Production/Stable", 68 | "Intended Audience :: Developers", 69 | "License :: OSI Approved :: MIT License", 70 | "Natural Language :: English", 71 | "Operating System :: OS Independent", 72 | "Programming Language :: Python :: 2.7", 73 | "Programming Language :: Python :: 3", 74 | "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", 75 | ], 76 | test_suite='tests', 77 | tests_require=test_requirements 78 | ) 79 | -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | -------------------------------------------------------------------------------- /tests/data/gaillard.net: -------------------------------------------------------------------------------- 1 | (export (version D) 2 | (design 3 | (source C:/xesscorp/PRODUCTS/StickIt_2nd_gen/StickIt-AudioIO/pcb/StickIt-AudioIO.sch) 4 | (date "08/25/2016 6:23:52 PM") 5 | (tool "Eeschema (2016-07-20 BZR 6990, Git 78e4787)-product") 6 | (sheet (number 1) (name /) (tstamps /) 7 | (title_block 8 | (title "StickIt-AudioIO Module") 9 | (company "XESS Corp.") 10 | (rev 2) 11 | (date 2016-05-20) 12 | (source StickIt-AudioIO.sch) 13 | (comment (number 4) (value "comment text..."))))) 14 | (components 15 | (comp (ref J3) 16 | (value Conn_02x03_Odd_Even) 17 | (datasheet ~) 18 | (fields 19 | (field (name DkReference) 609-3234-ND)) 20 | (libsource (lib Connector_Generic) (part Conn_02x03_Odd_Even) (description "Generic connector, double row, 02x03, odd/even pin numbering scheme (row 1 odd numbers, row 2 even numbers), script generated (kicad-library-utils/schlib/autogen/connector/)")) 21 | (sheetpath (names /Logic/) (tstamps /5C4D0F9E/)) 22 | (tstamp 5C4D541F)) 23 | (comp (ref J2) 24 | (value USB_B_Micro) 25 | (datasheet ~) 26 | (fields 27 | (field (name DkReference) 609-4616-1-ND)) 28 | (libsource (lib Connector) (part USB_B_Micro) (description "USB Micro Type B connector")) 29 | (sheetpath (names /Logic/) (tstamps /5C4D0F9E/)) 30 | (tstamp 5C4D995E)) 31 | (comp (ref JP1) 32 | (value JUMPER) 33 | (footprint XESS:HDR_1x2) 34 | (libsource (lib device) (part JUMPER)) 35 | (sheetpath (names /) (tstamps /)) 36 | (tstamp 5524AC0C)) 37 | (comp (ref JP2) 38 | (value JUMPER) 39 | (footprint XESS:HDR_1x2) 40 | (libsource (lib device) (part JUMPER)) 41 | (sheetpath (names /) (tstamps /)) 42 | (tstamp 57179D3C)) 43 | (comp (ref U1) 44 | (value AK4565VF) 45 | (footprint XESS:VSOP28) 46 | (fields 47 | (field (name kicost:link) http://www.aliexpress.com/item/100-New-AK4565VF-AK4565-TSSOP28-AKM-Brand-new-original-orders-are-welcome/32617934313.html?ws_ab_test=searchweb201556_8,searchweb201602_1_10037_10017_10021_507_10022_10032_10009_10020_10008_10018_10019_101,searchweb201603_2&btsid=f1412ba2-0f0a-4e39-9924-091cc8da27fc) 48 | (field (name kicost:pricing) 1:$5.45) 49 | (field (name manf) "Asahi Kasei") 50 | (field (name manf#) AK4565VF)) 51 | (libsource (lib xess) (part AK4565)) 52 | (sheetpath (names /) (tstamps /)) 53 | (tstamp 573E12F8)) 54 | (comp (ref U2) 55 | (value LM4808) 56 | (footprint XESS:MSOP8) 57 | (fields 58 | (field (name manf) TI) 59 | (field (name manf#) LM4808MM)) 60 | (libsource (lib xess) (part LM4808)) 61 | (sheetpath (names /) (tstamps /)) 62 | (tstamp 573E1410)) 63 | (comp (ref J1) 64 | (value STEREO_JACK) 65 | (footprint XESS:PJ-313-TH) 66 | (fields 67 | (field (name kicost:link) http://www.aliexpress.com/item/20Pcs-3-5mm-Female-Audio-Connector-5-Pin-DIP-Stereo-Headphone-Jack-PJ-313-Green/32600096063.html?ws_ab_test=searchweb201556_8,searchweb201602_1_10037_10017_10021_507_10022_10032_10009_10020_10008_10018_10019_101,searchweb201603_2&btsid=e31655d7-f43d-4ec6-a859-bfbd2dcde38a) 68 | (field (name kicost:pricing) 1:$0.123)) 69 | (libsource (lib xess) (part STEREO_JACK)) 70 | (sheetpath (names /) (tstamps /)) 71 | (tstamp 573E15BC)) 72 | (comp (ref J2) 73 | (value STEREO_JACK) 74 | (footprint XESS:PJ-313-TH) 75 | (fields 76 | (field (name kicost:link) http://www.aliexpress.com/item/20Pcs-3-5mm-Female-Audio-Connector-5-Pin-DIP-Stereo-Headphone-Jack-PJ-313-Green/32600096063.html?ws_ab_test=searchweb201556_8,searchweb201602_1_10037_10017_10021_507_10022_10032_10009_10020_10008_10018_10019_101,searchweb201603_2&btsid=e31655d7-f43d-4ec6-a859-bfbd2dcde38a) 77 | (field (name kicost:pricing) 1:$0.123)) 78 | (libsource (lib xess) (part STEREO_JACK)) 79 | (sheetpath (names /) (tstamps /)) 80 | (tstamp 573E1644)) 81 | (comp (ref C7) 82 | (value 0.1uF) 83 | (footprint Capacitors_SMD:C_0603_HandSoldering) 84 | (fields 85 | (field (name manf#) CL03A104KQ3NNNH)) 86 | (libsource (lib device) (part C)) 87 | (sheetpath (names /) (tstamps /)) 88 | (tstamp 573E16AA)) 89 | (comp (ref C2) 90 | (value 33uF) 91 | (footprint Capacitors_SMD:c_elec_5x4.5) 92 | (fields 93 | (field (name manf#) UWX1A330MCL1GB)) 94 | (libsource (lib device) (part CP1)) 95 | (sheetpath (names /) (tstamps /)) 96 | (tstamp 573E174E)) 97 | (comp (ref C6) 98 | (value 4.7uF) 99 | (footprint Capacitors_SMD:C_0603_HandSoldering) 100 | (fields 101 | (field (name manf#) EMK107ABJ475KA-T)) 102 | (libsource (lib device) (part C)) 103 | (sheetpath (names /) (tstamps /)) 104 | (tstamp 573E18D8)) 105 | (comp (ref RN3) 106 | (value 4K7) 107 | (footprint XESS:CTS_742C043) 108 | (fields 109 | (field (name manf#) 742c043472)) 110 | (libsource (lib xess) (part RN2)) 111 | (sheetpath (names /) (tstamps /)) 112 | (tstamp 573E1B1D)) 113 | (comp (ref RN1) 114 | (value 4K7) 115 | (footprint XESS:CTS_742C083) 116 | (fields 117 | (field (name manf#) 742c083472)) 118 | (libsource (lib xess) (part RN4)) 119 | (sheetpath (names /) (tstamps /)) 120 | (tstamp 573E1CF7)) 121 | (comp (ref RN2) 122 | (value 4K7) 123 | (footprint XESS:CTS_742C043) 124 | (fields 125 | (field (name manf#) 742c043472)) 126 | (libsource (lib xess) (part RN2)) 127 | (sheetpath (names /) (tstamps /)) 128 | (tstamp 573E1EC8)) 129 | (comp (ref C4) 130 | (value 33uF) 131 | (footprint Capacitors_SMD:c_elec_5x4.5) 132 | (fields 133 | (field (name manf#) UWX1A330MCL1GB)) 134 | (libsource (lib device) (part CP1)) 135 | (sheetpath (names /) (tstamps /)) 136 | (tstamp 573E2936)) 137 | (comp (ref C5) 138 | (value 33uF) 139 | (footprint Capacitors_SMD:c_elec_5x4.5) 140 | (fields 141 | (field (name manf#) UWX1A330MCL1GB)) 142 | (libsource (lib device) (part CP1)) 143 | (sheetpath (names /) (tstamps /)) 144 | (tstamp 573E29D2)) 145 | (comp (ref C1) 146 | (value 33uF) 147 | (footprint Capacitors_SMD:c_elec_5x4.5) 148 | (fields 149 | (field (name manf#) UWX1A330MCL1GB)) 150 | (libsource (lib device) (part CP1)) 151 | (sheetpath (names /) (tstamps /)) 152 | (tstamp 573E2A43)) 153 | (comp (ref C9) 154 | (value 0.1uF) 155 | (footprint Capacitors_SMD:C_0603_HandSoldering) 156 | (fields 157 | (field (name manf#) CL03A104KQ3NNNH)) 158 | (libsource (lib device) (part C)) 159 | (sheetpath (names /) (tstamps /)) 160 | (tstamp 573E2AE3)) 161 | (comp (ref C3) 162 | (value 0.1uF) 163 | (footprint Capacitors_SMD:C_0603_HandSoldering) 164 | (fields 165 | (field (name manf#) CL03A104KQ3NNNH)) 166 | (libsource (lib device) (part C)) 167 | (sheetpath (names /) (tstamps /)) 168 | (tstamp 573E2B5C)) 169 | (comp (ref C8) 170 | (value 4.7uF) 171 | (footprint Capacitors_SMD:C_0603_HandSoldering) 172 | (fields 173 | (field (name manf#) EMK107ABJ475KA-T)) 174 | (libsource (lib device) (part C)) 175 | (sheetpath (names /) (tstamps /)) 176 | (tstamp 573E2BE4)) 177 | (comp (ref L1) 178 | (value FERRITE_BEAD) 179 | (footprint Capacitors_SMD:C_0805_HandSoldering) 180 | (fields 181 | (field (name manf#) CIM21J252NE)) 182 | (libsource (lib xess) (part FERRITE_BEAD)) 183 | (sheetpath (names /) (tstamps /)) 184 | (tstamp 573E2FFC)) 185 | (comp (ref PCB1) 186 | (value PCB) 187 | (fields 188 | (field (name kicost:pricing) 1:$0.32)) 189 | (libsource (lib xess) (part PCB)) 190 | (sheetpath (names /) (tstamps /)) 191 | (tstamp 574B4360))) 192 | (libparts 193 | (libpart (lib xess) (part AK4565) 194 | (description "Stereo audio codec") 195 | (fields 196 | (field (name Reference) U) 197 | (field (name Value) AK4565)) 198 | (pins 199 | (pin (num 1) (name LOUT) (type output)) 200 | (pin (num 2) (name ROUT) (type output)) 201 | (pin (num 3) (name INTL1) (type input)) 202 | (pin (num 4) (name INTR1) (type input)) 203 | (pin (num 5) (name INTL0) (type input)) 204 | (pin (num 6) (name INTR0) (type input)) 205 | (pin (num 7) (name EXTL) (type input)) 206 | (pin (num 8) (name EXTR) (type input)) 207 | (pin (num 9) (name LIN) (type input)) 208 | (pin (num 10) (name RIN) (type input)) 209 | (pin (num 11) (name VCOM) (type power_out)) 210 | (pin (num 12) (name AGND) (type power_in)) 211 | (pin (num 13) (name VA) (type power_in)) 212 | (pin (num 14) (name VREF) (type input)) 213 | (pin (num 15) (name VD) (type power_in)) 214 | (pin (num 16) (name DGND) (type power_in)) 215 | (pin (num 17) (name VT) (type power_in)) 216 | (pin (num 18) (name SDTO0) (type output)) 217 | (pin (num 19) (name SDTO1) (type output)) 218 | (pin (num 20) (name SDTI) (type input)) 219 | (pin (num 21) (name LRCK) (type input)) 220 | (pin (num 22) (name MCLK) (type input)) 221 | (pin (num 23) (name BCLK) (type input)) 222 | (pin (num 24) (name CDTO) (type output)) 223 | (pin (num 25) (name CDTI) (type input)) 224 | (pin (num 26) (name CSN) (type input)) 225 | (pin (num 27) (name CCLK) (type input)) 226 | (pin (num 28) (name PDN) (type input)))) 227 | (libpart (lib device) (part C) 228 | (description "Unpolarized capacitor") 229 | (footprints 230 | (fp C?) 231 | (fp C_????_*) 232 | (fp C_????) 233 | (fp SMD*_c) 234 | (fp Capacitor*)) 235 | (fields 236 | (field (name Reference) C) 237 | (field (name Value) C)) 238 | (pins 239 | (pin (num 1) (name ~) (type passive)) 240 | (pin (num 2) (name ~) (type passive)))) 241 | (libpart (lib device) (part CP1) 242 | (description "Polarised capacitor") 243 | (footprints 244 | (fp SMD*_Pol) 245 | (fp C_Axial*) 246 | (fp C_Radial*) 247 | (fp c_elec*) 248 | (fp C*elec) 249 | (fp TantalC*) 250 | (fp CP*)) 251 | (fields 252 | (field (name Reference) C) 253 | (field (name Value) CP1)) 254 | (pins 255 | (pin (num 1) (name ~) (type passive)) 256 | (pin (num 2) (name ~) (type passive)))) 257 | (libpart (lib xess) (part FERRITE_BEAD) 258 | (fields 259 | (field (name Reference) L) 260 | (field (name Value) FERRITE_BEAD)) 261 | (pins 262 | (pin (num 1) (name 1) (type passive)) 263 | (pin (num 2) (name 2) (type passive)))) 264 | (libpart (lib device) (part JUMPER) 265 | (fields 266 | (field (name Reference) JP) 267 | (field (name Value) JUMPER)) 268 | (pins 269 | (pin (num 1) (name 1) (type passive)) 270 | (pin (num 2) (name 2) (type passive)))) 271 | (libpart (lib xess) (part LM4808) 272 | (fields 273 | (field (name Reference) U) 274 | (field (name Value) LM4808)) 275 | (pins 276 | (pin (num 1) (name OUT) (type output)) 277 | (pin (num 2) (name -IN) (type input)) 278 | (pin (num 3) (name +IN) (type input)) 279 | (pin (num 4) (name V-) (type power_in)) 280 | (pin (num 5) (name +IN) (type input)) 281 | (pin (num 6) (name -IN) (type input)) 282 | (pin (num 7) (name OUT) (type output)) 283 | (pin (num 8) (name V+) (type power_in)))) 284 | (libpart (lib xess) (part PCB) 285 | (fields 286 | (field (name Reference) PCB) 287 | (field (name Value) PCB))) 288 | (libpart (lib xess) (part RN2) 289 | (fields 290 | (field (name Reference) RN) 291 | (field (name Value) RN2)) 292 | (pins 293 | (pin (num 1) (name ~) (type passive)) 294 | (pin (num 2) (name ~) (type passive)) 295 | (pin (num 3) (name ~) (type passive)) 296 | (pin (num 4) (name ~) (type passive)))) 297 | (libpart (lib xess) (part RN4) 298 | (fields 299 | (field (name Reference) RN) 300 | (field (name Value) RN4)) 301 | (pins 302 | (pin (num 1) (name ~) (type passive)) 303 | (pin (num 2) (name ~) (type passive)) 304 | (pin (num 3) (name ~) (type passive)) 305 | (pin (num 4) (name ~) (type passive)) 306 | (pin (num 5) (name ~) (type passive)) 307 | (pin (num 6) (name ~) (type passive)) 308 | (pin (num 7) (name ~) (type passive)) 309 | (pin (num 8) (name ~) (type passive)))) 310 | (libpart (lib xess) (part STEREO_JACK) 311 | (description "stereo audio jack") 312 | (fields 313 | (field (name Reference) J) 314 | (field (name Value) STEREO_JACK)) 315 | (pins 316 | (pin (num ring) (name Right) (type passive)) 317 | (pin (num slv) (name Gnd) (type passive)) 318 | (pin (num tip) (name Left) (type passive)))) 319 | (libpart (lib xess) (part STICKIT2_HDR) 320 | (description "StickIt Header (2nd Gen)") 321 | (fields 322 | (field (name Reference) STK) 323 | (field (name Value) STICKIT2_HDR)) 324 | (pins 325 | (pin (num D0) (name D0) (type passive)) 326 | (pin (num D1) (name D1) (type passive)) 327 | (pin (num D2) (name D2) (type passive)) 328 | (pin (num D3) (name D3) (type passive)) 329 | (pin (num D4) (name D4) (type passive)) 330 | (pin (num D5) (name D5) (type passive)) 331 | (pin (num D6) (name D6) (type passive)) 332 | (pin (num D7) (name D7) (type passive)) 333 | (pin (num GND) (name GND) (type passive)) 334 | (pin (num VCC) (name VCC) (type passive))))) 335 | (libraries 336 | (library (logical device) 337 | (uri "C:\\Program Files\\KiCad\\share\\kicad\\library\\device.lib")) 338 | (library (logical xess) 339 | (uri C:\xesscorp\KiCad\libraries\xess.lib))) 340 | (nets 341 | (net (code 1) (name "Net-(RN1-Pad3)") 342 | (node (ref RN1) (pin 4)) 343 | (node (ref U2) (pin 2)) 344 | (node (ref RN1) (pin 3))) 345 | (net (code 2) (name "Net-(C1-Pad1)") 346 | (node (ref RN1) (pin 5)) 347 | (node (ref U2) (pin 1)) 348 | (node (ref C1) (pin 1))) 349 | (net (code 3) (name "Net-(RN1-Pad1)") 350 | (node (ref U2) (pin 6)) 351 | (node (ref RN1) (pin 1)) 352 | (node (ref RN1) (pin 2))) 353 | (net (code 4) (name "Net-(C2-Pad1)") 354 | (node (ref U2) (pin 7)) 355 | (node (ref RN1) (pin 8)) 356 | (node (ref C2) (pin 1))) 357 | (net (code 5) (name "Net-(C1-Pad2)") 358 | (node (ref J1) (pin tip)) 359 | (node (ref C1) (pin 2))) 360 | (net (code 6) (name "Net-(C2-Pad2)") 361 | (node (ref J1) (pin ring)) 362 | (node (ref C2) (pin 2))) 363 | (net (code 7) (name "Net-(C4-Pad2)") 364 | (node (ref RN3) (pin 1)) 365 | (node (ref C4) (pin 2)) 366 | (node (ref J2) (pin tip))) 367 | (net (code 8) (name "Net-(C5-Pad2)") 368 | (node (ref C5) (pin 2)) 369 | (node (ref J2) (pin ring)) 370 | (node (ref RN3) (pin 2))) 371 | (net (code 9) (name LRCK) 372 | (node (ref STK1) (pin D2)) 373 | (node (ref U1) (pin 21))) 374 | (net (code 10) (name CCLK) 375 | (node (ref U1) (pin 27)) 376 | (node (ref STK1) (pin D7))) 377 | (net (code 11) (name SDTI) 378 | (node (ref U1) (pin 20)) 379 | (node (ref U1) (pin 25)) 380 | (node (ref STK1) (pin D1))) 381 | (net (code 12) (name SCLK) 382 | (node (ref U1) (pin 23)) 383 | (node (ref STK1) (pin D5))) 384 | (net (code 13) (name MCLK) 385 | (node (ref STK1) (pin D3)) 386 | (node (ref U1) (pin 22))) 387 | (net (code 14) (name "Net-(RN1-Pad7)") 388 | (node (ref U1) (pin 2)) 389 | (node (ref RN1) (pin 7))) 390 | (net (code 15) (name SDTO) 391 | (node (ref STK1) (pin D0)) 392 | (node (ref U1) (pin 18))) 393 | (net (code 16) (name ~CS) 394 | (node (ref STK1) (pin D4)) 395 | (node (ref RN2) (pin 3)) 396 | (node (ref U1) (pin 26))) 397 | (net (code 17) (name ~RESET) 398 | (node (ref U1) (pin 28)) 399 | (node (ref STK1) (pin D6)) 400 | (node (ref RN2) (pin 4))) 401 | (net (code 18) (name +3.3V-A) 402 | (node (ref RN3) (pin 4)) 403 | (node (ref U1) (pin 14)) 404 | (node (ref RN3) (pin 3)) 405 | (node (ref U2) (pin 8)) 406 | (node (ref C6) (pin 1)) 407 | (node (ref C7) (pin 1)) 408 | (node (ref L1) (pin 1)) 409 | (node (ref U1) (pin 13))) 410 | (net (code 19) (name +3.3V) 411 | (node (ref STK1) (pin VCC)) 412 | (node (ref RN2) (pin 2)) 413 | (node (ref JP2) (pin 2)) 414 | (node (ref JP2) (pin 1)) 415 | (node (ref RN2) (pin 1)) 416 | (node (ref C9) (pin 1)) 417 | (node (ref C8) (pin 1)) 418 | (node (ref L1) (pin 2)) 419 | (node (ref U1) (pin 17)) 420 | (node (ref U1) (pin 15))) 421 | (net (code 20) (name "Net-(U1-Pad19)") 422 | (node (ref U1) (pin 19))) 423 | (net (code 21) (name "Net-(U1-Pad24)") 424 | (node (ref U1) (pin 24))) 425 | (net (code 22) (name "Net-(U1-Pad5)") 426 | (node (ref U1) (pin 5))) 427 | (net (code 23) (name "Net-(U1-Pad6)") 428 | (node (ref U1) (pin 6))) 429 | (net (code 24) (name "Net-(U1-Pad7)") 430 | (node (ref U1) (pin 7))) 431 | (net (code 25) (name "Net-(U1-Pad8)") 432 | (node (ref U1) (pin 8))) 433 | (net (code 26) (name "Net-(C5-Pad1)") 434 | (node (ref C5) (pin 1)) 435 | (node (ref U1) (pin 10)) 436 | (node (ref U1) (pin 4))) 437 | (net (code 27) (name "Net-(RN1-Pad6)") 438 | (node (ref RN1) (pin 6)) 439 | (node (ref U1) (pin 1))) 440 | (net (code 28) (name "Net-(C4-Pad1)") 441 | (node (ref U1) (pin 3)) 442 | (node (ref C4) (pin 1)) 443 | (node (ref U1) (pin 9))) 444 | (net (code 29) (name "Net-(C3-Pad1)") 445 | (node (ref U2) (pin 3)) 446 | (node (ref U1) (pin 11)) 447 | (node (ref U2) (pin 5)) 448 | (node (ref C3) (pin 1))) 449 | (net (code 30) (name GND) 450 | (node (ref J1) (pin slv)) 451 | (node (ref JP1) (pin 2)) 452 | (node (ref JP1) (pin 1)) 453 | (node (ref STK1) (pin GND)) 454 | (node (ref J2) (pin slv)) 455 | (node (ref U2) (pin 4)) 456 | (node (ref U1) (pin 12)) 457 | (node (ref U1) (pin 16)) 458 | (node (ref C8) (pin 2)) 459 | (node (ref C3) (pin 2)) 460 | (node (ref C7) (pin 2)) 461 | (node (ref C9) (pin 2)) 462 | (node (ref C6) (pin 2))))) -------------------------------------------------------------------------------- /tests/data/gardenlight.net: -------------------------------------------------------------------------------- 1 | (export (version D) 2 | (design 3 | (source /home/mmccoo/kicad/projects/gardenlight/gardenlight.sch) 4 | (date "Wed 20 Dec 2017 08:18:47 AM CET") 5 | (tool "Eeschema (2017-12-03 revision 383c7f5)-master") 6 | (sheet (number 1) (name /) (tstamps /) 7 | (title_block 8 | (title my_title) 9 | (company my_company) 10 | (rev A) 11 | (date 01/24/2019) 12 | (source gardenlight.sch) 13 | (comment (number 1) (value "")) 14 | (comment (number 2) (value "")) 15 | (comment (number 3) (value "")) 16 | (comment (number 4) (value ""))))) 17 | (components 18 | (comp (ref D1) 19 | (value LED) 20 | (footprint Miles:LED_5730) 21 | (libsource (lib Device) (part LED)) 22 | (sheetpath (names /) (tstamps /)) 23 | (tstamp 5A3A0C05)) 24 | (comp (ref D9) 25 | (value LED) 26 | (footprint Miles:LED_5730) 27 | (libsource (lib Device) (part LED)) 28 | (sheetpath (names /) (tstamps /)) 29 | (tstamp 5A3A0CED)) 30 | (comp (ref D17) 31 | (value LED) 32 | (footprint Miles:LED_5730) 33 | (libsource (lib Device) (part LED)) 34 | (sheetpath (names /) (tstamps /)) 35 | (tstamp 5A3A0D41)) 36 | (comp (ref D2) 37 | (value LED) 38 | (footprint Miles:LED_5730) 39 | (libsource (lib Device) (part LED)) 40 | (sheetpath (names /) (tstamps /)) 41 | (tstamp 5A3A0ECC)) 42 | (comp (ref D10) 43 | (value LED) 44 | (footprint Miles:LED_5730) 45 | (libsource (lib Device) (part LED)) 46 | (sheetpath (names /) (tstamps /)) 47 | (tstamp 5A3A0ED2)) 48 | (comp (ref D18) 49 | (value LED) 50 | (footprint Miles:LED_5730) 51 | (libsource (lib Device) (part LED)) 52 | (sheetpath (names /) (tstamps /)) 53 | (tstamp 5A3A0ED8)) 54 | (comp (ref D3) 55 | (value LED) 56 | (footprint Miles:LED_5730) 57 | (libsource (lib Device) (part LED)) 58 | (sheetpath (names /) (tstamps /)) 59 | (tstamp 5A3A109E)) 60 | (comp (ref D11) 61 | (value LED) 62 | (footprint Miles:LED_5730) 63 | (libsource (lib Device) (part LED)) 64 | (sheetpath (names /) (tstamps /)) 65 | (tstamp 5A3A10A4)) 66 | (comp (ref D19) 67 | (value LED) 68 | (footprint Miles:LED_5730) 69 | (libsource (lib Device) (part LED)) 70 | (sheetpath (names /) (tstamps /)) 71 | (tstamp 5A3A10AA)) 72 | (comp (ref D4) 73 | (value LED) 74 | (footprint Miles:LED_5730) 75 | (libsource (lib Device) (part LED)) 76 | (sheetpath (names /) (tstamps /)) 77 | (tstamp 5A3A10B4)) 78 | (comp (ref D12) 79 | (value LED) 80 | (footprint Miles:LED_5730) 81 | (libsource (lib Device) (part LED)) 82 | (sheetpath (names /) (tstamps /)) 83 | (tstamp 5A3A10BA)) 84 | (comp (ref D20) 85 | (value LED) 86 | (footprint Miles:LED_5730) 87 | (libsource (lib Device) (part LED)) 88 | (sheetpath (names /) (tstamps /)) 89 | (tstamp 5A3A10C0)) 90 | (comp (ref D5) 91 | (value LED) 92 | (footprint Miles:LED_5730) 93 | (libsource (lib Device) (part LED)) 94 | (sheetpath (names /) (tstamps /)) 95 | (tstamp 5A3A1616)) 96 | (comp (ref D13) 97 | (value LED) 98 | (footprint Miles:LED_5730) 99 | (libsource (lib Device) (part LED)) 100 | (sheetpath (names /) (tstamps /)) 101 | (tstamp 5A3A161C)) 102 | (comp (ref D21) 103 | (value LED) 104 | (footprint Miles:LED_5730) 105 | (libsource (lib Device) (part LED)) 106 | (sheetpath (names /) (tstamps /)) 107 | (tstamp 5A3A1622)) 108 | (comp (ref D6) 109 | (value LED) 110 | (footprint Miles:LED_5730) 111 | (libsource (lib Device) (part LED)) 112 | (sheetpath (names /) (tstamps /)) 113 | (tstamp 5A3A162C)) 114 | (comp (ref D14) 115 | (value LED) 116 | (footprint Miles:LED_5730) 117 | (libsource (lib Device) (part LED)) 118 | (sheetpath (names /) (tstamps /)) 119 | (tstamp 5A3A1632)) 120 | (comp (ref D22) 121 | (value LED) 122 | (footprint Miles:LED_5730) 123 | (libsource (lib Device) (part LED)) 124 | (sheetpath (names /) (tstamps /)) 125 | (tstamp 5A3A1638)) 126 | (comp (ref D7) 127 | (value LED) 128 | (footprint Miles:LED_5730) 129 | (libsource (lib Device) (part LED)) 130 | (sheetpath (names /) (tstamps /)) 131 | (tstamp 5A3A1642)) 132 | (comp (ref D15) 133 | (value LED) 134 | (footprint Miles:LED_5730) 135 | (libsource (lib Device) (part LED)) 136 | (sheetpath (names /) (tstamps /)) 137 | (tstamp 5A3A1648)) 138 | (comp (ref D23) 139 | (value LED) 140 | (footprint Miles:LED_5730) 141 | (libsource (lib Device) (part LED)) 142 | (sheetpath (names /) (tstamps /)) 143 | (tstamp 5A3A164E)) 144 | (comp (ref D8) 145 | (value LED) 146 | (footprint Miles:LED_5730) 147 | (libsource (lib Device) (part LED)) 148 | (sheetpath (names /) (tstamps /)) 149 | (tstamp 5A3A1658)) 150 | (comp (ref D16) 151 | (value LED) 152 | (footprint Miles:LED_5730) 153 | (libsource (lib Device) (part LED)) 154 | (sheetpath (names /) (tstamps /)) 155 | (tstamp 5A3A165E)) 156 | (comp (ref D24) 157 | (value LED) 158 | (footprint Miles:LED_5730) 159 | (libsource (lib Device) (part LED)) 160 | (sheetpath (names /) (tstamps /)) 161 | (tstamp 5A3A1664)) 162 | (comp (ref D25) 163 | (value LED) 164 | (footprint Miles:LED_5730) 165 | (libsource (lib Device) (part LED)) 166 | (sheetpath (names /) (tstamps /)) 167 | (tstamp 5A3ABB0D)) 168 | (comp (ref D33) 169 | (value LED) 170 | (footprint Miles:LED_5730) 171 | (libsource (lib Device) (part LED)) 172 | (sheetpath (names /) (tstamps /)) 173 | (tstamp 5A3ABB13)) 174 | (comp (ref D41) 175 | (value LED) 176 | (footprint Miles:LED_5730) 177 | (libsource (lib Device) (part LED)) 178 | (sheetpath (names /) (tstamps /)) 179 | (tstamp 5A3ABB19)) 180 | (comp (ref D26) 181 | (value LED) 182 | (footprint Miles:LED_5730) 183 | (libsource (lib Device) (part LED)) 184 | (sheetpath (names /) (tstamps /)) 185 | (tstamp 5A3ABB23)) 186 | (comp (ref D34) 187 | (value LED) 188 | (footprint Miles:LED_5730) 189 | (libsource (lib Device) (part LED)) 190 | (sheetpath (names /) (tstamps /)) 191 | (tstamp 5A3ABB29)) 192 | (comp (ref D42) 193 | (value LED) 194 | (footprint Miles:LED_5730) 195 | (libsource (lib Device) (part LED)) 196 | (sheetpath (names /) (tstamps /)) 197 | (tstamp 5A3ABB2F)) 198 | (comp (ref D27) 199 | (value LED) 200 | (footprint Miles:LED_5730) 201 | (libsource (lib Device) (part LED)) 202 | (sheetpath (names /) (tstamps /)) 203 | (tstamp 5A3ABB39)) 204 | (comp (ref D35) 205 | (value LED) 206 | (footprint Miles:LED_5730) 207 | (libsource (lib Device) (part LED)) 208 | (sheetpath (names /) (tstamps /)) 209 | (tstamp 5A3ABB3F)) 210 | (comp (ref D43) 211 | (value LED) 212 | (footprint Miles:LED_5730) 213 | (libsource (lib Device) (part LED)) 214 | (sheetpath (names /) (tstamps /)) 215 | (tstamp 5A3ABB45)) 216 | (comp (ref D28) 217 | (value LED) 218 | (footprint Miles:LED_5730) 219 | (libsource (lib Device) (part LED)) 220 | (sheetpath (names /) (tstamps /)) 221 | (tstamp 5A3ABB4F)) 222 | (comp (ref D36) 223 | (value LED) 224 | (footprint Miles:LED_5730) 225 | (libsource (lib Device) (part LED)) 226 | (sheetpath (names /) (tstamps /)) 227 | (tstamp 5A3ABB55)) 228 | (comp (ref D44) 229 | (value LED) 230 | (footprint Miles:LED_5730) 231 | (libsource (lib Device) (part LED)) 232 | (sheetpath (names /) (tstamps /)) 233 | (tstamp 5A3ABB5B)) 234 | (comp (ref D29) 235 | (value LED) 236 | (footprint Miles:LED_5730) 237 | (libsource (lib Device) (part LED)) 238 | (sheetpath (names /) (tstamps /)) 239 | (tstamp 5A3ABB65)) 240 | (comp (ref D37) 241 | (value LED) 242 | (footprint Miles:LED_5730) 243 | (libsource (lib Device) (part LED)) 244 | (sheetpath (names /) (tstamps /)) 245 | (tstamp 5A3ABB6B)) 246 | (comp (ref D45) 247 | (value LED) 248 | (footprint Miles:LED_5730) 249 | (libsource (lib Device) (part LED)) 250 | (sheetpath (names /) (tstamps /)) 251 | (tstamp 5A3ABB71)) 252 | (comp (ref D30) 253 | (value LED) 254 | (footprint Miles:LED_5730) 255 | (libsource (lib Device) (part LED)) 256 | (sheetpath (names /) (tstamps /)) 257 | (tstamp 5A3ABB7B)) 258 | (comp (ref D38) 259 | (value LED) 260 | (footprint Miles:LED_5730) 261 | (libsource (lib Device) (part LED)) 262 | (sheetpath (names /) (tstamps /)) 263 | (tstamp 5A3ABB81)) 264 | (comp (ref D46) 265 | (value LED) 266 | (footprint Miles:LED_5730) 267 | (libsource (lib Device) (part LED)) 268 | (sheetpath (names /) (tstamps /)) 269 | (tstamp 5A3ABB87)) 270 | (comp (ref D31) 271 | (value LED) 272 | (footprint Miles:LED_5730) 273 | (libsource (lib Device) (part LED)) 274 | (sheetpath (names /) (tstamps /)) 275 | (tstamp 5A3ABB91)) 276 | (comp (ref D39) 277 | (value LED) 278 | (footprint Miles:LED_5730) 279 | (libsource (lib Device) (part LED)) 280 | (sheetpath (names /) (tstamps /)) 281 | (tstamp 5A3ABB97)) 282 | (comp (ref D47) 283 | (value LED) 284 | (footprint Miles:LED_5730) 285 | (libsource (lib Device) (part LED)) 286 | (sheetpath (names /) (tstamps /)) 287 | (tstamp 5A3ABB9D)) 288 | (comp (ref D32) 289 | (value LED) 290 | (footprint Miles:LED_5730) 291 | (libsource (lib Device) (part LED)) 292 | (sheetpath (names /) (tstamps /)) 293 | (tstamp 5A3ABBA7)) 294 | (comp (ref D40) 295 | (value LED) 296 | (footprint Miles:LED_5730) 297 | (libsource (lib Device) (part LED)) 298 | (sheetpath (names /) (tstamps /)) 299 | (tstamp 5A3ABBAD)) 300 | (comp (ref D48) 301 | (value LED) 302 | (footprint Miles:LED_5730) 303 | (libsource (lib Device) (part LED)) 304 | (sheetpath (names /) (tstamps /)) 305 | (tstamp 5A3ABBB3)) 306 | (comp (ref J1) 307 | (value Conn_01x01) 308 | (footprint Connector:Banana_Jack_1Pin) 309 | (libsource (lib Connector_Generic) (part Conn_01x01)) 310 | (sheetpath (names /) (tstamps /)) 311 | (tstamp 5A3AEAB5)) 312 | (comp (ref J2) 313 | (value Conn_01x01) 314 | (footprint Connector:Banana_Jack_1Pin) 315 | (libsource (lib Connector_Generic) (part Conn_01x01)) 316 | (sheetpath (names /) (tstamps /)) 317 | (tstamp 5A3AEB97))) 318 | (libparts 319 | (libpart (lib Connector_Generic) (part Conn_01x01) 320 | (description "Generic connector, single row, 01x01, script generated (kicad-library-utils/schlib/autogen/connector/)") 321 | (docs ~) 322 | (footprints 323 | (fp Connector*:*)) 324 | (fields 325 | (field (name Reference) J) 326 | (field (name Value) Conn_01x01)) 327 | (pins 328 | (pin (num 1) (name Pin_1) (type passive)))) 329 | (libpart (lib Device) (part LED) 330 | (description "LED generic") 331 | (docs ~) 332 | (footprints 333 | (fp LED*)) 334 | (fields 335 | (field (name Reference) D) 336 | (field (name Value) LED)) 337 | (pins 338 | (pin (num 1) (name K) (type passive)) 339 | (pin (num 2) (name A) (type passive))))) 340 | (libraries 341 | (library (logical Connector_Generic) 342 | (uri /home/mmccoo/kicad/kicad-symbols/Connector_Generic.lib)) 343 | (library (logical Device) 344 | (uri /home/mmccoo/kicad/kicad-symbols/Device.lib))) 345 | (nets 346 | (net (code 1) (name "Net-(D30-Pad1)") 347 | (node (ref D30) (pin 1)) 348 | (node (ref D38) (pin 2))) 349 | (net (code 2) (name "Net-(D29-Pad1)") 350 | (node (ref D37) (pin 2)) 351 | (node (ref D29) (pin 1))) 352 | (net (code 3) (name "Net-(D37-Pad1)") 353 | (node (ref D37) (pin 1)) 354 | (node (ref D45) (pin 2))) 355 | (net (code 4) (name "Net-(D38-Pad1)") 356 | (node (ref D46) (pin 2)) 357 | (node (ref D38) (pin 1))) 358 | (net (code 5) (name "Net-(D31-Pad1)") 359 | (node (ref D39) (pin 2)) 360 | (node (ref D31) (pin 1))) 361 | (net (code 6) (name "Net-(D39-Pad1)") 362 | (node (ref D47) (pin 2)) 363 | (node (ref D39) (pin 1))) 364 | (net (code 7) (name "Net-(D35-Pad1)") 365 | (node (ref D35) (pin 1)) 366 | (node (ref D43) (pin 2))) 367 | (net (code 8) (name "Net-(D26-Pad1)") 368 | (node (ref D26) (pin 1)) 369 | (node (ref D34) (pin 2))) 370 | (net (code 9) (name "Net-(D34-Pad1)") 371 | (node (ref D42) (pin 2)) 372 | (node (ref D34) (pin 1))) 373 | (net (code 10) (name "Net-(D27-Pad1)") 374 | (node (ref D35) (pin 2)) 375 | (node (ref D27) (pin 1))) 376 | (net (code 11) (name "Net-(D28-Pad1)") 377 | (node (ref D36) (pin 2)) 378 | (node (ref D28) (pin 1))) 379 | (net (code 12) (name "Net-(D36-Pad1)") 380 | (node (ref D44) (pin 2)) 381 | (node (ref D36) (pin 1))) 382 | (net (code 13) (name +12V) 383 | (node (ref D6) (pin 2)) 384 | (node (ref D5) (pin 2)) 385 | (node (ref D1) (pin 2)) 386 | (node (ref D4) (pin 2)) 387 | (node (ref J1) (pin 1)) 388 | (node (ref D26) (pin 2)) 389 | (node (ref D8) (pin 2)) 390 | (node (ref D7) (pin 2)) 391 | (node (ref D25) (pin 2)) 392 | (node (ref D3) (pin 2)) 393 | (node (ref D2) (pin 2)) 394 | (node (ref D31) (pin 2)) 395 | (node (ref D27) (pin 2)) 396 | (node (ref D28) (pin 2)) 397 | (node (ref D29) (pin 2)) 398 | (node (ref D32) (pin 2)) 399 | (node (ref D30) (pin 2))) 400 | (net (code 14) (name "Net-(D32-Pad1)") 401 | (node (ref D32) (pin 1)) 402 | (node (ref D40) (pin 2))) 403 | (net (code 15) (name "Net-(D40-Pad1)") 404 | (node (ref D48) (pin 2)) 405 | (node (ref D40) (pin 1))) 406 | (net (code 16) (name "Net-(D12-Pad2)") 407 | (node (ref D4) (pin 1)) 408 | (node (ref D12) (pin 2))) 409 | (net (code 17) (name "Net-(D12-Pad1)") 410 | (node (ref D20) (pin 2)) 411 | (node (ref D12) (pin 1))) 412 | (net (code 18) (name "Net-(D13-Pad2)") 413 | (node (ref D5) (pin 1)) 414 | (node (ref D13) (pin 2))) 415 | (net (code 19) (name "Net-(D13-Pad1)") 416 | (node (ref D21) (pin 2)) 417 | (node (ref D13) (pin 1))) 418 | (net (code 20) (name "Net-(D14-Pad2)") 419 | (node (ref D6) (pin 1)) 420 | (node (ref D14) (pin 2))) 421 | (net (code 21) (name "Net-(D14-Pad1)") 422 | (node (ref D22) (pin 2)) 423 | (node (ref D14) (pin 1))) 424 | (net (code 22) (name "Net-(D1-Pad1)") 425 | (node (ref D9) (pin 2)) 426 | (node (ref D1) (pin 1))) 427 | (net (code 23) (name "Net-(D17-Pad2)") 428 | (node (ref D9) (pin 1)) 429 | (node (ref D17) (pin 2))) 430 | (net (code 24) (name "Net-(D10-Pad1)") 431 | (node (ref D18) (pin 2)) 432 | (node (ref D10) (pin 1))) 433 | (net (code 25) (name "Net-(D10-Pad2)") 434 | (node (ref D2) (pin 1)) 435 | (node (ref D10) (pin 2))) 436 | (net (code 26) (name "Net-(D11-Pad2)") 437 | (node (ref D11) (pin 2)) 438 | (node (ref D3) (pin 1))) 439 | (net (code 27) (name "Net-(D11-Pad1)") 440 | (node (ref D11) (pin 1)) 441 | (node (ref D19) (pin 2))) 442 | (net (code 28) (name "Net-(D25-Pad1)") 443 | (node (ref D33) (pin 2)) 444 | (node (ref D25) (pin 1))) 445 | (net (code 29) (name "Net-(D33-Pad1)") 446 | (node (ref D33) (pin 1)) 447 | (node (ref D41) (pin 2))) 448 | (net (code 30) (name "Net-(D15-Pad2)") 449 | (node (ref D7) (pin 1)) 450 | (node (ref D15) (pin 2))) 451 | (net (code 31) (name GND) 452 | (node (ref D45) (pin 1)) 453 | (node (ref D46) (pin 1)) 454 | (node (ref D47) (pin 1)) 455 | (node (ref D23) (pin 1)) 456 | (node (ref D24) (pin 1)) 457 | (node (ref D42) (pin 1)) 458 | (node (ref D41) (pin 1)) 459 | (node (ref D48) (pin 1)) 460 | (node (ref J2) (pin 1)) 461 | (node (ref D20) (pin 1)) 462 | (node (ref D43) (pin 1)) 463 | (node (ref D19) (pin 1)) 464 | (node (ref D44) (pin 1)) 465 | (node (ref D18) (pin 1)) 466 | (node (ref D17) (pin 1)) 467 | (node (ref D21) (pin 1)) 468 | (node (ref D22) (pin 1))) 469 | (net (code 32) (name "Net-(D15-Pad1)") 470 | (node (ref D23) (pin 2)) 471 | (node (ref D15) (pin 1))) 472 | (net (code 33) (name "Net-(D16-Pad2)") 473 | (node (ref D8) (pin 1)) 474 | (node (ref D16) (pin 2))) 475 | (net (code 34) (name "Net-(D16-Pad1)") 476 | (node (ref D24) (pin 2)) 477 | (node (ref D16) (pin 1))))) -------------------------------------------------------------------------------- /tests/data/kicad5_test.net: -------------------------------------------------------------------------------- 1 | (export (version D) 2 | (design 3 | (source /home/devb/tech_stuff/KiCad/tools/kinparse/tests/data/kicad5_test.sch) 4 | (date "Tue 22 Mar 2022 05:12:36 PM EDT") 5 | (tool "Eeschema 5.1.12-84ad8e8a86~92~ubuntu20.04.1") 6 | (sheet (number 1) (name /) (tstamps /) 7 | (title_block 8 | (title "title") 9 | (company "company") 10 | (rev "1.0") 11 | (date "03/23/2022") 12 | (source kicad5_test.sch) 13 | (comment (number 1) (value "")) 14 | (comment (number 2) (value "")) 15 | (comment (number 3) (value "")) 16 | (comment (number 4) (value ""))))) 17 | (components 18 | (comp (ref Q1) 19 | (value Q_NPN_CBE) 20 | (datasheet ~) 21 | (libsource (lib Device) (part Q_NPN_CBE) (description "NPN transistor, collector/base/emitter")) 22 | (sheetpath (names /) (tstamps /)) 23 | (tstamp 623A135E)) 24 | (comp (ref R4) 25 | (value R_US) 26 | (datasheet ~) 27 | (libsource (lib Device) (part R_US) (description "Resistor, US symbol")) 28 | (sheetpath (names /) (tstamps /)) 29 | (tstamp 623A1A21)) 30 | (comp (ref R5) 31 | (value R_US) 32 | (datasheet ~) 33 | (libsource (lib Device) (part R_US) (description "Resistor, US symbol")) 34 | (sheetpath (names /) (tstamps /)) 35 | (tstamp 623A2D4A)) 36 | (comp (ref R2) 37 | (value R_US) 38 | (datasheet ~) 39 | (libsource (lib Device) (part R_US) (description "Resistor, US symbol")) 40 | (sheetpath (names /) (tstamps /)) 41 | (tstamp 623A35E2)) 42 | (comp (ref R3) 43 | (value R_US) 44 | (datasheet ~) 45 | (libsource (lib Device) (part R_US) (description "Resistor, US symbol")) 46 | (sheetpath (names /) (tstamps /)) 47 | (tstamp 623A42C8)) 48 | (comp (ref R1) 49 | (value R_US) 50 | (datasheet ~) 51 | (libsource (lib Device) (part R_US) (description "Resistor, US symbol")) 52 | (sheetpath (names /) (tstamps /)) 53 | (tstamp 623A4BDC))) 54 | (libparts 55 | (libpart (lib Device) (part Q_NPN_CBE) 56 | (description "NPN transistor, collector/base/emitter") 57 | (docs ~) 58 | (fields 59 | (field (name Reference) Q) 60 | (field (name Value) Q_NPN_CBE)) 61 | (pins 62 | (pin (num 1) (name C) (type passive)) 63 | (pin (num 2) (name B) (type input)) 64 | (pin (num 3) (name E) (type passive)))) 65 | (libpart (lib Device) (part R_US) 66 | (description "Resistor, US symbol") 67 | (docs ~) 68 | (footprints 69 | (fp R_*)) 70 | (fields 71 | (field (name Reference) R) 72 | (field (name Value) R_US)) 73 | (pins 74 | (pin (num 1) (name ~) (type passive)) 75 | (pin (num 2) (name ~) (type passive))))) 76 | (libraries 77 | (library (logical Device) 78 | (uri /usr/share/kicad/library/Device.lib))) 79 | (nets 80 | (net (code 1) (name "Net-(Q1-Pad2)") 81 | (node (ref R1) (pin 1)) 82 | (node (ref R3) (pin 1)) 83 | (node (ref R2) (pin 2)) 84 | (node (ref Q1) (pin 2))) 85 | (net (code 2) (name "Net-(Q1-Pad3)") 86 | (node (ref R5) (pin 1)) 87 | (node (ref Q1) (pin 3))) 88 | (net (code 3) (name GND) 89 | (node (ref R3) (pin 2)) 90 | (node (ref R5) (pin 2))) 91 | (net (code 4) (name OUT) 92 | (node (ref Q1) (pin 1)) 93 | (node (ref R4) (pin 2))) 94 | (net (code 5) (name IN) 95 | (node (ref R1) (pin 2))) 96 | (net (code 6) (name +5V) 97 | (node (ref R4) (pin 1)) 98 | (node (ref R2) (pin 1))))) -------------------------------------------------------------------------------- /tests/data/kicad5_test.sch: -------------------------------------------------------------------------------- 1 | EESchema Schematic File Version 4 2 | EELAYER 30 0 3 | EELAYER END 4 | $Descr A4 11693 8268 5 | encoding utf-8 6 | Sheet 1 1 7 | Title "" 8 | Date "" 9 | Rev "" 10 | Comp "" 11 | Comment1 "" 12 | Comment2 "" 13 | Comment3 "" 14 | Comment4 "" 15 | $EndDescr 16 | $Comp 17 | L Device:Q_NPN_CBE Q1 18 | U 1 1 623A135E 19 | P 5500 3575 20 | F 0 "Q1" H 5691 3621 50 0000 L CNN 21 | F 1 "Q_NPN_CBE" H 5691 3530 50 0000 L CNN 22 | F 2 "" H 5700 3675 50 0001 C CNN 23 | F 3 "~" H 5500 3575 50 0001 C CNN 24 | 1 5500 3575 25 | 1 0 0 -1 26 | $EndComp 27 | $Comp 28 | L Device:R_US R4 29 | U 1 1 623A1A21 30 | P 5600 3100 31 | F 0 "R4" H 5668 3146 50 0000 L CNN 32 | F 1 "R_US" H 5668 3055 50 0000 L CNN 33 | F 2 "" V 5640 3090 50 0001 C CNN 34 | F 3 "~" H 5600 3100 50 0001 C CNN 35 | 1 5600 3100 36 | 1 0 0 -1 37 | $EndComp 38 | $Comp 39 | L Device:R_US R5 40 | U 1 1 623A2D4A 41 | P 5600 4075 42 | F 0 "R5" H 5668 4121 50 0000 L CNN 43 | F 1 "R_US" H 5668 4030 50 0000 L CNN 44 | F 2 "" V 5640 4065 50 0001 C CNN 45 | F 3 "~" H 5600 4075 50 0001 C CNN 46 | 1 5600 4075 47 | 1 0 0 -1 48 | $EndComp 49 | $Comp 50 | L Device:R_US R2 51 | U 1 1 623A35E2 52 | P 5300 3100 53 | F 0 "R2" H 5368 3146 50 0000 L CNN 54 | F 1 "R_US" H 5368 3055 50 0000 L CNN 55 | F 2 "" V 5340 3090 50 0001 C CNN 56 | F 3 "~" H 5300 3100 50 0001 C CNN 57 | 1 5300 3100 58 | 1 0 0 -1 59 | $EndComp 60 | $Comp 61 | L Device:R_US R3 62 | U 1 1 623A42C8 63 | P 5300 4075 64 | F 0 "R3" H 5368 4121 50 0000 L CNN 65 | F 1 "R_US" H 5368 4030 50 0000 L CNN 66 | F 2 "" V 5340 4065 50 0001 C CNN 67 | F 3 "~" H 5300 4075 50 0001 C CNN 68 | 1 5300 4075 69 | 1 0 0 -1 70 | $EndComp 71 | $Comp 72 | L Device:R_US R1 73 | U 1 1 623A4BDC 74 | P 4950 3575 75 | F 0 "R1" V 4745 3575 50 0000 C CNN 76 | F 1 "R_US" V 4836 3575 50 0000 C CNN 77 | F 2 "" V 4990 3565 50 0001 C CNN 78 | F 3 "~" H 4950 3575 50 0001 C CNN 79 | 1 4950 3575 80 | 0 1 1 0 81 | $EndComp 82 | $Comp 83 | L power:+5V #PWR0101 84 | U 1 1 623A5A79 85 | P 5600 2775 86 | F 0 "#PWR0101" H 5600 2625 50 0001 C CNN 87 | F 1 "+5V" H 5615 2948 50 0000 C CNN 88 | F 2 "" H 5600 2775 50 0001 C CNN 89 | F 3 "" H 5600 2775 50 0001 C CNN 90 | 1 5600 2775 91 | 1 0 0 -1 92 | $EndComp 93 | $Comp 94 | L power:GND #PWR0102 95 | U 1 1 623A63AA 96 | P 5600 4450 97 | F 0 "#PWR0102" H 5600 4200 50 0001 C CNN 98 | F 1 "GND" H 5605 4277 50 0000 C CNN 99 | F 2 "" H 5600 4450 50 0001 C CNN 100 | F 3 "" H 5600 4450 50 0001 C CNN 101 | 1 5600 4450 102 | 1 0 0 -1 103 | $EndComp 104 | Wire Wire Line 105 | 5600 2775 5600 2850 106 | Wire Wire Line 107 | 5600 3250 5600 3325 108 | Wire Wire Line 109 | 5600 4225 5600 4325 110 | Wire Wire Line 111 | 5600 3775 5600 3925 112 | Wire Wire Line 113 | 5100 3575 5300 3575 114 | Wire Wire Line 115 | 5600 2850 5300 2850 116 | Wire Wire Line 117 | 5300 2850 5300 2950 118 | Wire Wire Line 119 | 5300 4325 5600 4325 120 | Wire Wire Line 121 | 5300 3250 5300 3575 122 | Wire Wire Line 123 | 5300 4225 5300 4325 124 | Connection ~ 5600 2850 125 | Wire Wire Line 126 | 5600 2850 5600 2950 127 | Connection ~ 5300 3575 128 | Wire Wire Line 129 | 5300 3575 5300 3925 130 | Connection ~ 5600 4325 131 | Wire Wire Line 132 | 5600 4325 5600 4450 133 | Text GLabel 4800 3575 0 50 Input ~ 0 134 | IN 135 | Wire Wire Line 136 | 5600 3325 5875 3325 137 | Connection ~ 5600 3325 138 | Wire Wire Line 139 | 5600 3325 5600 3375 140 | Text GLabel 5875 3325 2 50 Output ~ 0 141 | OUT 142 | $EndSCHEMATC 143 | -------------------------------------------------------------------------------- /tests/data/kicad6_test.kicad_sch: -------------------------------------------------------------------------------- 1 | (kicad_sch (version 20211123) (generator eeschema) 2 | 3 | (uuid e63e39d7-6ac0-4ffd-8aa3-1841a4541b55) 4 | 5 | (paper "A4") 6 | 7 | (lib_symbols 8 | (symbol "Device:Q_NPN_CBE" (pin_names (offset 0) hide) (in_bom yes) (on_board yes) 9 | (property "Reference" "Q" (id 0) (at 5.08 1.27 0) 10 | (effects (font (size 1.27 1.27)) (justify left)) 11 | ) 12 | (property "Value" "Q_NPN_CBE" (id 1) (at 5.08 -1.27 0) 13 | (effects (font (size 1.27 1.27)) (justify left)) 14 | ) 15 | (property "Footprint" "" (id 2) (at 5.08 2.54 0) 16 | (effects (font (size 1.27 1.27)) hide) 17 | ) 18 | (property "Datasheet" "~" (id 3) (at 0 0 0) 19 | (effects (font (size 1.27 1.27)) hide) 20 | ) 21 | (property "ki_keywords" "transistor NPN" (id 4) (at 0 0 0) 22 | (effects (font (size 1.27 1.27)) hide) 23 | ) 24 | (property "ki_description" "NPN transistor, collector/base/emitter" (id 5) (at 0 0 0) 25 | (effects (font (size 1.27 1.27)) hide) 26 | ) 27 | (symbol "Q_NPN_CBE_0_1" 28 | (polyline 29 | (pts 30 | (xy 0.635 0.635) 31 | (xy 2.54 2.54) 32 | ) 33 | (stroke (width 0) (type default) (color 0 0 0 0)) 34 | (fill (type none)) 35 | ) 36 | (polyline 37 | (pts 38 | (xy 0.635 -0.635) 39 | (xy 2.54 -2.54) 40 | (xy 2.54 -2.54) 41 | ) 42 | (stroke (width 0) (type default) (color 0 0 0 0)) 43 | (fill (type none)) 44 | ) 45 | (polyline 46 | (pts 47 | (xy 0.635 1.905) 48 | (xy 0.635 -1.905) 49 | (xy 0.635 -1.905) 50 | ) 51 | (stroke (width 0.508) (type default) (color 0 0 0 0)) 52 | (fill (type none)) 53 | ) 54 | (polyline 55 | (pts 56 | (xy 1.27 -1.778) 57 | (xy 1.778 -1.27) 58 | (xy 2.286 -2.286) 59 | (xy 1.27 -1.778) 60 | (xy 1.27 -1.778) 61 | ) 62 | (stroke (width 0) (type default) (color 0 0 0 0)) 63 | (fill (type outline)) 64 | ) 65 | (circle (center 1.27 0) (radius 2.8194) 66 | (stroke (width 0.254) (type default) (color 0 0 0 0)) 67 | (fill (type none)) 68 | ) 69 | ) 70 | (symbol "Q_NPN_CBE_1_1" 71 | (pin passive line (at 2.54 5.08 270) (length 2.54) 72 | (name "C" (effects (font (size 1.27 1.27)))) 73 | (number "1" (effects (font (size 1.27 1.27)))) 74 | ) 75 | (pin input line (at -5.08 0 0) (length 5.715) 76 | (name "B" (effects (font (size 1.27 1.27)))) 77 | (number "2" (effects (font (size 1.27 1.27)))) 78 | ) 79 | (pin passive line (at 2.54 -5.08 90) (length 2.54) 80 | (name "E" (effects (font (size 1.27 1.27)))) 81 | (number "3" (effects (font (size 1.27 1.27)))) 82 | ) 83 | ) 84 | ) 85 | (symbol "Device:R_US" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes) 86 | (property "Reference" "R" (id 0) (at 2.54 0 90) 87 | (effects (font (size 1.27 1.27))) 88 | ) 89 | (property "Value" "R_US" (id 1) (at -2.54 0 90) 90 | (effects (font (size 1.27 1.27))) 91 | ) 92 | (property "Footprint" "" (id 2) (at 1.016 -0.254 90) 93 | (effects (font (size 1.27 1.27)) hide) 94 | ) 95 | (property "Datasheet" "~" (id 3) (at 0 0 0) 96 | (effects (font (size 1.27 1.27)) hide) 97 | ) 98 | (property "ki_keywords" "R res resistor" (id 4) (at 0 0 0) 99 | (effects (font (size 1.27 1.27)) hide) 100 | ) 101 | (property "ki_description" "Resistor, US symbol" (id 5) (at 0 0 0) 102 | (effects (font (size 1.27 1.27)) hide) 103 | ) 104 | (property "ki_fp_filters" "R_*" (id 6) (at 0 0 0) 105 | (effects (font (size 1.27 1.27)) hide) 106 | ) 107 | (symbol "R_US_0_1" 108 | (polyline 109 | (pts 110 | (xy 0 -2.286) 111 | (xy 0 -2.54) 112 | ) 113 | (stroke (width 0) (type default) (color 0 0 0 0)) 114 | (fill (type none)) 115 | ) 116 | (polyline 117 | (pts 118 | (xy 0 2.286) 119 | (xy 0 2.54) 120 | ) 121 | (stroke (width 0) (type default) (color 0 0 0 0)) 122 | (fill (type none)) 123 | ) 124 | (polyline 125 | (pts 126 | (xy 0 -0.762) 127 | (xy 1.016 -1.143) 128 | (xy 0 -1.524) 129 | (xy -1.016 -1.905) 130 | (xy 0 -2.286) 131 | ) 132 | (stroke (width 0) (type default) (color 0 0 0 0)) 133 | (fill (type none)) 134 | ) 135 | (polyline 136 | (pts 137 | (xy 0 0.762) 138 | (xy 1.016 0.381) 139 | (xy 0 0) 140 | (xy -1.016 -0.381) 141 | (xy 0 -0.762) 142 | ) 143 | (stroke (width 0) (type default) (color 0 0 0 0)) 144 | (fill (type none)) 145 | ) 146 | (polyline 147 | (pts 148 | (xy 0 2.286) 149 | (xy 1.016 1.905) 150 | (xy 0 1.524) 151 | (xy -1.016 1.143) 152 | (xy 0 0.762) 153 | ) 154 | (stroke (width 0) (type default) (color 0 0 0 0)) 155 | (fill (type none)) 156 | ) 157 | ) 158 | (symbol "R_US_1_1" 159 | (pin passive line (at 0 3.81 270) (length 1.27) 160 | (name "~" (effects (font (size 1.27 1.27)))) 161 | (number "1" (effects (font (size 1.27 1.27)))) 162 | ) 163 | (pin passive line (at 0 -3.81 90) (length 1.27) 164 | (name "~" (effects (font (size 1.27 1.27)))) 165 | (number "2" (effects (font (size 1.27 1.27)))) 166 | ) 167 | ) 168 | ) 169 | (symbol "power:+5V" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes) 170 | (property "Reference" "#PWR" (id 0) (at 0 -3.81 0) 171 | (effects (font (size 1.27 1.27)) hide) 172 | ) 173 | (property "Value" "+5V" (id 1) (at 0 3.556 0) 174 | (effects (font (size 1.27 1.27))) 175 | ) 176 | (property "Footprint" "" (id 2) (at 0 0 0) 177 | (effects (font (size 1.27 1.27)) hide) 178 | ) 179 | (property "Datasheet" "" (id 3) (at 0 0 0) 180 | (effects (font (size 1.27 1.27)) hide) 181 | ) 182 | (property "ki_keywords" "power-flag" (id 4) (at 0 0 0) 183 | (effects (font (size 1.27 1.27)) hide) 184 | ) 185 | (property "ki_description" "Power symbol creates a global label with name \"+5V\"" (id 5) (at 0 0 0) 186 | (effects (font (size 1.27 1.27)) hide) 187 | ) 188 | (symbol "+5V_0_1" 189 | (polyline 190 | (pts 191 | (xy -0.762 1.27) 192 | (xy 0 2.54) 193 | ) 194 | (stroke (width 0) (type default) (color 0 0 0 0)) 195 | (fill (type none)) 196 | ) 197 | (polyline 198 | (pts 199 | (xy 0 0) 200 | (xy 0 2.54) 201 | ) 202 | (stroke (width 0) (type default) (color 0 0 0 0)) 203 | (fill (type none)) 204 | ) 205 | (polyline 206 | (pts 207 | (xy 0 2.54) 208 | (xy 0.762 1.27) 209 | ) 210 | (stroke (width 0) (type default) (color 0 0 0 0)) 211 | (fill (type none)) 212 | ) 213 | ) 214 | (symbol "+5V_1_1" 215 | (pin power_in line (at 0 0 90) (length 0) hide 216 | (name "+5V" (effects (font (size 1.27 1.27)))) 217 | (number "1" (effects (font (size 1.27 1.27)))) 218 | ) 219 | ) 220 | ) 221 | (symbol "power:GND" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes) 222 | (property "Reference" "#PWR" (id 0) (at 0 -6.35 0) 223 | (effects (font (size 1.27 1.27)) hide) 224 | ) 225 | (property "Value" "GND" (id 1) (at 0 -3.81 0) 226 | (effects (font (size 1.27 1.27))) 227 | ) 228 | (property "Footprint" "" (id 2) (at 0 0 0) 229 | (effects (font (size 1.27 1.27)) hide) 230 | ) 231 | (property "Datasheet" "" (id 3) (at 0 0 0) 232 | (effects (font (size 1.27 1.27)) hide) 233 | ) 234 | (property "ki_keywords" "power-flag" (id 4) (at 0 0 0) 235 | (effects (font (size 1.27 1.27)) hide) 236 | ) 237 | (property "ki_description" "Power symbol creates a global label with name \"GND\" , ground" (id 5) (at 0 0 0) 238 | (effects (font (size 1.27 1.27)) hide) 239 | ) 240 | (symbol "GND_0_1" 241 | (polyline 242 | (pts 243 | (xy 0 0) 244 | (xy 0 -1.27) 245 | (xy 1.27 -1.27) 246 | (xy 0 -2.54) 247 | (xy -1.27 -1.27) 248 | (xy 0 -1.27) 249 | ) 250 | (stroke (width 0) (type default) (color 0 0 0 0)) 251 | (fill (type none)) 252 | ) 253 | ) 254 | (symbol "GND_1_1" 255 | (pin power_in line (at 0 0 270) (length 0) hide 256 | (name "GND" (effects (font (size 1.27 1.27)))) 257 | (number "1" (effects (font (size 1.27 1.27)))) 258 | ) 259 | ) 260 | ) 261 | ) 262 | 263 | (junction (at 134.62 83.82) (diameter 0) (color 0 0 0 0) 264 | (uuid 22038e08-14cd-44e9-8610-24bfe8a0e2a4) 265 | ) 266 | (junction (at 127 96.52) (diameter 0) (color 0 0 0 0) 267 | (uuid 33473488-6682-4cdf-8de3-5a3552a7ce88) 268 | ) 269 | (junction (at 134.62 91.44) (diameter 0) (color 0 0 0 0) 270 | (uuid 3c24ab61-861f-414b-bf23-eb9f1d4e8369) 271 | ) 272 | (junction (at 134.62 110.49) (diameter 0) (color 0 0 0 0) 273 | (uuid 9285293e-f7a3-4e01-ac88-9ebc0c104a54) 274 | ) 275 | 276 | (wire (pts (xy 109.22 96.52) (xy 114.3 96.52)) 277 | (stroke (width 0) (type default) (color 0 0 0 0)) 278 | (uuid 4a98e74f-1fb6-49e8-b8bb-ea48459ab3e0) 279 | ) 280 | (wire (pts (xy 127 91.44) (xy 127 96.52)) 281 | (stroke (width 0) (type default) (color 0 0 0 0)) 282 | (uuid 51cd9e0a-6177-4d9c-98d7-9dbbb77f9cd5) 283 | ) 284 | (wire (pts (xy 121.92 96.52) (xy 127 96.52)) 285 | (stroke (width 0) (type default) (color 0 0 0 0)) 286 | (uuid 527f3c91-95f0-4b0d-b126-85c3de1e0a0e) 287 | ) 288 | (wire (pts (xy 127 110.49) (xy 134.62 110.49)) 289 | (stroke (width 0) (type default) (color 0 0 0 0)) 290 | (uuid 6f57bf78-2b34-4713-8e9c-fb4ef9834ffe) 291 | ) 292 | (wire (pts (xy 127 109.22) (xy 127 110.49)) 293 | (stroke (width 0) (type default) (color 0 0 0 0)) 294 | (uuid 740f7dd3-51a1-4d1b-9613-7bb23278ddb7) 295 | ) 296 | (wire (pts (xy 134.62 110.49) (xy 134.62 114.3)) 297 | (stroke (width 0) (type default) (color 0 0 0 0)) 298 | (uuid 742c855f-2291-400f-b4de-9233365de062) 299 | ) 300 | (wire (pts (xy 134.62 91.44) (xy 148.59 91.44)) 301 | (stroke (width 0) (type default) (color 0 0 0 0)) 302 | (uuid 7dc39591-bc79-4a9b-95c0-417b27d600d5) 303 | ) 304 | (wire (pts (xy 134.62 78.74) (xy 134.62 83.82)) 305 | (stroke (width 0) (type default) (color 0 0 0 0)) 306 | (uuid 90f46995-4dde-4fca-9045-b7cc5caea84e) 307 | ) 308 | (wire (pts (xy 134.62 109.22) (xy 134.62 110.49)) 309 | (stroke (width 0) (type default) (color 0 0 0 0)) 310 | (uuid 95b53bcc-b2b5-4fc8-9d4f-68b388576eee) 311 | ) 312 | (wire (pts (xy 127 83.82) (xy 134.62 83.82)) 313 | (stroke (width 0) (type default) (color 0 0 0 0)) 314 | (uuid a8f2dacf-2d5a-4a9a-849c-44c9324f121c) 315 | ) 316 | (wire (pts (xy 127 96.52) (xy 127 101.6)) 317 | (stroke (width 0) (type default) (color 0 0 0 0)) 318 | (uuid bd1609c1-9e92-4ee5-b01d-8d00f8dc62fa) 319 | ) 320 | 321 | (global_label "OUT" (shape output) (at 148.59 91.44 0) (fields_autoplaced) 322 | (effects (font (size 1.27 1.27)) (justify left)) 323 | (uuid 96a5c046-2bb8-4223-addc-0967a661f4f5) 324 | (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 154.6317 91.3606 0) 325 | (effects (font (size 1.27 1.27)) (justify left) hide) 326 | ) 327 | ) 328 | (global_label "IN" (shape input) (at 109.22 96.52 180) (fields_autoplaced) 329 | (effects (font (size 1.27 1.27)) (justify right)) 330 | (uuid d4f7fae7-033b-42f6-b7ba-d553a4e26289) 331 | (property "Intersheet References" "${INTERSHEET_REFS}" (id 0) (at 104.8717 96.4406 0) 332 | (effects (font (size 1.27 1.27)) (justify right) hide) 333 | ) 334 | ) 335 | 336 | (symbol (lib_id "Device:R_US") (at 118.11 96.52 90) (unit 1) 337 | (in_bom yes) (on_board yes) (fields_autoplaced) 338 | (uuid 0520cef8-5eb4-4ad6-9db3-e738a3afea43) 339 | (property "Reference" "R1" (id 0) (at 118.11 90.17 90)) 340 | (property "Value" "R_US" (id 1) (at 118.11 92.71 90)) 341 | (property "Footprint" "" (id 2) (at 118.364 95.504 90) 342 | (effects (font (size 1.27 1.27)) hide) 343 | ) 344 | (property "Datasheet" "~" (id 3) (at 118.11 96.52 0) 345 | (effects (font (size 1.27 1.27)) hide) 346 | ) 347 | (pin "1" (uuid d0061db9-f957-4928-a91b-b0ddb72c8595)) 348 | (pin "2" (uuid 61450f2e-b3c3-417f-9b70-0afa465cacbf)) 349 | ) 350 | 351 | (symbol (lib_id "Device:Q_NPN_CBE") (at 132.08 96.52 0) (unit 1) 352 | (in_bom yes) (on_board yes) (fields_autoplaced) 353 | (uuid 08fae221-7b6f-4c57-be73-6210c6206091) 354 | (property "Reference" "Q1" (id 0) (at 137.16 95.2499 0) 355 | (effects (font (size 1.27 1.27)) (justify left)) 356 | ) 357 | (property "Value" "Q_NPN_CBE" (id 1) (at 137.16 97.7899 0) 358 | (effects (font (size 1.27 1.27)) (justify left)) 359 | ) 360 | (property "Footprint" "" (id 2) (at 137.16 93.98 0) 361 | (effects (font (size 1.27 1.27)) hide) 362 | ) 363 | (property "Datasheet" "~" (id 3) (at 132.08 96.52 0) 364 | (effects (font (size 1.27 1.27)) hide) 365 | ) 366 | (pin "1" (uuid 6e9aab82-e6c0-4960-99af-e7c5a83d520f)) 367 | (pin "2" (uuid db09a492-3111-4077-8b89-2ff4c8eebad3)) 368 | (pin "3" (uuid 8f29ec2b-5253-4ae2-bf8f-40e83998f739)) 369 | ) 370 | 371 | (symbol (lib_id "power:GND") (at 134.62 114.3 0) (unit 1) 372 | (in_bom yes) (on_board yes) (fields_autoplaced) 373 | (uuid 0f3541ed-d38f-4d54-87aa-efe15ec860fa) 374 | (property "Reference" "#PWR02" (id 0) (at 134.62 120.65 0) 375 | (effects (font (size 1.27 1.27)) hide) 376 | ) 377 | (property "Value" "GND" (id 1) (at 134.62 119.38 0)) 378 | (property "Footprint" "" (id 2) (at 134.62 114.3 0) 379 | (effects (font (size 1.27 1.27)) hide) 380 | ) 381 | (property "Datasheet" "" (id 3) (at 134.62 114.3 0) 382 | (effects (font (size 1.27 1.27)) hide) 383 | ) 384 | (pin "1" (uuid 535b76cd-fc12-4f09-acee-3d10d4fb3829)) 385 | ) 386 | 387 | (symbol (lib_id "Device:R_US") (at 134.62 87.63 0) (unit 1) 388 | (in_bom yes) (on_board yes) (fields_autoplaced) 389 | (uuid 4be9bcff-98b2-46ca-809c-98605f99802f) 390 | (property "Reference" "R4" (id 0) (at 137.16 86.3599 0) 391 | (effects (font (size 1.27 1.27)) (justify left)) 392 | ) 393 | (property "Value" "R_US" (id 1) (at 137.16 88.8999 0) 394 | (effects (font (size 1.27 1.27)) (justify left)) 395 | ) 396 | (property "Footprint" "" (id 2) (at 135.636 87.884 90) 397 | (effects (font (size 1.27 1.27)) hide) 398 | ) 399 | (property "Datasheet" "~" (id 3) (at 134.62 87.63 0) 400 | (effects (font (size 1.27 1.27)) hide) 401 | ) 402 | (pin "1" (uuid b0f67d00-898d-4d86-831c-879d20ea58d1)) 403 | (pin "2" (uuid a83a46a9-63ee-4d26-bfce-0ba963092218)) 404 | ) 405 | 406 | (symbol (lib_id "power:+5V") (at 134.62 78.74 0) (unit 1) 407 | (in_bom yes) (on_board yes) (fields_autoplaced) 408 | (uuid 51ddfd96-d047-4f81-9be8-fab6aa44eb92) 409 | (property "Reference" "#PWR01" (id 0) (at 134.62 82.55 0) 410 | (effects (font (size 1.27 1.27)) hide) 411 | ) 412 | (property "Value" "+5V" (id 1) (at 134.62 73.66 0)) 413 | (property "Footprint" "" (id 2) (at 134.62 78.74 0) 414 | (effects (font (size 1.27 1.27)) hide) 415 | ) 416 | (property "Datasheet" "" (id 3) (at 134.62 78.74 0) 417 | (effects (font (size 1.27 1.27)) hide) 418 | ) 419 | (pin "1" (uuid 999da873-64db-46ef-9afc-708c26450aaf)) 420 | ) 421 | 422 | (symbol (lib_id "Device:R_US") (at 127 105.41 0) (unit 1) 423 | (in_bom yes) (on_board yes) (fields_autoplaced) 424 | (uuid 803be133-afda-4dfd-b6d5-104381910e3a) 425 | (property "Reference" "R3" (id 0) (at 129.54 104.1399 0) 426 | (effects (font (size 1.27 1.27)) (justify left)) 427 | ) 428 | (property "Value" "R_US" (id 1) (at 129.54 106.6799 0) 429 | (effects (font (size 1.27 1.27)) (justify left)) 430 | ) 431 | (property "Footprint" "" (id 2) (at 128.016 105.664 90) 432 | (effects (font (size 1.27 1.27)) hide) 433 | ) 434 | (property "Datasheet" "~" (id 3) (at 127 105.41 0) 435 | (effects (font (size 1.27 1.27)) hide) 436 | ) 437 | (pin "1" (uuid bdde9e11-7801-483e-9088-385c57e7afa3)) 438 | (pin "2" (uuid 639f8471-ada5-4f78-89f6-af541dfd2b3a)) 439 | ) 440 | 441 | (symbol (lib_id "Device:R_US") (at 134.62 105.41 0) (unit 1) 442 | (in_bom yes) (on_board yes) (fields_autoplaced) 443 | (uuid 9c27bafe-dc9a-4fc8-9304-3713da742e75) 444 | (property "Reference" "R5" (id 0) (at 137.16 104.1399 0) 445 | (effects (font (size 1.27 1.27)) (justify left)) 446 | ) 447 | (property "Value" "R_US" (id 1) (at 137.16 106.6799 0) 448 | (effects (font (size 1.27 1.27)) (justify left)) 449 | ) 450 | (property "Footprint" "" (id 2) (at 135.636 105.664 90) 451 | (effects (font (size 1.27 1.27)) hide) 452 | ) 453 | (property "Datasheet" "~" (id 3) (at 134.62 105.41 0) 454 | (effects (font (size 1.27 1.27)) hide) 455 | ) 456 | (pin "1" (uuid 8caa6ac8-9324-4dbf-9999-0ab7579656ee)) 457 | (pin "2" (uuid 962defff-51d6-4ea0-9a4d-3205cf1d6dd3)) 458 | ) 459 | 460 | (symbol (lib_id "Device:R_US") (at 127 87.63 0) (unit 1) 461 | (in_bom yes) (on_board yes) (fields_autoplaced) 462 | (uuid dfe7aa15-3d3f-4a25-935c-577ae609d381) 463 | (property "Reference" "R2" (id 0) (at 129.54 86.3599 0) 464 | (effects (font (size 1.27 1.27)) (justify left)) 465 | ) 466 | (property "Value" "R_US" (id 1) (at 129.54 88.8999 0) 467 | (effects (font (size 1.27 1.27)) (justify left)) 468 | ) 469 | (property "Footprint" "" (id 2) (at 128.016 87.884 90) 470 | (effects (font (size 1.27 1.27)) hide) 471 | ) 472 | (property "Datasheet" "~" (id 3) (at 127 87.63 0) 473 | (effects (font (size 1.27 1.27)) hide) 474 | ) 475 | (pin "1" (uuid 02cfcace-e3c9-4ff8-9a7d-8c9ddff38412)) 476 | (pin "2" (uuid 18e0d667-71c2-4288-ab78-9b784fe175c7)) 477 | ) 478 | 479 | (sheet_instances 480 | (path "/" (page "1")) 481 | ) 482 | 483 | (symbol_instances 484 | (path "/51ddfd96-d047-4f81-9be8-fab6aa44eb92" 485 | (reference "#PWR01") (unit 1) (value "+5V") (footprint "") 486 | ) 487 | (path "/0f3541ed-d38f-4d54-87aa-efe15ec860fa" 488 | (reference "#PWR02") (unit 1) (value "GND") (footprint "") 489 | ) 490 | (path "/08fae221-7b6f-4c57-be73-6210c6206091" 491 | (reference "Q1") (unit 1) (value "Q_NPN_CBE") (footprint "") 492 | ) 493 | (path "/0520cef8-5eb4-4ad6-9db3-e738a3afea43" 494 | (reference "R1") (unit 1) (value "R_US") (footprint "") 495 | ) 496 | (path "/dfe7aa15-3d3f-4a25-935c-577ae609d381" 497 | (reference "R2") (unit 1) (value "R_US") (footprint "") 498 | ) 499 | (path "/803be133-afda-4dfd-b6d5-104381910e3a" 500 | (reference "R3") (unit 1) (value "R_US") (footprint "") 501 | ) 502 | (path "/4be9bcff-98b2-46ca-809c-98605f99802f" 503 | (reference "R4") (unit 1) (value "R_US") (footprint "") 504 | ) 505 | (path "/9c27bafe-dc9a-4fc8-9304-3713da742e75" 506 | (reference "R5") (unit 1) (value "R_US") (footprint "") 507 | ) 508 | ) 509 | ) 510 | -------------------------------------------------------------------------------- /tests/data/kicad6_test.net: -------------------------------------------------------------------------------- 1 | (export (version "E") 2 | (design 3 | (source "/home/devb/tech_stuff/KiCad/tools/kinparse/tests/data/kicad6_test_2.kicad_sch") 4 | (date "Tue 22 Mar 2022 05:06:15 PM EDT") 5 | (tool "Eeschema 6.0.0-d3dd2cf0fa~116~ubuntu20.04.1") 6 | (sheet (number "1") (name "/") (tstamps "/") 7 | (title_block 8 | (title "title") 9 | (company "company") 10 | (rev "1.0") 11 | (date "03/23/2022") 12 | (source "kicad6_test_2.kicad_sch") 13 | (comment (number "1") (value "")) 14 | (comment (number "2") (value "")) 15 | (comment (number "3") (value "")) 16 | (comment (number "4") (value "")) 17 | (comment (number "5") (value "")) 18 | (comment (number "6") (value "")) 19 | (comment (number "7") (value "")) 20 | (comment (number "8") (value "")) 21 | (comment (number "9") (value ""))))) 22 | (components 23 | (comp (ref "Q1") 24 | (value "Q_NPN_CBE") 25 | (datasheet "~") 26 | (libsource (lib "Device") (part "Q_NPN_CBE") (description "NPN transistor, collector/base/emitter")) 27 | (property (name "Sheetname") (value "")) 28 | (property (name "Sheetfile") (value "kicad6_test_2.kicad_sch")) 29 | (sheetpath (names "/") (tstamps "/")) 30 | (tstamps "08fae221-7b6f-4c57-be73-6210c6206091")) 31 | (comp (ref "R1") 32 | (value "R_US") 33 | (datasheet "~") 34 | (libsource (lib "Device") (part "R_US") (description "Resistor, US symbol")) 35 | (property (name "Sheetname") (value "")) 36 | (property (name "Sheetfile") (value "kicad6_test_2.kicad_sch")) 37 | (property (name "exclude_from_bom")) 38 | (sheetpath (names "/") (tstamps "/")) 39 | (tstamps "0520cef8-5eb4-4ad6-9db3-e738a3afea43")) 40 | (comp (ref "R2") 41 | (value "R_US") 42 | (datasheet "~") 43 | (libsource (lib "Device") (part "R_US") (description "Resistor, US symbol")) 44 | (property (name "Sheetname") (value "")) 45 | (property (name "Sheetfile") (value "kicad6_test_2.kicad_sch")) 46 | (sheetpath (names "/") (tstamps "/")) 47 | (tstamps "dfe7aa15-3d3f-4a25-935c-577ae609d381")) 48 | (comp (ref "R3") 49 | (value "R_US") 50 | (datasheet "~") 51 | (libsource (lib "Device") (part "R_US") (description "Resistor, US symbol")) 52 | (property (name "Sheetname") (value "")) 53 | (property (name "Sheetfile") (value "kicad6_test_2.kicad_sch")) 54 | (sheetpath (names "/") (tstamps "/")) 55 | (tstamps "803be133-afda-4dfd-b6d5-104381910e3a")) 56 | (comp (ref "R4") 57 | (value "R_US") 58 | (datasheet "~") 59 | (libsource (lib "Device") (part "R_US") (description "Resistor, US symbol")) 60 | (property (name "Sheetname") (value "")) 61 | (property (name "Sheetfile") (value "kicad6_test_2.kicad_sch")) 62 | (sheetpath (names "/") (tstamps "/")) 63 | (tstamps "4be9bcff-98b2-46ca-809c-98605f99802f")) 64 | (comp (ref "R5") 65 | (value "R_US") 66 | (datasheet "~") 67 | (libsource (lib "Device") (part "R_US") (description "Resistor, US symbol")) 68 | (property (name "Sheetname") (value "")) 69 | (property (name "Sheetfile") (value "kicad6_test_2.kicad_sch")) 70 | (sheetpath (names "/") (tstamps "/")) 71 | (tstamps "9c27bafe-dc9a-4fc8-9304-3713da742e75"))) 72 | (libparts 73 | (libpart (lib "Device") (part "Q_NPN_CBE") 74 | (description "NPN transistor, collector/base/emitter") 75 | (docs "~") 76 | (fields 77 | (field (name "Reference") "Q") 78 | (field (name "Value") "Q_NPN_CBE") 79 | (field (name "Datasheet") "~")) 80 | (pins 81 | (pin (num "1") (name "C") (type "passive")) 82 | (pin (num "2") (name "B") (type "input")) 83 | (pin (num "3") (name "E") (type "passive")))) 84 | (libpart (lib "Device") (part "R_US") 85 | (description "Resistor, US symbol") 86 | (docs "~") 87 | (footprints 88 | (fp "R_*")) 89 | (fields 90 | (field (name "Reference") "R") 91 | (field (name "Value") "R_US") 92 | (field (name "Datasheet") "~")) 93 | (pins 94 | (pin (num "1") (name "") (type "passive")) 95 | (pin (num "2") (name "") (type "passive"))))) 96 | (libraries 97 | (library (logical "Device") 98 | (uri "/usr/share/kicad/symbols//Device.kicad_sym"))) 99 | (nets 100 | (net (code "1") (name "+5V") 101 | (node (ref "R2") (pin "1") (pintype "passive")) 102 | (node (ref "R4") (pin "1") (pintype "passive"))) 103 | (net (code "2") (name "GND") 104 | (node (ref "R3") (pin "2") (pintype "passive")) 105 | (node (ref "R5") (pin "2") (pintype "passive"))) 106 | (net (code "3") (name "IN") 107 | (node (ref "R1") (pin "1") (pintype "passive"))) 108 | (net (code "4") (name "Net-(R1-Pad2)") 109 | (node (ref "Q1") (pin "2") (pinfunction "B") (pintype "input")) 110 | (node (ref "R1") (pin "2") (pintype "passive")) 111 | (node (ref "R2") (pin "2") (pintype "passive")) 112 | (node (ref "R3") (pin "1") (pintype "passive"))) 113 | (net (code "5") (name "Net-(R5-Pad1)") 114 | (node (ref "Q1") (pin "3") (pinfunction "E") (pintype "passive")) 115 | (node (ref "R5") (pin "1") (pintype "passive"))) 116 | (net (code "6") (name "OUT") 117 | (node (ref "Q1") (pin "1") (pinfunction "C") (pintype "passive")) 118 | (node (ref "R4") (pin "2") (pintype "passive"))))) -------------------------------------------------------------------------------- /tests/data/kicad8_test.net: -------------------------------------------------------------------------------- 1 | (export (version "E") 2 | (design 3 | (source "/home/devb/projects/KiCad/tools/kinparse/tests/data/kicad8_test.kicad_sch") 4 | (date "2024-09-22T16:09:49-0400") 5 | (tool "Eeschema 8.0.5-8.0.5-0~ubuntu22.04.1") 6 | (sheet (number "1") (name "/") (tstamps "/") 7 | (title_block 8 | (title "title") 9 | (company "company") 10 | (rev "1.0") 11 | (date "03/23/2022") 12 | (source "kicad8_test.kicad_sch") 13 | (comment (number "1") (value "")) 14 | (comment (number "2") (value "")) 15 | (comment (number "3") (value "")) 16 | (comment (number "4") (value "")) 17 | (comment (number "5") (value "")) 18 | (comment (number "6") (value "")) 19 | (comment (number "7") (value "")) 20 | (comment (number "8") (value "")) 21 | (comment (number "9") (value ""))))) 22 | (components 23 | (comp (ref "Q1") 24 | (value "Q_NPN_CBE") 25 | (fields 26 | (field (name "Footprint")) 27 | (field (name "Datasheet")) 28 | (field (name "Description"))) 29 | (libsource (lib "Device") (part "Q_NPN_CBE") (description "NPN transistor, collector/base/emitter")) 30 | (property (name "Sheetname") (value "Root")) 31 | (property (name "Sheetfile") (value "kicad8_test.kicad_sch")) 32 | (property (name "ki_keywords") (value "transistor NPN")) 33 | (sheetpath (names "/") (tstamps "/")) 34 | (tstamps "08fae221-7b6f-4c57-be73-6210c6206091")) 35 | (comp (ref "R1") 36 | (value "R_US") 37 | (fields 38 | (field (name "Footprint")) 39 | (field (name "Datasheet")) 40 | (field (name "Description"))) 41 | (libsource (lib "Device") (part "R_US") (description "Resistor, US symbol")) 42 | (property (name "Sheetname") (value "Root")) 43 | (property (name "Sheetfile") (value "kicad8_test.kicad_sch")) 44 | (property (name "ki_keywords") (value "R res resistor")) 45 | (property (name "ki_fp_filters") (value "R_*")) 46 | (sheetpath (names "/") (tstamps "/")) 47 | (tstamps "0520cef8-5eb4-4ad6-9db3-e738a3afea43")) 48 | (comp (ref "R2") 49 | (value "R_US") 50 | (fields 51 | (field (name "Footprint")) 52 | (field (name "Datasheet")) 53 | (field (name "Description"))) 54 | (libsource (lib "Device") (part "R_US") (description "Resistor, US symbol")) 55 | (property (name "Sheetname") (value "Root")) 56 | (property (name "Sheetfile") (value "kicad8_test.kicad_sch")) 57 | (property (name "ki_keywords") (value "R res resistor")) 58 | (property (name "ki_fp_filters") (value "R_*")) 59 | (sheetpath (names "/") (tstamps "/")) 60 | (tstamps "dfe7aa15-3d3f-4a25-935c-577ae609d381")) 61 | (comp (ref "R3") 62 | (value "R_US") 63 | (fields 64 | (field (name "Footprint")) 65 | (field (name "Datasheet")) 66 | (field (name "Description"))) 67 | (libsource (lib "Device") (part "R_US") (description "Resistor, US symbol")) 68 | (property (name "Sheetname") (value "Root")) 69 | (property (name "Sheetfile") (value "kicad8_test.kicad_sch")) 70 | (property (name "ki_keywords") (value "R res resistor")) 71 | (property (name "ki_fp_filters") (value "R_*")) 72 | (sheetpath (names "/") (tstamps "/")) 73 | (tstamps "803be133-afda-4dfd-b6d5-104381910e3a")) 74 | (comp (ref "R4") 75 | (value "R_US") 76 | (fields 77 | (field (name "Footprint")) 78 | (field (name "Datasheet")) 79 | (field (name "Description"))) 80 | (libsource (lib "Device") (part "R_US") (description "Resistor, US symbol")) 81 | (property (name "Sheetname") (value "Root")) 82 | (property (name "Sheetfile") (value "kicad8_test.kicad_sch")) 83 | (property (name "ki_keywords") (value "R res resistor")) 84 | (property (name "ki_fp_filters") (value "R_*")) 85 | (sheetpath (names "/") (tstamps "/")) 86 | (tstamps "4be9bcff-98b2-46ca-809c-98605f99802f")) 87 | (comp (ref "R5") 88 | (value "R_US") 89 | (fields 90 | (field (name "Footprint")) 91 | (field (name "Datasheet")) 92 | (field (name "Description"))) 93 | (libsource (lib "Device") (part "R_US") (description "Resistor, US symbol")) 94 | (property (name "Sheetname") (value "Root")) 95 | (property (name "Sheetfile") (value "kicad8_test.kicad_sch")) 96 | (property (name "ki_keywords") (value "R res resistor")) 97 | (property (name "ki_fp_filters") (value "R_*")) 98 | (sheetpath (names "/") (tstamps "/")) 99 | (tstamps "9c27bafe-dc9a-4fc8-9304-3713da742e75"))) 100 | (libparts 101 | (libpart (lib "Device") (part "Q_NPN_CBE") 102 | (description "NPN transistor, collector/base/emitter") 103 | (docs "~") 104 | (fields 105 | (field (name "Reference") "Q") 106 | (field (name "Value") "Q_NPN_CBE") 107 | (field (name "Footprint")) 108 | (field (name "Datasheet") "~") 109 | (field (name "Description") "NPN transistor, collector/base/emitter")) 110 | (pins 111 | (pin (num "1") (name "C") (type "passive")) 112 | (pin (num "2") (name "B") (type "input")) 113 | (pin (num "3") (name "E") (type "passive")))) 114 | (libpart (lib "Device") (part "R_US") 115 | (description "Resistor, US symbol") 116 | (docs "~") 117 | (footprints 118 | (fp "R_*")) 119 | (fields 120 | (field (name "Reference") "R") 121 | (field (name "Value") "R_US") 122 | (field (name "Footprint")) 123 | (field (name "Datasheet") "~") 124 | (field (name "Description") "Resistor, US symbol")) 125 | (pins 126 | (pin (num "1") (name "") (type "passive")) 127 | (pin (num "2") (name "") (type "passive"))))) 128 | (libraries 129 | (library (logical "Device") 130 | (uri "/usr/share/kicad/library/Device.lib"))) 131 | (nets 132 | (net (code "1") (name "+5V") 133 | (node (ref "R2") (pin "1") (pintype "passive")) 134 | (node (ref "R4") (pin "1") (pintype "passive"))) 135 | (net (code "2") (name "GND") 136 | (node (ref "R3") (pin "2") (pintype "passive")) 137 | (node (ref "R5") (pin "2") (pintype "passive"))) 138 | (net (code "3") (name "IN") 139 | (node (ref "R1") (pin "1") (pintype "passive"))) 140 | (net (code "4") (name "Net-(Q1-B)") 141 | (node (ref "Q1") (pin "2") (pinfunction "B") (pintype "input")) 142 | (node (ref "R1") (pin "2") (pintype "passive")) 143 | (node (ref "R2") (pin "2") (pintype "passive")) 144 | (node (ref "R3") (pin "1") (pintype "passive"))) 145 | (net (code "5") (name "Net-(Q1-E)") 146 | (node (ref "Q1") (pin "3") (pinfunction "E") (pintype "passive")) 147 | (node (ref "R5") (pin "1") (pintype "passive"))) 148 | (net (code "6") (name "OUT") 149 | (node (ref "Q1") (pin "1") (pinfunction "C") (pintype "passive")) 150 | (node (ref "R4") (pin "2") (pintype "passive"))))) -------------------------------------------------------------------------------- /tests/data/ref2by2.net: -------------------------------------------------------------------------------- 1 | (export (version D) 2 | (design 3 | (source /home/erik/Projects/keyboard/keyboards/test_kicad/referentties/ref2by2.sch) 4 | (date "Do 23 Aug 2018 09:47:44 CEST") 5 | (tool "Eeschema 5.0.0-fee4fd1~66~ubuntu18.04.1") 6 | (sheet (number 1) (name /) (tstamps /) 7 | (title_block 8 | (title my_title) 9 | (company my_company) 10 | (rev 0.1) 11 | (date 01/23/2019) 12 | (source ref2by2.sch) 13 | (comment (number 1) (value "comment #1")) 14 | (comment (number 2) (value "")) 15 | (comment (number 3) (value "")) 16 | (comment (number 4) (value ""))))) 17 | (components 18 | (comp (ref J1) 19 | (value Conn_01x02_Male) 20 | (footprint Connector_PinHeader_2.54mm:PinHeader_2x01_P2.54mm_Vertical) 21 | (datasheet ~) 22 | (libsource (lib Connector) (part Conn_01x02_Male) (description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)")) 23 | (sheetpath (names /) (tstamps /)) 24 | (tstamp 5B7DD2DE)) 25 | (comp (ref J2) 26 | (value Conn_01x02_Male) 27 | (footprint Connector_PinHeader_2.54mm:PinHeader_2x01_P2.54mm_Vertical) 28 | (datasheet ~) 29 | (libsource (lib Connector) (part Conn_01x02_Male) (description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)")) 30 | (sheetpath (names /) (tstamps /)) 31 | (tstamp 5B7DD375))) 32 | (libparts 33 | (libpart (lib Connector) (part Conn_01x02_Male) 34 | (description "Generic connector, single row, 01x02, script generated (kicad-library-utils/schlib/autogen/connector/)") 35 | (docs ~) 36 | (footprints 37 | (fp Connector*:*_1x??_*)) 38 | (fields 39 | (field (name Reference) J) 40 | (field (name Value) Conn_01x02_Male)) 41 | (pins 42 | (pin (num 1) (name Pin_1) (type passive)) 43 | (pin (num 2) (name Pin_2) (type passive))))) 44 | (libraries 45 | (library (logical Connector) 46 | (uri /usr/share/kicad/library/Connector.lib))) 47 | (nets 48 | (net (code 1) (name /r0) 49 | (node (ref J1) (pin 1))) 50 | (net (code 2) (name /r1) 51 | (node (ref J1) (pin 2))) 52 | (net (code 3) (name /c1) 53 | (node (ref J2) (pin 1))) 54 | (net (code 4) (name /c0) 55 | (node (ref J2) (pin 2))))) 56 | -------------------------------------------------------------------------------- /tests/data/test.net: -------------------------------------------------------------------------------- 1 | (export (version D) 2 | (design 3 | (source C:/xesscorp/PRODUCTS/StickIt_2nd_gen/StickIt-AudioIO/pcb/StickIt-AudioIO.sch) 4 | (date "08/25/2016 6:23:52 PM") 5 | (tool "Eeschema (2016-07-20 BZR 6990, Git 78e4787)-product") 6 | (sheet (number 1) (name /) (tstamps /) 7 | (title_block 8 | (title "StickIt-AudioIO Module") 9 | (company "XESS Corp.") 10 | (rev 2) 11 | (date 2016-05-20) 12 | (source StickIt-AudioIO.sch) 13 | (comment (number 4) (value "comment text..."))))) 14 | (components 15 | (comp (ref STK1) 16 | (value STICKIT2_HDR) 17 | (footprint XESS:STICKIT2_HDR) 18 | (fields 19 | (field (name kicost:pricing) 1:0.09)) 20 | (libsource (lib xess) (part STICKIT2_HDR)) 21 | (sheetpath (names /) (tstamps /)) 22 | (tstamp 5523634F)) 23 | (comp (ref JP1) 24 | (value JUMPER) 25 | (footprint XESS:HDR_1x2) 26 | (libsource (lib device) (part JUMPER)) 27 | (sheetpath (names /) (tstamps /)) 28 | (tstamp 5524AC0C)) 29 | (comp (ref JP2) 30 | (value JUMPER) 31 | (footprint XESS:HDR_1x2) 32 | (libsource (lib device) (part JUMPER)) 33 | (sheetpath (names /) (tstamps /)) 34 | (tstamp 57179D3C)) 35 | (comp (ref U1) 36 | (value AK4565VF) 37 | (footprint XESS:VSOP28) 38 | (fields 39 | (field (name kicost:link) http://www.aliexpress.com/item/100-New-AK4565VF-AK4565-TSSOP28-AKM-Brand-new-original-orders-are-welcome/32617934313.html?ws_ab_test=searchweb201556_8,searchweb201602_1_10037_10017_10021_507_10022_10032_10009_10020_10008_10018_10019_101,searchweb201603_2&btsid=f1412ba2-0f0a-4e39-9924-091cc8da27fc) 40 | (field (name kicost:pricing) 1:$5.45) 41 | (field (name manf) "Asahi Kasei") 42 | (field (name manf#) AK4565VF)) 43 | (libsource (lib xess) (part AK4565)) 44 | (sheetpath (names /) (tstamps /)) 45 | (tstamp 573E12F8)) 46 | (comp (ref U2) 47 | (value LM4808) 48 | (footprint XESS:MSOP8) 49 | (fields 50 | (field (name manf) TI) 51 | (field (name manf#) LM4808MM)) 52 | (libsource (lib xess) (part LM4808)) 53 | (sheetpath (names /) (tstamps /)) 54 | (tstamp 573E1410)) 55 | (comp (ref J1) 56 | (value STEREO_JACK) 57 | (footprint XESS:PJ-313-TH) 58 | (fields 59 | (field (name kicost:link) http://www.aliexpress.com/item/20Pcs-3-5mm-Female-Audio-Connector-5-Pin-DIP-Stereo-Headphone-Jack-PJ-313-Green/32600096063.html?ws_ab_test=searchweb201556_8,searchweb201602_1_10037_10017_10021_507_10022_10032_10009_10020_10008_10018_10019_101,searchweb201603_2&btsid=e31655d7-f43d-4ec6-a859-bfbd2dcde38a) 60 | (field (name kicost:pricing) 1:$0.123)) 61 | (libsource (lib xess) (part STEREO_JACK)) 62 | (sheetpath (names /) (tstamps /)) 63 | (tstamp 573E15BC)) 64 | (comp (ref J2) 65 | (value STEREO_JACK) 66 | (footprint XESS:PJ-313-TH) 67 | (fields 68 | (field (name kicost:link) http://www.aliexpress.com/item/20Pcs-3-5mm-Female-Audio-Connector-5-Pin-DIP-Stereo-Headphone-Jack-PJ-313-Green/32600096063.html?ws_ab_test=searchweb201556_8,searchweb201602_1_10037_10017_10021_507_10022_10032_10009_10020_10008_10018_10019_101,searchweb201603_2&btsid=e31655d7-f43d-4ec6-a859-bfbd2dcde38a) 69 | (field (name kicost:pricing) 1:$0.123)) 70 | (libsource (lib xess) (part STEREO_JACK)) 71 | (sheetpath (names /) (tstamps /)) 72 | (tstamp 573E1644)) 73 | (comp (ref C7) 74 | (value 0.1uF) 75 | (footprint Capacitors_SMD:C_0603_HandSoldering) 76 | (fields 77 | (field (name manf#) CL03A104KQ3NNNH)) 78 | (libsource (lib device) (part C)) 79 | (sheetpath (names /) (tstamps /)) 80 | (tstamp 573E16AA)) 81 | (comp (ref C2) 82 | (value 33uF) 83 | (footprint Capacitors_SMD:c_elec_5x4.5) 84 | (fields 85 | (field (name manf#) UWX1A330MCL1GB)) 86 | (libsource (lib device) (part CP1)) 87 | (sheetpath (names /) (tstamps /)) 88 | (tstamp 573E174E)) 89 | (comp (ref C6) 90 | (value 4.7uF) 91 | (footprint Capacitors_SMD:C_0603_HandSoldering) 92 | (fields 93 | (field (name manf#) EMK107ABJ475KA-T)) 94 | (libsource (lib device) (part C)) 95 | (sheetpath (names /) (tstamps /)) 96 | (tstamp 573E18D8)) 97 | (comp (ref RN3) 98 | (value 4K7) 99 | (footprint XESS:CTS_742C043) 100 | (fields 101 | (field (name manf#) 742c043472)) 102 | (libsource (lib xess) (part RN2)) 103 | (sheetpath (names /) (tstamps /)) 104 | (tstamp 573E1B1D)) 105 | (comp (ref RN1) 106 | (value 4K7) 107 | (footprint XESS:CTS_742C083) 108 | (fields 109 | (field (name manf#) 742c083472)) 110 | (libsource (lib xess) (part RN4)) 111 | (sheetpath (names /) (tstamps /)) 112 | (tstamp 573E1CF7)) 113 | (comp (ref RN2) 114 | (value 4K7) 115 | (footprint XESS:CTS_742C043) 116 | (fields 117 | (field (name manf#) 742c043472)) 118 | (libsource (lib xess) (part RN2)) 119 | (sheetpath (names /) (tstamps /)) 120 | (tstamp 573E1EC8)) 121 | (comp (ref C4) 122 | (value 33uF) 123 | (footprint Capacitors_SMD:c_elec_5x4.5) 124 | (fields 125 | (field (name manf#) UWX1A330MCL1GB)) 126 | (libsource (lib device) (part CP1)) 127 | (sheetpath (names /) (tstamps /)) 128 | (tstamp 573E2936)) 129 | (comp (ref C5) 130 | (value 33uF) 131 | (footprint Capacitors_SMD:c_elec_5x4.5) 132 | (fields 133 | (field (name manf#) UWX1A330MCL1GB)) 134 | (libsource (lib device) (part CP1)) 135 | (sheetpath (names /) (tstamps /)) 136 | (tstamp 573E29D2)) 137 | (comp (ref C1) 138 | (value 33uF) 139 | (footprint Capacitors_SMD:c_elec_5x4.5) 140 | (fields 141 | (field (name manf#) UWX1A330MCL1GB)) 142 | (libsource (lib device) (part CP1)) 143 | (sheetpath (names /) (tstamps /)) 144 | (tstamp 573E2A43)) 145 | (comp (ref C9) 146 | (value 0.1uF) 147 | (footprint Capacitors_SMD:C_0603_HandSoldering) 148 | (fields 149 | (field (name manf#) CL03A104KQ3NNNH)) 150 | (libsource (lib device) (part C)) 151 | (sheetpath (names /) (tstamps /)) 152 | (tstamp 573E2AE3)) 153 | (comp (ref C3) 154 | (value 0.1uF) 155 | (footprint Capacitors_SMD:C_0603_HandSoldering) 156 | (fields 157 | (field (name manf#) CL03A104KQ3NNNH)) 158 | (libsource (lib device) (part C)) 159 | (sheetpath (names /) (tstamps /)) 160 | (tstamp 573E2B5C)) 161 | (comp (ref C8) 162 | (value 4.7uF) 163 | (footprint Capacitors_SMD:C_0603_HandSoldering) 164 | (fields 165 | (field (name manf#) EMK107ABJ475KA-T)) 166 | (libsource (lib device) (part C)) 167 | (sheetpath (names /) (tstamps /)) 168 | (tstamp 573E2BE4)) 169 | (comp (ref L1) 170 | (value FERRITE_BEAD) 171 | (footprint Capacitors_SMD:C_0805_HandSoldering) 172 | (fields 173 | (field (name manf#) CIM21J252NE)) 174 | (libsource (lib xess) (part FERRITE_BEAD)) 175 | (sheetpath (names /) (tstamps /)) 176 | (tstamp 573E2FFC)) 177 | (comp (ref PCB1) 178 | (value PCB) 179 | (fields 180 | (field (name kicost:pricing) 1:$0.32)) 181 | (libsource (lib xess) (part PCB)) 182 | (sheetpath (names /) (tstamps /)) 183 | (tstamp 574B4360))) 184 | (libparts 185 | (libpart (lib xess) (part AK4565) 186 | (description "Stereo audio codec") 187 | (fields 188 | (field (name Reference) U) 189 | (field (name Value) AK4565)) 190 | (pins 191 | (pin (num 1) (name LOUT) (type output)) 192 | (pin (num 2) (name ROUT) (type output)) 193 | (pin (num 3) (name INTL1) (type input)) 194 | (pin (num 4) (name INTR1) (type input)) 195 | (pin (num 5) (name INTL0) (type input)) 196 | (pin (num 6) (name INTR0) (type input)) 197 | (pin (num 7) (name EXTL) (type input)) 198 | (pin (num 8) (name EXTR) (type input)) 199 | (pin (num 9) (name LIN) (type input)) 200 | (pin (num 10) (name RIN) (type input)) 201 | (pin (num 11) (name VCOM) (type power_out)) 202 | (pin (num 12) (name AGND) (type power_in)) 203 | (pin (num 13) (name VA) (type power_in)) 204 | (pin (num 14) (name VREF) (type input)) 205 | (pin (num 15) (name VD) (type power_in)) 206 | (pin (num 16) (name DGND) (type power_in)) 207 | (pin (num 17) (name VT) (type power_in)) 208 | (pin (num 18) (name SDTO0) (type output)) 209 | (pin (num 19) (name SDTO1) (type output)) 210 | (pin (num 20) (name SDTI) (type input)) 211 | (pin (num 21) (name LRCK) (type input)) 212 | (pin (num 22) (name MCLK) (type input)) 213 | (pin (num 23) (name BCLK) (type input)) 214 | (pin (num 24) (name CDTO) (type output)) 215 | (pin (num 25) (name CDTI) (type input)) 216 | (pin (num 26) (name CSN) (type input)) 217 | (pin (num 27) (name CCLK) (type input)) 218 | (pin (num 28) (name PDN) (type input)))) 219 | (libpart (lib device) (part C) 220 | (description "Unpolarized capacitor") 221 | (footprints 222 | (fp C?) 223 | (fp C_????_*) 224 | (fp C_????) 225 | (fp SMD*_c) 226 | (fp Capacitor*)) 227 | (fields 228 | (field (name Reference) C) 229 | (field (name Value) C)) 230 | (pins 231 | (pin (num 1) (name ~) (type passive)) 232 | (pin (num 2) (name ~) (type passive)))) 233 | (libpart (lib device) (part CP1) 234 | (description "Polarised capacitor") 235 | (footprints 236 | (fp SMD*_Pol) 237 | (fp C_Axial*) 238 | (fp C_Radial*) 239 | (fp c_elec*) 240 | (fp C*elec) 241 | (fp TantalC*) 242 | (fp CP*)) 243 | (fields 244 | (field (name Reference) C) 245 | (field (name Value) CP1)) 246 | (pins 247 | (pin (num 1) (name ~) (type passive)) 248 | (pin (num 2) (name ~) (type passive)))) 249 | (libpart (lib xess) (part FERRITE_BEAD) 250 | (fields 251 | (field (name Reference) L) 252 | (field (name Value) FERRITE_BEAD)) 253 | (pins 254 | (pin (num 1) (name 1) (type passive)) 255 | (pin (num 2) (name 2) (type passive)))) 256 | (libpart (lib device) (part JUMPER) 257 | (fields 258 | (field (name Reference) JP) 259 | (field (name Value) JUMPER)) 260 | (pins 261 | (pin (num 1) (name 1) (type passive)) 262 | (pin (num 2) (name 2) (type passive)))) 263 | (libpart (lib xess) (part LM4808) 264 | (fields 265 | (field (name Reference) U) 266 | (field (name Value) LM4808)) 267 | (pins 268 | (pin (num 1) (name OUT) (type output)) 269 | (pin (num 2) (name -IN) (type input)) 270 | (pin (num 3) (name +IN) (type input)) 271 | (pin (num 4) (name V-) (type power_in)) 272 | (pin (num 5) (name +IN) (type input)) 273 | (pin (num 6) (name -IN) (type input)) 274 | (pin (num 7) (name OUT) (type output)) 275 | (pin (num 8) (name V+) (type power_in)))) 276 | (libpart (lib xess) (part PCB) 277 | (fields 278 | (field (name Reference) PCB) 279 | (field (name Value) PCB))) 280 | (libpart (lib xess) (part RN2) 281 | (fields 282 | (field (name Reference) RN) 283 | (field (name Value) RN2)) 284 | (pins 285 | (pin (num 1) (name ~) (type passive)) 286 | (pin (num 2) (name ~) (type passive)) 287 | (pin (num 3) (name ~) (type passive)) 288 | (pin (num 4) (name ~) (type passive)))) 289 | (libpart (lib xess) (part RN4) 290 | (fields 291 | (field (name Reference) RN) 292 | (field (name Value) RN4)) 293 | (pins 294 | (pin (num 1) (name ~) (type passive)) 295 | (pin (num 2) (name ~) (type passive)) 296 | (pin (num 3) (name ~) (type passive)) 297 | (pin (num 4) (name ~) (type passive)) 298 | (pin (num 5) (name ~) (type passive)) 299 | (pin (num 6) (name ~) (type passive)) 300 | (pin (num 7) (name ~) (type passive)) 301 | (pin (num 8) (name ~) (type passive)))) 302 | (libpart (lib xess) (part STEREO_JACK) 303 | (description "stereo audio jack") 304 | (fields 305 | (field (name Reference) J) 306 | (field (name Value) STEREO_JACK)) 307 | (pins 308 | (pin (num ring) (name Right) (type passive)) 309 | (pin (num slv) (name Gnd) (type passive)) 310 | (pin (num tip) (name Left) (type passive)))) 311 | (libpart (lib xess) (part STICKIT2_HDR) 312 | (description "StickIt Header (2nd Gen)") 313 | (fields 314 | (field (name Reference) STK) 315 | (field (name Value) STICKIT2_HDR)) 316 | (pins 317 | (pin (num D0) (name D0) (type passive)) 318 | (pin (num D1) (name D1) (type passive)) 319 | (pin (num D2) (name D2) (type passive)) 320 | (pin (num D3) (name D3) (type passive)) 321 | (pin (num D4) (name D4) (type passive)) 322 | (pin (num D5) (name D5) (type passive)) 323 | (pin (num D6) (name D6) (type passive)) 324 | (pin (num D7) (name D7) (type passive)) 325 | (pin (num GND) (name GND) (type passive)) 326 | (pin (num VCC) (name VCC) (type passive))))) 327 | (libraries 328 | (library (logical device) 329 | (uri "C:\\Program Files\\KiCad\\share\\kicad\\library\\device.lib")) 330 | (library (logical xess) 331 | (uri C:\xesscorp\KiCad\libraries\xess.lib))) 332 | (nets 333 | (net (code 1) (name "Net-(RN1-Pad3)") 334 | (node (ref RN1) (pin 4)) 335 | (node (ref U2) (pin 2)) 336 | (node (ref RN1) (pin 3))) 337 | (net (code 2) (name "Net-(C1-Pad1)") 338 | (node (ref RN1) (pin 5)) 339 | (node (ref U2) (pin 1)) 340 | (node (ref C1) (pin 1))) 341 | (net (code 3) (name "Net-(RN1-Pad1)") 342 | (node (ref U2) (pin 6)) 343 | (node (ref RN1) (pin 1)) 344 | (node (ref RN1) (pin 2))) 345 | (net (code 4) (name "Net-(C2-Pad1)") 346 | (node (ref U2) (pin 7)) 347 | (node (ref RN1) (pin 8)) 348 | (node (ref C2) (pin 1))) 349 | (net (code 5) (name "Net-(C1-Pad2)") 350 | (node (ref J1) (pin tip)) 351 | (node (ref C1) (pin 2))) 352 | (net (code 6) (name "Net-(C2-Pad2)") 353 | (node (ref J1) (pin ring)) 354 | (node (ref C2) (pin 2))) 355 | (net (code 7) (name "Net-(C4-Pad2)") 356 | (node (ref RN3) (pin 1)) 357 | (node (ref C4) (pin 2)) 358 | (node (ref J2) (pin tip))) 359 | (net (code 8) (name "Net-(C5-Pad2)") 360 | (node (ref C5) (pin 2)) 361 | (node (ref J2) (pin ring)) 362 | (node (ref RN3) (pin 2))) 363 | (net (code 9) (name LRCK) 364 | (node (ref STK1) (pin D2)) 365 | (node (ref U1) (pin 21))) 366 | (net (code 10) (name CCLK) 367 | (node (ref U1) (pin 27)) 368 | (node (ref STK1) (pin D7))) 369 | (net (code 11) (name SDTI) 370 | (node (ref U1) (pin 20)) 371 | (node (ref U1) (pin 25)) 372 | (node (ref STK1) (pin D1))) 373 | (net (code 12) (name SCLK) 374 | (node (ref U1) (pin 23)) 375 | (node (ref STK1) (pin D5))) 376 | (net (code 13) (name MCLK) 377 | (node (ref STK1) (pin D3)) 378 | (node (ref U1) (pin 22))) 379 | (net (code 14) (name "Net-(RN1-Pad7)") 380 | (node (ref U1) (pin 2)) 381 | (node (ref RN1) (pin 7))) 382 | (net (code 15) (name SDTO) 383 | (node (ref STK1) (pin D0)) 384 | (node (ref U1) (pin 18))) 385 | (net (code 16) (name ~CS) 386 | (node (ref STK1) (pin D4)) 387 | (node (ref RN2) (pin 3)) 388 | (node (ref U1) (pin 26))) 389 | (net (code 17) (name ~RESET) 390 | (node (ref U1) (pin 28)) 391 | (node (ref STK1) (pin D6)) 392 | (node (ref RN2) (pin 4))) 393 | (net (code 18) (name +3.3V-A) 394 | (node (ref RN3) (pin 4)) 395 | (node (ref U1) (pin 14)) 396 | (node (ref RN3) (pin 3)) 397 | (node (ref U2) (pin 8)) 398 | (node (ref C6) (pin 1)) 399 | (node (ref C7) (pin 1)) 400 | (node (ref L1) (pin 1)) 401 | (node (ref U1) (pin 13))) 402 | (net (code 19) (name +3.3V) 403 | (node (ref STK1) (pin VCC)) 404 | (node (ref RN2) (pin 2)) 405 | (node (ref JP2) (pin 2)) 406 | (node (ref JP2) (pin 1)) 407 | (node (ref RN2) (pin 1)) 408 | (node (ref C9) (pin 1)) 409 | (node (ref C8) (pin 1)) 410 | (node (ref L1) (pin 2)) 411 | (node (ref U1) (pin 17)) 412 | (node (ref U1) (pin 15))) 413 | (net (code 20) (name "Net-(U1-Pad19)") 414 | (node (ref U1) (pin 19))) 415 | (net (code 21) (name "Net-(U1-Pad24)") 416 | (node (ref U1) (pin 24))) 417 | (net (code 22) (name "Net-(U1-Pad5)") 418 | (node (ref U1) (pin 5))) 419 | (net (code 23) (name "Net-(U1-Pad6)") 420 | (node (ref U1) (pin 6))) 421 | (net (code 24) (name "Net-(U1-Pad7)") 422 | (node (ref U1) (pin 7))) 423 | (net (code 25) (name "Net-(U1-Pad8)") 424 | (node (ref U1) (pin 8))) 425 | (net (code 26) (name "Net-(C5-Pad1)") 426 | (node (ref C5) (pin 1)) 427 | (node (ref U1) (pin 10)) 428 | (node (ref U1) (pin 4))) 429 | (net (code 27) (name "Net-(RN1-Pad6)") 430 | (node (ref RN1) (pin 6)) 431 | (node (ref U1) (pin 1))) 432 | (net (code 28) (name "Net-(C4-Pad1)") 433 | (node (ref U1) (pin 3)) 434 | (node (ref C4) (pin 1)) 435 | (node (ref U1) (pin 9))) 436 | (net (code 29) (name "Net-(C3-Pad1)") 437 | (node (ref U2) (pin 3)) 438 | (node (ref U1) (pin 11)) 439 | (node (ref U2) (pin 5)) 440 | (node (ref C3) (pin 1))) 441 | (net (code 30) (name GND) 442 | (node (ref J1) (pin slv)) 443 | (node (ref JP1) (pin 2)) 444 | (node (ref JP1) (pin 1)) 445 | (node (ref STK1) (pin GND)) 446 | (node (ref J2) (pin slv)) 447 | (node (ref U2) (pin 4)) 448 | (node (ref U1) (pin 12)) 449 | (node (ref U1) (pin 16)) 450 | (node (ref C8) (pin 2)) 451 | (node (ref C3) (pin 2)) 452 | (node (ref C7) (pin 2)) 453 | (node (ref C9) (pin 2)) 454 | (node (ref C6) (pin 2))))) -------------------------------------------------------------------------------- /tests/data/test.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | from skidl import * 4 | 5 | 6 | def _home_devb_tech_stuff_KiCad_tools_kinparse_tests_data_kicad6_test_2_kicad_sch(): 7 | 8 | #=============================================================================== 9 | # Component templates. 10 | #=============================================================================== 11 | 12 | Device_Q_NPN_CBE = Part('Device', 'Q_NPN_CBE', dest=TEMPLATE) 13 | 14 | Device_R_US = Part('Device', 'R_US', dest=TEMPLATE) 15 | 16 | 17 | #=============================================================================== 18 | # Component instantiations. 19 | #=============================================================================== 20 | 21 | Q1 = Device_Q_NPN_CBE(ref='Q1', value='Q_NPN_CBE') 22 | 23 | R1 = Device_R_US(ref='R1', value='R_US') 24 | 25 | R2 = Device_R_US(ref='R2', value='R_US') 26 | 27 | R3 = Device_R_US(ref='R3', value='R_US') 28 | 29 | R4 = Device_R_US(ref='R4', value='R_US') 30 | 31 | R5 = Device_R_US(ref='R5', value='R_US') 32 | 33 | 34 | #=============================================================================== 35 | # Net interconnections between instantiated components. 36 | #=============================================================================== 37 | 38 | Net('+5V').connect(R2['1'], R4['1']) 39 | 40 | Net('GND').connect(R3['2'], R5['2']) 41 | 42 | Net('IN').connect(R1['1']) 43 | 44 | Net('Net-(R1-Pad2)').connect(Q1['2'], R1['2'], R2['2'], R3['1']) 45 | 46 | Net('Net-(R5-Pad1)').connect(Q1['3'], R5['1']) 47 | 48 | Net('OUT').connect(Q1['1'], R4['2']) 49 | 50 | 51 | #=============================================================================== 52 | # Instantiate the circuit and generate the netlist. 53 | #=============================================================================== 54 | 55 | if __name__ == "__main__": 56 | _home_devb_tech_stuff_KiCad_tools_kinparse_tests_data_kicad6_test_2_kicad_sch() 57 | generate_netlist() 58 | -------------------------------------------------------------------------------- /tests/setup_teardown.py: -------------------------------------------------------------------------------- 1 | import os 2 | from kinparse import * 3 | 4 | files_at_start = set([]) 5 | 6 | def setup_function(f): 7 | global files_at_start 8 | files_at_start = set(os.listdir('.')) 9 | 10 | def teardown_function(f): 11 | files_at_end = set(os.listdir('.')) 12 | for file in files_at_end - files_at_start: 13 | try: 14 | os.remove(file) 15 | except Exception: 16 | pass 17 | 18 | if __name__ == '__main__': 19 | setup_function(None) 20 | with open('test.txt','wb') as f: 21 | f.write('test') 22 | teardown_function(None) 23 | -------------------------------------------------------------------------------- /tests/test_kinparse.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | from kinparse import * 3 | from .setup_teardown import * 4 | 5 | def isstr(s): 6 | print(s) 7 | assert isinstance(s, (type(u"A"), type("A"), type(""))) 8 | 9 | def parser_tests(ntlst): 10 | isstr(ntlst.version) 11 | 12 | isstr(ntlst.source) 13 | isstr(ntlst.date) 14 | isstr(ntlst.tool) 15 | isstr(ntlst.sheets[0].num) 16 | isstr(ntlst.sheets[0].name) 17 | isstr(ntlst.sheets[0].tstamps) 18 | isstr(ntlst.sheets[0].title) 19 | isstr(ntlst.sheets[0].company) 20 | isstr(ntlst.sheets[0].rev) 21 | isstr(ntlst.sheets[0].date) 22 | isstr(ntlst.sheets[0].source) 23 | isstr(ntlst.sheets[0].comments[0].num) 24 | isstr(ntlst.sheets[0].comments[0].text) 25 | 26 | isstr(ntlst.libraries[0].name) 27 | isstr(ntlst.libraries[0].uri) 28 | 29 | isstr(ntlst.libparts[0].lib) 30 | isstr(ntlst.libparts[0].name) 31 | isstr(ntlst.libparts[0].desc) 32 | isstr(ntlst.libparts[0].docs) 33 | isstr(ntlst.libparts[0].fields[0].name) 34 | isstr(ntlst.libparts[0].fields[0].value) 35 | isstr(ntlst.libparts[0].pins[0].num) 36 | isstr(ntlst.libparts[0].pins[0].name) 37 | isstr(ntlst.libparts[0].pins[0].type) 38 | if len(ntlst.libparts[0].footprints): 39 | isstr(ntlst.libparts[0].footprints[0]) 40 | if len(ntlst.libparts[0].aliases): 41 | isstr(ntlst.libparts[0].aliases[0]) 42 | 43 | isstr(ntlst.parts[0].ref) 44 | isstr(ntlst.parts[0].value) 45 | isstr(ntlst.parts[0].tstamp) 46 | isstr(ntlst.parts[0].datasheet) 47 | isstr(ntlst.parts[0].lib) 48 | isstr(ntlst.parts[0].part) 49 | isstr(ntlst.parts[0].desc) 50 | isstr(ntlst.parts[0].footprint) 51 | isstr(ntlst.parts[0].sheetpath.names) 52 | isstr(ntlst.parts[0].sheetpath.tstamps) 53 | if len(ntlst.parts[0].fields): 54 | isstr(ntlst.parts[0].fields[0].name) 55 | isstr(ntlst.parts[0].fields[0].value) 56 | 57 | isstr(ntlst.nets[0].name) 58 | isstr(ntlst.nets[0].code) 59 | isstr(ntlst.nets[0].pins[0].ref) 60 | isstr(ntlst.nets[0].pins[0].num) 61 | 62 | 63 | def test_kinparse_1(): 64 | ntlst = parse_netlist('data/test.net') 65 | assert len(ntlst.nets) == 30 66 | parser_tests(ntlst) 67 | 68 | def test_kinparse_2(): 69 | ntlst = parse_netlist('data/gardenlight.net') 70 | assert len(ntlst.nets) == 34 71 | parser_tests(ntlst) 72 | 73 | def test_kinparse_3(): 74 | ntlst = parse_netlist('data/ref2by2.net') 75 | assert len(ntlst.nets) == 4 76 | parser_tests(ntlst) 77 | 78 | def test_kinparse_4(): 79 | ntlst = parse_netlist('data/gaillard.net') 80 | assert ntlst.parts[0].sheetpath.names == "/Logic/" 81 | assert ntlst.parts[0].sheetpath.tstamps == "/5C4D0F9E/" 82 | assert ntlst.parts[0].tstamp == "5C4D541F" 83 | parser_tests(ntlst) 84 | 85 | def test_kinparse_5(): 86 | ntlst = parse_netlist('data/kicad5_test.net') 87 | assert len(ntlst.parts) == 6 88 | assert len(ntlst.nets) == 6 89 | parser_tests(ntlst) 90 | 91 | def test_kinparse_6(): 92 | ntlst = parse_netlist('data/kicad6_test.net') 93 | assert len(ntlst.parts) == 6 94 | assert len(ntlst.nets) == 6 95 | parser_tests(ntlst) 96 | 97 | def test_kinparse_8_1(): 98 | ntlst = parse_netlist('data/kicad8_test.net') 99 | assert len(ntlst.parts) == 6 100 | assert len(ntlst.nets) == 6 101 | parser_tests(ntlst) 102 | 103 | def test_kinparse_8_2(): 104 | ntlst = parse_netlist('data/control_board.net') 105 | assert len(ntlst.textvars) == 9 106 | assert len(ntlst.parts) == 180 107 | assert len(ntlst.nets) == 136 108 | parser_tests(ntlst) 109 | -------------------------------------------------------------------------------- /tox.ini: -------------------------------------------------------------------------------- 1 | # Tox configuration file 2 | 3 | [tox] 4 | minversion = 3.15 5 | envlist = py{27,36,37,38,39,310,311,312,313} 6 | skip_missing_interpreters = true 7 | ; uncomment requires to test with py27, py36. 8 | ; requires = virtualenv==20.21 9 | 10 | [travis] 11 | python = 12 | 2.7: py27 13 | 3.6: py36 14 | 3.7: py37 15 | 3.8: py38 16 | 3.9: py39 17 | 3.10: py310 18 | 3.11: py311 19 | 3.12: py312 20 | 3.13: py313 21 | 22 | [pytest] 23 | markers = spice: Run unit tests that use SPICE. 24 | 25 | [testenv:py{27,36,37,38,39,310,311,312,313}] 26 | description = test kinparse 27 | isolated_build = True 28 | setenv = TOXINIDIR = {toxinidir} 29 | passenv = * 30 | extras = testing 31 | deps = 32 | pytest 33 | changedir = tests 34 | allowlist_externals = 35 | make 36 | find 37 | sphinx-build 38 | commands = 39 | pip install -e {toxinidir} 40 | py.test 41 | 42 | [testenv:{docs,docview}] 43 | description = build the docs 44 | setenv = 45 | DOCSRC = {toxinidir}/docs 46 | deps = 47 | setuptools 48 | allowlist_externals = 49 | make 50 | commands = 51 | python {toxinidir}/setup.py sdist 52 | make -C {env:DOCSRC} singlehtml 53 | docview: python -m http.server -d {env:DOCSRC}/_build/singlehtml 54 | 55 | 56 | [testenv:{publish_test,publish_public}] 57 | description = 58 | Publish the package you have been developing to a package index server. 59 | By default, it uses testpypi. If you really want to publish your package 60 | to be publicly accessible in PyPI, use the `-- --repository pypi` option. 61 | skip_install = True 62 | changedir = {toxinidir} 63 | passenv = 64 | TWINE_USERNAME 65 | TWINE_PASSWORD 66 | TWINE_REPOSITORY 67 | deps = twine 68 | allowlist_externals = 69 | rm 70 | commands = 71 | rm -f {toxinidir}/dist/*.gz 72 | python {toxinidir}/setup.py sdist 73 | python -m twine check dist/* 74 | publish_test: python -m twine upload {posargs:--repository testpypi} dist/* 75 | publish_public: python -m twine upload {posargs:-- --repository pypi} dist/* 76 | --------------------------------------------------------------------------------