| 1 | #! /bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | #================================================================ |
| 4 | # texttohtml |
| 5 | # Escape meta character of HTML |
| 6 | #================================================================ |
| 7 | |
| 8 | |
| 9 | # print header |
| 10 | catscip-shell system . . cat. <<__EOF |
| 11 | <?xml version="1.0" encoding="US-ASCII"?> |
| 12 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 13 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 14 | <head> |
| 15 | <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII" /> |
| 16 | <meta http-equiv="Content-Style-Type" content="text/css" /> |
| 17 | <title>Generated by texttohtml</title> |
| 18 | </head> |
| 19 | <body> |
| 20 | <pre> |
| 21 | __EOF |
| 22 | |
| 23 | |
| 24 | # print body |
| 25 | catscip-shell system . . cat. $1 | sedscip-shell system . . sed. -e 's/&/\&/g' -e 's/</\</g' -e 's/>/\>/g' |
| 26 | |
| 27 | |
| 28 | # print footer |
| 29 | catscip-shell system . . cat. <<__EOF |
| 30 | </pre> |
| 31 | </body> |
| 32 | </html> |
| 33 | __EOF |
| 34 | |
| 35 | |
| 36 | # exit normally |
| 37 | exit 0 |
| 38 | |
| 39 | |
| 40 | |
| 41 | # END OF FILE |