linux-l: Re: Windows-HTML entperversieren
Robin S. Socha
robin at socha.net
Fr Aug 11 14:36:47 CEST 2000
* Ingo Buse <buse at atvision.de> writes:
> "Alain Schroeder" <alain at mini.gt.owl.de>
> On Fri, Aug 11, 2000 at 10:30:14AM +0200, Philipp Schmidt wrote:
Dein Quoting ist eine Zumutung - adjusted.
>> ich hab' hier ca. 300MB Windows-HTML, die ich mir gerne unter linux
>> anucken möchte, das scheitert jedoch an verschiedenen Faktoren:
>>
>> Alle relativen url's enthalten statt einem / einen \ Die Dateinamen
>> gehen kunterbunt zwischen upper/lowercase hin und her. Letzteres
>> konnte ich durch das spell-correction modul vom Apache kompensieren,
>> aber mir will keine \ / rewriting rule gelingen, da der Apache das
>> als doppelescape auffasst.
man sed, man tr:
for i in *.html ; do sed -e s/alt/neu/g $i ; done
Alternativ:
chomp; print "s/alt/neu/g;\n"
>> Hat jemand 'ne Idee?
Demoronizing HTML, das aus Windows kommt, ist immer gefährlich, weil
neben den Tags meistens auch 1000 andere Sachen nicht stimmen. Wenn Du
einfach nur valides HTML willst, ist tidy Dein Freund (ich würde es
zunächst mit -e laufen lassen).
http://www.w3.org/People/Raggett/tidy :
,----[ (root at deathwish):(/usr/ports/www/tidy)# tidy -h ]
| tidy: file1 file2 ...
| Utility to clean up & pretty print html files
| see http://www.w3.org/People/Raggett/tidy/
| options for tidy released on 13th January 2000
| -config <file> set options from config file
| -indent or -i indent element content
| -omit or -o omit optional endtags
| -wrap 72 wrap text at column 72 (default is 68)
| -upper or -u force tags to upper case (default is lower)
| -clean or -c replace font, nobr & center tags by CSS
| -raw leave chars > 128 unchanged upon output
| -ascii use ASCII for output, Latin-1 for input
| -latin1 use Latin-1 for both input and output
| -iso2022 use ISO2022 for both input and output
| -utf8 use UTF-8 for both input and output
| -mac use the Apple MacRoman character set
| -numeric or -n output numeric rather than named entities
| -modify or -m to modify original files
| -errors or -e only show errors
| -quiet or -q suppress nonessential output
| -f <file> write errors to <file>
| -xml use this when input is wellformed xml
| -asxml to convert html to wellformed xml
| -slides to burst into slides on h2 elements
| -help or -h list command line options
| Input/Output default to stdin/stdout respectively
| Single letter options apart from -f may be combined
| as in: tidy -f errs.txt -imu foo.html
| For further info on HTML see http://www.w3.org/MarkUp
`----
> veruch die seite doch mal in homesite (win) einzuladen,
300MB? Händisch?
--
Robin S. Socha <http://socha.net/>
Mehr Informationen über die Mailingliste linux-l