Commit Graph

42 Commits

Author SHA1 Message Date
Salvador E. Tropea a523c3ceb9 Added debug information about the SCH, PCB and Config used. 2020-07-31 12:00:49 -03:00
Salvador E. Tropea 956cba7c98 Fixed verbosity levels bigger than 1.
Partially my fault and also a bug in docopt.
2020-07-28 23:09:33 -03:00
Salvador E. Tropea 544f34c6fc Added native BoM generator.
Based on KiBoM, but reading the data directly from the .sch
Information from the libs not supported yet.
2020-07-27 22:04:01 -03:00
Salvador E. Tropea d4d88a5c9d Normalized the PCB and SCH file names.
Now the GS members contains the absolute path and various useful parts
of the name are computed and stored in GS to avoid computing them in
each output.
2020-07-23 12:03:42 -03:00
Salvador E. Tropea 53d840a5b1 Delayed the outputs configuration until last moment.
Now we set the data tree, but only configure the used outputs.
This gives a chance to setup things like the PCB and SCH meta-data.
2020-07-22 18:26:12 -03:00
Salvador E. Tropea 4368364489 Refactored the BaseOutput class to make it more similar to the YAML
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.
2020-07-08 15:17:24 -03:00
Salvador E. Tropea 4538236574 Now outputs and preflights are loaded as plugins.
They can be added from ~/.config/kiplot/plugins/
Also sorted the preflights in the YAML example and allower -v for
--help-list-outputs, needed to know from where are the plugins loaded.
2020-07-02 12:30:30 -03:00
Salvador E. Tropea ec35d2443f Added option to copy plot options from the PCB to the YAML example.
Also added DXF.metric_units and updated the README.
2020-07-01 20:43:03 -03:00
Salvador E. Tropea d926a5419e Added --example basic tests
Also added support for output directory to --example
2020-06-30 20:43:42 -03:00
Salvador E. Tropea 4ae54f3ded Added --example/-x option to generate a configuration example.
The example contains all the available preflights and outputs.
If the user specifies a PCB the names of the layers are from the provided PCB
2020-06-30 20:09:14 -03:00
Salvador E. Tropea 3c6f4950c7 Now the schematic can be specified separately.
We now test if the PCB and/or SCH are there only when we need them.
2020-06-29 19:25:54 -03:00
Salvador E. Tropea 42d1f14056 Now layers are solved when we really need it.
So we can do some operations (like --list) without loading the board.
Also: now the names for the layers are asked to pcbnew classes (not from file)
2020-06-29 12:55:02 -03:00
Salvador E. Tropea 2f0f3f755d Changed the command line parser from argparse to docopt.
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.
2020-06-26 12:04:56 -03:00
Salvador E. Tropea 46a20404a4 Added preflights help. 2020-06-25 10:31:23 -03:00
Salvador E. Tropea ac4ae89aba Added command line help for the outputs.
--help-list-outputs list supported outputs
--help-outputs list details for the supported outputs
--help-output OUTPUT shows the help for this particular output
2020-06-24 11:02:17 -03:00
Salvador E. Tropea 7679604646 Major code refactor
Pro:
- Much easier to add new outputs and pre-flights
- All options are optional
- Much better configuration syntax check
- Access to data is simpler

Cons:
- Much more source code files
- I focused on one application, not multiple instances running on the same
  process.
2020-06-19 15:54:55 -03:00
Salvador E. Tropea 406a9ab374 Fixed gzip exception name. 2020-06-14 12:02:15 -03:00
Salvador E. Tropea 4101f69cd4 Added support for compressed YAML files. 2020-06-14 11:05:08 -03:00
Salvador E. Tropea 3b7bfe40f7 Set the domain for log messages so we get "kiplot..." and not "kilog...." 2020-05-26 14:33:34 -03:00
Salvador E. Tropea 53be46e1fe Fixed the pragma in __main__ (typo) 2020-05-26 12:27:48 -03:00
Salvador E. Tropea 9672871ebe Excluded the module import main() exclusion from coverage 2020-05-26 12:23:01 -03:00
Salvador E. Tropea ba22eae5b8 Tunned flake8 and removed all unfiltered warnings and errors 2020-04-28 17:56:50 -03:00
Salvador E. Tropea 67403b2353 Added option to list available targets 2020-04-23 14:39:05 -03:00
Salvador E. Tropea 467c995c07 Added --version option 2020-03-28 16:42:33 -03:00
Salvador E. Tropea 0fa2eaf629 Added error when no -b option and we can't guess the PCB file 2020-03-23 22:41:10 -03:00
Salvador E. Tropea 33736e5cb1 Made -c option optional, now we guess the config 2020-03-23 22:37:17 -03:00
Salvador E. Tropea d5f1c27591 Made -b option optional, now we guess the board. 2020-03-23 22:21:54 -03:00
Salvador E. Tropea 9747d6457c Removed the PlotError exception in favor of simple error messages 2020-03-22 21:07:01 -03:00
Salvador E. Tropea 9267597330 Made flake8 compliant 2020-03-22 20:16:57 -03:00
Salvador E. Tropea 6067c84394 Added support for the layer names used in the PCB file. 2020-03-21 15:10:24 -03:00
Salvador E. Tropea 7d02012dbc Made --skip-pre to take a list of actions. 2020-03-18 19:49:22 -03:00
Salvador E. Tropea e4b94eec08 Added option to skip the pre-flight actions 2020-03-18 19:14:41 -03:00
Salvador E. Tropea b9964a9295 Sorted command line options 2020-03-16 10:12:54 -03:00
Salvador E. Tropea bcfee6283d Added targets selection, all by default and an --invert-sel option to do all
but named targets.
2020-03-16 10:09:04 -03:00
Salvador E. Tropea c0acfe3865 Added format and color to the logs. Also enhanced the yaml/pcbnew log error. 2020-03-14 16:12:05 -03:00
Salvador E. Tropea 8d1668a7d6 Merge branch 'add_info_process' 2020-03-13 14:16:50 -03:00
Salvador E. Tropea 49bb86d748 Moved the module to the root and added a script named kiplot to call it from /usr/bin.
Simplified the setup.py to make it work with Debian.
Added Debian package files.
Added a MANIFEST.in
2020-03-10 14:49:18 -03:00
John Beard c80c34939e Move to src directory 2018-06-02 17:55:32 +01:00
John Beard d3b331e3ad Add validation 2018-06-02 16:33:11 +01:00
John Beard 1519ff2e08 Overhaul config parsing 2018-06-02 13:31:03 +01:00
John Beard 5298dc2c72 Getting there 2018-06-01 23:56:22 +01:00
John Beard 21e185c9d6 Initial commit 2018-06-01 20:08:57 +01:00