1 |
wakaba |
1.1 |
use strict; |
2 |
|
|
package SuikaWiki::Plugin::Registry; |
3 |
|
|
|
4 |
|
|
|
5 |
|
|
our %Info; |
6 |
|
|
$Info{q#WikiPluginInfo#}->{Name} = q#WikiPluginInfo#; |
7 |
|
|
$Info{q#WikiPluginInfo#}->{q#Version#} = q#2004.0831.0328#; |
8 |
|
|
$Info{q#WikiPluginInfo#}->{q#InterfaceVersion#} = q#2.9.1#; |
9 |
|
|
$Info{q#WikiPluginInfo#}->{q#mkpluginVersion#} = q#2.1.19#; |
10 |
|
|
$Info{q#WikiPluginInfo#}->{q#module_name#} = q#SuikaWiki::Plugin::plugin::WikiPluginInfo1040731032806Sixu#; |
11 |
|
|
$Info{q#WikiPluginInfo#}->{q#Date.RCS#} = q#$Date: 2004/02/14 10:53:13 $#; |
12 |
|
|
$Info{q#WikiPluginInfo#}->{RequiredPlugin} = [q#WikiStruct#]; |
13 |
|
|
$Info{q#WikiPluginInfo#}->{Description} = [[q#WikiPlugin information#, q#en#, q##]]; |
14 |
|
|
$Info{q#WikiPluginInfo#}->{License} = [[q#%%Perl%%#, q##, q##]]; |
15 |
|
|
$Info{q#WikiPluginInfo#}->{Author} = [[[[q#Wakaba#, q#ja#, q#Latn#]], [[q#w@suika.fam.cx#]], [q##]]]; |
16 |
|
|
package SuikaWiki::Plugin::plugin::WikiPluginInfo1040731032806Sixu; |
17 |
|
|
|
18 |
|
|
|
19 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block Plugin/Use)" |
20 |
|
|
my $WIKIRESOURCE; |
21 |
|
|
use Message::Util::Error; |
22 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 1)" |
23 |
|
|
|
24 |
|
|
{my $def = {q#Parameter#, {q#template#, {q#Type#, q#template#, q#Default#, q#\#REQUIRED#, q#Description#, [[q#Template to be applied for each module#, q##, q##]]}}, q#Description#, [[q#Apply template for each WikiPlugin module#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
25 |
|
|
|
26 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__for_each_plugin']/Formatting)" |
27 |
|
|
$p->{q#template#} = do { my $r = $f->parse_attr ($p=>q#template#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
28 |
|
|
$p->{template} ||= ($WIKIRESOURCE ||= SuikaWiki::Plugin->module_package ('WikiResource'))->get |
29 |
|
|
(name => 'WikiPluginInfo:ForEachPlugin:Template', |
30 |
|
|
o => $o, wiki => $o->{wiki}); |
31 |
|
|
my $formatter = SuikaWiki::Plugin->formatter ('view_resource'); |
32 |
|
|
for (sort keys %SuikaWiki::Plugin::Registry::Info) { |
33 |
|
|
local $o->{var}->{wpi__plugin_module} = $_; |
34 |
|
|
try { |
35 |
|
|
$formatter->replace ($p->{template}, |
36 |
|
|
param => $o, |
37 |
|
|
-parent => $p->{-parent}); |
38 |
|
|
} catch Message::Util::Formatter::error with { |
39 |
|
|
my $err = shift; |
40 |
|
|
if ($err->{-object}->{-category_name} eq 'view_resource') { |
41 |
|
|
my $wiki = $err->{option}->{param}->{wiki}; |
42 |
|
|
SuikaWiki::Plugin->module_package ('Error') |
43 |
|
|
->reporting_formatting_template_error |
44 |
|
|
($err, $wiki, |
45 |
|
|
template => $p->{template}); |
46 |
|
|
undef; |
47 |
|
|
} else { |
48 |
|
|
$err->throw; |
49 |
|
|
} |
50 |
|
|
}; |
51 |
|
|
}}} |
52 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 2)" |
53 |
|
|
; |
54 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__for_each_plugin} = $def; |
55 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__for_each_plugin} = $def; |
56 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__for_each_plugin} = $def; |
57 |
|
|
}; |
58 |
|
|
|
59 |
|
|
{my $def = {q#Parameter#, {q#template#, {q#Type#, q#template#, q#Default#, q#\#REQUIRED#, q#Description#, [[q#Template to be applied for each module#, q##, q##]]}}, q#Description#, [[q#Apply template for each formatting caregory#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
60 |
|
|
|
61 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__for_each_formatting_category']/Formatting)" |
62 |
|
|
$p->{q#template#} = do { my $r = $f->parse_attr ($p=>q#template#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
63 |
|
|
$p->{template} ||= ($WIKIRESOURCE ||= SuikaWiki::Plugin->module_package ('WikiResource'))->get |
64 |
|
|
(name => 'WikiPluginInfo:ForEachCategory:Template', |
65 |
|
|
o => $o, wiki => $o->{wiki}); |
66 |
|
|
my $formatter = SuikaWiki::Plugin->formatter ('view_resource'); |
67 |
|
|
for (sort keys %SuikaWiki::Plugin::Rule) { |
68 |
|
|
local $o->{var}->{wpi__formatting_category} = $_; |
69 |
|
|
try { |
70 |
|
|
$formatter->replace ($p->{template}, |
71 |
|
|
param => $o, |
72 |
|
|
-parent => $p->{-parent}); |
73 |
|
|
} catch Message::Util::Formatter::error with { |
74 |
|
|
my $err = shift; |
75 |
|
|
if ($err->{-object}->{-category_name} eq 'view_resource') { |
76 |
|
|
my $wiki = $err->{option}->{param}->{wiki}; |
77 |
|
|
SuikaWiki::Plugin->module_package ('Error') |
78 |
|
|
->reporting_formatting_template_error |
79 |
|
|
($err, $wiki, |
80 |
|
|
template => $p->{template}); |
81 |
|
|
undef; |
82 |
|
|
} else { |
83 |
|
|
$err->throw; |
84 |
|
|
} |
85 |
|
|
}; |
86 |
|
|
}}} |
87 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 4)" |
88 |
|
|
; |
89 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__for_each_formatting_category} = $def; |
90 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__for_each_formatting_category} = $def; |
91 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__for_each_formatting_category} = $def; |
92 |
|
|
}; |
93 |
|
|
|
94 |
|
|
{my $def = {q#Parameter#, {q#template#, {q#Type#, q#template#, q#Default#, q#\#REQUIRED#, q#Description#, [[q#Template to be applied for each module#, q##, q##]]}, q#category#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#Formatting category to which rule belongs#, q#en#, q##]]}}, q#Description#, [[q#Apply template for each formatting rule#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
95 |
|
|
|
96 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__for_each_formatting_rule']/Formatting)" |
97 |
|
|
my $category = $p->{category} || $o->{var}->{wpi__formatting_category}; |
98 |
|
|
$p->{q#template#} = do { my $r = $f->parse_attr ($p=>q#template#, $o, -non_parsed_to_node => 1, %opt); ref $r?$r->inner_text:$r}; |
99 |
|
|
$p->{template} ||= ($WIKIRESOURCE ||= SuikaWiki::Plugin->module_package ('WikiResource'))->get |
100 |
|
|
(name => 'WikiPluginInfo:ForEachRule:Template', |
101 |
|
|
o => $o, wiki => $o->{wiki}); |
102 |
|
|
my $formatter = SuikaWiki::Plugin->formatter ('view_resource'); |
103 |
|
|
for (sort keys %{$SuikaWiki::Plugin::Rule{$category}}) { |
104 |
|
|
local $o->{var}->{wpi__formatting_rule} = $_; |
105 |
|
|
try { |
106 |
|
|
$formatter->replace ($p->{template}, |
107 |
|
|
param => $o, |
108 |
|
|
-parent => $p->{-parent}); |
109 |
|
|
} catch Message::Util::Formatter::error with { |
110 |
|
|
my $err = shift; |
111 |
|
|
if ($err->{-object}->{-category_name} eq 'view_resource') { |
112 |
|
|
my $wiki = $err->{option}->{param}->{wiki}; |
113 |
|
|
SuikaWiki::Plugin->module_package ('Error') |
114 |
|
|
->reporting_formatting_template_error |
115 |
|
|
($err, $wiki, |
116 |
|
|
template => $p->{template}); |
117 |
|
|
undef; |
118 |
|
|
} else { |
119 |
|
|
$err->throw; |
120 |
|
|
} |
121 |
|
|
}; |
122 |
|
|
}}} |
123 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 6)" |
124 |
|
|
; |
125 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__for_each_formatting_rule} = $def; |
126 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__for_each_formatting_rule} = $def; |
127 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__for_each_formatting_rule} = $def; |
128 |
|
|
}; |
129 |
|
|
|
130 |
|
|
{my $def = {q#Parameter#, {q#module#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPlugin module name#, q#en#, q##]]}}, q#Description#, [[q#WikiPlugin module name#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
131 |
|
|
|
132 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__plugin_name']/Formatting)" |
133 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
134 |
|
|
$p->{-parent}->append_text ( |
135 |
|
|
($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
136 |
|
|
->{Name} |
137 |
|
|
);}} |
138 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 8)" |
139 |
|
|
; |
140 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__plugin_name} = $def; |
141 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__plugin_name} = $def; |
142 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__plugin_name} = $def; |
143 |
|
|
}; |
144 |
|
|
|
145 |
|
|
{my $def = {q#Parameter#, {q#module#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPlugin module name#, q#en#, q##]]}}, q#Description#, [[q#WikiPlugin module version#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
146 |
|
|
|
147 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__plugin_version']/Formatting)" |
148 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
149 |
|
|
$p->{-parent}->append_text ( |
150 |
|
|
($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
151 |
|
|
->{Version} |
152 |
|
|
);}} |
153 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 10)" |
154 |
|
|
; |
155 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__plugin_version} = $def; |
156 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__plugin_version} = $def; |
157 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__plugin_version} = $def; |
158 |
|
|
}; |
159 |
|
|
|
160 |
|
|
{my $def = {q#Parameter#, {q#module#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPlugin module name#, q#en#, q##]]}}, q#Description#, [[q#WikiPlugin module version as RCS date-time#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
161 |
|
|
|
162 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__plugin_version_rcs_date']/Formatting)" |
163 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
164 |
|
|
$p->{-parent}->append_text ( |
165 |
|
|
($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
166 |
|
|
->{'Date.RCS'} |
167 |
|
|
);}} |
168 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 12)" |
169 |
|
|
; |
170 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__plugin_version_rcs_date} = $def; |
171 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__plugin_version_rcs_date} = $def; |
172 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__plugin_version_rcs_date} = $def; |
173 |
|
|
}; |
174 |
|
|
|
175 |
|
|
{my $def = {q#Parameter#, {q#module#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPlugin module name#, q#en#, q##]]}}, q#Description#, [[q#WikiPlugin interface version implemented by the WikiPlugin module#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
176 |
|
|
|
177 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__plugin_interface_version']/Formatting)" |
178 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
179 |
|
|
$p->{-parent}->append_text ( |
180 |
|
|
($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
181 |
|
|
->{InterfaceVersion} |
182 |
|
|
);}} |
183 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 14)" |
184 |
|
|
; |
185 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__plugin_interface_version} = $def; |
186 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__plugin_interface_version} = $def; |
187 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__plugin_interface_version} = $def; |
188 |
|
|
}; |
189 |
|
|
|
190 |
|
|
{my $def = {q#Parameter#, {q#module#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPlugin module name#, q#en#, q##]]}}, q#Description#, [[q#Version of mkplugin that genearted the WikiPlugin module#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
191 |
|
|
|
192 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__plugin_mkplugin_version']/Formatting)" |
193 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
194 |
|
|
$p->{-parent}->append_text ( |
195 |
|
|
($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
196 |
|
|
->{mkpluginVersion} |
197 |
|
|
);}} |
198 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 16)" |
199 |
|
|
; |
200 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__plugin_mkplugin_version} = $def; |
201 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__plugin_mkplugin_version} = $def; |
202 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__plugin_mkplugin_version} = $def; |
203 |
|
|
}; |
204 |
|
|
|
205 |
|
|
{my $def = {q#Parameter#, {q#module#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPlugin module name#, q#en#, q##]]}}, q#Description#, [[q#WikiPlugin module license#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
206 |
|
|
|
207 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__plugin_license']/Formatting)" |
208 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
209 |
|
|
my $license = ($WIKIRESOURCE ||= SuikaWiki::Plugin->module_package ('WikiResource'))->temp_get_language_resource_from_array |
210 |
|
|
(source => ($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
211 |
|
|
->{License}, o => $o)->[0]; |
212 |
|
|
$license =~ s{ %%([A-Za-z0-9_.+-]+)%% |
213 |
|
|
| ((?:(?!%%).)+)} |
214 |
|
|
{$1 ? ($WIKIRESOURCE ||= SuikaWiki::Plugin->module_package ('WikiResource'))->get_op |
215 |
|
|
('WikiPluginInfo:License:'.$1, $o, $p->{-parent}) |
216 |
|
|
: $p->{-parent}->append_text ($2); ''}gex;}} |
217 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 18)" |
218 |
|
|
; |
219 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__plugin_license} = $def; |
220 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__plugin_license} = $def; |
221 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__plugin_license} = $def; |
222 |
|
|
}; |
223 |
|
|
|
224 |
|
|
{my $def = {q#Parameter#, {q#module#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPlugin module name#, q#en#, q##]]}}, q#Description#, [[q#WikiPlugin module description#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
225 |
|
|
|
226 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__plugin_description']/Formatting)" |
227 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
228 |
|
|
$p->{-parent}->append_text ( |
229 |
|
|
(($WIKIRESOURCE ||= SuikaWiki::Plugin->module_package ('WikiResource'))->temp_get_language_resource_from_array |
230 |
|
|
(source => ($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
231 |
|
|
->{Description}, |
232 |
|
|
o => $o) || [])->[0], |
233 |
|
|
);}} |
234 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 20)" |
235 |
|
|
; |
236 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__plugin_description} = $def; |
237 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__plugin_description} = $def; |
238 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__plugin_description} = $def; |
239 |
|
|
}; |
240 |
|
|
|
241 |
|
|
{my $def = {q#Parameter#, {q#module#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPlugin module name#, q#en#, q##]]}}, q#Description#, [[q#WikiPlugin modules required by this WikiPlugin module#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
242 |
|
|
|
243 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__plugin_required_plugins']/Formatting)" |
244 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
245 |
|
|
my $list = ($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
246 |
|
|
->{RequiredPlugin} || []; |
247 |
|
|
return unless @$list; |
248 |
|
|
my $ul = $p->{-parent}->append_new_node |
249 |
|
|
(type => '#element', |
250 |
|
|
namespace_uri => q#http://www.w3.org/1999/xhtml#, |
251 |
|
|
local_name => 'ul'); |
252 |
|
|
for (sort @$list) { |
253 |
|
|
$ul->append_new_node (type => '#element', |
254 |
|
|
namespace_uri => q#http://www.w3.org/1999/xhtml#, |
255 |
|
|
local_name => 'li') |
256 |
|
|
->append_text ($_); |
257 |
|
|
}}} |
258 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 22)" |
259 |
|
|
; |
260 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__plugin_required_plugins} = $def; |
261 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__plugin_required_plugins} = $def; |
262 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__plugin_required_plugins} = $def; |
263 |
|
|
}; |
264 |
|
|
|
265 |
|
|
{my $def = {q#Parameter#, {q#module#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#WikiPlugin module name#, q#en#, q##]]}}, q#Description#, [[q#Perl modules required by this WikiPlugin module#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
266 |
|
|
|
267 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__plugin_required_modules']/Formatting)" |
268 |
|
|
my $module = $p->{module} || $o->{var}->{wpi__plugin_module}; |
269 |
|
|
my $list = ($SuikaWiki::Plugin::Registry::Info{ $module } || {}) |
270 |
|
|
->{RequiredModule} || []; |
271 |
|
|
return unless @$list; |
272 |
|
|
my $ul = $p->{-parent}->append_new_node |
273 |
|
|
(type => '#element', |
274 |
|
|
namespace_uri => q#http://www.w3.org/1999/xhtml#, |
275 |
|
|
local_name => 'ul'); |
276 |
|
|
for (sort @$list) { |
277 |
|
|
$ul->append_new_node (type => '#element', |
278 |
|
|
namespace_uri => q#http://www.w3.org/1999/xhtml#, |
279 |
|
|
local_name => 'li') |
280 |
|
|
->append_text ($_); |
281 |
|
|
}}} |
282 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 24)" |
283 |
|
|
; |
284 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__plugin_required_modules} = $def; |
285 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__plugin_required_modules} = $def; |
286 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__plugin_required_modules} = $def; |
287 |
|
|
}; |
288 |
|
|
|
289 |
|
|
{my $def = {q#Parameter#, {q#category#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#Formatting category#, q#en#, q##]]}}, q#Description#, [[q#Formatting category name#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
290 |
|
|
|
291 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__formatting_category_name']/Formatting)" |
292 |
|
|
my $name = $p->{category} || $o->{var}->{wpi__formatting_category}; |
293 |
|
|
$name =~ s/(?<=.)_/-/g; |
294 |
|
|
$p->{-parent}->append_text ($name);}} |
295 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 26)" |
296 |
|
|
; |
297 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__formatting_category_name} = $def; |
298 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__formatting_category_name} = $def; |
299 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__formatting_category_name} = $def; |
300 |
|
|
}; |
301 |
|
|
|
302 |
|
|
{my $def = {q#Parameter#, {q#rule#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#Formatting rule#, q#en#, q##]]}}, q#Description#, [[q#Formatting rule name#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
303 |
|
|
|
304 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__formatting_rule_name']/Formatting)" |
305 |
|
|
my $name = $p->{rule} || $o->{var}->{wpi__formatting_rule}; |
306 |
|
|
$name =~ s/(?<=.)_/-/g; |
307 |
|
|
$p->{-parent}->append_text ($name);}} |
308 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 28)" |
309 |
|
|
; |
310 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__formatting_rule_name} = $def; |
311 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__formatting_rule_name} = $def; |
312 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__formatting_rule_name} = $def; |
313 |
|
|
}; |
314 |
|
|
|
315 |
|
|
{my $def = {q#Parameter#, {q#rule#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#Formatting rule#, q#en#, q##]]}, q#category#, {q#Type#, q#text#, q#Default#, q#(auto)#, q#Description#, [[q#Formatting category#, q#en#, q##]]}}, q#Description#, [[q#FormattingRule description#, q#en#, q##]], q#main#, sub {my ($f, $rule_name, $p, $o, %opt) = @_; |
316 |
|
|
|
317 |
|
|
#line 1 "(WikiPlugin module source plugin-info.wp2, block FormattingRule[name()='[q#view#, q#view-resource#, q#form-input#]/wpi__formatting_rule_description']/Formatting)" |
318 |
|
|
my $category = $p->{category} || $o->{var}->{wpi__formatting_category}; |
319 |
|
|
my $rule = $p->{rule} || $o->{var}->{wpi__formatting_rule}; |
320 |
|
|
$category =~ s/(?=.)-/_/ if $p->{category}; |
321 |
|
|
$rule =~ s/(?=.)-/_/ if $p->{rule}; |
322 |
|
|
$p->{-parent}->append_text ( |
323 |
|
|
(($WIKIRESOURCE ||= SuikaWiki::Plugin->module_package ('WikiResource'))->temp_get_language_resource_from_array |
324 |
|
|
(source => (($SuikaWiki::Plugin::Rule{ $category } || {}) |
325 |
|
|
->{ $rule } || {}) |
326 |
|
|
->{Description}, |
327 |
|
|
o => $o) || [])->[0] |
328 |
|
|
);}} |
329 |
|
|
#line 1 "(WikiPlugin module WikiPluginInfo, chunk 30)" |
330 |
|
|
; |
331 |
|
|
$SuikaWiki::Plugin::Rule{view}->{wpi__formatting_rule_description} = $def; |
332 |
|
|
$SuikaWiki::Plugin::Rule{view_resource}->{wpi__formatting_rule_description} = $def; |
333 |
|
|
$SuikaWiki::Plugin::Rule{form_input}->{wpi__formatting_rule_description} = $def; |
334 |
|
|
}; |
335 |
|
|
|
336 |
|
|
package SuikaWiki::Plugin::Resource; |
337 |
|
|
|
338 |
|
|
our $BaseResource; |
339 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiPluginInfo:Description#} = q#Description#; |
340 |
|
|
$BaseResource->{q#und#}->{q##}->{q#WikiPluginInfo:ForEachCategory:Template#} = q#%section ( title => {%wpi--formatting-category-name;}p, heading, content => {%wpi--for-each-formatting-rule;}p, );#; |
341 |
|
|
$BaseResource->{q#und#}->{q##}->{q#WikiPluginInfo:ForEachPlugin:Template#} = q#%section ( title => {%wpi--plugin-name;}p, heading, content => { %list ( {%res (name => {WikiPluginInfo:Description});}p => {%wpi--plugin-description;}p, {%res (name => {WikiPluginInfo:Version});}p => {%wpi--plugin-version; (%wpi--plugin-version-rcs-date;)}p, {%res (name => {WikiPluginInfo:InterfaceVersion});}p => {%wpi--plugin-interface-version;}p, {%res (name => {WikiPluginInfo:mkpluginVersion});}p => {%wpi--plugin-mkplugin-version;}p, {%res (name => {WikiPluginInfo:License});}p => {%wpi--plugin-license;}p, {%res (name => {WikiPluginInfo:RequiredPlugins});}p => {%wpi--plugin-required-plugins;}p, {%res (name => {WikiPluginInfo:RequiredModules});}p => {%wpi--plugin-required-modules;}p, ); }p, );#; |
342 |
|
|
$BaseResource->{q#und#}->{q##}->{q#WikiPluginInfo:ForEachRule:Template#} = q#%section ( title => {%wpi--formatting-rule-name;}p, heading, content => { %list ( {%res (name => {WikiPluginInfo:Rule:Name});}p => {%wpi--formatting-category-name;/%wpi--formatting-rule-name;}p, {%res (name => {WikiPluginInfo:Description});}p => {%wpi--formatting-rule-description;}p, ); }p, );#; |
343 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiPluginInfo:InterfaceVersion#} = q#WikiPlugin interface implemented by this module#; |
344 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiPluginInfo:License#} = q#License of this module#; |
345 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiPluginInfo:License:GPL#} = q#%paragraph (content => {This program is free software; you can redistribute it and/or modify it under the terms of the %link-to-resource ( label => {%link-to-it (label => {GNU General Public License});}, uri => {http://www.gnu.org/copyleft/gpl.html}, ); as published by the %link-to-resource ( label => {%link-to-it (label => {Free Software Foundation});}, uri => {http://www.fsf.org/}, ); either version 2 of the License, or (at your option) any later version.}p); %paragraph (content => {This program is distributed in the hope that it will be useful, but %em (content => {WITHOUT ANY WARRANTY});; without even the implied warranty of %em (content => {MERCHANTABILITY}); or %em (content => {FITNESS FOR A PARTICULAR PURPOSE});. See the GNU General Public License for more details.}p); %paragraph (content => {You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.});#; |
346 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiPluginInfo:License:Mozilla#} = q#Version: MPL 1.1/GPL 2.0/LGPL 2.1 %paragraph (content => {The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at <%link-to-resource ( label => {%link-to-it (label => {http://www.mozilla.org/MPL/});}, uri => {http://www.mozilla.org/MPL/});>}p); %paragraph (content => {Software distributed under the License is distributed on an "%em (content => {AS IS});" basis, %em (content => {WITHOUT WARRANTY OF ANY KIND});, either express or implied. See the License for the specific language governing rights and limitations under the License.}p); %paragraph (content => {Alternatively, the contents of this file may be used under the terms of either the %link-to-resource ( label => {%link-to-it (label => {GNU General Public License});}, uri => {http://www.gnu.org/copyleft/gpl.html}, ); Version 2 or later (the "GPL"), or the %link-to-resource ( label => {%link-to-it (label => {GNU Lesser General Public License});}, uri => {http://www.gnu.org/copyleft/lesser.html}, ); Version 2.1 or later (the "LGPL"), in which case the provisions of the GPL or the LGPL are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of either the GPL or the LGPL, and not to allow others to use your version of this file under the terms of the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the GPL or the LGPL. If you do not delete the provisions above, a recipient may use your version of this file under the terms of any one of the MPL, the GPL or the LGPL.}p);#; |
347 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiPluginInfo:License:Perl#} = q#%paragraph (content => {This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.});#; |
348 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiPluginInfo:mkpluginVersion#} = q#Version of mkplugin that generated this module#; |
349 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiPluginInfo:RequiredModules#} = q#Perl modules required by this module#; |
350 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiPluginInfo:RequiredPlugins#} = q#WikiPlugin modules required by this module#; |
351 |
|
|
$BaseResource->{q#en#}->{q##}->{q#WikiPluginInfo:Rule:Name#} = q#Formatting rule name#; |
352 |
|
|
$BaseResource->{q#en #}->{q##}->{q#WikiPluginInfo:Version#} = q#Version#; |
353 |
|
|
package SuikaWiki::Plugin::Registry; |
354 |
|
|
|
355 |
|
|
$Info{q#WikiPluginInfo#}->{provide} = {q#rule#, {q#form_input#, [q#wpi__for_each_plugin#, q#wpi__for_each_formatting_category#, q#wpi__for_each_formatting_rule#, q#wpi__plugin_name#, q#wpi__plugin_version#, q#wpi__plugin_version_rcs_date#, q#wpi__plugin_interface_version#, q#wpi__plugin_mkplugin_version#, q#wpi__plugin_license#, q#wpi__plugin_description#, q#wpi__plugin_required_plugins#, q#wpi__plugin_required_modules#, q#wpi__formatting_category_name#, q#wpi__formatting_rule_name#, q#wpi__formatting_rule_description#], q#view#, [q#wpi__for_each_plugin#, q#wpi__for_each_formatting_category#, q#wpi__for_each_formatting_rule#, q#wpi__plugin_name#, q#wpi__plugin_version#, q#wpi__plugin_version_rcs_date#, q#wpi__plugin_interface_version#, q#wpi__plugin_mkplugin_version#, q#wpi__plugin_license#, q#wpi__plugin_description#, q#wpi__plugin_required_plugins#, q#wpi__plugin_required_modules#, q#wpi__formatting_category_name#, q#wpi__formatting_rule_name#, q#wpi__formatting_rule_description#], q#view_resource#, [q#wpi__for_each_plugin#, q#wpi__for_each_formatting_category#, q#wpi__for_each_formatting_rule#, q#wpi__plugin_name#, q#wpi__plugin_version#, q#wpi__plugin_version_rcs_date#, q#wpi__plugin_interface_version#, q#wpi__plugin_mkplugin_version#, q#wpi__plugin_license#, q#wpi__plugin_description#, q#wpi__plugin_required_plugins#, q#wpi__plugin_required_modules#, q#wpi__formatting_category_name#, q#wpi__formatting_rule_name#, q#wpi__formatting_rule_description#]}}; |
356 |
|
|
|
357 |
|
|
1; |