# pcb-rnd native file formats

The native file format of pcb-rnd is lihata based. Lihata is a generic markup language that describes how a tree can be serialized into a file format. What the tree contains and what each node means is up to the user (pcb-rnd in this case). This document describes how the lihata trees are interpreted by pcb-rnd.

This document is halfway in between the low level lihata document and the high level data model specification. It is assumed that the reader is familiar with both: the lihata interface plugin doesn't do anything on its own, it only takes the data model from the memory and the lihata document on disk and converts the syntax between the two.

The following table is a summary of the native file formats the core handles. Various plugins will handle their own file formats, often also lihata based - those are each documented at the corresponding. Note: pcb-rnd does not try to recognize the purpose of the file by the file name, but by the root node name - files can be named anything, there's no "extension"; there are some files that are found by name (typically config files) - these are marked with bold.

typical filename | root node | purpose (and documentation)
--- | --- | ---
foo.lht | ha:pcb-rnd-board-v* | Printed circuit board, self-contained (struct drawing) (sample file)
bar.lht, bar.fp | li:pcb-rnd-subcircuit-v* | A subcircuit, self-contained, most often used as a footprint (struct drawing) (sample file)
times.lht | li:pcb-rnd-font-v1 | Vector font (struct drawing)
pcb-conf.lht | li:pcb-rnd-conf-v1 | A configuration subtree: system config (e.g. /usr/share/pcb-rnd/pcb-conf.lht) or user config (~/.pcb-rnd/pcb-conf.lht) (struct drawing) (sample file)
project.lht | ha:geda-project-v1 | A project file that describes configuration and source file names for various software (struct drawing)
pcb-menu-default.lht | ha: | The main menu system, including popup menus, all key and mouse bindings