@qu1ck Any chance that the “Extra Fields” tab can become “Fields” so that the (now) fixed fields “Reference, Value, Footprint, Quality” may be set to hidden as well? Ideally, I would love to be able to configure the visibility and position (left to right) of any column/field.
When placing components, I have the iBOM.html file on my iPad mini and like to use as much real estate for columns I need at that time which (for me) is just reference and my house part number.
As others have said, thanks for such a wonderful tool and your dedication to continue to support it!
In terms of hiding fixed columns isn’t it better to do it at “runtime” i.e. in html instead of at generation time? This way you will not have to regenerate bom every time you want to show/hide a column.
Doing at runtime is better indeed, i was just thinking to piggy back on a facility you already have. Doing it runtime; you can then virtually elliminate the “extra fields” i.e., these would be hidden at runtime also.
Runtime that one can save/retrieve the combination of hidden and displayed columns.
Change the colors, styling, add company logo, even custom functionality if you are handy with javascript.
Of course you could do all of that before by editing existing ibom code but your changes would likely break with each plugin update. Now you have more or less stable “interface”.
Hello, don’t know if this might be any use to anyone but I have patched the plugin to add a new event that fires whenever the BOM body is (re-)written.
And in case anyone is interested, here is the user.js that I used this with:
// Linkify URLs
function linkify () {
const urlrx = /^\s*((https?:\/\/|mailto:|tel:|xmpp:|geo:)[^\s]+)/i;
for (const row of document.getElementsByTagName("tr")) {
if (!/^bomrow/.test(row.id)) {
continue;
}
for (const col of row.getElementsByTagName("td")) {
col.childNodes.forEach(node => {
if (node.nodeType == 3/*text node*/) {
const rxMatch = node.nodeValue.match(urlrx);
if (rxMatch) {
const url = rxMatch[1];
const href = document.createElement("a");
href.href = url;
// href.target="_blank"; // If wanting to open links in a new tab by default
href.appendChild(node);
col.appendChild(href);
}
}
});
}
}
};
EventHandler.registerCallback(IBOM_EVENT_TYPES.BOM_BODY_POPULATED_EVENT, linkify);
The URL matching regex is a bit crap but does the job for me.
That’s a great use of customization functionality. Feel free to submit your patch on github, I’ll merge it. Just change event name to BOM_BODY_CHANGE_EVENT to be consistent with other events.
If you don’t want to bother with PR I’ll push it but I’d rather keep commit author information.
Hi @qu1ck, thank you for this plugin. It’s really handy!
We’ll be using this for the guy who will be finishing the boards by hand. As we do not put designators on the silkscreen the easiest way for him to keep track of things is by opening the HTML. It truly makes life much easier than mucking about with PDFs.
Feel free to submit your patch on github
I don’t have a Microsoft account but it’d be handy if you could patch it in yourself.
I have taken a look at the demo and it looks really useful and well designed. However, not - at all - being a programmer I admittedly can’t find installation instructions, what to download from github etc. Anyone can help by linking me e.g. to the installation & download instructions?
to be the one the BOM functionality in KiCAD “sees”. However, when I ask Kicad to generate a BOM from “interactivehtmlbom…” in the BOM dialog box I get an error as shown in the attached screen dump. Should I set another file to be the “run” file?