Skip to content
Snippets Groups Projects
Commit 0b414229 authored by Whitney Armstrong's avatar Whitney Armstrong
Browse files

Tweaked documentation tags and builder script

parent fa94a63b
Branches
Tags
1 merge request!137Tweaked documentation tags and builder script
......@@ -15,7 +15,7 @@ get_includes() {
xmllint --format --xpath '//include/@ref' ${input_file} &> /dev/null
local res="$?"
if [ "${res}" == "0" ] ; then
local subincluded=$(xmllint --format --xpath '//include/@ref' ${input_file} 2> /dev/null | sed 's/ref=\"//g' | sed 's/\"//g' )
local subincluded=$(xmllint --format --xpath '//include/@ref' ${input_file} 2> /dev/null | sed 's/ref=\"//g' | sed 's/\"//g' )
filelist="${filelist} ${subincluded}"
#echo "sub include $afile"
fi
......@@ -41,6 +41,12 @@ get_doc_levels() {
local new_levels=$(xmllint --format --xpath '//documentation/@level' $afile 2> /dev/null | sed 's/level=\"/ /g' | sed 's/\"//g' )
levels="${levels} ${new_levels}"
fi
# see if there are tags without level attribute
xmllint --format --xpath '//documentation[not(@level)]' $afile &> /dev/null
if [ "${?}" == "0" ] ; then
#echo "DERP"
levels="${levels} 100"
fi
done
echo "$levels" | sed 's/ /\n/g' | sort | uniq
}
......@@ -56,7 +62,14 @@ for alevel in $(echo ${all_levels} | sed 's/ /\n/g' | sort -n | uniq ) ; do
#xmllint --format --xpath '//documentation[@level="'"$alevel"'"]/text()' $afile
level_doc=$(xmllint --format --xpath '//documentation[@level="'$alevel'"]' ${afile} 2> /dev/null )
if [ "$?" -eq "0" ] ; then
xmllint --format --xpath '//documentation[@level="'$alevel'"]/text()' ${afile} | sed -re 's/<\/?\w+>//g' | sed 's/^[[:space:]]*#/#/g'
xmllint --format --xpath '//documentation[@level="'$alevel'"]/text()' ${afile} | sed -re 's/<\/?\w+>//g' | sed 's/^[[:space:]]*#/#/g'
fi
# sets the tags without attribute level to 100
xmllint --format --xpath '//documentation[not(@level)]/text()' ${afile} &> /dev/null
if [ "$?" -eq "0" ] ; then
if [ "$alevel" -eq "100" ] ; then
xmllint --format --xpath '//documentation[not(@level)]/text()' ${afile} | sed -re 's/<\/?\w+>//g' | sed 's/^[[:space:]]*#/#/g'
fi
fi
done
done
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment