4.3.1. Command open-library

This command opens a LibrePCB library and lets you execute some tasks with it.

Command

  1. $ ./librepcb-cli open-library --help

Output

  1. Usage: ./librepcb-cli [options] open-library [command_options] library
  2. LibrePCB Command Line Interface
  3. Options:
  4. -h, --help Displays this help.
  5. -v, --version Displays version information.
  6. --verbose Verbose output.
  7. --all Perform the selected action(s) on all elements contained in
  8. the opened library.
  9. --save Save library (and contained elements if '--all' is given)
  10. before closing them (useful to upgrade file format).
  11. --strict Fail if the opened files are not strictly canonical, i.e.
  12. there would be changes when saving the library elements.
  13. Arguments:
  14. open-library Open a library to execute library-related tasks.
  15. library Path to library directory (*.lplib).
Example: Check and Upgrade File Format of Library Elements

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.

Command

  1. $ ./librepcb-cli open-library \
  2. --all \
  3. --strict \
  4. MyLibrary.lplib

Output

  1. Open library 'MyLibrary.lplib'...
  2. Process 86 component categories...
  3. Process 44 package categories...
  4. Process 37 symbols...
  5. Process 492 packages...
  6. Process 34 components...
  7. Process 37 devices...
  8. SUCCESS