X-Git-Url: https://mop.ddnsfree.com/gitweb/?p=populate.git;a=blobdiff_plain;f=populate.sh;fp=populate.sh;h=6dec3fa325900dcdfb9f6f69527ea4838844cbb5;hp=9a9b7e6d659788cafe649e2c5acc340f34b3783e;hb=0b0cd79df48d0960febe885308fbbb34227f4fd4;hpb=6a3d74d0a9a59c22d1dd4dc3311cd07b920703d9 diff --git a/populate.sh b/populate.sh index 9a9b7e6..6dec3fa 100755 --- a/populate.sh +++ b/populate.sh @@ -114,15 +114,15 @@ 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//\n\n/g;s/<\/url>/\n<\/url>\n/g; - /^$/,/^<\/url>$/ { s/\\_/_/g; }; - /^$/,/^<\/url>$/ { s/\(^[^<].*\)/\1<\/a>/g; }; - s/^$//g;s/^<\/url>$//g' | tr -d '\n' | \ - sed "s/${NEWLI}${NEWLI}/
${NEWLI}/g;"' + sed "s/${NEWLI}${NEWLI}/
${NEWLI}/g;"' + s/\([^<]*\)<\/url>/
\1<\/a>/g; s///g;s/<\/lang:htm>//g;s/]*>.*<\/lang:[^>]*>//g' fi )