Revision 3019,
785 bytes
checked in by amuller, 14 years ago
(diff) |
Ticket #1135 - Corrigindo CSS e adicionando filemanager
|
Rev | Line | |
---|
[3019] | 1 | #!/bin/sh |
---|
| 2 | # |
---|
| 3 | # This script removes the HTML formatting from a file. If the file was designed |
---|
| 4 | # with such use in mind and was properly formatted besides HTML (such as the README |
---|
| 5 | # file for ttf2pt1) it will look good as a plain text file. |
---|
| 6 | # |
---|
| 7 | # This script supports a very limited set of HTML formatting. Everything that |
---|
| 8 | # goes before <BODY> is removed. Any lines that |
---|
| 9 | # contain only the HTML formatting or start with "<!" or contain only ">" |
---|
| 10 | # are completely removed. Then all the in-line formatting is removed. |
---|
| 11 | # Then " ", "<", ">" are changed to " ", "<", ">". |
---|
| 12 | |
---|
| 13 | sed '1,/<[bB][oO][dD][yY]>/d; |
---|
| 14 | /^<!/d; |
---|
| 15 | s/<[lL][iI]>/-/g; |
---|
| 16 | s/^</< </; |
---|
| 17 | s/> *$/>>/; |
---|
| 18 | s/<[^<>]*>//g; |
---|
| 19 | /^< *>$/d; |
---|
| 20 | /^>>$/d;s/^< //; |
---|
| 21 | s/>$//; |
---|
| 22 | s/&[nN][bB][sS][pP];/ /g;s/&[lL][tT];/</g;s/&[gG][tT];/>/g;s/&[aA][mM][pP];/\&/g;' |
---|
Note: See
TracBrowser
for help on using the repository browser.