File: descr.sed

package info (click to toggle)
mined 2000.10-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 10,908 kB
  • ctags: 2,256
  • sloc: ansic: 130,722; sh: 1,720; makefile: 253; perl: 169; sed: 152; cpp: 28
file content (39 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (3)
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
# skip lines not intended for description
/<p id=nodescr>/,/^$/ d

# define ranges to be extracted and handled
1,/^<h.>Introduction/ d
/^<h.>.*verview/ b ov
/^<h.>/,$ d
: ov
/^<h.>.*verview/,$ b overview

: intro
/^[	 ]*</ d
b

: overview

# suppress HTML only lines
/^[	 ]*<[^>]*>$/ d

# headers
s,^[	 ]*<h3>\([^<]*\).*,\1,
t lines

# sections
s,[	 ]*<h[^>]*>\([^<]*\).*,\1,
t lines

# items
s,[	 ]*<li>,* ,
t lines

# continuation lines
s,[	 ]*,  ,

:lines
# remove embedded HTML
s,<[^>]*> *,,g
s,^ *$,,