File: cat2pod

package info (click to toggle)
phabricator 0~git20190207-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 71,728 kB
  • sloc: php: 552,244; sql: 16,997; ansic: 3,619; yacc: 2,503; sh: 754; xml: 519; lex: 488; cpp: 221; python: 186; makefile: 177; sed: 66
file content (71 lines) | stat: -rwxr-xr-x 768 bytes parent folder | download | duplicates (2)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sed -f
s,^\x1b\[1m\(.*\)\x1b\[m,=head1 \1\n,g
/^=head1/ {
    x
    p
    s,.*,,
    x
}
s,\x1b\[1m\([^\x1b]*\)\x1b\[m,B<\1>,g
s,\x1b\[4m\([^\x1b]*\)\x1b\[m,I<\1>,g
s,^      ,,
s,^    ,,
/^B<[^>]*>/ {
N
    /^B<[^>]*>.*\n          .*$/ {
        x
        p
        s,.*,,
        x
        P
        x
        s,.*,=back\n,
        x
    i\
\n=over\n
        D
    }
    x
    p
    s,.*,,
    x
    P
    D
}
/^I<--/ {
    s/^I<--/=item I<--/
    i\
\n=over\n
    a\
\n=back\n
}

/^$/,/^    [A-Z]/ {
    /^    [A-Z]/ {
        i\
\n=over\n
    }
}

/^    [A-Z]/,/^$/ {
    /^$/ {
        a\
=back\n
    }
    s/^    //
}

/^$/,/^   [A-Z]/ {
    /^   [A-Z]/ {
        i\
\n=over\n
    }
}

/^   [A-Z]/,/^$/ {
    /^$/ {
        a\
=back\n
    }
    s/^   //
}