File: html2help.sed

package info (click to toggle)
wip 2p3-9
  • links: PTS
  • area: non-free
  • in suites: lenny
  • size: 3,160 kB
  • ctags: 889
  • sloc: ansic: 13,304; csh: 534; makefile: 109; sed: 92
file content (45 lines) | stat: -rw-r--r-- 897 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Remove everything between the BEGIN and END Index comments.
/<\!--.*WIP BEGIN Index/,/<\!--.*WIP END Index/d
# Just remove the rest of the BEGIN and END comments.
/<\!--.*WIP.*-->/d
# Too bad there's no way to make sed ignore case!
s?<CODE>??g
s?</CODE>??g
### These two are done later after formatting....
### s?<PRE>??g
### s?</PRE>??g
# Stuff to ignore
s?<HTML[^>]*>??g
s?</HTML[^>]*>??g
s?<HEADER[^>]*>??g
s?</HEADER[^>]*>??g
s?<BODY[^>]*>??g
s?</BODY[^>]*>??g
s?<ISINDEX>??
s?</ADDRESS>??g
s?<NEXTID[^>]*>??g
s?<HR[^>]*>??g
s?<BR[^>]*>??g
# character set translations from HTML special chars
s?&gt.?>?g
s?&lt.?<?g
# Paragraph borders
s?<P>??g
s?</P>??g
# Headings
s?<TITLE>[^<]*</TITLE>??g
s?<H\([0-9]\)>[^<]*</H\1>??g
s?<H[0-9]>??g
s?</H[0-9]>??g
# DL is description
s?<DL>??g
s?</DL>??g
s?<DT>??g
s?<DD>??g
# Italics
s?<it>??g
s?</it>??g
# Get rid of Anchors
:pre
s?<A[^>]*>??g
s?</A>??g