Hi All,
I’ve finished implement some new feature to the plugin and I was wondering if anyone fancy trying it out before the final merger for release?
Here’s what changed on 0.0.9 (peding release)
Added
- Added support for options files. for now on any new features will be implemented and made configurble via the options file. this will also make it eaiser to have a standard setup between projects.
- Added PDF support. the PDF generator uses html templates to create the PDF file.
- Added HTML_PDF template for use with the PDF generator
- Added BOM sort and the related configuarable settings. You can now sort ASC/DEC by ref, value and footprint.
Fixed
- Fixed the issue where file names with space would break class tags
- Fixed the missing filed header class tags
Here’s what the new PDF template looks like
and here the PDF example if anyone want to have a closer look.
kicad_bom_wizard PDF output hash Define electronics.pdf (138.3 KB)
Getting the dev code
To get access to 0.0.9 you will need to git clone the project and then checkout the develop branch.
git clone https://github.com/HashDefineElectronics/KiCad_BOM_Wizard.git
cd ./KiCad_BOM_Wizard
git checkout develop
then you will need to run the install
npm install -g ./
Using it
At this point, you should be able to use the plugin the same way as you did previously except that you can now pass it a config instead of a series of commands parameters.
you can find an example of the config file on the project root directory under Example/options.json.
Using the new config file, all you need to do is now call kicad_bom_wizard and give it the location of your config file.
kicad_bom_wizard CONFIG_PATH/options.json
where CONFIG_PATH is the directory to the options.json.
configuration file example
Here what the configuration file looks like. All path can be relative to the config file, relative your current working directory, relative to kicad_bom_wizard or absolute .
{
"version" : 2,
"outputType" : "pdf",
"templatePath" : "HTML_PDF",
"outputPath" : "../Test/.tmp/",
"outputName" : "output.pdf",
"input": "example.xml",
"pdfOptions": {
"pageSize": "A3",
"printBackground" : true,
"landscape": true,
"marginsType" : "0"
},
"sort" : {"by": "ref", "ascending": true}
}
-
outputType needs to be either pdf or file. where file is that you intent to make you own text file. for example csv or html.
-
templatePath this is the path to your template file. This can either be CSV, HTML, HTML_PDF or a path to your own.
-
outputPath this is where you intend to save your output file
-
outputName this the name that you want to the output file to be called.
-
input this the path and name of your project xml file.
-
pdfOptions this are some of the options for configuring the PDF output if you are using PDF
-
sort by this sets the BOM component grouped sort order. You can set it too ref, value, value_num and footprint. where value_num means that the value filed is to be treated as numbers.
– Ron