From ece74fa60cb5830b16b79811cbed2c9ebda2757d Mon Sep 17 00:00:00 2001 From: Simon Steinkamp Date: Wed, 14 Oct 2026 09:15:10 +0200 Subject: [PATCH 1/4] Add argument to add a header line --- InteractiveHtmlBom/core/config.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/InteractiveHtmlBom/core/config.py b/InteractiveHtmlBom/core/config.py index 605a40b..d9805b4 100644 --- a/InteractiveHtmlBom/core/config.py +++ b/InteractiveHtmlBom/core/config.py @@ -457,6 +457,10 @@ def add_options(cls, parser, version): help='Do not blacklist components with empty value.') # Fields section + parser.add_argument('--header-line', dest='header_lines', + action='append', default=[], metavar='TEXT', + help='Additional line shown in the BOM header. ' + 'Can be given multiple times.') parser.add_argument('--netlist-file', help='(Deprecated) Path to netlist or xml file.') parser.add_argument('--extra-data-file', From d7b55a44e43ec3be4c189fb12d3019a992827b38 Mon Sep 17 00:00:00 2001 From: Simon Steinkamp Date: Wed, 14 Oct 2026 09:18:40 +0200 Subject: [PATCH 2/4] Add header lines to config Fixup: Config --- InteractiveHtmlBom/core/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/InteractiveHtmlBom/core/config.py b/InteractiveHtmlBom/core/config.py index d9805b4..781a074 100644 --- a/InteractiveHtmlBom/core/config.py +++ b/InteractiveHtmlBom/core/config.py @@ -73,6 +73,7 @@ class Config: kicad_text_formatting = True # Extra fields section + header_lines = [] extra_data_file = None netlist_initial_directory = '' # This is relative to pcb file directory show_fields = default_show_group_fields @@ -636,6 +637,7 @@ def set_from_args(self, args): self.include_nets = args.include_nets # Fields + self.header_lines = args.header_lines self.extra_data_file = args.extra_data_file or args.netlist_file if args.extra_fields is not None: self.show_fields = self.default_show_group_fields + \ From 3bb85009f0b25248e827f1f35eabfe5bfb3e5897 Mon Sep 17 00:00:00 2001 From: Simon Steinkamp Date: Wed, 14 Oct 2026 09:24:25 +0200 Subject: [PATCH 3/4] Add header_lines to pcbdata metadata in ibom main --- InteractiveHtmlBom/core/ibom.py | 1 + 1 file changed, 1 insertion(+) diff --git a/InteractiveHtmlBom/core/ibom.py b/InteractiveHtmlBom/core/ibom.py index 0fb4667..f0bd297 100644 --- a/InteractiveHtmlBom/core/ibom.py +++ b/InteractiveHtmlBom/core/ibom.py @@ -337,6 +337,7 @@ def main(parser, config, logger): pcbdata["bom"] = generate_bom(components, config) pcbdata["ibom_version"] = config.version + pcbdata["metadata"]["header_lines"] = list(config.header_lines) # build BOM bom_file = generate_file(pcb_file_dir, pcb_file_name, pcbdata, config) From 9119dc7b50216df195c4395d0654107e4717571a Mon Sep 17 00:00:00 2001 From: Simon Steinkamp Date: Wed, 14 Oct 2026 09:27:20 +0200 Subject: [PATCH 4/4] Show header-lines in frontend --- InteractiveHtmlBom/web/ibom.html | 1 + InteractiveHtmlBom/web/ibom.js | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/InteractiveHtmlBom/web/ibom.html b/InteractiveHtmlBom/web/ibom.html index a6e5a6d..7ddbaa8 100644 --- a/InteractiveHtmlBom/web/ibom.html +++ b/InteractiveHtmlBom/web/ibom.html @@ -63,6 +63,7 @@ +
diff --git a/InteractiveHtmlBom/web/ibom.js b/InteractiveHtmlBom/web/ibom.js index d88a6f8..fa9fc65 100644 --- a/InteractiveHtmlBom/web/ibom.js +++ b/InteractiveHtmlBom/web/ibom.js @@ -895,6 +895,13 @@ function populateMetadata() { document.getElementById("title").innerHTML = pcbdata.metadata.title; document.getElementById("revision").innerHTML = "Rev: " + pcbdata.metadata.revision; document.getElementById("company").innerHTML = pcbdata.metadata.company; + var container = document.getElementById("header-lines"); + (pcbdata.metadata.header_lines || []).forEach(function (line) { + var div = document.createElement("div"); + div.textContent = line; + container.appendChild(div); + }); + document.getElementById("filedate").innerHTML = pcbdata.metadata.date; ["title", "revision", "company", "date"].forEach(function(field) { var element = document.getElementById(field === "date" ? "filedate" : field);