Next: Interactive work with Scheme code, Previous: lepton-schematic command line options, Up: Schematic capture [Contents][Index]

### 5.15 Component libraries

The global component library of a project is made up of a number of symbol libraries, otherwise named component resources, each of which in turn makes available a number of component symbols. Each resource may be either a directory on disk containing symbol files, a command in the system `PATH` which can generate symbol data (e.g. from a database), or a Scheme function which can do likewise.

The component library system in Lepton manages component resources and symbols, and abstracts the interface to the underlying storage. The libraries are used by all Lepton tools based on the code of the `liblepton` library.

A directory which contains one or more symbol files in gEDA/gaf File Format Document may be used as a component resource. Each symbol file should have a filename ending in ‘`.sym`’ (case insensitive). A component resource based on a directory can be added using the functions component-library or component-library-search. Symbol files with filenames starting with a period ‘`.`’ are ignored.

An executable program in the system search path may be used as a component resource. A component resource based on a command may be added using the function component-library-command.

Scheme functions may be used as a component resource as well. A component resource based on Scheme functions may be added using the function component-library-funcs.

Each symbol is identified by its name, which is stored in the saved schematic file. The name must be a valid for storage in a Lepton schematic file as the basename of a component object. For symbols from directory resources, the filename of the symbol is taken as the symbol name. For a command resource, the name may be any permissible string. Guidelines to follow:

- Do not begin a symbol name with ‘`EMBEDDED`’.
- Do not use whitespace, or any of the characters ‘`/:!*?`’.
- Try to use unique names.

Next: Interactive work with Scheme code, Previous: lepton-schematic command line options, Up: Schematic capture [Contents][Index]