User Tools

Site Tools


packet:xrouter:docs:parsing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
packet:xrouter:docs:parsing [2025/04/22 02:28] – created m0mzfpacket:xrouter:docs:parsing [2025/04/22 03:04] (current) m0mzf
Line 24: Line 24:
 # #
 # - This script does not take any arguments # - This script does not take any arguments
-# - The only required configuration is to set the following path +# - The only required configuration is to set the wiki namespace
-BASEPATH=/home/jason/radio/packet/xrouter/Xrouter +
-# and the Wiki namespace+
 NAMESPACE="packet:xrouter:docs:" NAMESPACE="packet:xrouter:docs:"
 +#   and the working folder for the script
 +BASEPATH=/home/jason/radio/packet/xrouter/Xrouter
 # This folder should contain the two directories "XRouter Help Files" # This folder should contain the two directories "XRouter Help Files"
 # and "XRouter Manual Files". A new directory will be created here # and "XRouter Manual Files". A new directory will be created here
Line 68: Line 68:
 OUTPUTDIR="$BASEPATH/docuwiki-$DATE" OUTPUTDIR="$BASEPATH/docuwiki-$DATE"
 INDEXFILE="${OUTPUTDIR}"/index.docuwiki INDEXFILE="${OUTPUTDIR}"/index.docuwiki
- 
-# Wiki MANPAGE namespace structure. We pass this into awk later but define it here 
- 
  
 # Handy functions # Handy functions
Line 154: Line 151:
  # Use the section name to generate a file foreach section  # Use the section name to generate a file foreach section
  local outputpath="${OUTPUTDIR}"/"$1"/"${section}".docuwiki  local outputpath="${OUTPUTDIR}"/"$1"/"${section}".docuwiki
- # Create formatted section for wiki namespace+ # Create formatted section for wiki index page
  echo "== $section ==" >> "$INDEXFILE"  echo "== $section ==" >> "$INDEXFILE"
-Format the section name as docuWiki header +and create formatted header for the wiki content 
- echo "$section" | awk '{hdr="======"; print hdr $0 hdr}' >> "$outputpath"+ echo "====== $section ======" >> "$outputpath"
  # Spit some stuff out to the shell  # Spit some stuff out to the shell
  echoRed "$section"  echoRed "$section"
Line 191: Line 188:
 echo "======= XRouter Documentation =======" >> "$INDEXFILE" echo "======= XRouter Documentation =======" >> "$INDEXFILE"
 echo "The content below is auto-generated from the XRouter documentation using [[$NAMESPACE:parsing|this bash / awk script]] to parse MAN / HLP files into docuWiki some simple markup language" >> "$INDEXFILE" echo "The content below is auto-generated from the XRouter documentation using [[$NAMESPACE:parsing|this bash / awk script]] to parse MAN / HLP files into docuWiki some simple markup language" >> "$INDEXFILE"
-echo "----" >> "$INDEXFILE" 
 echoGreen "Parsing MAN files from $MANFILES" echoGreen "Parsing MAN files from $MANFILES"
 parseFiles MAN parseFiles MAN
packet/xrouter/docs/parsing.1745288905.txt.gz · Last modified: 2025/04/22 02:28 by m0mzf