Index: render.sh =================================================================== --- render.sh (revision 16838) +++ render.sh (nonexistent) @@ -1,234 +0,0 @@ -#!/bin/sh - -echo ' - -
-' - -for n in *.lht -do - lhtflat < $n -done | tee Flat | awk -F "[\t]" ' -BEGIN { - q="\"" -} - -function parent(path) -{ - sub("/[^/]*$", "", path) - return path -} - -function children(DST, path) -{ - return split(CHILDREN[path], DST, "[|]") -} - -function sy_is_recursive(path, dp) -{ - dp = DATA[path] - gsub("/[0-9]::", "/", path) - if (path ~ dp) - rturn 1 - return 0 -} - -function sy_href(path) -{ - return "#" path -} - -(($1 == "open") || ($1 == "data")) { - path=$3 - gsub("[0-9]+::", "", path) - TYPE[path] = $2 - p = parent(path) - if (CHILDREN[p] == "") - CHILDREN[p] = path - else - CHILDREN[p] = CHILDREN[p] "|" path - data=$4 - gsub("\\\\057", "/", data) - DATA[path] = data - - name=$3 - sub("^.*/", "", name) - sub(".*::", "", name) - NAME[path] = name -} - -function qstrip(s) -{ - gsub("[\\\\]+164", " ", s) - gsub("[\\\\]n", " ", s) - return s -} - -function qstripnl(s) -{ - gsub("[\\\\]+164", " ", s) - gsub("[\\\\]n", "\n", s) - return s -} - -function tbl_hdr(node, level) -{ - print "" -# print qstrip(DATA[path "/desc"]) - print "
" - print "
type | description" - - v = children(N, path) - for(n = 1; n <= v; n++) { - node = N[n] - print " |
---|---|
" NAME[node] - print " | " qstripnl(DATA[node]) - } - print " |
Each table below describes the full tree of one of the pcb-rnd file formats, from the root." - gen_roots("/lht_tree_doc/roots") - - print "
Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees." - gen_roots("/lht_tree_doc/comm") - - print "
" - gen_types("/lht_tree_doc/types") -} - -' - -echo ' - - -' Property changes on: render.sh ___________________________________________________________________ Deleted: svn:executable ## -1 +0,0 ## -* \ No newline at end of property Index: Makefile =================================================================== --- Makefile (revision 16838) +++ Makefile (revision 16839) @@ -1,7 +1,7 @@ all: tree.html tree.txt -tree.html: render.sh *.lht - ./render.sh > tree.html +tree.html: render/render.sh *.lht + cd render && ./render.sh > ../tree.html tree.txt: tree.html w3m -cols 256 tree.html > tree.txt Index: render/render.sh =================================================================== --- render/render.sh (nonexistent) +++ render/render.sh (revision 16839) @@ -0,0 +1,234 @@ +#!/bin/sh + +echo ' + +
+' + +for n in ../*.lht +do + lhtflat < $n +done | tee Flat | awk -F "[\t]" ' +BEGIN { + q="\"" +} + +function parent(path) +{ + sub("/[^/]*$", "", path) + return path +} + +function children(DST, path) +{ + return split(CHILDREN[path], DST, "[|]") +} + +function sy_is_recursive(path, dp) +{ + dp = DATA[path] + gsub("/[0-9]::", "/", path) + if (path ~ dp) + rturn 1 + return 0 +} + +function sy_href(path) +{ + return "#" path +} + +(($1 == "open") || ($1 == "data")) { + path=$3 + gsub("[0-9]+::", "", path) + TYPE[path] = $2 + p = parent(path) + if (CHILDREN[p] == "") + CHILDREN[p] = path + else + CHILDREN[p] = CHILDREN[p] "|" path + data=$4 + gsub("\\\\057", "/", data) + DATA[path] = data + + name=$3 + sub("^.*/", "", name) + sub(".*::", "", name) + NAME[path] = name +} + +function qstrip(s) +{ + gsub("[\\\\]+164", " ", s) + gsub("[\\\\]n", " ", s) + return s +} + +function qstripnl(s) +{ + gsub("[\\\\]+164", " ", s) + gsub("[\\\\]n", "\n", s) + return s +} + +function tbl_hdr(node, level) +{ + print "" +# print qstrip(DATA[path "/desc"]) + print "
" + print "
type | description" + + v = children(N, path) + for(n = 1; n <= v; n++) { + node = N[n] + print " |
---|---|
" NAME[node] + print " | " qstripnl(DATA[node]) + } + print " |
Each table below describes the full tree of one of the pcb-rnd file formats, from the root." + gen_roots("/lht_tree_doc/roots") + + print "
Each table below describes a subtree that usually does not specify a whole tree (thus they are usually not a valid file on their own). These subtrees are described in a separate table because they are used from multiple other trees." + gen_roots("/lht_tree_doc/comm") + + print "
" + gen_types("/lht_tree_doc/types") +} + +' + +echo ' + + +' Property changes on: render/render.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property