Index: trunk/doc/developer/lihata_format/comm_attribs.lht =================================================================== --- trunk/doc/developer/lihata_format/comm_attribs.lht (nonexistent) +++ trunk/doc/developer/lihata_format/comm_attribs.lht (revision 4276) @@ -0,0 +1,19 @@ +ha:lht_tree_doc { ha:comm { + + ha:attribs { + type=ha + desc { a hash of attributes } + li:children { + ha:simple-attrib-key { valtype=string; desc={attribute value without metadata (text node)} } + ha:detailed-attrib { + type=ha + desc { attribute with metadata (hash node) } + li:children { + ha:value { valtype=string; desc={attribute value} } + ha:prio { valtype=integer; desc={priority value} } + } + } + } + } + +}} Index: trunk/doc/developer/lihata_format/comm_concrete.lht =================================================================== --- trunk/doc/developer/lihata_format/comm_concrete.lht (nonexistent) +++ trunk/doc/developer/lihata_format/comm_concrete.lht (revision 4276) @@ -0,0 +1,36 @@ +ha:lht_tree_doc { ha:comm { + + ha:group.ID { + type=ha + desc { Group of concrete objects } + li:children { + ha:loclib_name = { valtype=string; desc={name in the local library (optional)}} + ha:objects { + type=li + desc { List of child objects } + li:children { + ha:obj.ID = { valtype=none; desc={list of any concrete object }} + } + sy:attr@dup = {/lht_tree_doc/comm/attrib} + } + } + } + + ha:group_ref.ID { + type=ha + desc { Group reference to a concrete object within the same sheet or buffer } + li:children { + ha:x = { valtype=coord; desc={xform: translate placement in x (horizontal) direction }} + ha:y = { valtype=coord; desc={xform: translate placement in y (vertical) direction }} + ha:ref = { valtype=string; desc={oidpath to the referee (should be a group) }} + ha:child_xform { + type=li + desc { List of child object transformation to be performed after placement } + li:children { + ha:OIDPATH = { valtype=none; desc={list of transformations as described in the desing doc; OIDPATH is relative to the referee group }} + } + sy:attr@dup = {/lht_tree_doc/comm/attrib} + } + } + } +}} Index: trunk/doc/developer/lihata_format/examples/example.devmap =================================================================== --- trunk/doc/developer/lihata_format/examples/example.devmap (nonexistent) +++ trunk/doc/developer/lihata_format/examples/example.devmap (revision 4276) @@ -0,0 +1,10 @@ +ha:std_devmap.v1 { + ha:comp_attribs { + footprint=sot23 + li:portmap={ + {B->pcb/pinnum=1} + {E->pcb/pinnum=2} + {C->pcb/pinnum=3} + } + } +} Index: trunk/doc/developer/lihata_format/examples/example.sym =================================================================== --- trunk/doc/developer/lihata_format/examples/example.sym (nonexistent) +++ trunk/doc/developer/lihata_format/examples/example.sym (revision 4276) @@ -0,0 +1,64 @@ +ha:cschem-group-v1 { + ha:group.1 { + li:objects { + ha:polygon.1 { + li:outline { + ha:line { x1=10266; y1=-1780; x2=9224; y2=-3517; } + ha:line { x1=9224; y1=-3517; x2=10935; y2=-3368; } + ha:line { x1=10935; y1=-3368; x2=10266; y2=-1780; } + } + stroke=sym-decor; + fill=sym-decor; + } + ha:group.2 { + x=12000; y=8000; rot=90.000000; + li:objects { + ha:line.1 { x1=0; y1=0; x2=-4000; y2=0; stroke=term-decor; } + ha:text.2 { x1=-3000; y1=-4000; dyntext=1; stroke=term-primary; text=%../a.display/name%; floater=1; } + } + ha:attrib { + name=C + role=terminal + } + } + ha:group.3 { + mirx=1; + li:objects { + ha:line.1 { x1=0; y1=0; x2=-4000; y2=0; stroke=term-decor; } + ha:text.2 { x1=-3000; y1=0; dyntext=1; stroke=term-primary; text=%../a.display/name%; floater=1; } + } + ha:attrib { + name=B + role=terminal + } + } + ha:group.4 { + x=12000; y=-4000; rot=90.000000; + li:objects { + ha:line.1 { x1=0; y1=0; x2=-4000; y2=0; stroke=term-decor; } + ha:text.2 { x1=-3000; y1=-4000; dyntext=1; stroke=term-primary; text=%../a.display/name%; floater=1; } + } + ha:attrib { + name=E + role=terminal + } + } + ha:text.5 { x1=8000; y1=8000; rot=90.000000; dyntext=1; stroke=sym-secondary; text=%../A.devmap%; floater=1; } + ha:text.6 { x1=4000; y1=8000; rot=90.000000; dyntext=1; stroke=sym-primary; text=%../A.name%; floater=1; } + ha:arc.7 { cx=9000; cy=0; r=5500; sang=0.000000; dang=360.000000; stroke=sym-decor; } + ha:line.8 { x1=7000; y1=4000; x2=7000; y2=-4000; stroke=sym-decor; } + ha:line.9 { x1=4000; y1=0; x2=7000; y2=0; stroke=sym-decor; } + ha:line.10 { x1=7000; y1=-1000; x2=12000; y2=-4000; stroke=sym-decor; } + ha:line.11 { x1=7000; y1=1000; x2=12000; y2=4000; stroke=sym-decor; } + } + ha:attrib { + name=Q?? + role=symbol + devmap=bc817_sot23 + -sym-source = {sch-rnd default symbol lib} + -sym-copyright = {(C) 2022 Tibor 'Igor2' Palinkas} + -sym-license-dist = {GPLv2+} + -sym-license-use = {Public Domain} + } + } +} Index: trunk/doc/developer/lihata_format/index.html =================================================================== --- trunk/doc/developer/lihata_format/index.html (nonexistent) +++ trunk/doc/developer/lihata_format/index.html (revision 4276) @@ -0,0 +1,62 @@ + + + + sch-rnd developer manual - lihata file formats + + + +

sch-rnd native file formats

+

+The native file format of sch-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 (sch-rnd in this case). This document +describes how the lihata trees are interpreted by sch-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 sch-rnd core +plugins use. Note: +sch-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.sch ha:cschem-sheet-v* + Schematics sheet, self-contained +
(struct drawing) +
(sample file) + +
bar.sym li:cschem-group-v* + A group, usually a symbol, self-contained +
(struct drawing) +
(sample file) + +
baz.devmap li:std_devmap.v + A devmap file, self-contained +
(struct drawing) +
(sample file) + +
buffer.lht li:cschem-buffer-v + buffer content save; aside from the header, it's the same as a sheet (ha:cschem-sheet-v*) + +
project.lht ha:geda-project-v1 or ha:coraleda-project-v1 + A project file (documented in pcb-rnd) + +
menu-default.lht ha: + The main menu system, including popup menus, all key and mouse bindings (documented in pcb-rnd) + +
+ + +