Command "open-library"
This command opens a LibrePCB library and lets you execute some tasks with it.
Command
./librepcb-cli open-library --help
Output
Usage: ./librepcb-cli [options] open-library [command_options] library
LibrePCB Command Line Interface
Options:
-h, --help Print this message.
-V, --version Displays version information.
-v, --verbose Verbose output.
--all Perform the selected action(s) on all elements contained in
the opened library.
--check Run the library element check, print all non-approved messages
and report failure (exit code = 1) if there are non-approved
messages.
--minify-step Minify the STEP models of all packages. Only works in
conjunction with '--all'. Pass '--save' to write the minified
files to disk.
--save Save library (and contained elements if '--all' is given)
before closing them (useful to upgrade file format).
--strict Fail if the opened files are not strictly canonical, i.e.
there would be changes when saving the library elements.
Arguments:
open-library Open a library to execute library-related tasks.
library Path to library directory (*.lplib).
Examples
Check Library Elements and Upgrade File Format
This command is useful for Continuous Integration of LibrePCB libraries because
it reports failure if you check in libraries with invalid or non-canonical
S-Expression files or STEP models. In addition, the library check is run
(--check) and reports failure if there are any non-approved messages.
Command
./librepcb-cli open-library --all --check --minify-step --strict MyLibrary.lplib
Output
Open library 'MyLibrary.lplib'... Process 86 component categories... Process 44 package categories... Process 37 symbols... Process 492 packages... Process 34 components... Process 37 devices... SUCCESS