Skip to content

Custom metadata field - #594

Merged
qu1ck merged 4 commits into
openscopeproject:masterfrom
Simon-SGB:custom_metadata_field
Oct 17, 2026
Merged

qu1ck merged 4 commits into
openscopeproject:masterfrom
Simon-SGB:custom_metadata_field

Conversation

@Simon-SGB

Copy link
Copy Markdown
Contributor

As discussed in #593 , a new metadata field is created to be able to pass a JSON string to ibom. This string can be used to add metadata (i.e. drawing-number or engineer name) to the ibom using the customization feature. The user-file-examples user.js and userheader.html were extended to serve as examples for this new metadata field.

Comment thread InteractiveHtmlBom/core/config.py Outdated
'highlight_pin1', 'redraw_on_drag', 'board_rotation', 'checkboxes',
'bom_view', 'layer_view', 'offset_back_rotation',
'kicad_text_formatting', 'mark_when_checked'
'kicad_text_formatting', 'mark_when_checked', 'custom_metadata_field'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name it same as flag, just custom_metadata

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment thread InteractiveHtmlBom/core/config.py Outdated
'do not populate status. Components with '
'this field not empty will be excluded.')
parser.add_argument('--custom-metadata', default='',
help='Custom metadata as a JSON string. Gets '

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the description to reflect that it does not have to be JSON, just an arbitrary string data.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Simon Steinkamp added 2 commits October 15, 2026 11:11
Helpstring was constraining metadata to JSON format which is not necessary. Plain strings
could also be used here.
@Simon-SGB
Simon-SGB requested a review from qu1ck October 15, 2026 09:21
@qu1ck
qu1ck merged commit d1eb5b7 into openscopeproject:master Oct 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants