Gentoo Archives: gentoo-user

From: gentuxx <gentuxx@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Any 'sed' geniuses out there?
Date: Tue, 27 Sep 2005 04:29:50
Message-Id: 4338C921.4020505@gmail.com
In Reply to: Re: [gentoo-user] Any 'sed' geniuses out there? by Dave Nebinger
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Dave Nebinger wrote:
5
6 >> I'm writing a sed script that will parse the *broken* output of
7 >> man2html. I say broken, because the output isn't W3C compliant (html
8 >> OR xhtml). I'd like to be able to modify it so that the final outcome
9 >> is XHTML 1.0 compliant. I'm running into a problem where the output
10 >> doesn't close the <p>, <dt>, or <dd> tags.
11 >
12 >
13 > Won't html tidy do this kind of thing for you?
14 >
15 > It would seem to be easier to reuse an existing tested tool rather
16 > than trying to roll your own...
17 >
18 >
19 Well, while I enjoy a good challenge (especially sed, awk, or perl),
20 htmltidy does the trick quite nicely. It doesn't indent the way that
21 I do, but my first priority was making the output W3C compliant, and
22 htmltidy's output is that.
23
24 Thanks Dave!
25
26 - --
27 gentux
28 echo "hfouvyAdpy/ofu" | perl -pe 's/(.)/chr(ord($1)-1)/ge'
29
30 gentux's gpg fingerprint ==> 34CE 2E97 40C7 EF6E EC40 9795 2D81 924A
31 6996 0993
32 -----BEGIN PGP SIGNATURE-----
33 Version: GnuPG v1.4.1 (GNU/Linux)
34
35 iD8DBQFDOMkhLYGSSmmWCZMRAoqSAJ4nP7Vyb/x3/EjvC9O7MGWLpcWzygCgxQrV
36 kFsnMCN9cYemTJEh0ub+JSI=
37 =pUJg
38 -----END PGP SIGNATURE-----
39
40 --
41 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Any 'sed' geniuses out there? Dave Nebinger <dnebinger@××××.com>