User Tools

Site Tools


gEDA » Development » Parts Manager » User Guide

Part Manager User Guide

Bulk Import

Currently, the part manager only provides a command line interface for bulk import of data. XSLT converts XML data into SQL using a stylesheet. Then, the SQL can be read by a command line interface for the database. The following diagram shows the dataflow for a bulk import:

Bulk Import Dataflow

The import can be accomplished with the following command line when in the gparts/sql/sqlite directory:

$ xsltproc convert.xml ../../data/companies.xml | sqlite3 sample.db

See the XML files in the gparts/data directory for examples. Any combination of company, package, and part elements can be used within the data element.

Use the following as an example for specifying a company.


Use the following as an example for specifying a package.


Use the following as an example for specifying a resistor. The resistor, as any part, can have multiple document elements associated with it. The category specifies the type of document, such as datasheet, user manual, errata, etc…

        <document category="Datasheet"></document>

Part Attributes

The part manager places database fields into component attributes using macros. The macros use the form $(column_name). Unfortunately, this mechanism requires modification of symbols in the library for use with the part manager. The part manager performs the operation in the following steps:

  1. loads the symbol drawing
  2. instantiates a component from the symbol drawing
  3. places inherited attributes in the component
  4. performs macro expansion on inherited attributes

Currently, macros can only be used in attributes that get promoted. The logic for attribute promotion must match between gschem and the part manager.

The following gschem file snippet shows the macro used place the field from the database column 'Resistance' into the 'VALUE' attribute.

T 195 200 8 10 1 1 0 0 1 
geda/gparts_ug.txt · Last modified: 2014/04/12 19:22 by rlutz