packet:xrouter:docs:parsing
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| packet:xrouter:docs:parsing [2025/04/26 19:16] – m0mzf | packet:xrouter:docs:parsing [2025/04/26 21:44] (current) – m0mzf | ||
|---|---|---|---|
| Line 70: | Line 70: | ||
| OUTPUTDIR=" | OUTPUTDIR=" | ||
| INDEXFILE=" | INDEXFILE=" | ||
| - | |||
| - | # Wiki MANPAGE namespace structure. We pass this into awk later but define it here | ||
| - | |||
| # Handy functions | # Handy functions | ||
| Line 88: | Line 85: | ||
| } | } | ||
| + | # awk functions | ||
| awkFormatIndexMANTitle=' | awkFormatIndexMANTitle=' | ||
| { | { | ||
| Line 104: | Line 102: | ||
| awkParseMan=' | awkParseMan=' | ||
| { | { | ||
| - | if (NR> | + | if (NR> |
| - | if (NR> | + | if (NR> |
| if (NR==1 || NR==2) # For the first two lines | if (NR==1 || NR==2) # For the first two lines | ||
| Line 123: | Line 121: | ||
| print "</ | print "</ | ||
| } | } | ||
| - | else if (NR>lno && NR<(recs -1) && NF>0) # If we' | + | else if (NR>lno && NR<(recs -1) && NF>0) # If we are in SEE ALSO and are not EOF and have non-empty lines |
| { | { | ||
| line=$0 # | line=$0 # | ||
| Line 157: | Line 155: | ||
| ' | ' | ||
| + | # File enumerator / reader / writer | ||
| parseFiles () { | parseFiles () { | ||
| mkdir " | mkdir " | ||
| Line 195: | Line 194: | ||
| # Parse the file! | # Parse the file! | ||
| awk -v flag=0 -v recs=" | awk -v flag=0 -v recs=" | ||
| + | # Add a link back to index page | ||
| + | echo " | ||
| # Add a line break after each MAN entry | # Add a line break after each MAN entry | ||
| - | echo -e "\n\n----\n\n" >> " | + | echo -e " |
| # and add an entry to the index | # and add an entry to the index | ||
| echo " | echo " | ||
| Line 205: | Line 206: | ||
| awk " | awk " | ||
| echo "</ | echo "</ | ||
| + | # Add a link back to index page | ||
| + | echo " | ||
| echo " | echo " | ||
| ;; | ;; | ||
| Line 219: | Line 222: | ||
| echo " | echo " | ||
| echo "This content is auto-generated from the XRouter documentation using [[$NAMESPACE: | echo "This content is auto-generated from the XRouter documentation using [[$NAMESPACE: | ||
| - | echoGreen " | + | echoGreen " |
| parseFiles MAN | parseFiles MAN | ||
| - | echoGreen " | + | echoGreen " |
| parseFiles HLP | parseFiles HLP | ||
| - | #echoGreen " | + | #echoGreen " |
| #parseFiles DOC | #parseFiles DOC | ||
| </ | </ | ||
packet/xrouter/docs/parsing.1745694997.txt.gz · Last modified: by m0mzf
