Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
How to print a BOM?
Clicking Tools->Generate_BOM->Generate landed me with the first XML file I've produced in over 40 years of computing, and I'm struggling with finding a Linux utility that can make something printable out of it. (Or readable, for that matter.) Firefox just displays the raw XML source text, as does LibreOffice. An "apt-cache search xml | more" has yet to ring any bells on what might make sense of the badly obfuscated BOM. Is there an easy way out of this cul de sac?? (E.g. plain text, postscript, or PDF?) Erik |
When you generate the BOM from eeschema, the dialog box lists a number
of BOM generator scripts. Did you pick one of them? I do have my own scripts if you are interested, but they date back to stone-age Kicad in that they use a tool called xsltproc. These days Kicad uses Python scripts. BTW, I use a pivot table to create a grouped BOM from a simple CSV list, as personally I found that better than trying to do the grouping in the script. Things may have improved in kicad since I got this working, but what I have works, so I'm not going to fix it! Regards, Robert * Plain text email - safe, readable, inclusive. * -- This email has been checked for viruses by Avast antivirus software. www.avast.com |
You should use the provided BOM generators, or write your own. I recommend exporting BOM to csv, and opening it in Libreoffice. Then you can pretty print it. On Thu, Sep 12, 2024, 11:21 Robert via <birmingham_spider=[email protected]> wrote: When you generate the BOM from eeschema, the dialog box lists a number |
> On Thu, Sep 12, 2024, 11:21 Robert via groups.io <birmingham_spider= > [email protected]> wrote: > > > When you generate the BOM from eeschema, the dialog box lists a number > > of BOM generator scripts.?? Did you pick one of them? None were listed. All the sub-boxes in the dialogue box were blank. I repeat: All the sub-boxes in the dialogue box were blank. I therefore had no option but to press "generate" and take what came. It is some alternative to this paucity of options that I hoped to find. > > I do have my own scripts if you are interested, but they date back to > > stone-age Kicad in that they use a tool called xsltproc.?? These days > > Kicad uses Python scripts. I have yet to upgrade from "5.0.2+dfsg1-1 release build". (2018, so pretty recent.) All I needed was for kicad to do nothing. Just dump plain text to a file, if that is not too hard for it to achieve without plugins and python. (To filter the text, I'll just use Awk.) It is the damn XML which was clogging up the works, as I had nothing to decrypt that obfuscation. > > BTW, I use a pivot table to create a grouped BOM from a simple CSV list, > > as personally I found that better than trying to do the grouping in the > > script.?? Things may have improved in kicad since I got this working, > > but what I have works, so I'm not going to fix it! If kicad would only issue a CSV - in plain text - then I could do anything and everything with that, elegantly and simply, using Awk. Many thanks for your interest, Robert. I've now installed the Linux package "xml2", which should be able to provide a CSV by means of xml2 and 2csv, but the latter borks, no manpage is provided, and the nominated doco link is a 404. So it is abandonware. But just xml2 does convert to a simpler looking list of 99% extraneous gumpf interspersed with 1% real BOM data, i.e. Part Number, Description, Package. I'm amazed that a simple shopping list is more than kicad can manage by itself? On 12.09.24 12:16, Lev wrote: > You should use the provided BOM generators, or write your own. I recommend > exporting BOM to csv, and opening it in Libreoffice. Then you can pretty > print it. That is what I have done. Kicad provided no alternative to the XML output. If it could do CSV, I would pounce on it instantly. It is the lack of BOM generator options which was the issue. That may be less of a problem once I update, but there's a lot on the plate ATM, and finishing the job with the version on hand didn't look impossible, as it didn't look completely broken - just lacking anything other than XML. If it can't be tickled into more useful output, then I've found a way to reduce the hoo-hah in XML, and a few lines of Awk can filter out 99% of the remaining obfuscation, giving Part Number, Description, Package, and even distilling Quantity of identical components, if I'm inclined. Erik |
The reason why kicad exports xml is to allow the BOM output to be set to
whatever you want it to be, including CSV, but it was never user-friendly. Poking around my kicad installation suggests python scripts started to be shipped with kicad 6. I can send you the python scripts that were shipped with kicad 6 and kicad 7 if you would like to experiment, but I don't know if they would work with kicad 5 (if they don't, maybe some editing would get them working). You could upgrade kicad, in which case you would get the scripts and everything should just work. That will require some work on your part, particularly with respect to libraries, but this is what I would recommend as it's by far and away the best use of time. If you really don't want to upgrade and the kicad 6/7 python scripts don't work with kicad 5, I can send you my xsltproc based files, but you would need to modify what I have done, because it's very specific to my own setup. So you would be spending time on a dead-end, and I would have to spend time explaining everything. Regards, Robert. * Plain text email - safe, readable, inclusive. * On 13/09/2024 09:23, dvalin via groups.io wrote: I have yet to upgrade from "5.0.2+dfsg1-1 release build". (2018, so-- This email has been checked for viruses by Avast antivirus software. www.avast.com |
That is not pretty recent, that is bordering on ancient. Kicad is now up to version 8, and they bring out a new version with new features each year, along with updates during the year. On Fri, 13 Sept 2024 at 09:23, dvalin via <dvalin=[email protected]> wrote:
|
toggle quoted message
Show quoted text
|
Open office - its free and works without fault From: [email protected] <[email protected]> on behalf of dvalin via groups.io <dvalin@...> Sent: Thursday, September 12, 2024 1:53:20 pm To: [email protected] <[email protected]> Subject: [kicad-users] How to print a BOM? Clicking Tools->Generate_BOM->Generate landed me with the first XML file I've produced in over 40 years of computing, and I'm struggling with finding a Linux utility that can make something printable out of it. (Or readable, for that matter.) Firefox just displays the raw XML source text, as does LibreOffice. An "apt-cache search xml | more" has yet to ring any bells on what might make sense of the badly obfuscated BOM. Is there an easy way out of this cul de sac?? (E.g. plain text, postscript, or PDF?) Erik |
to navigate to use esc to dismiss