upgrade_footprint_lib
Upgrade a KiCad footprint library to the current format, using atomic writes and a backup for safe rollback.
Instructions
Upgrade a footprint library to current KiCad format.
Rewrites every footprint in the library, so this takes the library
directory. kicad-cli has no per-footprint option here, and a single
.kicad_mod path is rejected.
KiCad performs the migration, as it should, but it performs it on a copy and
each result lands through the server's atomic write, so no footprint file can
be left truncated. Only files whose content actually changed are written, so
an upgrade that touches three footprints leaves the rest of the library
alone. The whole library is still copied to ``<name>.pretty.bak`` first and
the result names it, because that is the undo for an upgrade that SUCCEEDED.
There is exactly one, and every run overwrites it.
Each file is atomic; the library as a whole is not a transaction. An upgrade
interrupted midway leaves some footprints migrated and some not, and no file
damaged. Version control is still the better answer for a library you care
about.
Args:
footprint_path: Path to a .pretty library directory.
Optional; omit to use the configured default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| footprint_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |