Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[blog] Inventree kicad #166

Merged
merged 5 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions _data/general/footer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@
internal: extend/api.md
- name: App
internal: extend/app.md
- name: Integrate
internal: extend/integrate/index.md
- name: Plugins
internal: extend/plugin/index.md
- name: KiCad
link: https://github.com/sparkmicro/Ki-nTree
- name: Integrations
internal: extend/integrate/index.md

- title: Sitemap
cats:
Expand Down
5 changes: 4 additions & 1 deletion _includes/partial/publisher_ref.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{% assign publisher_ref = site.publishers | where: 'short_name', include.pub | first %}
<a href="{{ publisher_ref.url | relative_url }}">
<span class="inline-flex">by <img src="https://github.com/{{ include.pub }}.png?size=40" alt="mdo" class="self-center w-5 h-5 rounded-full" style="margin:0px"> {{ include.pub }}</span>
<span class="inline-flex">
<img src="https://github.com/{{ include.pub }}.png?size=40" alt="mdo" class="self-center w-5 h-5 rounded-full" style="margin:0px">
<p>&nbsp;{{ include.pub }}</p>
</span>
</a>
26 changes: 22 additions & 4 deletions _layouts/plugin.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,30 @@ <h2>{{ page.name }}
<h2 class="block sm:hidden">Detail section</h2>
<div>
<p class="mb-0">License:
<small>
{% if page.open_source %}<i class="fa-brands fa-osi"></i>{% else %}<i class="fa-solid fa-lock"></i>{% endif %}
{{ page.license }}<br>
<div class="flex flex-wrap">
Status:
<div>{% if page.stable %}<i class="fa-regular fa-circle-check"></i>Stable{% else %}<i class="fa-solid fa-triangle-exclamation"></i> Unstable{% endif %}</div>
<div>{% if page.maintained %}<i class="fa-regular fa-circle-check"></i>Maintained{% else %}<i class="fa-solid fa-circle-exclamation"></i> Unmaintained{% endif %}</div>
</small>
<div class="">
Status:<br>
<div>
<small>
{% if page.stable %}
<i class="fa-regular fa-circle-check success"></i>Stable
{% else %}
<i class="fa-solid fa-triangle-exclamation"></i> Unstable
{% endif %}
</small>
</div>
<div>
<small>
{% if page.maintained %}
<i class="fa-regular fa-circle-check success"></i>Maintained
{% else %}
<i class="fa-solid fa-circle-exclamation"></i> Unmaintained
{% endif %}
</small>
</div>
</div>
{% if page.pypi and page.package_name %}Package on PyPI:<pre class="my-0">{{ page.package_name }}</pre>{% endif %}
</p>
Expand Down
60 changes: 60 additions & 0 deletions _posts/2023-09-26-kicad.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
author: SchrodingersGat
title: KiCad Integration
---

In the world of electronics design and PCB (Printed Circuit Board) development, KiCad has been a go-to tool for engineers and hobbyists alike. KiCad is a very popular and capable tool, and has continually evolved to meet the changing needs of its users.

