X-Git-Url: https://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=populate.sh;h=6dec3fa325900dcdfb9f6f69527ea4838844cbb5;hb=aaef28396dd10c873964d07ae39eacf408c7be9d;hp=de6b1b7baa64ae3f41a5bbd5d679278fd3edc50d;hpb=8b701cc88aba9b9043cb0c5e9be030481253ba8d;p=populate.git diff --git a/populate.sh b/populate.sh index de6b1b7..6dec3fa 100755 --- a/populate.sh +++ b/populate.sh @@ -114,12 +114,16 @@ function formatify() { ) | ( if [ "$1" = "tex" ]; then sed 's/à/\\`a/g;s/è/\\`e/g;s/ì/\\`i/g;s/ò/\\`o/g;s/ù/\\`u/g;s/áéíóú/\\'"'"'a/g; -s/é/\\'"'"'e/g;s/í/\\'"'"'i/g;s/ó/\\'"'"'o/g;s/ú/\\'"'"'u/g;s/°/\$\^\\circ\$/g; -s//\\textit{/g;s//\\textbf{/g;s/<\/[ib]>/}/g;s//URL: \\textit\{/g;s/<\/url>/\}/g; -s/“/``/g;s/”/'"''"'/g;s///g;s/<\/lang:tex>//g;s/]*>.*<\/lang:[^>]*>//g' + s/é/\\'"'"'e/g;s/í/\\'"'"'i/g;s/ó/\\'"'"'o/g;s/ú/\\'"'"'u/g;s/°/\$\^\\circ\$/g; + s//\\textit{/g;s//\\textbf{/g;s/<\/[ib]>/}/g; + s//\n\n/g;s/<\/url>/\n<\/url>\n/g;' | \ + sed '/^$/,/^<\/url>$/ { s/_/\\_/g; };' | tee -a loggone.txt | tr -d '\n' | \ + sed 's//URL: \\textit\{/g;s/<\/url>/\}/g; + s/“/``/g;s/”/'"''"'/g;s///g;s/<\/lang:tex>//g;s/]*>.*<\/lang:[^>]*>//g' elif [ "$1" = "htm" ]; then - sed "s/${NEWLI}${NEWLI}/
${NEWLI}/g;"'s/\([^<]*\)<\/url>/\1<\/a>/g; -s///g;s/<\/lang:htm>//g;s/]*>.*<\/lang:[^>]*>//g' + sed "s/${NEWLI}${NEWLI}/
${NEWLI}/g;"' + s/\([^<]*\)<\/url>/
\1<\/a>/g; + s///g;s/<\/lang:htm>//g;s/]*>.*<\/lang:[^>]*>//g' fi )