跳转到主要内容

用于管理KiCad项目的脚本、模板和示例。

项目描述

欢迎使用kicad-helpers

用于管理KiCad项目的脚本、模板和示例

Build, Test, Package PyPI version shields.io

项目目标

  • 提供合理默认的结构和脚本,以管理KiCad项目
  • 通过持续集成脚本自动化所有可自动化操作(例如,更新BOM、生成制造文件、运行测试、生成文档等)
  • 配置git和KiCad以便友好协作
  • 通过命令行参数、环境变量等支持自定义
  • 使安装/设置/使用一切变得简单
  • 制作出色的文档

安装

> pip install kicad_helpers

设置新项目

打开命令行shell并将路径切换到包含您的KiCad项目的目录。然后运行kh_update以将各种项目模板应用到项目目录中

> cd kicad/project/path
> kh_update

默认情况下,这将安装以下模板

要覆盖现有模板,请使用带有--overwrite标志的kh_update命令

> kh_update --v --overwrite
Render kitspace.yaml template.
Render settings.ini template.
Render .github/workflows/build.yml template.
Render .kicad_helpers_config/drc.yaml template.
Render .kicad_helpers_config/erc.yaml template.
Render .kicad_helpers_config/pcb_pdf.yaml template.
Render .kicad_helpers_config/pcb_svg.yaml template.
Render .kicad_helpers_config/sch_pdf.yaml template.
Render .kicad_helpers_config/sch_svg.yaml template.
Render .kicad_helpers_config/manufacturers/default.yaml template.
Render .kicad_helpers_config/manufacturers/PCBWay.yaml template.
Render tests/Tests.ipynb template.
"*.pro filter=kicad_project" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitattributes
"*.sch filter=kicad_sch" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitattributes
Add filters to git config.
"_autosave*" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*bak" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*.xml" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
".ipynb_checkpoints" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*-erc.txt" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"*-drc.txt" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore
"kibot_errors.filter" already exists in /home/ryan/dev/python/kicad-helpers/_temp/.gitignore

要查看可用的选项,请运行以下命令

> kh_update --help
usage: kh_update [-h] [--v] [--overwrite] [--root ROOT]

Setup a new project (or update an existing project) with templates from the `kicad_helpers/templates` directory. Also
installs git filters to prevent insignificant changes to the kicad `*.pro` and `*.sch` files from being tracked by git
(see https://jnavila.github.io/plotkicadsch/ for more details).

optional arguments:
  -h, --help   show this help message and exit
  --v          verbose (default: False)
  --overwrite  overwrite existing templates (default: False)
  --root ROOT  project root directory (default: .)

从KiCad原理图导出BOM

> kh_sch_to_bom --v
/home/ryan/miniconda3/envs/kh/bin/python3.9 -m kifield -r --nobackup --overwrite --group -aq -x /home/ryan/dev/python/kicad-helpers/_temp/40-channel-hv-switching-board.sch -i /home/ryan/dev/python/kicad-helpers/_temp/manufacturing/default/40-channel-hv-switching-board-BOM.csv

将BOM数据导入KiCad原理图

> kh_sch_to_bom --v
/home/ryan/miniconda3/envs/kh/bin/python3.9 -m kifield -r --nobackup --overwrite --fields ~quantity -x /home/ryan/dev/python/kicad-helpers/_temp/manufacturing/default/40-channel-hv-switching-board-BOM.csv -i /home/ryan/dev/python/kicad-helpers/_temp/40-channel-hv-switching-board.sch

运行tests目录中的所有测试

> kh_test
testing /home/ryan/dev/python/kicad-helpers/_temp/tests/Tests.ipynb
All tests are passing!

贡献者

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源代码分发

kicad_helpers-0.14.tar.gz (26.6 kB 查看哈希值)

上传时间 源代码

构建分发

kicad_helpers-0.14-py3-none-any.whl (27.1 kB 查看哈希值)

上传时间 Python 3

由以下赞助

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面