Ever since InvenTree was first [*shamlessly cross-promoted*](https://forum.kicad.info/t/inventory-management-open-source/) on the KiCad forums, I have been searching for a clean way to connect KiCad and InvenTree together. This has been a [popular topic of discussion](https://github.com/inventree/InvenTree/discussions/4133) with other InvenTree users too!

InvenTree contains all of my part definition data and inventory management information, such as part parameters, supplier data, etc. If only there was a simply way to get all of that information directly out of InvenTree and into KiCad.

Well now, with great excitement, there is! InvenTree data can now be used as a first-class *symbol library* - with full support of all of InvenTree's internal data!

### HTTP Library Support

In September 2023, [HTTP Libary Support](https://gitlab.com/kicad/code/kicad/-/merge_requests/1679) was added to the KiCad application.

This feature allows KiCad library data to be retrieved from an external API endpoint, rather than a library file on the local filesystem. This is a groundbreaking change which allows us to leverage InvenTree's existing capabilities to provide a fully-featured integration between the two software packages.

### InvenTree Plugin

The same author who implemented the HTTP library support in KiCad has also released a [plugin for InvenTree](https://github.com/afkiwers/inventree_kicad) which provides an API wrapper for the InvenTree database that conforms to the KiCad HTTP library standard.

What does this mean? Simply put, it means that you can now use your InvenTree database as a native KiCad library, and pull your InvenTree data directly in to your KiCad schematic.

### Configuration File

Once the plugin is installed, a simple configuration file on the local computer is all that is required to connect to the InvenTree database. All that is required is the URL to the remote server (with the correct plugin extension) and an API token for authentication:

```
{
"meta": {
"version": 1.0
},
"name": "InvenTree",
"description": "InvenTree Library",
"source": {
"type": "REST_API",
"api_version": "v1",
"root_url": "http://my.inventree.server/plugin/kicad-library-plugin",
"token": "usertokendatastring"
}
}
```

### Categories as Libraries

InvenTree *categories* can be used as separate *libraries* in the KiCad application. The InvenTree plugin allows the user to select which part categories are exposed to KiCad.

### Parameters as Fields

Part *parameters* are exposed to the KiCad symbol as *fields*. This means that any extra part information (stored as part parameters in InvenTree) is available to the KiCad symbols.

#### Default Values

Where certain KiCad values are not defined for a particular part, each *library category* can optionally specify attributes such as *Default Symbol* or *Default Footprint*. This allows a category to be defined where all parts may share a common symbol and/or footprint within KiCad.

### Further Reading

Check out the [inventree-kicad-plugin](https://github.com/afkiwers/inventree_kicad) page on GitHub for further details, including installation instructions!
5 changes: 5 additions & 0 deletions _publishers/afwkiers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
short_name: afkiwers
name: Andre
github: afkiwers
---
36 changes: 36 additions & 0 deletions _repo/inventree-kicad.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: inventree-kicad-plugin
author: afkiwers
license: MIT
open_source: true
stable: true
maintained: true
pypi: true
package_name: inventree-kicad-plugin
github: https://github.com/afkiwers/inventree_kicad
issue_tracked: https://github.com/afkiwers/inventree_kicad/issues
categories: Integration
tags: schematic bom kicad
---

KiCad Integration for InvenTree

A plugin which allows InvenTree to serve component data to [KiCad](https://kicad.org) via the HTTP library interface.

This plugin provides an API wrapper which provides an API interface that conforms to the KiCad HTTP library interface specification. This allows KiCad to pull component data directly from your InvenTree database.

## Installation

The plugin can be installed via the InvenTree web interface, using the tag `inventree-kicad-plugin`.

Alternatively, install the plugin manually as follows:

```
pip install inventree-kicad-plugin
```

Or, add to your `plugins.txt` file and run `invoke install`.

## Documentation

Refer to the [plugin documentation](https://github.com/afkiwers/inventree_kicad) for further instructions and information.
2 changes: 1 addition & 1 deletion _repo/inventree-wireviz.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: inventree-wireviz-plugin
author: SchrodingersGat
license: MIT
open_source: true
stable: false
stable: true
maintained: true
pypi: true
package_name: inventree-wireviz-plugin
Expand Down
4 changes: 4 additions & 0 deletions assets/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ layout: empty
@apply mb-0 italic
}

.success {
color: #155724;
}

.anchor {
display: block;
position: relative;
Expand Down
17 changes: 12 additions & 5 deletions extend/integrate/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
---
title: Integrate
title: Third Party Integrations
---

Tools and plugins that integrate into InvenTree via APIs or plugins natively.
- [Ki-n-Tree](https://github.com/sparkmicro/Ki-nTree) *KiCad* integration
- [PK2InvenTree](https://github.com/rgilham/PK2InvenTree) is an open-source tool for migrating an existing [PartKeepr](https://github.com/partkeepr/PartKeepr) database to InvenTree.
- [Digikey-Inventree-Integration](https://github.com/EUdds/Digikey-Inventree-Integration) is a simple project that takes a digikey part number to creates a part in InvenTree.
In addition to the many out-of-the-box features, and further functionality provided via [plugins](/plugins.html), InvenTree is supported by a range of third-party integrations, built by members of the InvenTree community.

Below is a non-exhaustive list of external tools that may be used in conjunction with InvenTree, or to extends its functionality:

| Tool | Publisher | Description |
| --- | --- | --- |
| [Ki-n-Tree](https://github.com/sparkmicro/Ki-nTree) | [@sparkmicro](https://github.com/sparkmicro) | Tool for automating creation of InvenTree data from external systems such as DigiKey |
| [PK2InvenTree](https://github.com/rgilham/PK2InvenTree) | [@rgilham](https://github.com/rgilham) | An open-source tool for migrating an existing [PartKeepr](https://github.com/partkeepr/PartKeepr) database to InvenTree |
| [Digikey-Inventree-Integration](https://github.com/EUdds/Digikey-Inventree-Integration) | [@EUdds](https://github.com/EUdds) | A project that takes a digikey part number to creates a part in InvenTree. |

If you have (or know of) a third party software tool which should be featured here, please reach out and let us know!
Loading