Index: dump_actions_to_html.sh =================================================================== --- dump_actions_to_html.sh (nonexistent) +++ dump_actions_to_html.sh (revision 34674) @@ -0,0 +1,121 @@ +#!/bin/sh + +# collates the pcb-rnd action table into a html doc page + +asrc="../action_src" +lsrc="librnd_acts" + +cd ../../../../src +pcb_rnd_ver=`./pcb-rnd --version` +pcb_rnd_rev=`svn info ^/ | awk '/Revision:/ { + print $0 + got_rev=1 + exit + } + END { + if (!got_rev) + print "Rev unknown" + } + '` +cd ../doc/user/09_appendix/src + +echo " + + + pcb-rnd user manual + + + + +

+

pcb-rnd User Manual: Appendix

+

+

Action Reference

+" +echo "" a "" "" "" "" + } + + a="" + s="" + d="" + c="" +} + + +/^A/ { + flush_sd() + sub("^A", "", $0) + a = a "
" $0 + next +} + +/^D/ { + sub("^D", "", $0) + d = d "
" $0 + next +} + +/^S/ { + sub("^S", "", $0) + s = s "
" $0 + next +} + +/^C/ { + sub("^C", "", $0) + c = c "
" $0 + next +} + +' | sort -fu | awk -v "asrc=$asrc" -v "lsrc=$lsrc" ' +# insert links around actions where applicable + BEGIN { + q = "\"" + } + // { + pre = $0 + sub(".*", "", pre) + post = $0 + sub(".*", "", post) + act = $0 + sub(".*", "", act) + sub(".*", "", act) + loact = tolower(act) + fn = asrc "/" loact ".html" + lfn = lsrc "/" loact ".html" + if ((getline < fn) == 1) + print pre "" post + else if ((getline < lfn) == 1) + print pre "" post + else + print pre "" post + close(fn) + close(lfn) + next + } + + { print $0 } + + END { + print "
\n" "" +echo $pcb_rnd_ver ", " $pcb_rnd_rev +echo "" +echo "
Action Description Syntax Plugin" +( + cd ../../../../src + ./pcb-rnd --dump-actions 2>/dev/null +) | awk ' + +function flush_sd() +{ + if ( a != "" || s != "" || d != "" ) { + sub("^
", "", a) + sub("^
", "", d) + sub("^
", "", s) + sub("^
", "", c) + print "
" d "" s "" c "" act "" act " (RND)" act "
" + print "

RND: this action comes from librnd and is common to all ringdove applications." + print "" + print "" + } +'