Interactive Html Bom Plugin for KiCad

Interactive html plugin seems to have support for filtering away DNP components by using the “field name”, but I could not find how to filter those away by using the “Do not populate” attribute which is available as a checkbox at least in Kicad 8 on symbol and footprint editor. Would it be possible to add support for this?

1 Like

It is supported. In the fields tab go to “DNP field name” and choose “kicad_dnp”.

1 Like

Thanks, I missed that from the field name list. Works now just like I hoped. And in the html settings the “dnp outlined” option is very good to have.

Only thing I could wish more, would be the possibility of having seeing also the DNP components in the list but separated from the other components.

Check “group” for “kicad_dnp” field (and don’t use it as dnp) and those parts will be grouped separately.

Hi @qu1ck! Kudos on building InteractiveHtmlBom.
I’m trying to get it to run inside docker on a headless environment in order to have a CI pipeline (using Gitlab’s free runners) spit my output files.
I know there are some hints of this on the GitHub documentation, but it seems to not be able to run in a headless environment. I’m using the official Kicad 8 docker image (Container / Docker Images | KiCad EDA) but I can run this job on other images if needed.
Any pointers?
Thanks!

I may be able to give pointers but this

is not nearly enough to go on. What errors do you see? What specific commands/scripts are you running?

Yeah, that was a crappy ask for help.

So: I have this on my Dockerfile to address InteractiveHtmlBom:

RUN apt install -y wget
RUN apt install -y software-properties-common xvfb
RUN wget https://github.com/openscopeproject/InteractiveHtmlBom/releases/download/v2.9.0/InteractiveHtmlBom.zip && unzip InteractiveHtmlBom.zip
RUN export INTERACTIVE_HTML_BOM_NO_DISPLAY=""
RUN export DISPLAY=10.0

Then I run:
xvfb-run --auto-servernum --server-args "-screen 0 1024x768x24" python3 /InteractiveHtmlBom/generate_interactive_bom.py --dest-dir self.bom_dir --highlight-pin1 --no-browser --extra-fields Description,INFO,LCSC,DIGIKEY --name-format navtrack-rev-2-interactive_bom.html /source/navtrack-rev2/navtrack-rev2.kicad_pcb
and I get: Unable to access the X Display, is $DISPLAY set properly?

I’m calling the command above from python. The thing is, I’ve tried a bunch of things and can’t get rid of this error. Any pointers?

If you use INTERACTIVE_HTML_BOM_NO_DISPLAY then there is no need to run xvfb. The reason you get the error is most likely because the $DISLPAY is 10.0 and you ask xvfb to pick auto server number which is unlikely to be 10.0.

Here’s a few things to get you on the right track:

  1. You can install ibom with pip install InteractiveHtmlBom, that will generate an executable generate_interactive_bom most likely in ~/.local/bin or wherever pip places package binaries on your distro.
  2. Use INTERACTIVE_HTML_BOM_NO_DISPLAY=1, don’t leave it empty. TRUE or YES or anything else will work too. You don’t need xvfb if you set this variable.
  3. (Optional) If you are calling from python and install from pip you can avoid spawning a process and directly call into ibom main

It will allow you more direct control of the config, custom logging and you won’t even need the env variable since you will be bypassing the dialog stuff.

Awesome, that did it!
Thanks!

1 Like

Hi,
while this pluging wonderfully worked for KiCAD versions up to 8. In the latest version (I am currently running 8.0.2 on Linux), we encountered cases of parts that are treated as excluded from BOM while they are not excluded at all - they are drawn correctly but they are missing on the BOM list. I was not able to exactly reproduce this yet - the parts that are missing on one board are OK on another and vice versa. Did the rules for the part exclusion changed?

Nothing changed except for support of new in kicad 8 DNP attribute.
I would suggest checking attributes of symbols/footprints that you find are missing in the bom and checking the settings that you generate the bom with.

I finally had some time and analyzed the parts what are excluded - the culprit is really the DNP field (the one selected as a DNP name in the config) - in the excluded part, this field was not really empty but it contained a single space (" "), so the code that checked them for presence found them present. I fixed it by removing the offending space (replacing " " for “” in board file). I am not sure how the space got there, maybe its some relic from older versions of our libraries. But I think that checking the DNP field not just for presence but also for non-whitespace contents would be nice.

Hi,

@qu1ck and the other developers, your plugin is really great! Easy to configure and results are really nice and practical.

I’m trying to automate my process using CLI.
That is handy but I didn’t find how to use the ibom.config.ini file as input. I found a workaround by using the --show-dialog option and press “generate” but it is not ideal.
Is there a better way?

Thanks.

AdriZ

1 Like

There is a related feature request Using local config file with CLI mode · Issue #368 · openscopeproject/InteractiveHtmlBom · GitHub

Current workaround is to write a shell script that captures the configs you want as flags for the CLI (every option has corresponding cli flag).

1 Like

A post was split to a new topic: How to install HTML Interactive BOM plugin?

Thanks @qu1ck
Do you have an example of this shell script?

Something along the lines of

#!/bin/bash

/path/to/generate_interactive_bom.py --your-flags-here "$@"

Pass file name to it like my_ibom_wrapper.sh /path/to/board.kicad_pcb and it will automatically pass the flags along with the file to ibom.

OK. Thank you.
I was actually thinking of the script to convert the .ini file in a list of flags for the CLI.

You could write a little program for that but you shouldn’t have to unless you have lots of options that are not default. You only have to specify flags that you changed.

Indeed, thanks a lot.