Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

[r200]: trunk / pdf_maker / uncss.sh Maximize Restore History

Download this file

uncss.sh    15 lines (14 with data), 848 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#!/bin/bash
for i in ../doc/*.html; do
cat $i |
perl -np -e 's/<code class="note">((?:.(?!<\/?code))*.)<\/code>/<dfn>\1<\/dfn>/g' |
perl -np -e 's/<code class="keystroke">((?:.(?!<\/?code))*.)<\/code>/<kbd>\1<\/kbd>/g' |
perl -np -e 's/<code class="option">((?:.(?!<\/?code))*.)<\/code>/<blink>\1<\/blink>/g' |
perl -np -e 's/<code class="special">((?:.(?!<\/?code))*.)<\/code>/<samp>\1<\/samp>/g' |
perl -np -e 's/<code class="vim">((?:.(?!<\/?code))*.)<\/code>/<tt>\1<\/tt>/g' |
perl -np -e 's/<code class="example">((?:(?:.(?!<\/?code))*.)?)<\/code>/<var>\1<\/var>/g' |
perl -np -e 's/<code class="section">((?:(?:.(?!<\/?code))*.)?)<\/code>/<strong>\1<\/strong>/g' |
perl -np -e 's/<code class="notvi">((?:.(?!<\/?code))*.)<\/code>/<cite>\1<\/cite>/g' |
grep -v 'Generated by vim2html' > tmp &&
mv tmp $(basename $i)
done