Skip to content

Commit 38e99eb

Browse files
authored
Prefer symbol datasheet, hydrate symbols with mpn + mfr data (#581)
* Prefer symbol datasheet, fallback to API scan * Patch symbol MPN/MFR metadata on add-component
1 parent 4fe4c47 commit 38e99eb

File tree

4 files changed

+385
-163
lines changed

4 files changed

+385
-163
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ and this project adheres to Semantic Versioning (https://semver.org/spec/v2.0.0.
1212

1313
- Use zstd level 17 (was 15) when embedding STEP 3D models into KiCad footprints.
1414
- `Path(..., allow_not_exist=True)` no longer emits missing-path warnings.
15+
- `pcb search` component add now prefers symbol datasheets, using fallback URL scan only when needed.
16+
- `pcb search` add-component now rewrites symbol `Manufacturer_Part_Number`/`Manufacturer_Name` metadata before generating `.zen`.
1517

1618
### Fixed
1719

crates/pcb-component-gen/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ pub fn generate_component_zen(args: GenerateComponentZenArgs<'_>) -> Result<Stri
169169
"pin_defs": pin_defs_vec,
170170
"pin_groups": pin_groups_vec,
171171
"pin_mappings": pin_mappings,
172-
"description": args.symbol.description,
173172
"datasheet_file": args.datasheet_filename,
174173
"generated_by": args.generated_by,
175174
"include_skip_bom": args.include_skip_bom,

crates/pcb-component-gen/templates/component.zen.jinja

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
"""
22
{{ component_name }}
3-
{%- if description %}
4-
5-
{{ description }}
6-
{%- endif %}
73

84
Auto-generated using `{{ generated_by }}`.
95
"""
@@ -34,9 +30,6 @@ Component(
3430
{%- if include_skip_pos %}
3531
skip_pos = skip_pos,
3632
{%- endif %}
37-
{%- if description %}
38-
description = "{{ description }}",
39-
{%- endif %}
4033
{%- if datasheet_file %}
4134
datasheet = File("{{ datasheet_file }}"),
4235
{%- endif %}

0 commit comments

Comments
 (0)