Currently the script uses ImageMagick library. But the SVG conversion
is handled unreliably. ImageMagick has various backends to do it and
some of them don't work. I saw this problem many times, and is now
affecting my system. A more reliable conversion can be achieved using
`rsvg-convert`. Isn't as good as InkScape, but is smaller and works
well.
In the process I'm trimming the extra blank space generated by
PcbDraw when we have objects in layers like "User Drawings" that
extends beyond the PCB size.
I'm also compressing JPGs more aggressively, this makes a real
difference between PNG and JPG outputs. Otherwise the difference
is too small.
This makes the filters similar to output options.
- Adds coherence to error messages.
- Enable aliases (used the ones suggested by @leoheck)
Additionally now the README.md preflights documentation comes directly
from --help-preflights
Now the options are just an attribute of the outputs.
It means we have a set of classes for the options.
All the output content is parsed by the classes, including the Layers.
Now the layers support a simple string (with interesting shortcuts), a list of
strings or the original list of dicts.
Note that variants_blacklist and variants_whitelist needs a fresh IBoM.
These options didn't work and crashed IBoM. It was reported as a result of
the tests included in this commit.
This make the code cleaner and better documented.
Now the usage is more clear, and also a little bit more strict.
I'm using a modified docopt because I preffer using args.option instead of
args['--option'], I also fixed a few flake8 issues in docopt.py.
--help-list-outputs list supported outputs
--help-outputs list details for the supported outputs
--help-output OUTPUT shows the help for this particular output
Implemented in a different way.
For all internal commands now we use Python bindings to fill the zones as
suggested by @arikrupnik in johnbeard/kiplot#11
For 'print_pcb' now we ask KiCad to do it before printing (needs v1.4.1)
- When a BoM operation fails now we show the output of the child process.
(Only enabled when using debug verbosity)
- The error levels 1 and 2 were overlapped with internal Python codes.
- Now we delay the PCB load until we really need it. Which could be never.