todoxygen.sh 1.76 KB
 Roland Levillain committed Mar 31, 2010 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #! /bin/sh # todoxygen.sh: Turn HTML files into suitable inputs for doxygen. # Copyright (C) 2009, 2010 EPITA Research and Development Laboratory (LRDE). # # This file is part of Olena. # # Olena is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation, version 2 of the License. # # Olena is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Olena. If not, see . test $# -eq 3 \ || { echo "Usage:$0 "; exit 1; } html="$1" out="$2/basename $1 .html.hh"  Guillaume Lazzara committed Nov 13, 2008 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43  bodyl=grep -n ""$html | cut -d ':' -f 1 nlines=wc -l $html | cut -d ' ' -f 1 tail_line=$(($nlines -$bodyl)) echo '/*! ' > $out echo '\htmlonly' >>$out tail -n $tail_line$html >> $out echo '\endhtmlonly */' >>$out sed -i -e 's/ /\ /g' $out sed -i -e 's/↦/\&map/g'$out sed -i -e 's/’/\&rsquo/g' $out sed -i -e 's/→/\&rarr/g'$out sed -i -e 's/“/\&ldquo/g' $out sed -i -e 's/”/\&rdquo/g'$out sed -i -e 's/≡/\&equiv/g' $out  Roland Levillain committed Mar 31, 2010 44 45 # Doxygen wants us to preserve '\n' after commands. # \ref and \see do not need that extra new line.  Guillaume Lazzara committed Feb 24, 2009 46 for keyword in include section page subpage subsection subsubsection image; do  Guillaume Lazzara committed Dec 09, 2008 47  sed -i -e "s/\\\\endhtmlonly\\\\$keyword/\\\\endhtmlonly\n\n\\\\$keyword/g"$out  Guillaume Lazzara committed Mar 26, 2009 48  sed -i -e "s/\\\\endhtmlonly\*\//\\\\endhtmlonly\n\n\*\/\n\n/g" $out  Guillaume Lazzara committed Dec 09, 2008 49 50  sed -i -e "s/\\\\$keyword $$.*$$\\\\htmlonly/\\\\$keyword \1\n\n\\\\htmlonly\n/g"$out done