diff --git a/KiBOM_CLI.py b/KiBOM_CLI.py index e114e9a..3ae019d 100755 --- a/KiBOM_CLI.py +++ b/KiBOM_CLI.py @@ -14,7 +14,7 @@ (this file is auto-generated with default options the first time the script is executed). For usage help: - python -m kibom -h + python KiBOM_CLI.py -h """ import sys diff --git a/README.md b/README.md index a5ea425..161eb0b 100644 --- a/README.md +++ b/README.md @@ -14,41 +14,37 @@ BoM options are user-configurable in a per-project configuration file. ## Installation -KiBom can be installed through the PIP package manager: +KiBoM can be installed via multiple methods: -```pip install kibom``` - -*Note: Take note of which python executable you use when installing kibom - this is the same executable you must use when running the KiBom script from KiCAD (more details below under "Usage")* +**A. Download** -## Usage - -The KiBoM script can be run directly from KiCad or from the command line, e.g. +Download the KiBoM [package from github](https://github.com/SchrodingersGat/KiBoM/archive/master.zip) and extract the .zip archive to a location on your computer. -`python -m kibom "%I" "%O.csv"` +**B. Git Clone** -**Note: Selecting python executable** +Use git to clone the source code to your computer: -The python executable you choose (i.e. the *python* part of the command above) **must** be the same as the one you used to install kibom (using pip). +`git clone https://github.com/SchrodingersGat/kibom` -By default KiCad uses the version of python packaged with the KiCad application (i.e. kicad/bin/python). +**C. PIP** -**Example: Install kibom under python3 on windows** +KiBom can also be installed through the PIP package manager: -You have installed kibom using Python3: `pip3 install kibom` +```pip install kibom``` -To launch the script correctly from the KiCad BOM window, use the command: +*Note: Take note of which python executable you use when installing kibom - this is the same executable you must use when running the KiBom script from KiCAD (more details below under "Usage")* -`python3.exe -m kibom "%I" "%O.csv"` +Installing under PIP is recommended for advanced users only, as the exact location of the installed module must be known to properly run the script from within KiCad. -If you are running a different python version, select that accordingly. +## Usage -For command help, run the script with the *-h* flag e.g. +The *KiBOM_CLI* script can be run directly from KiCad or from the command line. For command help, run the script with the *-h* flag e.g. -`python -m kibom -h` +`python KiBOM_CLI.py -h` ~~~~ -usage: python -m kibom [-h] [-n NUMBER] [-v] [-r VARIANT] [-d SUBDIRECTORY] - [--cfg CFG] [-s SEPARATOR] [--version] +usage: KiBOM_CLI.py [-h] [-n NUMBER] [-v] [-r VARIANT] [--cfg CFG] + [-s SEPARATOR] netlist output KiBOM Bill of Materials generator script @@ -56,8 +52,8 @@ KiBOM Bill of Materials generator script positional arguments: netlist xml netlist file. Use "%I" when running from within KiCad - output BoM output file name. Use "%O" when running from - within KiCad to use the default output name (csv + output BoM output file name. Use "%O" when running from + within KiCad to use the default output name (csv file). For e.g. HTML output, use "%O.html" optional arguments: @@ -66,21 +62,19 @@ optional arguments: Number of boards to build (default = 1) -v, --verbose Enable verbose output -r VARIANT, --variant VARIANT - Board variant(s), used to determine which components - are output to the BoM. To specify multiple variants, - with a BOM file exported for each variant, separate - variants with the ';' (semicolon) character. + Board variant(s), used to determine which components are + output to the BoM -d SUBDIRECTORY, --subdirectory SUBDIRECTORY - Subdirectory within which to store the generated BoM - files. + Subdirectory (relative to output file) within which the + BoM(s) should be written. --cfg CFG BoM config file (script will try to use 'bom.ini' if not specified here) -s SEPARATOR, --separator SEPARATOR CSV Separator (default ',') - --version show program's version number and exit -~~~~ +~~~~ + **netlist** The netlist must be provided to the script. When running from KiCad use "%I" **output** This is the path to the BoM output. When running from KiCad, usage "%O" for the default option diff --git a/example/html_ex.png b/example/html_ex.png index 521ee00..3f5f0e5 100644 Binary files a/example/html_ex.png and b/example/html_ex.png differ