~ubuntu-branches/ubuntu/saucy/nginx/saucy-updates

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/util/wiki2pod.pl

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry, Cyril Lavier, Michael Lustfield, Kartik Mistry
  • Date: 2012-05-14 11:15:00 UTC
  • mfrom: (4.2.49 sid)
  • Revision ID: package-import@ubuntu.com-20120514111500-1y9ij7zulu9xnmry
Tags: 1.2.0-1
[Cyril Lavier]
* New upstream release. (Closes: #670306)
  + 1.2.x is stable release now.
* debian/modules/chunkin-nginx-module:
  + Updated chunkin-nginx-module to v0.23rc2-3-g85eca98.
* debian/modules/headers-more-module:
  + Updated headers-more-module to v0.17rc1-4-g33a82ed.
* debian/modules/nginx-development-kit:
  + Updated nginx-development-kit to v0.2.17-7-g24202b4.
* debian/modules/nginx-echo:
  + Updated nginx-echo to v0.38rc2-7-g080c0a1.
* debian/modules/nginx-lua:
  + Updated nginx-lua to v0.5.0rc25-5-g8d28785.
* debian/modules/nginx-upstream-fair:
  + Updated nginx-upstream-fair to a18b409.
* debian/modules/nginx-upload-progress:
  + Updated nginx-upload-progress to v0.9.0-0-ga788dea.
* debian/modules/naxsi:
  + Updated naxsi to 0.46
* debian/modules/README.Modules-versions:
  + Updated versions and URLs for modules.
* debian/naxsi-ui-extract, debian/naxsi-ui-intercept,
  debian/nginx-naxsi-ui.*, debian/naxsi-ui-extract.1,
  debian/naxsi-ui-intercept.1, debian/rules:
  + Added nginx-naxsi-ui package containing the learning daemon
    and the WebUI.
* debian/nginx-common.nginx.default, debian/nginx-common.nginx.init:
  + Renamed files to be compliant with the nginx-naxsi-ui package.
* debian/po:
  + Added needed files for using po-debconf.
  + Added French translation.
* debian/control:
  + Applied the modifications given after the review by Justin Rye.

[Michael Lustfield]
* debian/conf/uwsgi_params:
  + Added UWSGI_SCHEME to uwsgi_params. (Closes: #664878)
* debian/conf/sites-available/default:
  + Added allow directive for ipv6 localhost. (Closes: #664271)

[Kartik Mistry]
* debian/control:
  + wrap-and-sort.
* debian/copyright:
  + Added missing copyrights, minor formatting fixes.
* debian/nginx-common.nginx.init:
  + Added ulimit for restarts, Thanks to Daniel Roschka
    <danielroschka@phoenitydawn.de> for patch. (Closes: #673580)
* debian/conf/sites-available/default:
  + Added patch to fix deprecated "listen" directive, Thanks to
    Guillaume Plessis <gui@dotdeb.org> for patch. (Closes: #672632)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env perl
2
 
 
3
 
use strict;
4
 
use warnings;
5
 
use bytes;
6
 
 
7
 
my @nl_counts;
8
 
my $last_nl_count_level;
9
 
 
10
 
my @bl_counts;
11
 
my $last_bl_count_level;
12
 
 
13
 
sub fmt_pos ($) {
14
 
    (my $s = $_[0]) =~ s{\#(.*)}{/"$1"};
15
 
    $s;
16
 
}
17
 
 
18
 
sub fmt_mark ($$) {
19
 
    my ($tag, $s) = @_;
20
 
    my $max_level = 0;
21
 
    while ($s =~ /([<>])\1*/g) {
22
 
        my $level = length $&;
23
 
        if ($level > $max_level) {
24
 
            $max_level = $level;
25
 
        }
26
 
    }
27
 
 
28
 
    my $times = $max_level + 1;
29
 
    if ($times > 1) {
30
 
        $s = " $s ";
31
 
    }
32
 
    return $tag . ('<' x $times) . $s . ('>' x $times);
33
 
}
34
 
 
35
 
print "=encoding utf-8\n\n";
36
 
 
37
 
while (<>) {
38
 
    if ($. == 1) {
39
 
        # strip the leading U+FEFF byte in MS-DOS text files
40
 
        my $first = ord(substr($_, 0, 1));
41
 
        #printf STDERR "0x%x", $first;
42
 
        #my $second = ord(substr($_, 2, 1));
43
 
        #printf STDERR "0x%x", $second;
44
 
        if ($first == 0xEF) {
45
 
            substr($_, 0, 1, '');
46
 
            #warn "Hit!";
47
 
        }
48
 
    }
49
 
    s{\[(http[^ \]]+) ([^\]]*)\]}{$2 (L<$1>)}gi;
50
 
    s{ \[\[ ( [^\]\|]+ ) \| ([^\]]*) \]\] }{"L<$2|" . fmt_pos($1) . ">"}gixe;
51
 
    s{<code>(.*?)</code>}{fmt_mark('C', $1)}gie;
52
 
    s{'''(.*?)'''}{fmt_mark('B', $1)}ge;
53
 
    s{''(.*?)''}{fmt_mark('I', $1)}ge;
54
 
    if (s{^\s*<[^>]+>\s*$}{}) {
55
 
        next;
56
 
    }
57
 
 
58
 
    if (/^\s*$/) {
59
 
        print "\n";
60
 
        next;
61
 
    }
62
 
 
63
 
=begin cmt
64
 
 
65
 
    if ($. == 1) {
66
 
        warn $_;
67
 
        for my $i (0..length($_) - 1) {
68
 
            my $chr = substr($_, $i, 1);
69
 
            warn "chr ord($i): ".ord($chr)." \"$chr\"\n";
70
 
        }
71
 
    }
72
 
 
73
 
=end cmt
74
 
=cut
75
 
 
76
 
    if (/(=+) (.*) \1$/) {
77
 
        #warn "HERE! $_" if $. == 1;
78
 
        my ($level, $title) = (length $1, $2);
79
 
        collapse_lists();
80
 
 
81
 
        print "\n=head$level $title\n\n";
82
 
    } elsif (/^(\#+) (.*)/) {
83
 
        my ($level, $txt) = (length($1) - 1, $2);
84
 
        if (defined $last_nl_count_level && $level != $last_nl_count_level) {
85
 
            print "\n=back\n\n";
86
 
        }
87
 
        $last_nl_count_level = $level;
88
 
        $nl_counts[$level] ||= 0;
89
 
        if ($nl_counts[$level] == 0) {
90
 
            print "\n=over\n\n";
91
 
        }
92
 
        $nl_counts[$level]++;
93
 
        print "\n=item $nl_counts[$level].\n\n";
94
 
        print "$txt\n";
95
 
    } elsif (/^(\*+) (.*)/) {
96
 
        my ($level, $txt) = (length($1) - 1, $2);
97
 
        if (defined $last_bl_count_level && $level != $last_bl_count_level) {
98
 
            print "\n=back\n\n";
99
 
        }
100
 
        $last_bl_count_level = $level;
101
 
        $bl_counts[$level] ||= 0;
102
 
        if ($bl_counts[$level] == 0) {
103
 
            print "\n=over\n\n";
104
 
        }
105
 
        $bl_counts[$level]++;
106
 
        print "\n=item *\n\n";
107
 
        print "$txt\n";
108
 
    } else {
109
 
        collapse_lists();
110
 
        print;
111
 
    }
112
 
}
113
 
 
114
 
collapse_lists();
115
 
 
116
 
sub collapse_lists {
117
 
    while (defined $last_nl_count_level && $last_nl_count_level >= 0) {
118
 
        print "\n=back\n\n";
119
 
        $last_nl_count_level--;
120
 
    }
121
 
    undef $last_nl_count_level;
122
 
    undef @nl_counts;
123
 
 
124
 
    while (defined $last_bl_count_level && $last_bl_count_level >= 0) {
125
 
        print "\n=back\n\n";
126
 
        $last_bl_count_level--;
127
 
    }
128
 
    undef $last_bl_count_level;
129
 
    undef @bl_counts;
130
 
}
131