Skip to content

v1.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 12 Aug 11:57

npnp v1.2.0

Breaking change: The Altium and KiCad CLI command syntax has been redesigned.
Update scripts and documentation before upgrading.

Breaking Changes

  • Removed the export and batch subcommands under altium and kicad.
  • Use one target command for both single-component and multi-component exports:
    • npnp altium C2040 -o altium_libs
    • npnp kicad C2040 -o kicad_libs --name MyParts
    • npnp altium -i ids.txt -o altium_libs --name MyParts -j 42
    • npnp kicad -i ids.txt -o kicad_libs --name MyParts -j 42
  • --append is now a boolean flag and uses the directory supplied by -o.
  • Renamed the public library naming option from --library-name to --name.
  • Made generated component names deterministic by using
    <source-name>__<LCSC-ID> across Altium, KiCad, and STEP artifacts.
  • Kept the LCSC suffix as the internal library identity even though the same
    ID is also exported as NPNP_COMPONENT_ID metadata. The metadata is for
    lookup and inspection; the suffix keeps symbol, footprint, and model names
    unique and stable during append/update workflows.
  • Existing generated libraries should be regenerated because component and
    model names may change after this release.
  • Batch exports continue after component failures and report failed IDs in the
    final summary.
  • Removed the unused export-report.json output and related report API.
  • Removed the unused KiCad version selector; npnp now uses its single supported
    KiCad library format without an extra version setting.
  • Release binaries use the optimized [profile.release] configuration from
    Cargo.toml (opt-level = "z", fat LTO, symbol stripping, and aborting
    panics).

Updated

  • Added --name examples for fresh and append exports in the prompt and both
    README languages.
  • Multi-component examples use -j 42; single-component exports do not need a
    parallelism option.
  • Normalized generated Altium schematic text to font size 10 for labels,
    designators, comments, and metadata parameters.
  • Added unified STEP model export for one component or an ID file:
    npnp model C2040 -o step_models and
    npnp model -i ids.txt -o step_models -j 42.

Migration

Replace commands such as:

npnp altium batch -i ids.txt -o altium --library-name MyLib --full -j 4
npnp kicad batch -i ids.txt -o kicad --library-name MyParts --full -j 4

with:

npnp altium -i ids.txt -o altium_libs --name MyLib -j 42
npnp kicad -i ids.txt -o kicad_libs --name MyParts -j 42

中文

破坏性变更: Altium 和 KiCad 的命令行语法已经重新设计。
升级前请更新脚本和文档。

破坏性变更

  • 移除 altiumkicad 下的 exportbatch 子命令。
  • 单个器件和批量导出统一使用目标命令:
    • npnp altium C2040 -o altium_libs
    • npnp kicad C2040 -o kicad_libs --name MyParts
    • npnp altium -i ids.txt -o altium_libs --name MyParts -j 42
    • npnp kicad -i ids.txt -o kicad_libs --name MyParts -j 42
  • --append 现在是布尔开关,并使用 -o 指定的目录。
  • 公共库命名参数从 --library-name 更名为 --name
  • 统一生成器件名称,Altium、KiCad 和 STEP 工件均使用
    <源名称>__<LCSC-ID> 的确定性命名方式。
  • 即使同一个 ID 也会导出为 NPNP_COMPONENT_ID 元数据,库内部名称仍保留
    LCSC 后缀。元数据用于查询和查看,后缀用于保证符号、封装和模型名称在追加或更新时唯一且稳定。
  • 由于器件和模型名称可能发生变化,升级后应重新生成已有库。
  • 批量导出会在器件失败后继续执行,并在最终摘要中报告失败 ID。

更新

  • 在命令提示和中英文 README 中增加 --name 的新示例。
  • 多器件示例使用 -j 42,单器件导出不需要并行参数。
  • 将 Altium 原理图中的标签、位号、注释和元数据参数统一为字号 10
  • 增加统一的 STEP 模型导出方式,支持单个器件或 ID 文件:
    npnp model C2040 -o step_models
    npnp model -i ids.txt -o step_models -j 42

迁移

旧命令:

npnp altium batch -i ids.txt -o altium --library-name MyLib --full -j 4
npnp kicad batch -i ids.txt -o kicad --library-name MyParts --full -j 4

新命令:

npnp altium -i ids.txt -o altium_libs --name MyLib -j 42
npnp kicad -i ids.txt -o kicad_libs --name MyParts -j 42

Contributor

@ref42