From 0c89eabcf5a7f9dd881abc8a8cb5f2271ec4e01e Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 13 Jan 2010 00:37:56 +0000 Subject: more options for field configuration, additional pagespec test --- doc/plugins/contrib/field.mdwn | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field.mdwn b/doc/plugins/contrib/field.mdwn index a43bf24b2..09646d28a 100644 --- a/doc/plugins/contrib/field.mdwn +++ b/doc/plugins/contrib/field.mdwn @@ -13,6 +13,9 @@ IkiWiki::Plugin::field - front-end for per-page record fields. # simple registration field_register => [qw{meta}], + # allow the config to be queried as a field + field_allow_config => 1, + ## DESCRIPTION This plugin is meant to be used in conjunction with other plugins @@ -32,8 +35,17 @@ a given page. This can be used in three ways: The following options can be set in the ikiwiki setup file. +**field_allow_config** + + field_allow_config => 1, + +Allow the $config hash to be queried like any other field; the +keys of the config hash are the field names. + **field_register** + field_register => [qw{meta}], + A list of plugin-IDs to register. This assumes that the plugins in question store data in the %pagestatus hash using the ID of that plugin, and thus the field values are looked for there. @@ -46,12 +58,17 @@ registered with the "field" plugin. The "field" PageSpec function can be used to match the value of a field for a page. -field(*name* *glob*) +**field(*name* *glob*)** For example: field(bar Foo*) will match if the "bar" field starts with "Foo". +**destfield(*name* *glob*)** + +is the same, except that it tests the destination page (that is, in cases +when the source page is being included in another page). + ## FUNCTIONS ### field_register -- cgit v1.2.3 From 9ccd1ba41bff43c1a5d06197b454c8748224e30f Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 13 Jan 2010 02:20:34 +0000 Subject: ymlfront: backend for structured data --- doc/plugins/contrib/ymlfront.mdwn | 99 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 doc/plugins/contrib/ymlfront.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ymlfront.mdwn b/doc/plugins/contrib/ymlfront.mdwn new file mode 100644 index 000000000..f4438f23c --- /dev/null +++ b/doc/plugins/contrib/ymlfront.mdwn @@ -0,0 +1,99 @@ +[[!template id=plugin name=ymlfront author="[[rubykat]]"]] +[[!tag type/meta]] +[[!toc]] +## NAME + +IkiWiki::Plugin::ymlfront - add YAML-format data to a page + +## SYNOPSIS + + # activate the plugin + add_plugins => [qw{goodstuff ymlfront ....}], + +## DESCRIPTION + +This plugin provides a way of adding arbitrary meta-data (data fields) to any +page by prefixing the page with a YAML-format document. This provides a way to +create per-page structured data, where each page is treated like a record, and +the structured data are fields in that record. This can include the meta-data +for that page, such as the page title. + +This plugin is meant to be used in conjunction with the [[field]] plugin. + +## DETAILS + +The YAML-format data in a page must be placed at the start of the page +and delimited by lines containing precisely three dashes. The "normal" +content of the page then follows. + +For example: + + --- + title: Foo does not work + Urgency: High + Status: Assigned + AssignedTo: Fred Nurk + Version: 1.2.3 + --- + When running on the Sprongle system, the Foo function returns incorrect data. + +What will normally be displayed is everything following the second line of dashes. +That will be htmlized using the page-type of the page-file. + +### Accessing the Data + +There are three ways to access the data given in the YAML section. + +* [[getfield]] plugin + + The **getfield** plugin can display the data as individual variable values. + + For example: + + --- + title: Foo does not work + Urgency: High + Status: Assigned + AssignedTo: Fred Nurk + Version: 1.2.3 + --- + # {{$title}} + + **Urgency:** {{$Urgency}}\\ + **Status:** {{$Status}}\\ + **Assigned To:** {{$AssignedTo}}\\ + **Version:** {{$Version}} + + When running on the Sprongle system, the Foo function returns incorrect data. + +* [[ftemplate]] plugin + + The **ftemplate** plugin is like the [[plugins/template]] plugin, but it is also aware of [[field]] values. + + For example: + + --- + title: Foo does not work + Urgency: High + Status: Assigned + AssignedTo: Fred Nurk + Version: 1.2.3 + --- + \[[!ftemplate id="bug_display_template"]] + + When running on the Sprongle system, the Foo function returns incorrect data. + +* write your own plugin + + In conjunction with the [[field]] plugin, you can write your own plugin to access the data. + +## PREREQUISITES + + IkiWiki + IkiWiki::Plugin::field + YAML::Any + +## DOWNLOAD + +* browse at GitHub: +* git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From ccc8e8868269bf2751596e04f792c388acb85c12 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 13 Jan 2010 02:27:59 +0000 Subject: getfield: query field (meta-data) values --- doc/plugins/contrib/getfield.mdwn | 85 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 doc/plugins/contrib/getfield.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn new file mode 100644 index 000000000..ed03dc439 --- /dev/null +++ b/doc/plugins/contrib/getfield.mdwn @@ -0,0 +1,85 @@ +[[!template id=plugin name=getfield author="[[rubykat]]"]] +[[!tag type/meta]] +[[!toc]] +## NAME + +IkiWiki::Plugin::getfield - query the values of fields + +## SYNOPSIS + + # activate the plugin + add_plugins => [qw{goodstuff getfield ....}], + +## DESCRIPTION + +This plugin provides a way of querying the meta-data (data fields) of a page +inside the page content (rather than inside a template) This provides a way to +use per-page structured data, where each page is treated like a record, and the +structured data are fields in that record. This can include the meta-data for +that page, such as the page title. + +This plugin is meant to be used in conjunction with the B plugin. + +### USAGE + +One can get the value of a field by using special markup in the page. +This does not use directive markup, in order to make it easier to +use the markup inside other directives. There are two forms: + +* {{$*fieldname*}} + + This queries the value of *fieldname* for the source page. + + For example: + + \[[!meta title="My Long and Complicated Title With Potential For Spelling Mistakes"]] + # {{$title}} + + When the page is processed, this will give you: + +

My Long and Complicated Title With Potential For Spelling Mistakes

+ +* {{+$*fieldname*+}} + + This queries the value of *fieldname* for the destination page; that is, + the value when this page is included inside another page. + + For example: + + On PageA: + + \[[!meta title="I Am Page A"]] + # {{+$title+}} + + Stuff about A. + + On PageB: + + \[[!meta title="I Am Page B"]] + \[[!inline pagespec="PageA"]] + + When PageA is displayed: + +

I Am Page A

+

Stuff about A.

+ + When PageB is displayed: + +

I Am Page B

+

Stuff about A.

+ +### More Examples + +Listing all the sub-pages of the current page: + + \[[!map pages="{{$page}}/*"]] + +### LIMITATIONS + +One cannot query the values of fields on pages other than the current +page or the destination page. + +## DOWNLOAD + +* browse at GitHub: +* git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From 7d997f1007b240c14c04ff73b09a2a62fa3e64ad Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 13 Jan 2010 02:36:28 +0000 Subject: ftemplate: field-aware structured template plugin --- doc/plugins/contrib/ftemplate.mdwn | 94 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 doc/plugins/contrib/ftemplate.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ftemplate.mdwn b/doc/plugins/contrib/ftemplate.mdwn new file mode 100644 index 000000000..bcc6f2c67 --- /dev/null +++ b/doc/plugins/contrib/ftemplate.mdwn @@ -0,0 +1,94 @@ +[[!template id=plugin name=ftemplate author="[[rubykat]]"]] +[[!tag type/meta type/format]] +[[!toc]] +## NAME + +IkiWiki::Plugin::ftemplate - field-aware structured template plugin + +## SYNOPSIS + + # activate the plugin + add_plugins => [qw{goodstuff ftemplate ....}], + +## DESCRIPTION + +This plugin provides the **ftemplate** directive. This is like +the [[ikiwiki/directive/template]] directive, with the addition that one does not +have to provide all the values in the call to the template, +because ftemplate can query structured data ("fields") using +the [[field]] plugin. + +Templates are files that can be filled out and inserted into pages in +the wiki, by using the ftemplate directive. The directive has an id +parameter that identifies the template to use. + +Additional parameters can be used to fill out the template, in +addition to the "field" values. Passed-in values override the +"field" values. + +There are two places where template files can live. One is, as with the +[[plugins/template]] plugin, in the /templates directory on the wiki. These +templates are wiki pages, and can be edited from the web like other wiki +pages. + +The second place where template files can live is in the global +templates directory (the same place where the page.tmpl template lives). +This is a useful place to put template files if you want to prevent +them being edited from the web, and you don't want to have to make +them work as wiki pages. + +### EXAMPLES + +#### Example 1 + +PageA: + + [[!meta title="I Am Page A"]] + [[!meta description="A is for Apple."]] + [[!meta author="Fred Nurk"]] + [[!ftemplate id="mytemplate"]] + +Template "mytemplate": + + # + by + + **Summary:** + +This will give: + +

I Am Page A

+

by Fred Nurk

+

Summary: A is for Apple. + +#### Example 2: Overriding values + +PageB: + + [[!meta title="I Am Page B"]] + [[!meta description="B is for Banana."]] + [[!meta author="Fred Nurk"]] + [[!ftemplate id="mytemplate" title="Bananananananas"]] + +This will give: + +

Bananananananas

+

by Fred Nurk

+

Summary: B is for Banana. + +### LIMITATIONS + +One cannot query the values of fields on pages other than the current +page. + +## PREREQUISITES + + IkiWiki + IkiWiki::Plugin::field + HTML::Template + Encode + +## DOWNLOAD + +* browse at GitHub: +* git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From a3527672769b93eeb4a70fbe9f316c986706c375 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 13 Jan 2010 02:37:27 +0000 Subject: fixed title --- doc/plugins/contrib/ftemplate.mdwn | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ftemplate.mdwn b/doc/plugins/contrib/ftemplate.mdwn index bcc6f2c67..fba51e1c2 100644 --- a/doc/plugins/contrib/ftemplate.mdwn +++ b/doc/plugins/contrib/ftemplate.mdwn @@ -43,10 +43,10 @@ them work as wiki pages. PageA: - [[!meta title="I Am Page A"]] - [[!meta description="A is for Apple."]] - [[!meta author="Fred Nurk"]] - [[!ftemplate id="mytemplate"]] + \[[!meta title="I Am Page A"]] + \[[!meta description="A is for Apple."]] + \[[!meta author="Fred Nurk"]] + \[[!ftemplate id="mytemplate"]] Template "mytemplate": @@ -65,10 +65,10 @@ This will give: PageB: - [[!meta title="I Am Page B"]] - [[!meta description="B is for Banana."]] - [[!meta author="Fred Nurk"]] - [[!ftemplate id="mytemplate" title="Bananananananas"]] + \[[!meta title="I Am Page B"]] + \[[!meta description="B is for Banana."]] + \[[!meta author="Fred Nurk"]] + \[[!ftemplate id="mytemplate" title="Bananananananas"]] This will give: -- cgit v1.2.3 From 2cbf60a431d41b3cb0767f1c0fb1ecf50103bcb0 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 13 Jan 2010 02:38:33 +0000 Subject: correcting link --- doc/plugins/contrib/getfield.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn index ed03dc439..5e6b01113 100644 --- a/doc/plugins/contrib/getfield.mdwn +++ b/doc/plugins/contrib/getfield.mdwn @@ -81,5 +81,5 @@ page or the destination page. ## DOWNLOAD -* browse at GitHub: +* browse at GitHub: * git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From f90827f29bc1682bf3682375972f5cc836049dc7 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 13 Jan 2010 02:47:59 +0000 Subject: this is sort of format too --- doc/plugins/contrib/getfield.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn index 5e6b01113..302569f4b 100644 --- a/doc/plugins/contrib/getfield.mdwn +++ b/doc/plugins/contrib/getfield.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=getfield author="[[rubykat]]"]] -[[!tag type/meta]] +[[!tag type/meta type/format]] [[!toc]] ## NAME -- cgit v1.2.3 From 4f25d90ebc2d3ff2ad7a5d7bd8578a6c4d673aa8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 14 Jan 2010 18:56:05 -0500 Subject: mention that lighttpd does support this. Example needed. --- doc/plugins/po.mdwn | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index f3b70b5f7..da85636ec 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -129,11 +129,10 @@ For details, see [Apache's documentation](http://httpd.apache.org/docs/2.2/conte lighttpd -------- -lighttpd unfortunately does not support content negotiation. - -**FIXME**: does `mod_magnet` provide the functionality needed to - emulate this? +Recent versions of lighttpd should be able to use +`$HTTP["language"]` to configure the translatted pages to be served. +TODO: Example Usage ===== -- cgit v1.2.3 From 65db2f47acfe5815952bb0bfbdbe15b5cf5ce7be Mon Sep 17 00:00:00 2001 From: Spida Date: Fri, 15 Jan 2010 00:15:33 +0000 Subject: --- doc/plugins/po.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index da85636ec..576d36ec1 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -132,6 +132,8 @@ lighttpd Recent versions of lighttpd should be able to use `$HTTP["language"]` to configure the translatted pages to be served. +See [Lighttpd Issue](http://redmine.lighttpd.net/issues/show/1119) + TODO: Example Usage -- cgit v1.2.3 From a1138ae820d3ea121cbd28552a3300631179b0a5 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 16 Jan 2010 05:19:42 +0000 Subject: the pod bold thingy didn't work, making it a markdown one --- doc/plugins/contrib/getfield.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn index 302569f4b..929f70485 100644 --- a/doc/plugins/contrib/getfield.mdwn +++ b/doc/plugins/contrib/getfield.mdwn @@ -18,7 +18,7 @@ use per-page structured data, where each page is treated like a record, and the structured data are fields in that record. This can include the meta-data for that page, such as the page title. -This plugin is meant to be used in conjunction with the B plugin. +This plugin is meant to be used in conjunction with the **field** plugin. ### USAGE -- cgit v1.2.3 From 353f722dc439a14d7e74dab9ca2818f955ff4d41 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 16 Jan 2010 05:29:53 +0000 Subject: --- doc/plugins/contrib/getfield/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/plugins/contrib/getfield/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn new file mode 100644 index 000000000..61b9f5378 --- /dev/null +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -0,0 +1,3 @@ +## Templating, and other uses + +Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If it can be made to work anywhere, or from a specific place in the wiki - configurable, possibly - you'll have something very similar to mediawiki's templates. I can already think of a few uses for this combined with [[template]] ;) . --[[SR|users/simonraven]] -- cgit v1.2.3 From 3b2772967fdb125bb8160f968729681b7af13269 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Sat, 16 Jan 2010 08:08:46 +0000 Subject: responded to discussion --- doc/plugins/contrib/getfield/discussion.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 61b9f5378..78462197a 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -1,3 +1,12 @@ ## Templating, and other uses Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If it can be made to work anywhere, or from a specific place in the wiki - configurable, possibly - you'll have something very similar to mediawiki's templates. I can already think of a few uses for this combined with [[template]] ;) . --[[SR|users/simonraven]] + +> Yes, I mentioned "only current page" in the "LIMITATIONS" section. + +> What do you think would be a good syntax for querying other pages? +> It needs to resolve to a single page, though I guess using "bestlink" to find the closest page would mean that one didn't have to spell out the whole page. + +> I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. + +> -- [[users/KathrynAndersen]] -- cgit v1.2.3 From e3a09318a0686a7e3d01206f56ca6019c3c198e0 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sat, 16 Jan 2010 08:42:56 +0000 Subject: --- doc/plugins/contrib/getfield/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 78462197a..f3c844e94 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -7,6 +7,10 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i > What do you think would be a good syntax for querying other pages? > It needs to resolve to a single page, though I guess using "bestlink" to find the closest page would mean that one didn't have to spell out the whole page. +>> I don't know the internals very well, I think that's how other plugins do it. *goes to check* Usually it's a `foreach` loop, and use a `pagestate{foo}` to check the page's status/state. There's also some stuff like 'pagespec_match_list($params{page}` ... they do slightly different thing depending on need. --[[SR|users/simonraven]] + > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. > -- [[users/KathrynAndersen]] + +>> Ooh, sounds nice :) . --[[SR|users/simonraven]] -- cgit v1.2.3 From 354468d280354234d9c8c91333534c9784f427cf Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Sun, 17 Jan 2010 00:10:55 +0000 Subject: respond: markup, not internals --- doc/plugins/contrib/getfield/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index f3c844e94..37d65d851 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -9,6 +9,11 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >> I don't know the internals very well, I think that's how other plugins do it. *goes to check* Usually it's a `foreach` loop, and use a `pagestate{foo}` to check the page's status/state. There's also some stuff like 'pagespec_match_list($params{page}` ... they do slightly different thing depending on need. --[[SR|users/simonraven]] +>>> No, I meant what markup I should use; the actual implementation probably wouldn't be too difficult. + +>>> The current markup is {{$*fieldname*}}; what you're wanting, perhaps it should be represented like {{$*pagename*:*fieldname*}}, or {{$*pagename*::*fieldname*}} or something else... +>>> -- [[KathrynAndersen]] + > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. > -- [[users/KathrynAndersen]] -- cgit v1.2.3 From b3363aa89f840fd42b8a621b011326ef41b73513 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sun, 17 Jan 2010 09:28:07 +0000 Subject: --- doc/plugins/contrib/getfield/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 37d65d851..9f1337046 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -14,6 +14,8 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >>> The current markup is {{$*fieldname*}}; what you're wanting, perhaps it should be represented like {{$*pagename*:*fieldname*}}, or {{$*pagename*::*fieldname*}} or something else... >>> -- [[KathrynAndersen]] +>>>> Oh. Hmm. I like your idea actually, or alternately, in keeping more with other plugins, doing it like {{pagename/fieldname}}. The meaning is less clear that way, but avoids potential issues with filename clashes that have a colon in them. It also keeps a certain logic - at least to me. Either way, I think both are good choices. + > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. > -- [[users/KathrynAndersen]] -- cgit v1.2.3 From 2137d1f68c694af6135d0d84b59bbfbcffe36669 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sun, 17 Jan 2010 09:31:07 +0000 Subject: --- doc/plugins/contrib/getfield/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 9f1337046..42338a3c7 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -14,7 +14,7 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >>> The current markup is {{$*fieldname*}}; what you're wanting, perhaps it should be represented like {{$*pagename*:*fieldname*}}, or {{$*pagename*::*fieldname*}} or something else... >>> -- [[KathrynAndersen]] ->>>> Oh. Hmm. I like your idea actually, or alternately, in keeping more with other plugins, doing it like {{pagename/fieldname}}. The meaning is less clear that way, but avoids potential issues with filename clashes that have a colon in them. It also keeps a certain logic - at least to me. Either way, I think both are good choices. +>>>> Oh. Hmm. I like your idea actually, or alternately, in keeping more with other plugins, doing it like {{pagename/fieldname}}. The meaning of the separator is less clear with /, but avoids potential issues with filename clashes that have a colon in them. It also keeps a certain logic - at least to me. Either way, I think both are good choices. [[SR|users/simonraven]] > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. -- cgit v1.2.3 From fa0bbaab21a456f8115d9af508fef06443b8d275 Mon Sep 17 00:00:00 2001 From: "http://oblomov.myopenid.com/" Date: Sun, 17 Jan 2010 09:56:26 +0000 Subject: Suggest # as page-field separator --- doc/plugins/contrib/getfield/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 42338a3c7..900ca65b2 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -16,6 +16,9 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >>>> Oh. Hmm. I like your idea actually, or alternately, in keeping more with other plugins, doing it like {{pagename/fieldname}}. The meaning of the separator is less clear with /, but avoids potential issues with filename clashes that have a colon in them. It also keeps a certain logic - at least to me. Either way, I think both are good choices. [[SR|users/simonraven]] +>>>>> What about using {{pagename#fieldname}}? The meaning of the hash in URLs sort of fits with what is needed here (reference to a 'named' thing within the page) and it won't conflict with actual hash usages (unless we expect different named parts of pages to define different values for the same field ...) +>>>>> -- [[Oblomov]] + > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. > -- [[users/KathrynAndersen]] -- cgit v1.2.3 From 9c0c8b57fb9ccaf21888a7eb9e93dc0d312773e0 Mon Sep 17 00:00:00 2001 From: simonraven Date: Sun, 17 Jan 2010 17:27:51 +0000 Subject: --- doc/plugins/contrib/getfield/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 900ca65b2..ce6246034 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -18,6 +18,8 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >>>>> What about using {{pagename#fieldname}}? The meaning of the hash in URLs sort of fits with what is needed here (reference to a 'named' thing within the page) and it won't conflict with actual hash usages (unless we expect different named parts of pages to define different values for the same field ...) >>>>> -- [[Oblomov]] +>>>>>> That's a good one too. --[[simonraven]] + > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. -- cgit v1.2.3 From bcde9b74120d0572d41447d798917ae02134e059 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Sun, 24 Jan 2010 02:52:57 +0000 Subject: new report plugin --- doc/plugins/contrib/report.mdwn | 166 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 doc/plugins/contrib/report.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/report.mdwn b/doc/plugins/contrib/report.mdwn new file mode 100644 index 000000000..7130bcb5f --- /dev/null +++ b/doc/plugins/contrib/report.mdwn @@ -0,0 +1,166 @@ +[[!template id=plugin name=report author="[[rubykat]]"]] +[[!tag type/meta type/format]] +[[!toc]] +## NAME + +IkiWiki::Plugin::report - Produce templated reports from page field data. + +## SYNOPSIS + + # activate the plugin + add_plugins => [qw{goodstuff report ....}], + + \[[!report template="blog_summary" + pages="blog/*" + sort="mtime"]] + +## DESCRIPTION + +This plugin provides the **report** directive. This enables one to report on +the structured data ("field" values) of multiple pages; the output is formatted +via a template. This depends on the "field" plugin. + +The pages to report on are selected by a PageSpec given by the "pages" +parameter. The template is given by the "template" parameter. +The template expects the data from a single page; it is applied +to each matching page separately, one after the other. + +Additional parameters can be used to fill out the template, in +addition to the "field" values. Passed-in values override the +"field" values. + +There are two places where template files can live. One, as with the +[[plugins/template]] plugin, is in the /templates directory on the wiki. These +templates are wiki pages, and can be edited from the web like other wiki +pages. + +The second place where template files can live is in the global +templates directory (the same place where the page.tmpl template lives). +This is a useful place to put template files if you want to prevent +them being edited from the web, and you don't want to have to make +them work as wiki pages. + +## OPTIONS + +**template**: The template to use for the report. + +**pages**: A PageSpec to determine the pages to report on. + +**sort**: How the matching pages should be sorted. Sorting criteria are separated by spaces. + +The possible values for sorting are: + +* **page**: Sort by the full page ID. +* **pagename**: Sort by the base page name. +* **pagename_natural**: Sort by the base page name, using Sort::Naturally if it is installed. +* **mtime**: Sort by the page modification time. +* **age**: Sort by the page creation time, newest first. + +Any other value is taken to be a field name to sort by. +If a sort value begins with a minus (-) then the order for that field is reversed. + +### Headers + +An additional option is the "headers" option. This is a space-separated +list of field names which are to be used as headers in the report. This +is a way of getting around one of the limitations of HTML::Template, that +is, not being able to do tests such as +"if this-header is not equal to previous-header". + +Instead, that logic is performed inside the plugin. The template is +given parameters "HEADER1", "HEADER2" and so on, for each header. +If the value of a header field is the same as the previous value, +then HEADER**N** is set to be empty, but if the value of the header +field is new, then HEADER**N** is given that value. + +#### Example + +Suppose you're writing a blog in which you record "moods", and you +want to display your blog posts by mood. + + \[[!report template="mood_summary" + pages="blog/*" + sort="Mood Date title" + headers="Mood"]] + +The "mood_summary" template might be like this: + + + ## + + ### + () \[[ + +### Advanced Options + +The following options are used to improve efficiency when dealing +with large numbers of pages; most people probably won't need them. + +**trail**: + +A page or pages to use as a "trail" page. When a trail page is used, +the matching pages are limited to (a subset of) the pages which that +page links to; the "pages" pagespec in this case, rather than selecting +pages from the entire wiki, will select pages from within the set of pages +given by the trail page. + +**doscan**: + +Whether this report should be called in "scan" mode; if it is, then +the pages which match the pagespec are added to the list of links from +this page. This can be used by *another* report by setting this +page to be a "trail" page in *that* report. +It is not possible to use "trail" and "doscan" at the same time. +By default, "doscan" is false. + +## TEMPLATE PARAMETERS + +The templates are in HTML::Template format, just as [[plugins/template]] and +[[ftemplate]] are. The parameters passed in to the template are as follows: + +***fields***: + +The structured data from the current matching page. This includes +"title" and "description" if they are defined. + +***common values***: + +Values known for all pages: "page", "destpage". Also "basename" (the base name of the page). + +***passed-in values***: + +Any additional parameters to the report directive are passed to the +template; a parameter will override the matching "field" value. +For example, if you have a "Mood" field, and you pass Mood="bad" to +the report, then that will be the Mood which is given for the whole +report. + +Generally this is useful if one wishes to make a more generic +template and hide or show portions of it depending on what +values are passed in the report directive call. + +For example, one could have a "hide_mood" parameter which would hide +the "Mood" section of your template when it is true, which one could +use when the Mood is one of the headers. + +***headers***: + +See the section on Headers. + +***first and last***: + +If this is the first page-record in the report, then "first" is true. +If this is the last page-record in the report, then "last" is true. + +## PREREQUISITES + + IkiWiki + IkiWiki::Plugin::field + HTML::Template + Encode + +## DOWNLOAD + +* browse at GitHub: +* git repo at git://github.com/rubykat/ikiplugins.git -- cgit v1.2.3 From 27d2d7115df82908396d460d92857fd0990c556d Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Sun, 24 Jan 2010 02:59:11 +0000 Subject: note that report is now released --- doc/plugins/contrib/getfield/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index ce6246034..015e9f5a1 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -26,3 +26,6 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i > -- [[users/KathrynAndersen]] >> Ooh, sounds nice :) . --[[SR|users/simonraven]] + +>>> I've now released the [[plugins/contrib/report]] plugin. I've been using it on my site; the holdup on releasing was because I hadn't yet written the docs for it. I hope you find it useful. +>>> -- [[users/KathrynAndersen]] -- cgit v1.2.3 From f6b2edef642ccda83a4c96aeeb2e146202707a67 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Sun, 24 Jan 2010 09:38:40 +0000 Subject: new release of getfield; can now get values from other pages as well as current page --- doc/plugins/contrib/getfield.mdwn | 60 ++++++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 7 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield.mdwn b/doc/plugins/contrib/getfield.mdwn index 929f70485..0a92894f1 100644 --- a/doc/plugins/contrib/getfield.mdwn +++ b/doc/plugins/contrib/getfield.mdwn @@ -18,13 +18,13 @@ use per-page structured data, where each page is treated like a record, and the structured data are fields in that record. This can include the meta-data for that page, such as the page title. -This plugin is meant to be used in conjunction with the **field** plugin. +This plugin is meant to be used in conjunction with the [[field]] plugin. ### USAGE One can get the value of a field by using special markup in the page. This does not use directive markup, in order to make it easier to -use the markup inside other directives. There are two forms: +use the markup inside other directives. There are four forms: * {{$*fieldname*}} @@ -39,6 +39,26 @@ use the markup inside other directives. There are two forms:

My Long and Complicated Title With Potential For Spelling Mistakes

+* {{$*pagename*#*fieldname*}} + + This queries the value of *fieldname* for the page *pagename*. + + For example: + + On PageFoo: + + \[[!meta title="I Am Page Foo"]] + + Stuff about Foo. + + On PageBar: + + For more info, see \[[{{$PageFoo#title}}|PageFoo]]. + + When PageBar is displayed: + + <p>For more info, see <a href="PageFoo">I Am Page Foo</a>.</p> + * {{+$*fieldname*+}} This queries the value of *fieldname* for the destination page; that is, @@ -68,17 +88,43 @@ use the markup inside other directives. There are two forms:

I Am Page B

Stuff about A.

+* {{+$*pagename*#*fieldname*+}} + + This queries the value of *fieldname* for the page *pagename*; the + only difference between this and {{$*pagename*#*fieldname*}} is + that the full name of *pagename* is calculated relative to the + destination page rather than the source page. + + I can't really think of a reason why this should be needed, but + this format has been added for completeness. + +### No Value Found + +If no value is found for the given field, then the field name is returned. + +For example: + +On PageFoo: + + \[[!meta title="Foo"]] + My title is {{$title}}. + + My description is {{$description}}. + +When PageFoo is displayed: + +

My title is Foo.

+ +

My description is description.

+ +This is because "description" hasn't been defined for that page. + ### More Examples Listing all the sub-pages of the current page: \[[!map pages="{{$page}}/*"]] -### LIMITATIONS - -One cannot query the values of fields on pages other than the current -page or the destination page. - ## DOWNLOAD * browse at GitHub: -- cgit v1.2.3 From e9ee3d7d85e792ee6720696abe62f25cdd7f945a Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Sun, 24 Jan 2010 09:41:44 +0000 Subject: note new version of getfield --- doc/plugins/contrib/getfield/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/getfield/discussion.mdwn b/doc/plugins/contrib/getfield/discussion.mdwn index 015e9f5a1..5f7fffead 100644 --- a/doc/plugins/contrib/getfield/discussion.mdwn +++ b/doc/plugins/contrib/getfield/discussion.mdwn @@ -19,6 +19,7 @@ Like you mentioned in [[ftemplate]] IIRC, it'll only work on the same page. If i >>>>> What about using {{pagename#fieldname}}? The meaning of the hash in URLs sort of fits with what is needed here (reference to a 'named' thing within the page) and it won't conflict with actual hash usages (unless we expect different named parts of pages to define different values for the same field ...) >>>>> -- [[Oblomov]] >>>>>> That's a good one too. --[[simonraven]] +>>>>>>> Done! I used {{$*pagename*#*fieldname*}} for the format. -- [[users/KathrynAndersen]] > I'm also working on a "report" plugin, which will basically apply a template like [[ftemplate]] does, but to a list of pages given from a pagespec, rather than the current page. -- cgit v1.2.3 From 1e0b724bac67d3f31bfb3620876937ec4291a326 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 31 Jan 2010 14:03:19 -0500 Subject: document that state variables are not available in the checkconfig hook --- doc/plugins/write.mdwn | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 45f083b42..082f0e38f 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -68,20 +68,21 @@ In roughly the order they are called. This allows for plugins to perform their own processing of command-line options and so add options to the ikiwiki command line. It's called during -command line processing, with @ARGV full of any options that ikiwiki was +command line processing, with `@ARGV` full of any options that ikiwiki was not able to process on its own. The function should process any options it -can, removing them from @ARGV, and probably recording the configuration -settings in %config. It should take care not to abort if it sees +can, removing them from `@ARGV`, and probably recording the configuration +settings in `%config`. It should take care not to abort if it sees an option it cannot process, and should just skip over those options and -leave them in @ARGV. +leave them in `@ARGV`. ### checkconfig hook(type => "checkconfig", id => "foo", call => \&checkconfig); This is useful if the plugin needs to check for or modify ikiwiki's -configuration. It's called early in the startup process. The -function is passed no values. It's ok for the function to call +configuration. It's called early in the startup process. `%config` +is populated at this point, but other state has not yet been loaded. +The function is passed no values. It's ok for the function to call `error()` if something isn't configured right. ### refresh -- cgit v1.2.3 From b384af237df92e787f84f845d0d2bc182f7775ff Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 6 Feb 2010 16:19:17 -0500 Subject: opendiscussion: This plugin will also now allow posting comments to otherwise locked-down sites. --- IkiWiki/Plugin/opendiscussion.pm | 1 + debian/changelog | 2 ++ doc/plugins/comments.mdwn | 4 ++-- doc/plugins/lockedit.mdwn | 11 +++-------- doc/plugins/opendiscussion.mdwn | 5 +++-- 5 files changed, 11 insertions(+), 12 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/opendiscussion.pm b/IkiWiki/Plugin/opendiscussion.pm index 4b91f5d83..5a455940b 100644 --- a/IkiWiki/Plugin/opendiscussion.pm +++ b/IkiWiki/Plugin/opendiscussion.pm @@ -25,6 +25,7 @@ sub canedit ($$) { my $session=shift; return "" if $page=~/(\/|^)\Q$config{discussionpage}\E$/i; + return "" if pagespec_match($page, "postcomment(*)"); return undef; } diff --git a/debian/changelog b/debian/changelog index b4acac633..a65592277 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,8 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low * Add link to userpage (or creation link) to top of preferences page. * auto-blog.setup: Lock all pages, so only admin can post to the blog by default. + * opendiscussion: This plugin will also now allow posting comments + to otherwise locked-down sites. -- Joey Hess Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/plugins/comments.mdwn b/doc/plugins/comments.mdwn index b6d4d252b..f933d32be 100644 --- a/doc/plugins/comments.mdwn +++ b/doc/plugins/comments.mdwn @@ -14,8 +14,8 @@ authorship should hopefully be unforgeable by CGI users. The intention is that on a non-wiki site (like a blog) you can lock all pages for admin-only access, then allow otherwise unprivileged (or perhaps even anonymous) users to comment on posts. See the documentation of the -[[lockedit]] and [[anonok]] pages for details on locking down a wiki so -users can only post comments. +[[opendiscussion]], [[lockedit]] and [[anonok]] pages for details on locking +down a wiki so readers can only post comments. Individual comments are stored as internal-use pages named something like `page/comment_1`, `page/comment_2`, etc. These pages internally use a diff --git a/doc/plugins/lockedit.mdwn b/doc/plugins/lockedit.mdwn index c8f64ea47..681163203 100644 --- a/doc/plugins/lockedit.mdwn +++ b/doc/plugins/lockedit.mdwn @@ -12,14 +12,9 @@ to lock. For example, you could choose to lock all pages created before 2006, or all pages that are linked to from the page named "locked". More usually though, you'll just list some names of pages to lock. -One handy thing to do if you're using ikiwiki for your blog is to lock -"* and !*/Discussion". This prevents others from adding to or modifying -posts in your blog, while still letting them comment via the Discussion -pages. - -Alternatively, if you're using the [[comments]] plugin, you can lock -"!postcomment(*)" to allow users to comment on pages, but not edit anything -else. +If you want to lock down a blog so only you can post to it, you can just +lock "*", and enable the [[opendiscussion]] plugin, so readers can still post +[[comments]]. Wiki administrators can always edit locked pages. The [[ikiwiki/PageSpec]] can specify that some pages are not locked for some users. For example, diff --git a/doc/plugins/opendiscussion.mdwn b/doc/plugins/opendiscussion.mdwn index b2ba68bf7..3b5ab4858 100644 --- a/doc/plugins/opendiscussion.mdwn +++ b/doc/plugins/opendiscussion.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=opendiscussion author="[[Joey]]"]] [[!tag type/auth]] -This plugin allows editing of Discussion pages by anonymous users who have -not logged into the wiki. +This plugin allows editing of Discussion pages, and posting of comments, +even when the [[lockedit]] plugin has been configured to otherwise prevent +editing. -- cgit v1.2.3 From 046095552ac231366d71a3c7a84bdc6d46662212 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Feb 2010 17:26:09 -0500 Subject: httpauth: When cgiauthurl is configured, httpauth can now be used alongside other authentication methods (like openid or anonok). Rather than always redirect to the cgiauthurl for authentication, there is now a button on the login form to use it. --- IkiWiki/Plugin/httpauth.pm | 35 +++++++++++++++++++++++++++++++---- IkiWiki/Plugin/openid.pm | 2 +- debian/changelog | 4 ++++ doc/bugs/anonok_vs._httpauth.mdwn | 2 ++ doc/plugins/httpauth.mdwn | 9 +++++---- 5 files changed, 43 insertions(+), 9 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm index a18f8ca54..d0d4da0b7 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -11,6 +11,8 @@ sub import { hook(type => "auth", id => "httpauth", call => \&auth); hook(type => "canedit", id => "httpauth", call => \&canedit, last => 1); + hook(type => "formbuilder_setup", id => "httpauth", + call => \&formbuilder_setup); } sub getsetup () { @@ -27,6 +29,14 @@ sub getsetup () { rebuild => 0, }, } + +sub redir_cgiauthurl ($$) { + my $cgi=shift; + my $params=shift; + + IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$params); + exit; +} sub auth ($$) { my $cgi=shift; @@ -43,14 +53,31 @@ sub canedit ($$$) { my $session=shift; if (! defined $cgi->remote_user() && defined $config{cgiauthurl}) { - return sub { - IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$cgi->query_string()); - exit; - }; + return sub { redir_cgiauthurl($cgi, $cgi->query_string()) }; } else { return undef; } } +sub formbuilder_setup (@) { + my %params=@_; + + my $form=$params{form}; + my $session=$params{session}; + my $cgi=$params{cgi}; + my $buttons=$params{buttons}; + + if ($form->title eq "signin" && + ! defined $cgi->remote_user() && defined $config{cgiauthurl}) { + my $button_text="Login with HTTP auth"; + push @$buttons, $button_text; + + if ($form->submitted && $form->submitted eq $button_text) { + redir_cgiauthurl($cgi, "do=postsignin"); + exit; + } + } +} + 1 diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index b60740c0e..382d8286f 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -56,7 +56,7 @@ sub formbuilder_setup (@) { # OpenID fieldset. $form->fieldsets("OpenID"); - $form->field( + $form->field( name => "openid_url", label => gettext("Log in with")." ".htmllink("", "", "ikiwiki/OpenID", noimageinline => 1), fieldset => "OpenID", diff --git a/debian/changelog b/debian/changelog index 358a5dc5c..3dd68558e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,6 +15,10 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low * Fix color and format plugins to appear in the websetup interface. * amazon_s3: Fix to support the EU S3 datacenter, which is more picky about attempts to create already existing buckets. + * httpauth: When cgiauthurl is configured, httpauth can now be used + alongside other authentication methods (like openid or anonok). Rather + than always redirect to the cgiauthurl for authentication, there is now + a button on the login form to use it. -- Joey Hess Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/bugs/anonok_vs._httpauth.mdwn b/doc/bugs/anonok_vs._httpauth.mdwn index b738e3b6c..bff37e18b 100644 --- a/doc/bugs/anonok_vs._httpauth.mdwn +++ b/doc/bugs/anonok_vs._httpauth.mdwn @@ -114,3 +114,5 @@ index 127c321..a18f8ca 100644 >> time that httpauth is redirecting to the cgiauthurl. As mentioned above, >> the only way to deal with that would be to add a link to the signin page >> that does the httpauth signin. --[[Joey]] + +>>> That's dealt with in final version. [[done]] --[[Joey]] diff --git a/doc/plugins/httpauth.mdwn b/doc/plugins/httpauth.mdwn index 77796a3d7..a7aac558b 100644 --- a/doc/plugins/httpauth.mdwn +++ b/doc/plugins/httpauth.mdwn @@ -14,10 +14,11 @@ signed into the wiki. This method is suitable only for private wikis. ## separate cgiauthurl To use httpauth for a wiki where the content is public, and where -the `ikiwiki.cgi` needs to be usable without authentication (for searching -and so on), you can configure a separate url that is used for -authentication, via the `cgiauthurl` option in the setup file. This -url will then be redirected to whenever authentication is needed. +the `ikiwiki.cgi` needs to be usable without authentication (for searching, +or logging in using other methods, and so on), you can configure a separate +url that is used for authentication, via the `cgiauthurl` option in the setup +file. This url will then be redirected to when a user chooses to log in using +httpauth. A typical setup is to make an `auth` subdirectory, and symlink `ikiwiki.cgi` into it. Then configure the web server to require authentication only for -- cgit v1.2.3 From e11876b7003c700fbc3717ca9c5af5aac3b72ac2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Feb 2010 18:25:10 -0500 Subject: httpauth: Add httpauth_pagespec setting that can be used to limit pages to only being edited via users authed with httpauth. --- IkiWiki.pm | 7 ++++- IkiWiki/Plugin/httpauth.pm | 75 +++++++++++++++++++++++++++++++++------------- debian/changelog | 2 ++ doc/plugins/httpauth.mdwn | 9 ++++++ 4 files changed, 72 insertions(+), 21 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 2a0132745..de7dbfc79 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -941,7 +941,12 @@ sub linkpage ($) { sub cgiurl (@) { my %params=@_; - return $config{cgiurl}."?". + my $cgiurl=$config{cgiurl}; + if (exists $params{cgiurl}) { + $cgiurl=$params{cgiurl}; + delete $params{cgiurl}; + } + return $cgiurl."?". join("&", map $_."=".uri_escape_utf8($params{$_}), keys %params); } diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm index d0d4da0b7..202ca1153 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -9,10 +9,10 @@ use IkiWiki 3.00; sub import { hook(type => "getsetup", id => "httpauth", call => \&getsetup); hook(type => "auth", id => "httpauth", call => \&auth); - hook(type => "canedit", id => "httpauth", call => \&canedit, - last => 1); hook(type => "formbuilder_setup", id => "httpauth", call => \&formbuilder_setup); + hook(type => "canedit", id => "httpauth", call => \&canedit); + hook(type => "pagetemplate", id => "httpauth", call => \&pagetemplate); } sub getsetup () { @@ -28,13 +28,20 @@ sub getsetup () { safe => 1, rebuild => 0, }, + httpauth_pagespec => { + type => "pagespec", + example => "!*/Discussion", + description => "PageSpec of pages where only httpauth will be used for authentication", + safe => 0, + rebuild => 0, + }, } -sub redir_cgiauthurl ($$) { +sub redir_cgiauthurl ($;@) { my $cgi=shift; - my $params=shift; - IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$params); + IkiWiki::redirect($cgi, + IkiWiki::cgiurl(cgiurl => $config{cgiauthurl}, @_)); exit; } @@ -47,19 +54,6 @@ sub auth ($$) { } } -sub canedit ($$$) { - my $page=shift; - my $cgi=shift; - my $session=shift; - - if (! defined $cgi->remote_user() && defined $config{cgiauthurl}) { - return sub { redir_cgiauthurl($cgi, $cgi->query_string()) }; - } - else { - return undef; - } -} - sub formbuilder_setup (@) { my %params=@_; @@ -74,10 +68,51 @@ sub formbuilder_setup (@) { push @$buttons, $button_text; if ($form->submitted && $form->submitted eq $button_text) { - redir_cgiauthurl($cgi, "do=postsignin"); - exit; + # bounce thru cgiauthurl and then back to + # the stored postsignin action + redir_cgiauthurl($cgi, do => "postsignin"); } } } +sub test_httpauth_pagespec ($) { + my $page=shift; + + return defined $config{httpauth_pagespec} && + length $config{httpauth_pagespec} && + defined $config{cgiauthurl} && + pagespec_match($page, $config{httpauth_pagespec}); +} + +sub canedit ($$$) { + my $page=shift; + my $cgi=shift; + my $session=shift; + + if (! defined $cgi->remote_user() && test_httpauth_pagespec($page)) { + return sub { + IkiWiki::redirect($cgi, + $config{cgiauthurl}.'?'.$cgi->query_string()); + exit; + }; + } + else { + return undef; + } +} + +sub pagetemplate (@_) { + my %params=@_; + my $template=$params{template}; + + if ($template->param("editurl") && + test_httpauth_pagespec($params{page})) { + # go directly to cgiauthurl when editing a page matching + # the pagespec + $template->param(editurl => IkiWiki::cgiurl( + cgiurl => $config{cgiauthurl}, + do => "edit", page => $params{page})); + } +} + 1 diff --git a/debian/changelog b/debian/changelog index 3dd68558e..14be7ec69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,8 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low alongside other authentication methods (like openid or anonok). Rather than always redirect to the cgiauthurl for authentication, there is now a button on the login form to use it. + * httpauth: Add httpauth_pagespec setting that can be used to limit + pages to only being edited via users authed with httpauth. -- Joey Hess Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/plugins/httpauth.mdwn b/doc/plugins/httpauth.mdwn index a7aac558b..0eda5554f 100644 --- a/doc/plugins/httpauth.mdwn +++ b/doc/plugins/httpauth.mdwn @@ -24,3 +24,12 @@ A typical setup is to make an `auth` subdirectory, and symlink `ikiwiki.cgi` into it. Then configure the web server to require authentication only for access to the `auth` subdirectory. Then `cgiauthurl` is pointed at this symlink. + +## using only httpauth for some pages + +If you want to only use httpauth for editing some pages, while allowing +other authentication methods to be used for other pages, you can +configure `httpauth_pagespec` in the setup file. This makes Edit +links on pages that match the [[ikiwiki/PageSpec]] automatically use +the `cgiauthurl`, and prevents matching pages from being edited by +users authentication via other methods. -- cgit v1.2.3 From a63929f6cc7778ffc4ba57d784cdf2206ec650c7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Feb 2010 22:24:15 -0500 Subject: Group related plugins into sections in the setup file, and drop unused rcs plugins from the setup file. --- IkiWiki/Plugin/anonok.pm | 1 + IkiWiki/Plugin/blogspam.pm | 1 + IkiWiki/Plugin/bzr.pm | 1 + IkiWiki/Plugin/conditional.pm | 1 + IkiWiki/Plugin/cvs.pm | 1 + IkiWiki/Plugin/darcs.pm | 1 + IkiWiki/Plugin/editpage.pm | 1 + IkiWiki/Plugin/git.pm | 1 + IkiWiki/Plugin/htmlscrubber.pm | 1 + IkiWiki/Plugin/httpauth.pm | 1 + IkiWiki/Plugin/inline.pm | 1 + IkiWiki/Plugin/link.pm | 1 + IkiWiki/Plugin/lockedit.pm | 1 + IkiWiki/Plugin/mdwn.pm | 1 + IkiWiki/Plugin/mercurial.pm | 1 + IkiWiki/Plugin/meta.pm | 1 + IkiWiki/Plugin/moderatedcomments.pm | 1 + IkiWiki/Plugin/monotone.pm | 1 + IkiWiki/Plugin/opendiscussion.pm | 1 + IkiWiki/Plugin/openid.pm | 1 + IkiWiki/Plugin/parentlinks.pm | 1 + IkiWiki/Plugin/passwordauth.pm | 1 + IkiWiki/Plugin/recentchanges.pm | 1 + IkiWiki/Plugin/signinedit.pm | 1 + IkiWiki/Plugin/svn.pm | 1 + IkiWiki/Plugin/tla.pm | 1 + IkiWiki/Setup.pm | 32 ++++++++++++++++++++++++++------ IkiWiki/Setup/Standard.pm | 8 ++++++++ debian/changelog | 2 ++ doc/plugins/write.mdwn | 13 ++++++++----- 30 files changed, 70 insertions(+), 11 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/anonok.pm b/IkiWiki/Plugin/anonok.pm index 243b98920..0e74cbfad 100644 --- a/IkiWiki/Plugin/anonok.pm +++ b/IkiWiki/Plugin/anonok.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, anonok_pagespec => { type => "pagespec", diff --git a/IkiWiki/Plugin/blogspam.pm b/IkiWiki/Plugin/blogspam.pm index 626c8ec42..c4e5cf390 100644 --- a/IkiWiki/Plugin/blogspam.pm +++ b/IkiWiki/Plugin/blogspam.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, blogspam_pagespec => { type => 'pagespec', diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 883007367..1ffdc2353 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -36,6 +36,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, bzr_wrapper => { type => "string", diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm index aad617812..beeddc672 100644 --- a/IkiWiki/Plugin/conditional.pm +++ b/IkiWiki/Plugin/conditional.pm @@ -16,6 +16,7 @@ sub getsetup { plugin => { safe => 1, rebuild => undef, + section => "core", }, } diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index f6db8bc98..26a3e9dd2 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -85,6 +85,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, cvsrepo => { type => "string", diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm index 0d68f27e5..1c9538e83 100644 --- a/IkiWiki/Plugin/darcs.pm +++ b/IkiWiki/Plugin/darcs.pm @@ -92,6 +92,7 @@ sub getsetup() { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, darcs_wrapper => { type => "string", diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 9211cca89..44fe5514a 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -17,6 +17,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "core", }, } diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 1eec6aee6..b02f4a5ed 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -68,6 +68,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, git_wrapper => { type => "string", diff --git a/IkiWiki/Plugin/htmlscrubber.pm b/IkiWiki/Plugin/htmlscrubber.pm index a249cdf7a..ee284a45c 100644 --- a/IkiWiki/Plugin/htmlscrubber.pm +++ b/IkiWiki/Plugin/htmlscrubber.pm @@ -40,6 +40,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "core", }, htmlscrubber_skip => { type => "pagespec", diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm index b2bb2701a..478f67446 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -20,6 +20,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, cgiauthurl => { type => "string", diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 401852513..44919e58c 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -49,6 +49,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "core", }, rss => { type => "boolean", diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm index 4c1add985..3838aec09 100644 --- a/IkiWiki/Plugin/link.pm +++ b/IkiWiki/Plugin/link.pm @@ -20,6 +20,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "core", }, } diff --git a/IkiWiki/Plugin/lockedit.pm b/IkiWiki/Plugin/lockedit.pm index 74ddbb153..1466e8337 100644 --- a/IkiWiki/Plugin/lockedit.pm +++ b/IkiWiki/Plugin/lockedit.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, locked_pages => { type => "pagespec", diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index 3de59ef3d..4ddf097ba 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "core", }, multimarkdown => { type => "boolean", diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index 11fdec529..ea00a3364 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -36,6 +36,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, mercurial_wrapper => { type => "string", diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 55c9ddbd1..5f046cb2a 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -20,6 +20,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "core", }, } diff --git a/IkiWiki/Plugin/moderatedcomments.pm b/IkiWiki/Plugin/moderatedcomments.pm index 2555927b7..afe1ceedf 100644 --- a/IkiWiki/Plugin/moderatedcomments.pm +++ b/IkiWiki/Plugin/moderatedcomments.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, moderate_users => { type => 'boolean', diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm index 9502804f1..c33cf7e3a 100644 --- a/IkiWiki/Plugin/monotone.pm +++ b/IkiWiki/Plugin/monotone.pm @@ -68,6 +68,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, mtn_wrapper => { type => "string", diff --git a/IkiWiki/Plugin/opendiscussion.pm b/IkiWiki/Plugin/opendiscussion.pm index 5a455940b..2805f60ef 100644 --- a/IkiWiki/Plugin/opendiscussion.pm +++ b/IkiWiki/Plugin/opendiscussion.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, } diff --git a/IkiWiki/Plugin/openid.pm b/IkiWiki/Plugin/openid.pm index 382d8286f..bb99446b4 100644 --- a/IkiWiki/Plugin/openid.pm +++ b/IkiWiki/Plugin/openid.pm @@ -26,6 +26,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, openidsignup => { type => "string", diff --git a/IkiWiki/Plugin/parentlinks.pm b/IkiWiki/Plugin/parentlinks.pm index e678a057d..728bbc399 100644 --- a/IkiWiki/Plugin/parentlinks.pm +++ b/IkiWiki/Plugin/parentlinks.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "core", }, } diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm index c07065b7d..4848b47bb 100644 --- a/IkiWiki/Plugin/passwordauth.pm +++ b/IkiWiki/Plugin/passwordauth.pm @@ -19,6 +19,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, account_creation_password => { type => "string", diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index 5c7b71aaa..04219b721 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -22,6 +22,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "core", }, recentchangespage => { type => "string", diff --git a/IkiWiki/Plugin/signinedit.pm b/IkiWiki/Plugin/signinedit.pm index 8b44a68f7..31160c02f 100644 --- a/IkiWiki/Plugin/signinedit.pm +++ b/IkiWiki/Plugin/signinedit.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "auth", }, } diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm index 06b987f51..7d27ec842 100644 --- a/IkiWiki/Plugin/svn.pm +++ b/IkiWiki/Plugin/svn.pm @@ -44,6 +44,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, svnrepo => { type => "string", diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm index f4b20a6ec..16d73b136 100644 --- a/IkiWiki/Plugin/tla.pm +++ b/IkiWiki/Plugin/tla.pm @@ -34,6 +34,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => undef, + section => "rcs", }, tla_wrapper => { type => "string", diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index 8a25ecc57..b21bd7bfe 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -77,7 +77,6 @@ sub merge ($) { sub getsetup () { # Gets all available setup data from all plugins. Returns an # ordered list of [plugin, setup] pairs. - my @ret; # disable logging to syslog while dumping, broken plugins may # whine when loaded @@ -85,27 +84,48 @@ sub getsetup () { $config{syslog}=undef; # Load all plugins, so that all setup options are available. - my @plugins=grep { $_ ne $config{rcs} } sort(IkiWiki::listplugins()); - unshift @plugins, $config{rcs} if $config{rcs}; # rcs plugin 1st + my @plugins=IkiWiki::listplugins(); foreach my $plugin (@plugins) { eval { IkiWiki::loadplugin($plugin) }; if (exists $IkiWiki::hooks{checkconfig}{$plugin}{call}) { my @s=eval { $IkiWiki::hooks{checkconfig}{$plugin}{call}->() }; } } - + + my %sections; foreach my $plugin (@plugins) { if (exists $IkiWiki::hooks{getsetup}{$plugin}{call}) { # use an array rather than a hash, to preserve order my @s=eval { $IkiWiki::hooks{getsetup}{$plugin}{call}->() }; next unless @s; - push @ret, [ $plugin, \@s ], + + # set default section value (note use of shared + # hashref between array and hash) + my %s=@s; + if (! exists $s{plugin} || ! $s{plugin}->{section}) { + $s{plugin}->{section}="misc"; + } + + # only the selected rcs plugin is included + if ($config{rcs} && $plugin eq $config{rcs}) { + $s{plugin}->{section}="core"; + } + elsif ($s{plugin}->{section} eq "rcs") { + next; + } + + push @{$sections{$s{plugin}->{section}}}, [ $plugin, \@s ]; } } $config{syslog}=$syslog; - return @ret; + return map { sort { $a->[0] cmp $b->[0] } @{$sections{$_}} } + sort { # core first, then alphabetical + ($b eq "core") <=> ($a eq "core") + || + $a cmp $b + } keys %sections; } sub dump ($) { diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index 951bcfc56..c99dbb620 100644 --- a/IkiWiki/Setup/Standard.pm +++ b/IkiWiki/Setup/Standard.pm @@ -90,10 +90,18 @@ sub gendump ($) { # disable logging to syslog while dumping $config{syslog}=undef; + my $curr_section; push @ret, dumpvalues(\%setup, IkiWiki::getsetup()); foreach my $pair (IkiWiki::Setup::getsetup()) { my $plugin=$pair->[0]; my $setup=$pair->[1]; + my %s=@{$setup}; + my $section=$s{plugin}->{section}; + if (! defined $curr_section || $curr_section ne $section) { + $curr_section=$section; + push @ret, "", "\t#", "\t# $section plugins", "\t#"; + } + my @values=dumpvalues(\%setup, @{$setup}); if (@values) { push @ret, "", "\t# $plugin plugin", @values; diff --git a/debian/changelog b/debian/changelog index d74abd0f9..f24a453c8 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,8 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low * httpauth: Add httpauth_pagespec setting that can be used to limit pages to only being edited via users authed with httpauth. * Allow globs to be used in user() pagespecs. + * Group related plugins into sections in the setup file, and drop + unused rcs plugins from the setup file. -- Joey Hess Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 082f0e38f..68454d56c 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -457,6 +457,12 @@ describing the option. There can also be an item named "plugin", which describes the plugin as a whole. For example: return + plugin => { + description => "description of this plugin", + safe => 1, + rebuild => 1, + section => "misc", + }, option_foo => { type => "boolean", description => "enable foo?", @@ -471,11 +477,6 @@ describes the plugin as a whole. For example: safe => 1, rebuild => 0, }, - plugin => { - description => "description of this plugin", - safe => 1, - rebuild => 1, - }, * `type` can be "boolean", "string", "integer", "pagespec", or "internal" (used for values that are not user-visible). The type is @@ -496,6 +497,8 @@ describes the plugin as a whole. For example: the plugin) will require a wiki rebuild, false if no rebuild is needed, and undef if a rebuild could be needed in some circumstances, but is not strictly required. +* `section` can optionally specify which section in the config file + the plugin fits in. ### genwrapper -- cgit v1.2.3 From 9cee2962e01ef0538cc8498951867a543f91b47d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 01:10:36 -0500 Subject: format plugin categorization --- IkiWiki/Plugin/creole.pm | 1 + IkiWiki/Plugin/highlight.pm | 1 + IkiWiki/Plugin/hnb.pm | 1 + IkiWiki/Plugin/html.pm | 1 + IkiWiki/Plugin/mdwn.pm | 2 +- IkiWiki/Plugin/otl.pm | 1 + IkiWiki/Plugin/po.pm | 3 ++- IkiWiki/Plugin/rawhtml.pm | 1 + IkiWiki/Plugin/textile.pm | 1 + IkiWiki/Plugin/txt.pm | 1 + IkiWiki/Plugin/wikitext.pm | 1 + doc/plugins/conditional.mdwn | 2 +- doc/plugins/format.mdwn | 2 +- doc/plugins/graphviz.mdwn | 2 +- doc/plugins/more.mdwn | 2 +- doc/plugins/shortcut.mdwn | 2 +- doc/plugins/table.mdwn | 2 +- doc/plugins/template.mdwn | 2 +- doc/plugins/typography.mdwn | 2 +- plugins/rst | 2 +- 20 files changed, 21 insertions(+), 11 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/creole.pm b/IkiWiki/Plugin/creole.pm index 425e71043..a1e4b31d3 100644 --- a/IkiWiki/Plugin/creole.pm +++ b/IkiWiki/Plugin/creole.pm @@ -17,6 +17,7 @@ sub getsetup { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/highlight.pm b/IkiWiki/Plugin/highlight.pm index 9bdde85ae..947fb692e 100644 --- a/IkiWiki/Plugin/highlight.pm +++ b/IkiWiki/Plugin/highlight.pm @@ -23,6 +23,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, tohighlight => { type => "string", diff --git a/IkiWiki/Plugin/hnb.pm b/IkiWiki/Plugin/hnb.pm index bd2177a06..32c9cf3ad 100644 --- a/IkiWiki/Plugin/hnb.pm +++ b/IkiWiki/Plugin/hnb.pm @@ -23,6 +23,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/html.pm b/IkiWiki/Plugin/html.pm index a7d5e8ce9..4dbae081b 100644 --- a/IkiWiki/Plugin/html.pm +++ b/IkiWiki/Plugin/html.pm @@ -21,6 +21,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/mdwn.pm b/IkiWiki/Plugin/mdwn.pm index 4ddf097ba..b892eabee 100644 --- a/IkiWiki/Plugin/mdwn.pm +++ b/IkiWiki/Plugin/mdwn.pm @@ -16,7 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin - section => "core", + section => "format", }, multimarkdown => { type => "boolean", diff --git a/IkiWiki/Plugin/otl.pm b/IkiWiki/Plugin/otl.pm index 3ab2441bf..3801a6ec2 100644 --- a/IkiWiki/Plugin/otl.pm +++ b/IkiWiki/Plugin/otl.pm @@ -17,6 +17,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index f8801185e..2cbfb0a45 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -85,7 +85,8 @@ sub getsetup () { return plugin => { safe => 0, - rebuild => 1, + rebuild => 1, # format plugin + section => "format", }, po_master_language => { type => "string", diff --git a/IkiWiki/Plugin/rawhtml.pm b/IkiWiki/Plugin/rawhtml.pm index ad8a610c1..0838bcb22 100644 --- a/IkiWiki/Plugin/rawhtml.pm +++ b/IkiWiki/Plugin/rawhtml.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # changes file types + section => "format", }, } diff --git a/IkiWiki/Plugin/textile.pm b/IkiWiki/Plugin/textile.pm index 8cc5a7951..56bb4bffc 100644 --- a/IkiWiki/Plugin/textile.pm +++ b/IkiWiki/Plugin/textile.pm @@ -19,6 +19,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/txt.pm b/IkiWiki/Plugin/txt.pm index 8599bdc8e..1ed9f0856 100644 --- a/IkiWiki/Plugin/txt.pm +++ b/IkiWiki/Plugin/txt.pm @@ -29,6 +29,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, # format plugin + section => "format", }, } diff --git a/IkiWiki/Plugin/wikitext.pm b/IkiWiki/Plugin/wikitext.pm index accb03bbe..b24630b15 100644 --- a/IkiWiki/Plugin/wikitext.pm +++ b/IkiWiki/Plugin/wikitext.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 0, # format plugin rebuild => undef, + section => "format", }, } diff --git a/doc/plugins/conditional.mdwn b/doc/plugins/conditional.mdwn index 95ffb2764..27a99bb7c 100644 --- a/doc/plugins/conditional.mdwn +++ b/doc/plugins/conditional.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=conditional core=1 author="[[Joey]]"]] -[[!tag type/format]] +[[!tag type/special-purpose]] This plugin provides the [[ikiwiki/directive/if]] [[ikiwiki/directive]]. With this directive, you can make text be conditionally displayed on a page. diff --git a/doc/plugins/format.mdwn b/doc/plugins/format.mdwn index 91e707fcf..5ec0842ae 100644 --- a/doc/plugins/format.mdwn +++ b/doc/plugins/format.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=format core=0 author="[[Joey]]"]] -[[!tag type/format]] +[[!tag type/useful]] This plugin allows mixing different page formats together, by embedding text formatted one way inside a page formatted another way. This is done diff --git a/doc/plugins/graphviz.mdwn b/doc/plugins/graphviz.mdwn index b89f16b59..8237ae9dc 100644 --- a/doc/plugins/graphviz.mdwn +++ b/doc/plugins/graphviz.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=graphviz author="[[JoshTriplett]]"]] -[[!tag type/chrome type/format]] +[[!tag type/chrome]] This plugin provides the [[ikiwiki/directive/graph]] [[ikiwiki/directive]]. This directive allows embedding [graphviz](http://www.graphviz.org/) graphs in a diff --git a/doc/plugins/more.mdwn b/doc/plugins/more.mdwn index e9a971289..81a9e67e8 100644 --- a/doc/plugins/more.mdwn +++ b/doc/plugins/more.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=more author="Ben"]] -[[!tag type/format]] +[[!tag type/chrome]] This plugin provides the [[ikiwiki/directive/more]] [[ikiwiki/directive]], which is a way to have a "more" link on a post in a blog, that leads to the diff --git a/doc/plugins/shortcut.mdwn b/doc/plugins/shortcut.mdwn index cca1f4bdd..68896f4d3 100644 --- a/doc/plugins/shortcut.mdwn +++ b/doc/plugins/shortcut.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=shortcut author="[[Joey]]"]] -[[!tag type/format]] +[[!tag type/useful]] This plugin provides the [[ikiwiki/directive/shortcut]] [[ikiwiki/directive]]. It allows external links to commonly linked to sites to be made diff --git a/doc/plugins/table.mdwn b/doc/plugins/table.mdwn index 10a85bb2c..fb830044f 100644 --- a/doc/plugins/table.mdwn +++ b/doc/plugins/table.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=table author="[[VictorMoral]]"]] -[[!tag type/format]] +[[!tag type/useful]] This plugin provides the [[ikiwiki/directive/table]] [[ikiwiki/directive]]. It can build HTML tables from data in CSV (comma-separated values) diff --git a/doc/plugins/template.mdwn b/doc/plugins/template.mdwn index 3485fe64c..6675207b2 100644 --- a/doc/plugins/template.mdwn +++ b/doc/plugins/template.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=template author="[[Joey]]"]] -[[!tag type/format]] +[[!tag type/useful]] This plugin provides the [[ikiwiki/directive/template]] [[ikiwiki/directive]]. With this plugin, you can set up templates, and cause them to be filled out diff --git a/doc/plugins/typography.mdwn b/doc/plugins/typography.mdwn index 030ef8052..9ff6c4ffd 100644 --- a/doc/plugins/typography.mdwn +++ b/doc/plugins/typography.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=typography author="[[Roktas]]"]] -[[!tag type/format]] +[[!tag type/chrome]] This plugin, also known as [SmartyPants](http://daringfireball.net/projects/smartypants/), translates diff --git a/plugins/rst b/plugins/rst index 9f64b33a0..838667507 100755 --- a/plugins/rst +++ b/plugins/rst @@ -33,7 +33,7 @@ def _to_dict(args): return dict((k, v) for k, v in zip(*[iter(args)]*2)) def getsetup(proxy, *kwargs): - return 'plugin', { 'safe' : 1, 'rebuild' : 1 } + return 'plugin', { 'safe' : 1, 'rebuild' : 1, 'section' : 'format' } import sys def debug(s): -- cgit v1.2.3 From 04a99c84406d7b1552b15fc0b5ea598644f94c23 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 03:38:00 -0500 Subject: plugin tag reorg --- doc/plugins/404.mdwn | 2 +- doc/plugins/aggregate.mdwn | 2 +- doc/plugins/autoindex.mdwn | 2 +- doc/plugins/calendar.mdwn | 2 +- doc/plugins/color.mdwn | 2 +- doc/plugins/comments.mdwn | 2 +- doc/plugins/contrib/postal.mdwn | 2 +- doc/plugins/cutpaste.mdwn | 2 +- doc/plugins/ddate.mdwn | 1 + doc/plugins/filecheck.mdwn | 2 +- doc/plugins/format.mdwn | 2 +- doc/plugins/fortune.mdwn | 1 + doc/plugins/goto.mdwn | 2 +- doc/plugins/graphviz.mdwn | 2 +- doc/plugins/haiku.mdwn | 1 + doc/plugins/img.mdwn | 2 +- doc/plugins/mirrorlist.mdwn | 2 +- doc/plugins/more.mdwn | 2 +- doc/plugins/poll.mdwn | 2 +- doc/plugins/polygen.mdwn | 1 + doc/plugins/prettydate.mdwn | 1 + doc/plugins/relativedate.mdwn | 1 + doc/plugins/repolist.mdwn | 2 +- doc/plugins/shortcut.mdwn | 2 +- doc/plugins/sparkline.mdwn | 2 +- doc/plugins/table.mdwn | 2 +- doc/plugins/template.mdwn | 2 +- doc/plugins/testpagespec.mdwn | 2 +- doc/plugins/teximg.mdwn | 2 +- doc/plugins/toc.mdwn | 2 +- doc/plugins/toggle.mdwn | 2 +- doc/plugins/type/chrome.mdwn | 2 +- doc/plugins/type/useful.mdwn | 1 - doc/plugins/type/widget.mdwn | 2 ++ doc/plugins/underlay.mdwn | 18 +++++++++--------- doc/plugins/wmd.mdwn | 2 +- 36 files changed, 44 insertions(+), 37 deletions(-) delete mode 100644 doc/plugins/type/useful.mdwn create mode 100644 doc/plugins/type/widget.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/404.mdwn b/doc/plugins/404.mdwn index ad332ee04..53dace3c9 100644 --- a/doc/plugins/404.mdwn +++ b/doc/plugins/404.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=404 author="[[Simon_McVittie|smcv]]"]] -[[!tag type/useful]] +[[!tag type/web]] This plugin lets you use the IkiWiki CGI script as an Apache 404 handler, to give the behaviour of various other wiki engines where visiting a diff --git a/doc/plugins/aggregate.mdwn b/doc/plugins/aggregate.mdwn index e2efcd83f..bb828b05c 100644 --- a/doc/plugins/aggregate.mdwn +++ b/doc/plugins/aggregate.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=aggregate author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] This plugin allows content from other feeds to be aggregated into the wiki. To specify feeds to aggregate, use the diff --git a/doc/plugins/autoindex.mdwn b/doc/plugins/autoindex.mdwn index 03e2d12f3..d1133e4f5 100644 --- a/doc/plugins/autoindex.mdwn +++ b/doc/plugins/autoindex.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=autoindex core=0 author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] This plugin searches for [[SubPages|ikiwiki/subpage]] with a missing parent page, and generates the parent pages. The generated page content is diff --git a/doc/plugins/calendar.mdwn b/doc/plugins/calendar.mdwn index bc1bc6c71..49fd90627 100644 --- a/doc/plugins/calendar.mdwn +++ b/doc/plugins/calendar.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=calendar author="[[ManojSrivastava]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides a [[ikiwiki/directive/calendar]] [[ikiwiki/directive]]. The directive displays a calendar, similar to the typical calendars shown on diff --git a/doc/plugins/color.mdwn b/doc/plugins/color.mdwn index dbb8b870c..d639bf563 100644 --- a/doc/plugins/color.mdwn +++ b/doc/plugins/color.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=color core=0 author="[[ptecza]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides a [[ikiwiki/directive/color]] [[ikiwiki/directive]]. The directive can be used to color a piece of text on a page. diff --git a/doc/plugins/comments.mdwn b/doc/plugins/comments.mdwn index f933d32be..775ef75a0 100644 --- a/doc/plugins/comments.mdwn +++ b/doc/plugins/comments.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=comments author="[[Simon_McVittie|smcv]]"]] -[[!tag type/useful]] +[[!tag type/web]] This plugin adds "blog-style" comments. Unlike the wiki-style freeform Discussion pages, these comments are posted by a simple form, cannot later diff --git a/doc/plugins/contrib/postal.mdwn b/doc/plugins/contrib/postal.mdwn index b2f875393..c522f8bcb 100644 --- a/doc/plugins/contrib/postal.mdwn +++ b/doc/plugins/contrib/postal.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=postal author="[[DavidBremner]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] The `postal` plugin allows users to send mail to a special address to comment on a page. It uses the [[mailbox]] diff --git a/doc/plugins/cutpaste.mdwn b/doc/plugins/cutpaste.mdwn index f74f8a269..ea3665c44 100644 --- a/doc/plugins/cutpaste.mdwn +++ b/doc/plugins/cutpaste.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=cutpaste author="[[Enrico]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/cut]], [[ikiwiki/directive/copy]] and [[ikiwiki/directive/paste]] diff --git a/doc/plugins/ddate.mdwn b/doc/plugins/ddate.mdwn index 741606a6e..17bb16cff 100644 --- a/doc/plugins/ddate.mdwn +++ b/doc/plugins/ddate.mdwn @@ -1,6 +1,7 @@ [[!template id=plugin name=ddate author="[[Joey]]"]] [[!tag type/fun]] [[!tag type/date]] +[[!tag type/chrome]] Enables use of Discordian dates. `--timeformat` can be used to change the date format; see `ddate(1)`. diff --git a/doc/plugins/filecheck.mdwn b/doc/plugins/filecheck.mdwn index f4563d58e..e5f68b29c 100644 --- a/doc/plugins/filecheck.mdwn +++ b/doc/plugins/filecheck.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=filecheck core=0 author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] This plugin enhances the regular [[ikiwiki/PageSpec]] syntax with some additional tests, for things like file size, mime type, and virus diff --git a/doc/plugins/format.mdwn b/doc/plugins/format.mdwn index 5ec0842ae..b41d365aa 100644 --- a/doc/plugins/format.mdwn +++ b/doc/plugins/format.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=format core=0 author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/widget]] This plugin allows mixing different page formats together, by embedding text formatted one way inside a page formatted another way. This is done diff --git a/doc/plugins/fortune.mdwn b/doc/plugins/fortune.mdwn index 9966f456d..3cb125ac1 100644 --- a/doc/plugins/fortune.mdwn +++ b/doc/plugins/fortune.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=fortune author="[[Joey]]"]] [[!tag type/fun]] +[[!tag type/widget]] This plugin implements the [[ikiwiki/directive/fortune]] [[ikiwiki/directive]]. This directive uses the `fortune` program to insert a fortune into the page. diff --git a/doc/plugins/goto.mdwn b/doc/plugins/goto.mdwn index 9c401c5d2..8e1de7a10 100644 --- a/doc/plugins/goto.mdwn +++ b/doc/plugins/goto.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=goto author="[[Simon_McVittie|smcv]]"]] -[[!tag type/useful]] +[[!tag type/web]] This plugin adds a `do=goto` mode for the IkiWiki CGI script. It's mainly for internal use by the [[404]], [[comments]] and [[recentchanges]] diff --git a/doc/plugins/graphviz.mdwn b/doc/plugins/graphviz.mdwn index 8237ae9dc..65130ae8c 100644 --- a/doc/plugins/graphviz.mdwn +++ b/doc/plugins/graphviz.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=graphviz author="[[JoshTriplett]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/graph]] [[ikiwiki/directive]]. This directive allows embedding [graphviz](http://www.graphviz.org/) graphs in a diff --git a/doc/plugins/haiku.mdwn b/doc/plugins/haiku.mdwn index 74eac1c29..448733d95 100644 --- a/doc/plugins/haiku.mdwn +++ b/doc/plugins/haiku.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=haiku author="[[Joey]]"]] [[!tag type/fun]] +[[!tag type/widget]] This plugin provides a [[ikiwiki/directive/haiku]] [[ikiwiki/directive]]. The directive allows inserting a randomly generated haiku into a wiki page. diff --git a/doc/plugins/img.mdwn b/doc/plugins/img.mdwn index 114438765..a6cd90f28 100644 --- a/doc/plugins/img.mdwn +++ b/doc/plugins/img.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=img author="Christian Mock"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/img]] [[ikiwiki/directive]]. While ikiwiki supports inlining full-size images by making a diff --git a/doc/plugins/mirrorlist.mdwn b/doc/plugins/mirrorlist.mdwn index b371e8eb7..6e4964ed1 100644 --- a/doc/plugins/mirrorlist.mdwn +++ b/doc/plugins/mirrorlist.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=mirror author="[[Joey]]"]] -[[!tag type/special-purpose]] +[[!tag type/chrome]] This plugin allows adding links a list of mirrors to each page in the wiki. For each mirror, a name and an url should be specified. Pages are diff --git a/doc/plugins/more.mdwn b/doc/plugins/more.mdwn index 81a9e67e8..a0664e843 100644 --- a/doc/plugins/more.mdwn +++ b/doc/plugins/more.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=more author="Ben"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/more]] [[ikiwiki/directive]], which is a way to have a "more" link on a post in a blog, that leads to the diff --git a/doc/plugins/poll.mdwn b/doc/plugins/poll.mdwn index 510f67798..099cb399c 100644 --- a/doc/plugins/poll.mdwn +++ b/doc/plugins/poll.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=poll author="[[Joey]]"]] -[[!tag type/web]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/poll]] [[ikiwiki/directive]], which allows inserting an online poll into a page. diff --git a/doc/plugins/polygen.mdwn b/doc/plugins/polygen.mdwn index 6045c1ec9..f9cea1f4d 100644 --- a/doc/plugins/polygen.mdwn +++ b/doc/plugins/polygen.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=polygen author="Enrico Zini"]] [[!tag type/fun]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/polygen]] [[ikiwiki/directive]], which allows inserting text generated by polygen into a wiki page. diff --git a/doc/plugins/prettydate.mdwn b/doc/plugins/prettydate.mdwn index 11ad4252f..149b7c29c 100644 --- a/doc/plugins/prettydate.mdwn +++ b/doc/plugins/prettydate.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=prettydate author="[[Joey]]"]] [[!tag type/date]] +[[!tag type/chrome]] Enabling this plugin changes the dates displayed on pages in the wiki to a format that is nice and easy to read. Examples: "late Wednesday evening, diff --git a/doc/plugins/relativedate.mdwn b/doc/plugins/relativedate.mdwn index 50c96c5d7..d6e8eb08b 100644 --- a/doc/plugins/relativedate.mdwn +++ b/doc/plugins/relativedate.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=relativedate author="[[Joey]]"]] [[!tag type/date]] +[[!tag type/chrome]] This plugin lets dates be displayed in relative form. Examples: "2 days ago", "1 month and 3 days ago", "30 minutes ago". Hovering over the date will diff --git a/doc/plugins/repolist.mdwn b/doc/plugins/repolist.mdwn index 9b3a7575e..efd9c9352 100644 --- a/doc/plugins/repolist.mdwn +++ b/doc/plugins/repolist.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=repolist author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/web]] This plugin allows you to configure ikiwiki with the location of [[rcs]] repositories for your wiki's source. This is done via the diff --git a/doc/plugins/shortcut.mdwn b/doc/plugins/shortcut.mdwn index 68896f4d3..1e8e85ed8 100644 --- a/doc/plugins/shortcut.mdwn +++ b/doc/plugins/shortcut.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=shortcut author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/shortcut]] [[ikiwiki/directive]]. It allows external links to commonly linked to sites to be made diff --git a/doc/plugins/sparkline.mdwn b/doc/plugins/sparkline.mdwn index bcc5daec6..ee3928d7e 100644 --- a/doc/plugins/sparkline.mdwn +++ b/doc/plugins/sparkline.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=sparkline author="[[Joey]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/sparkline]] [[ikiwiki/directive]], which allows for easily embedding sparklines into diff --git a/doc/plugins/table.mdwn b/doc/plugins/table.mdwn index fb830044f..fe66f90a8 100644 --- a/doc/plugins/table.mdwn +++ b/doc/plugins/table.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=table author="[[VictorMoral]]"]] -[[!tag type/useful]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/table]] [[ikiwiki/directive]]. It can build HTML tables from data in CSV (comma-separated values) diff --git a/doc/plugins/template.mdwn b/doc/plugins/template.mdwn index 6675207b2..da775f232 100644 --- a/doc/plugins/template.mdwn +++ b/doc/plugins/template.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=template author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/template]] [[ikiwiki/directive]]. With this plugin, you can set up templates, and cause them to be filled out diff --git a/doc/plugins/testpagespec.mdwn b/doc/plugins/testpagespec.mdwn index dabcb0bec..8180d5d4b 100644 --- a/doc/plugins/testpagespec.mdwn +++ b/doc/plugins/testpagespec.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=testpagespec author="[[Joey]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] This plugin provides a [[ikiwiki/directive/testpagespec]] [[ikiwiki/directive]]. The directive allows testing a [[ikiwiki/PageSpec]] to see if it matches a diff --git a/doc/plugins/teximg.mdwn b/doc/plugins/teximg.mdwn index ae052837f..f3cade85f 100644 --- a/doc/plugins/teximg.mdwn +++ b/doc/plugins/teximg.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=teximg author="[[PatrickWinnertz]]"]] -[[!tag type/chrome type/slow]] +[[!tag type/widget type/slow]] This plugin provides a [[ikiwiki/directive/teximg]] [[ikiwiki/directive]], that renders LaTeX formulas into images. diff --git a/doc/plugins/toc.mdwn b/doc/plugins/toc.mdwn index 2b7686681..a0ad3a5d0 100644 --- a/doc/plugins/toc.mdwn +++ b/doc/plugins/toc.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=toc author="[[Joey]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/toc]] [[ikiwiki/directive]], which adds a table of contents to a page. diff --git a/doc/plugins/toggle.mdwn b/doc/plugins/toggle.mdwn index 69ac613e0..d1500eba0 100644 --- a/doc/plugins/toggle.mdwn +++ b/doc/plugins/toggle.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=toggle author="[[Joey]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/toggle]] and [[ikiwiki/directive/toggleable]] [[directives|ikiwiki/directive]]. diff --git a/doc/plugins/type/chrome.mdwn b/doc/plugins/type/chrome.mdwn index d3f0eb3d3..a1c6d0728 100644 --- a/doc/plugins/type/chrome.mdwn +++ b/doc/plugins/type/chrome.mdwn @@ -1 +1 @@ -These plugins affect the look and feel of the wiki. +These plugins affect the look and feel of the overall wiki. diff --git a/doc/plugins/type/useful.mdwn b/doc/plugins/type/useful.mdwn deleted file mode 100644 index 92fcf5af1..000000000 --- a/doc/plugins/type/useful.mdwn +++ /dev/null @@ -1 +0,0 @@ -These plugins perform various miscellaneous useful functions. diff --git a/doc/plugins/type/widget.mdwn b/doc/plugins/type/widget.mdwn new file mode 100644 index 000000000..875829d0b --- /dev/null +++ b/doc/plugins/type/widget.mdwn @@ -0,0 +1,2 @@ +These plugins allow inserting various things into pages via a +[[ikiwiki/directive]]. diff --git a/doc/plugins/underlay.mdwn b/doc/plugins/underlay.mdwn index f7eafee7c..8836a394c 100644 --- a/doc/plugins/underlay.mdwn +++ b/doc/plugins/underlay.mdwn @@ -1,17 +1,17 @@ [[!template id=plugin name=underlay author="[[Simon_McVittie|smcv]]"]] -[[!tag type/useful]] +[[!tag type/special-purpose]] -This plugin adds an `add_underlays` option to the setup file. -Its value is a list of underlay directories whose content is added to the wiki. +This plugin adds an `add_underlays` option to the setup file. Its value is +a list of underlay directories whose content is added to the wiki. Multiple underlays are normally set up automatically by other plugins (for -instance, the images used by the [[plugins/smiley]] plugin), but they can also be -used as a way to pull in external files that you don't want in revision control, -like photos or software releases. +instance, the images used by the [[plugins/smiley]] plugin), but they can +also be used as a way to pull in external files that you don't want in +revision control, like photos or software releases. -Directories in `add_underlays` should usually be absolute. If relative, they're -interpreted as relative to the parent directory of the basewiki underlay, which -is probably not particularly useful in this context. +Directories in `add_underlays` should usually be absolute. If relative, +they're interpreted as relative to the parent directory of the basewiki +underlay, which is probably not particularly useful in this context. -- diff --git a/doc/plugins/wmd.mdwn b/doc/plugins/wmd.mdwn index dc9a30703..96c6e2e6c 100644 --- a/doc/plugins/wmd.mdwn +++ b/doc/plugins/wmd.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=wmd author="[[Will]]"]] -[[!tag type/chrome]] +[[!tag type/web]] [WMD](http://wmd-editor.com/) is a What You See Is What You Mean editor for [[mdwn]]. This plugin makes WMD be used for editing pages in the wiki. -- cgit v1.2.3 From 3ce8030dafc40a8188f6a32567c04d157b0ac39f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 03:43:01 -0500 Subject: more tag reorg --- doc/plugins/date.mdwn | 2 +- doc/plugins/linkmap.mdwn | 1 + doc/plugins/listdirectives.mdwn | 1 + doc/plugins/orphans.mdwn | 1 + doc/plugins/pagecount.mdwn | 1 + doc/plugins/pagestats.mdwn | 2 +- doc/plugins/progress.mdwn | 2 +- doc/plugins/version.mdwn | 1 + 8 files changed, 8 insertions(+), 3 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/date.mdwn b/doc/plugins/date.mdwn index b8dbdfee5..2a33f014c 100644 --- a/doc/plugins/date.mdwn +++ b/doc/plugins/date.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=date author="[[Joey]]"]] -[[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/date]] [[ikiwiki/directive]], which provides a way to display an arbitrary date diff --git a/doc/plugins/linkmap.mdwn b/doc/plugins/linkmap.mdwn index 89cb9d8ae..7e51cd935 100644 --- a/doc/plugins/linkmap.mdwn +++ b/doc/plugins/linkmap.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=linkmap author="[[Joey]]"]] [[!tag type/meta]] +[[!tag type/widget]] [[!tag type/slow]] This plugin provides the [[ikiwiki/directive/linkmap]] [[ikiwiki/directive]]. diff --git a/doc/plugins/listdirectives.mdwn b/doc/plugins/listdirectives.mdwn index 2d9bce01d..df854de52 100644 --- a/doc/plugins/listdirectives.mdwn +++ b/doc/plugins/listdirectives.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=listdirectives author="Will"]] [[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/listdirectives]] [[ikiwiki/directive]], which inserts a list of currently available diff --git a/doc/plugins/orphans.mdwn b/doc/plugins/orphans.mdwn index e403c2d18..09ad0a51d 100644 --- a/doc/plugins/orphans.mdwn +++ b/doc/plugins/orphans.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=orphans author="[[Joey]]"]] [[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/orphans]] [[ikiwiki/directive]], which generates a list of possibly orphaned pages -- diff --git a/doc/plugins/pagecount.mdwn b/doc/plugins/pagecount.mdwn index a56027e60..71872fae8 100644 --- a/doc/plugins/pagecount.mdwn +++ b/doc/plugins/pagecount.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=pagecount author="[[Joey]]"]] [[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/pagecount]] [[ikiwiki/directive]], which displays the number of pages diff --git a/doc/plugins/pagestats.mdwn b/doc/plugins/pagestats.mdwn index c3eba6363..347e39a89 100644 --- a/doc/plugins/pagestats.mdwn +++ b/doc/plugins/pagestats.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=pagestats author="Enrico Zini"]] -[[!tag type/meta type/tags]] +[[!tag type/meta type/tags type/widget]] This plugin provides the [[ikiwiki/directive/pagestats]] [[ikiwiki/directive]], which can generate stats about how pages link to diff --git a/doc/plugins/progress.mdwn b/doc/plugins/progress.mdwn index e1b560cc8..20736d18c 100644 --- a/doc/plugins/progress.mdwn +++ b/doc/plugins/progress.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=progress author="[[Will]]"]] -[[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/progress]] [[ikiwiki/directive]], which generates a progress bar. diff --git a/doc/plugins/version.mdwn b/doc/plugins/version.mdwn index 43027bdd7..326a2e7ce 100644 --- a/doc/plugins/version.mdwn +++ b/doc/plugins/version.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=version author="[[Joey]]"]] [[!tag type/meta]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/version]] [[ikiwiki/directive]], which inserts the current version -- cgit v1.2.3 From 21b4f11cbb0796e858f95dcee2ff117fb4e10afe Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 03:47:21 -0500 Subject: more tag reorg --- doc/plugins/editpage.mdwn | 1 + doc/plugins/getsource.mdwn | 1 + doc/plugins/inline.mdwn | 1 + doc/plugins/mirrorlist.mdwn | 2 +- doc/plugins/parentlinks.mdwn | 2 +- doc/plugins/recentchanges.mdwn | 1 + doc/plugins/recentchangesdiff.mdwn | 1 + doc/plugins/rsync.mdwn | 1 + 8 files changed, 8 insertions(+), 2 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/editpage.mdwn b/doc/plugins/editpage.mdwn index b830e51aa..346ee7c78 100644 --- a/doc/plugins/editpage.mdwn +++ b/doc/plugins/editpage.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=editpage core=1 author="[[Joey]]"]] +[[!tag type/web]] This plugin allows editing wiki pages in the web interface. It's enabled by default if [[cgi]] is enabled; disable it if you want cgi for other things diff --git a/doc/plugins/getsource.mdwn b/doc/plugins/getsource.mdwn index 20040ccee..d5404a628 100644 --- a/doc/plugins/getsource.mdwn +++ b/doc/plugins/getsource.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=getsource author="[[Will_Uther|Will]]"]] +[[!tag type/web]] This plugin adds a "Source" link to the top of each page that uses the CGI to display the page's source. diff --git a/doc/plugins/inline.mdwn b/doc/plugins/inline.mdwn index 6c3282576..3eb849fdb 100644 --- a/doc/plugins/inline.mdwn +++ b/doc/plugins/inline.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=inline core=1 author="[[Joey]]"]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/inline]] [[ikiwiki/directive]], which allows including one wiki page diff --git a/doc/plugins/mirrorlist.mdwn b/doc/plugins/mirrorlist.mdwn index 6e4964ed1..aedc1f4a0 100644 --- a/doc/plugins/mirrorlist.mdwn +++ b/doc/plugins/mirrorlist.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=mirror author="[[Joey]]"]] -[[!tag type/chrome]] +[[!tag type/web]] This plugin allows adding links a list of mirrors to each page in the wiki. For each mirror, a name and an url should be specified. Pages are diff --git a/doc/plugins/parentlinks.mdwn b/doc/plugins/parentlinks.mdwn index ef262a30c..c2d364bef 100644 --- a/doc/plugins/parentlinks.mdwn +++ b/doc/plugins/parentlinks.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=parentlinks core=1 author="[[intrigeri]]"]] -[[!tag type/link]] +[[!tag type/link type/chrome]] This plugin generates the links to a page's parents that typically appear at the top of a wiki page. diff --git a/doc/plugins/recentchanges.mdwn b/doc/plugins/recentchanges.mdwn index 9375296a4..823f68502 100644 --- a/doc/plugins/recentchanges.mdwn +++ b/doc/plugins/recentchanges.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=recentchanges core=1 author="[[Joey]]"]] +[[!tag type/meta]] This plugin examines the [[revision_control_system|rcs]] history and generates a page describing each recent change made to the wiki. These diff --git a/doc/plugins/recentchangesdiff.mdwn b/doc/plugins/recentchangesdiff.mdwn index a7b113ade..57299f92d 100644 --- a/doc/plugins/recentchangesdiff.mdwn +++ b/doc/plugins/recentchangesdiff.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=recentchangesdiff core=0 author="[[Joey]]"]] +[[!tag type/meta]] This plugin extends the [[recentchanges]] plugin, adding a diff for each change. The diffs are by default hidden from display on the recentchanges diff --git a/doc/plugins/rsync.mdwn b/doc/plugins/rsync.mdwn index 315b663c0..e48886168 100644 --- a/doc/plugins/rsync.mdwn +++ b/doc/plugins/rsync.mdwn @@ -1,4 +1,5 @@ [[!template id=plugin name=rsync author="[[schmonz]]"]] +[[!tag type/special-purpose]] This plugin allows ikiwiki to push generated pages to another host by running a command such as `rsync`. -- cgit v1.2.3 From 1db0dd855ae49e4bb7b74e1158fc0356836d45a7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 03:56:56 -0500 Subject: one more --- doc/plugins/map.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/map.mdwn b/doc/plugins/map.mdwn index 8f5a9f15e..b164d5ca8 100644 --- a/doc/plugins/map.mdwn +++ b/doc/plugins/map.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=map author="Alessandro Dotti Contra"]] -[[!tag type/meta]] +[[!tag type/meta type/widget]] This plugin provides the [[ikiwiki/directive/map]] [[ikiwiki/directive]], which generates a hierarchical page map for the wiki. -- cgit v1.2.3 From a7eb434afd216e0b473ac82777544c9c45852792 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 04:10:11 -0500 Subject: another (last?) tag change --- doc/plugins/postsparkline.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/postsparkline.mdwn b/doc/plugins/postsparkline.mdwn index c81f91bdc..b0733e343 100644 --- a/doc/plugins/postsparkline.mdwn +++ b/doc/plugins/postsparkline.mdwn @@ -1,5 +1,5 @@ [[!template id=plugin name=postsparkline author="[[Joey]]"]] -[[!tag type/chrome]] +[[!tag type/widget]] This plugin provides the [[ikiwiki/directive/postsparkline]] [[ikiwiki/directive]]. It uses the [[sparkline]] plugin to create a sparkline of -- cgit v1.2.3 From 20ba12802b3897bf48d8a7704a57e9cede2466bd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 04:22:15 -0500 Subject: add section information --- IkiWiki/Plugin/404.pm | 1 + IkiWiki/Plugin/aggregate.pm | 1 + IkiWiki/Plugin/amazon_s3.pm | 1 + IkiWiki/Plugin/attachment.pm | 1 + IkiWiki/Plugin/autoindex.pm | 1 + IkiWiki/Plugin/comments.pm | 1 + IkiWiki/Plugin/editdiff.pm | 1 + IkiWiki/Plugin/edittemplate.pm | 1 + IkiWiki/Plugin/getsource.pm | 1 + IkiWiki/Plugin/google.pm | 1 + IkiWiki/Plugin/goto.pm | 1 + IkiWiki/Plugin/mirrorlist.pm | 1 + IkiWiki/Plugin/norcs.pm | 1 + IkiWiki/Plugin/pingee.pm | 1 + IkiWiki/Plugin/pinger.pm | 1 + IkiWiki/Plugin/remove.pm | 1 + IkiWiki/Plugin/rename.pm | 1 + IkiWiki/Plugin/repolist.pm | 1 + IkiWiki/Plugin/rsync.pm | 1 + IkiWiki/Plugin/search.pm | 1 + IkiWiki/Plugin/testpagespec.pm | 1 + IkiWiki/Plugin/underlay.pm | 1 + IkiWiki/Plugin/websetup.pm | 1 + IkiWiki/Plugin/wmd.pm | 2 ++ doc/plugins/write.mdwn | 3 ++- 25 files changed, 27 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/404.pm b/IkiWiki/Plugin/404.pm index 85486e559..8adfd5dd9 100644 --- a/IkiWiki/Plugin/404.pm +++ b/IkiWiki/Plugin/404.pm @@ -21,6 +21,7 @@ sub getsetup () { # server admin action too safe => 0, rebuild => 0, + section => "web", } } diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 5a9eb433d..c18d413e6 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -43,6 +43,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "special-purpose", }, aggregateinternal => { type => "boolean", diff --git a/IkiWiki/Plugin/amazon_s3.pm b/IkiWiki/Plugin/amazon_s3.pm index cfd8cd347..f2f4dbcf2 100644 --- a/IkiWiki/Plugin/amazon_s3.pm +++ b/IkiWiki/Plugin/amazon_s3.pm @@ -45,6 +45,7 @@ sub getsetup () { plugin => { safe => 0, rebuild => 0, + section => "special-purpose", }, amazon_s3_key_id => { type => "string", diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index cbe6efc21..ad1dd9bca 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -19,6 +19,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", }, allowed_attachments => { type => "pagespec", diff --git a/IkiWiki/Plugin/autoindex.pm b/IkiWiki/Plugin/autoindex.pm index 555856b11..e50464dca 100644 --- a/IkiWiki/Plugin/autoindex.pm +++ b/IkiWiki/Plugin/autoindex.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "special-purpose", }, } diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index caed0d58c..1e71749a4 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -38,6 +38,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, comments_pagespec => { type => 'pagespec', diff --git a/IkiWiki/Plugin/editdiff.pm b/IkiWiki/Plugin/editdiff.pm index 7df6a9ffb..d8f53a42e 100644 --- a/IkiWiki/Plugin/editdiff.pm +++ b/IkiWiki/Plugin/editdiff.pm @@ -19,6 +19,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", }, } diff --git a/IkiWiki/Plugin/edittemplate.pm b/IkiWiki/Plugin/edittemplate.pm index a163b0d84..5f0551d92 100644 --- a/IkiWiki/Plugin/edittemplate.pm +++ b/IkiWiki/Plugin/edittemplate.pm @@ -23,6 +23,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "web", }, } diff --git a/IkiWiki/Plugin/getsource.pm b/IkiWiki/Plugin/getsource.pm index d1555430e..b362de726 100644 --- a/IkiWiki/Plugin/getsource.pm +++ b/IkiWiki/Plugin/getsource.pm @@ -17,6 +17,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, getsource_mimetype => { type => "string", diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm index 483fa1707..48ad4c8ce 100644 --- a/IkiWiki/Plugin/google.pm +++ b/IkiWiki/Plugin/google.pm @@ -17,6 +17,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, } diff --git a/IkiWiki/Plugin/goto.pm b/IkiWiki/Plugin/goto.pm index 439552f62..03bd682b3 100644 --- a/IkiWiki/Plugin/goto.pm +++ b/IkiWiki/Plugin/goto.pm @@ -14,6 +14,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", } } diff --git a/IkiWiki/Plugin/mirrorlist.pm b/IkiWiki/Plugin/mirrorlist.pm index d0a6107ef..92be7913e 100644 --- a/IkiWiki/Plugin/mirrorlist.pm +++ b/IkiWiki/Plugin/mirrorlist.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, mirrorlist => { type => "string", diff --git a/IkiWiki/Plugin/norcs.pm b/IkiWiki/Plugin/norcs.pm index bfe84c0e1..e6a05a3c5 100644 --- a/IkiWiki/Plugin/norcs.pm +++ b/IkiWiki/Plugin/norcs.pm @@ -25,6 +25,7 @@ sub getsetup () { plugin => { safe => 0, # rcs plugin rebuild => 0, + section => "rcs", }, } diff --git a/IkiWiki/Plugin/pingee.pm b/IkiWiki/Plugin/pingee.pm index f5386d0ca..aafce9e70 100644 --- a/IkiWiki/Plugin/pingee.pm +++ b/IkiWiki/Plugin/pingee.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "special-purpose", }, } diff --git a/IkiWiki/Plugin/pinger.pm b/IkiWiki/Plugin/pinger.pm index c20ecb5d4..a797fc7bd 100644 --- a/IkiWiki/Plugin/pinger.pm +++ b/IkiWiki/Plugin/pinger.pm @@ -21,6 +21,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "special-purpose", }, pinger_timeout => { type => "integer", diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index 3c1e0c713..f59d0269e 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", }, } diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index 8213d21f6..3908443ca 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", }, } diff --git a/IkiWiki/Plugin/repolist.pm b/IkiWiki/Plugin/repolist.pm index f69ec3988..ba7c5f0aa 100644 --- a/IkiWiki/Plugin/repolist.pm +++ b/IkiWiki/Plugin/repolist.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "web", }, repositories => { type => "string", diff --git a/IkiWiki/Plugin/rsync.pm b/IkiWiki/Plugin/rsync.pm index e38801e4a..8dd983be7 100644 --- a/IkiWiki/Plugin/rsync.pm +++ b/IkiWiki/Plugin/rsync.pm @@ -16,6 +16,7 @@ sub getsetup () { plugin => { safe => 0, rebuild => 0, + section => "special-purpose", }, rsync_command => { type => "string", diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 393c17e0f..fb68396a1 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -20,6 +20,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 1, + section => "web", }, omega_cgi => { type => "string", diff --git a/IkiWiki/Plugin/testpagespec.pm b/IkiWiki/Plugin/testpagespec.pm index 440fca33b..17a77cb69 100644 --- a/IkiWiki/Plugin/testpagespec.pm +++ b/IkiWiki/Plugin/testpagespec.pm @@ -15,6 +15,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => undef, + section => "special-purpose", }, } diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 116fe7324..ab74fc37e 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 0, rebuild => undef, + section => "special-purpose", }, add_underlays => { type => "string", diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index 445552e40..5c19c9b63 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -18,6 +18,7 @@ sub getsetup () { plugin => { safe => 1, rebuild => 0, + section => "web", }, websetup_force_plugins => { type => "string", diff --git a/IkiWiki/Plugin/wmd.pm b/IkiWiki/Plugin/wmd.pm index 9ddd237ab..5361d2914 100644 --- a/IkiWiki/Plugin/wmd.pm +++ b/IkiWiki/Plugin/wmd.pm @@ -17,6 +17,8 @@ sub getsetup () { return plugin => { safe => 1, + rebuild => 0, + section => "web", }, } diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 68454d56c..fbaabb6a0 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -498,7 +498,8 @@ describes the plugin as a whole. For example: and undef if a rebuild could be needed in some circumstances, but is not strictly required. * `section` can optionally specify which section in the config file - the plugin fits in. + the plugin fits in. The convention is to name the sections the + same as the tags used for [[plugins|plugin]] on this wiki. ### genwrapper -- cgit v1.2.3 From 5d566d8b32e7ec260df996366b471631d6a3b47c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 14:38:43 -0500 Subject: reorg and expand docs of some variables --- doc/plugins/write.mdwn | 99 ++++++++++++++++++++++++++++---------------------- 1 file changed, 55 insertions(+), 44 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index fbaabb6a0..712dda8bf 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -31,7 +31,7 @@ they're the same as far as how they hook into ikiwiki. This document will explain how to write both sorts of plugins, albeit with an emphasis on perl plugins. -## Considerations +## Remember: Ikiwiki is a compiler One thing to keep in mind when writing a plugin is that ikiwiki is a wiki *compiler*. So plugins influence pages when they are built, not when they @@ -40,7 +40,23 @@ example, will insert the build time. Also, as a compiler, ikiwiki avoids rebuilding pages unless they have changed, so a plugin that prints some random or changing thing on a page will generate a static page that won't change until ikiwiki rebuilds the page for some other reason, like the page -being edited. +being edited. The [[tutorial]] has some other examples of ways that ikiwiki +being a compiler may trip up the unwary. + +## Plugin interface + +To import the ikiwiki plugin interface: + + use IkiWiki '3.00'; + +This will import several variables and functions into your plugin's +namespace. These variables and functions are the ones most plugins need, +and a special effort will be made to avoid changing them in incompatible +ways, and to document any changes that have to be made in the future. + +Note that IkiWiki also provides other variables and functions that are not +exported by default. No guarantee is made about these in the future, so if +it's not exported, the wise choice is to not use it. ## Registering plugins @@ -508,28 +524,17 @@ describes the plugin as a whole. For example: This hook is used to inject C code (which it returns) into the `main` function of the ikiwiki wrapper when it is being generated. -## Plugin interface - -To import the ikiwiki plugin interface: +### Exported variables - use IkiWiki '3.00'; +Several variables are exported to your plugin when you `use IkiWiki;` -This will import several variables and functions into your plugin's -namespace. These variables and functions are the ones most plugins need, -and a special effort will be made to avoid changing them in incompatible -ways, and to document any changes that have to be made in the future. - -Note that IkiWiki also provides other variables and functions that are not -exported by default. No guarantee is made about these in the future, so if -it's not exported, the wise choice is to not use it. - -### %config +#### %config A plugin can access the wiki's configuration via the `%config` hash. The best way to understand the contents of the hash is to look at your ikiwiki setup file, which sets the hash content to configure the wiki. -### %pagestate +#### %pagestate The `%pagestate` hash can be used by plugins to save state that they will need next time ikiwiki is run. The hash holds per-page state, so to set a value, @@ -547,7 +552,7 @@ When pages are deleted, ikiwiki automatically deletes their pagestate too. Note that page state does not persist across wiki rebuilds, only across wiki updates. -### %wikistate +#### %wikistate The `%wikistate` hash can be used by a plugin to store persistant state that is not bound to any one page. To set a value, use @@ -556,19 +561,25 @@ serialize, `$key` is any string you like, and `$id` must be the same as the "id" parameter passed to `hook()` when registering the plugin, so that the state can be dropped if the plugin is no longer used. -### Other variables +#### %links + +The `%links` hash can be used to look up the names of each page that +a page links to. The name of the page is the key; the value is an array +reference. Do not modify this hash directly; call `add_link()`. + +#### %destsources -If your plugin needs to access data about other pages in the wiki. It can -use the following hashes, using a page name as the key: +The `%destsources` hash records the name of the source file used to +create each destination file. The key is the output filename (ie, +"foo/index.html"), and the value is the source filename that it was built +from (eg, "foo.mdwn"). Note that a single source file may create multiple +destination files. Do not modify this hash directly; call `will_render()`. -* `%links` lists the names of each page that a page links to, in an array - reference. -* `%destsources` contains the name of the source file used to create each - destination file. -* `%pagesources` contains the name of the source file for each page. +#### %pagesources -Also, the `%IkiWiki::version` variable contains the version number for the -ikiwiki program. +The `%pagesources` has can be used to look up the source filename +of a page. So the key is the page name, and the value is the source +filename. Do not modify this hash. ### Library functions @@ -614,22 +625,6 @@ page created from it. (Ie, it appends ".html".) Use this when constructing the filename of a html file. Use `urlto` when generating a link to a page. -### `deptype(@)` - -Use this function to generate ikiwiki's internal representation of a -dependency type from one or more of these keywords: - -* `content` is the default. Any change to the content - of a page triggers the dependency. -* `presence` is only triggered by a change to the presence - of a page. -* `links` is only triggered by a change to the links of a page. - This includes when a link is added, removed, or changes what - it points to due to other changes. It does not include the - addition or removal of a duplicate link. - -If multiple types are specified, they are combined. - #### `pagespec_match_list($$;@)` Passed a page name, and [[ikiwiki/PageSpec]], returns a list of pages @@ -683,6 +678,22 @@ The most often used is "location", which specifies the location the PageSpec should match against. If not passed, relative PageSpecs will match relative to the top of the wiki. +#### `deptype(@)` + +Use this function to generate ikiwiki's internal representation of a +dependency type from one or more of these keywords: + +* `content` is the default. Any change to the content + of a page triggers the dependency. +* `presence` is only triggered by a change to the presence + of a page. +* `links` is only triggered by a change to the links of a page. + This includes when a link is added, removed, or changes what + it points to due to other changes. It does not include the + addition or removal of a duplicate link. + +If multiple types are specified, they are combined. + #### `bestlink($$)` Given a page and the text of a link on the page, determine which -- cgit v1.2.3 From b1c47b4065b245ccf46b99292d7de61800468237 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 14:41:28 -0500 Subject: heading tweaks --- doc/plugins/write.mdwn | 64 +++++++++++++++++++++++++------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 712dda8bf..17c54ffc7 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -524,17 +524,17 @@ describes the plugin as a whole. For example: This hook is used to inject C code (which it returns) into the `main` function of the ikiwiki wrapper when it is being generated. -### Exported variables +## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` -#### %config +### %config A plugin can access the wiki's configuration via the `%config` hash. The best way to understand the contents of the hash is to look at your ikiwiki setup file, which sets the hash content to configure the wiki. -#### %pagestate +### %pagestate The `%pagestate` hash can be used by plugins to save state that they will need next time ikiwiki is run. The hash holds per-page state, so to set a value, @@ -552,7 +552,7 @@ When pages are deleted, ikiwiki automatically deletes their pagestate too. Note that page state does not persist across wiki rebuilds, only across wiki updates. -#### %wikistate +### %wikistate The `%wikistate` hash can be used by a plugin to store persistant state that is not bound to any one page. To set a value, use @@ -561,13 +561,13 @@ serialize, `$key` is any string you like, and `$id` must be the same as the "id" parameter passed to `hook()` when registering the plugin, so that the state can be dropped if the plugin is no longer used. -#### %links +### %links The `%links` hash can be used to look up the names of each page that a page links to. The name of the page is the key; the value is an array reference. Do not modify this hash directly; call `add_link()`. -#### %destsources +### %destsources The `%destsources` hash records the name of the source file used to create each destination file. The key is the output filename (ie, @@ -575,15 +575,15 @@ create each destination file. The key is the output filename (ie, from (eg, "foo.mdwn"). Note that a single source file may create multiple destination files. Do not modify this hash directly; call `will_render()`. -#### %pagesources +### %pagesources The `%pagesources` has can be used to look up the source filename of a page. So the key is the page name, and the value is the source filename. Do not modify this hash. -### Library functions +## Library functions -#### `hook(@)` +### `hook(@)` Hook into ikiwiki's processing. See the discussion of hooks above. @@ -592,12 +592,12 @@ named `no_override` is supported, If it's set to a true value, then this hook will not override any existing hook with the same id. This is useful if the id can be controled by the user. -#### `debug($)` +### `debug($)` Logs a debugging message. These are supressed unless verbose mode is turned on. -#### `error($;$)` +### `error($;$)` Aborts with an error message. If the second parameter is passed, it is a function that is called after the error message is printed, to do any final @@ -611,13 +611,13 @@ In other hooks, error() is a fatal error, so use with care. Try to avoid dying on bad input when building a page, as that will halt the entire wiki build and make the wiki unusable. -#### `template($;@)` +### `template($;@)` Creates and returns a [[!cpan HTML::Template]] object. The first parameter is the name of the file in the template directory. The optional remaining parameters are passed to `HTML::Template->new`. -#### `htmlpage($)` +### `htmlpage($)` Passed a page name, returns the base name that will be used for a the html page created from it. (Ie, it appends ".html".) @@ -625,7 +625,7 @@ page created from it. (Ie, it appends ".html".) Use this when constructing the filename of a html file. Use `urlto` when generating a link to a page. -#### `pagespec_match_list($$;@)` +### `pagespec_match_list($$;@)` Passed a page name, and [[ikiwiki/PageSpec]], returns a list of pages in the wiki that match the [[ikiwiki/PageSpec]]. @@ -656,7 +656,7 @@ Additional named parameters can be specified: Any other named parameters are passed on to `pagespec_match`, to further limit the match. -#### `add_depends($$;$)` +### `add_depends($$;$)` Makes the specified page depend on the specified [[ikiwiki/PageSpec]]. @@ -678,7 +678,7 @@ The most often used is "location", which specifies the location the PageSpec should match against. If not passed, relative PageSpecs will match relative to the top of the wiki. -#### `deptype(@)` +### `deptype(@)` Use this function to generate ikiwiki's internal representation of a dependency type from one or more of these keywords: @@ -730,7 +730,7 @@ control some options. These are: * class - set to add a css class to the link * title - set to add a title attribute to the link -#### `readfile($;$)` +### `readfile($;$)` Given a filename, reads and returns the entire file. @@ -739,7 +739,7 @@ in binary mode. A failure to read the file will result in it dying with an error. -#### `writefile($$$;$$)` +### `writefile($$$;$$)` Given a filename, a directory to put it in, and the file's content, writes a file. @@ -767,7 +767,7 @@ generally the directory parameter is a trusted toplevel directory like the srcdir or destdir, and any subdirectories of this are included in the filename parameter. -#### `will_render($$)` +### `will_render($$)` Given a page name and a destination file name (not including the base destination directory), register that the page will result in that file @@ -783,34 +783,34 @@ Ikiwiki uses this information to automatically clean up rendered files when the page that rendered them goes away or is changed to no longer render them. will_render also does a few important security checks. -#### `pagetype($)` +### `pagetype($)` Given the name of a source file, returns the type of page it is, if it's a type that ikiwiki knowns how to htmlize. Otherwise, returns undef. -#### `pagename($)` +### `pagename($)` Given the name of a source file, returns the name of the wiki page that corresponds to that file. -#### `pagetitle($)` +### `pagetitle($)` Give the name of a wiki page, returns a version suitable to be displayed as the page's title. This is accomplished by de-escaping escaped characters in the page name. "_" is replaced with a space, and '__NN__' is replaced by the UTF character with code NN. -#### `titlepage($)` +### `titlepage($)` This performs the inverse of `pagetitle`, ie, it converts a page title into a wiki page name. -#### `linkpage($)` +### `linkpage($)` This converts text that could have been entered by the user as a [[ikiwiki/WikiLink]] into a wiki page name. -#### `srcfile($;$)` +### `srcfile($;$)` Given the name of a source file in the wiki, searches for the file in the source directory and the underlay directories (most recently added @@ -820,7 +820,7 @@ Normally srcfile will fail with an error message if the source file cannot be found. The second parameter can be set to a true value to make it return undef instead. -#### `add_underlay($)` +### `add_underlay($)` Adds a directory to the set of underlay directories that ikiwiki will search for files. @@ -828,18 +828,18 @@ search for files. If the directory name is not absolute, ikiwiki will assume it is in the parent directory of the configured underlaydir. -#### `displaytime($;$)` +### `displaytime($;$)` Given a time, formats it for display. The optional second parameter is a strftime format to use to format the time. -#### `gettext` +### `gettext` This is the standard gettext function, although slightly optimised. -#### `urlto($$;$)` +### `urlto($$;$)` Construct a relative url to the first parameter from the page named by the second. The first parameter can be either a page name, or some other @@ -848,13 +848,13 @@ destination file, as registered by `will_render`. If the third parameter is passed and is true, an absolute url will be constructed instead of the default relative url. -#### `newpagefile($$)` +### `newpagefile($$)` This can be called when creating a new page, to determine what filename to save the page to. It's passed a page name, and its type, and returns the name of the file to create, relative to the srcdir. -#### `targetpage($$;$)` +### `targetpage($$;$)` Passed a page and an extension, returns the filename that page will be rendered to. @@ -863,7 +863,7 @@ Optionally, a third parameter can be passed, to specify the preferred filename of the page. For example, `targetpage("foo", "rss", "feed")` will yield something like `foo/feed.rss`. -#### `add_link($$)` +### `add_link($$)` This adds a link to `%links`, ensuring that duplicate links are not added. Pass it the page that contains the link, and the link text. -- cgit v1.2.3 From ba19f940bd071f7065246594751dd49041cbbaba Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 14:44:26 -0500 Subject: move note to sidebox --- doc/plugins/write.mdwn | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 17c54ffc7..07bfd72ac 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -3,6 +3,20 @@ written to extend ikiwiki in many ways. Despite the length of this page, it's not really hard. This page is a complete reference to everything a plugin might want to do. There is also a quick [[tutorial]]. +[[!template type="note" text=""" +Ikiwiki is a compiler + +One thing to keep in mind when writing a plugin is that ikiwiki is a wiki +*compiler*. So plugins influence pages when they are built, not when they +are loaded. A plugin that inserts the current time into a page, for +example, will insert the build time. Also, as a compiler, ikiwiki avoids +rebuilding pages unless they have changed, so a plugin that prints some +random or changing thing on a page will generate a static page that won't +change until ikiwiki rebuilds the page for some other reason, like the page +being edited. The [[tutorial]] has some other examples of ways that ikiwiki +being a compiler may trip up the unwary. +"""]] + [[!toc levels=2]] ## Types of plugins @@ -31,18 +45,6 @@ they're the same as far as how they hook into ikiwiki. This document will explain how to write both sorts of plugins, albeit with an emphasis on perl plugins. -## Remember: Ikiwiki is a compiler - -One thing to keep in mind when writing a plugin is that ikiwiki is a wiki -*compiler*. So plugins influence pages when they are built, not when they -are loaded. A plugin that inserts the current time into a page, for -example, will insert the build time. Also, as a compiler, ikiwiki avoids -rebuilding pages unless they have changed, so a plugin that prints some -random or changing thing on a page will generate a static page that won't -change until ikiwiki rebuilds the page for some other reason, like the page -being edited. The [[tutorial]] has some other examples of ways that ikiwiki -being a compiler may trip up the unwary. - ## Plugin interface To import the ikiwiki plugin interface: -- cgit v1.2.3 From 60410369daef9ce990d516f0d538571db4623ceb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 14:48:22 -0500 Subject: add variable value examples --- doc/plugins/write.mdwn | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 07bfd72ac..f2b96b6d9 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -3,7 +3,7 @@ written to extend ikiwiki in many ways. Despite the length of this page, it's not really hard. This page is a complete reference to everything a plugin might want to do. There is also a quick [[tutorial]]. -[[!template type="note" text=""" +[[!template id="note" text=""" Ikiwiki is a compiler One thing to keep in mind when writing a plugin is that ikiwiki is a wiki @@ -569,6 +569,8 @@ The `%links` hash can be used to look up the names of each page that a page links to. The name of the page is the key; the value is an array reference. Do not modify this hash directly; call `add_link()`. + $links{"foo"} = ["bar", "baz"]; + ### %destsources The `%destsources` hash records the name of the source file used to @@ -576,6 +578,8 @@ create each destination file. The key is the output filename (ie, "foo/index.html"), and the value is the source filename that it was built from (eg, "foo.mdwn"). Note that a single source file may create multiple destination files. Do not modify this hash directly; call `will_render()`. + + $destsources{"foo/index.html"} = "foo.mdwn"; ### %pagesources @@ -583,6 +587,8 @@ The `%pagesources` has can be used to look up the source filename of a page. So the key is the page name, and the value is the source filename. Do not modify this hash. + $pagesources{"foo"} = "foo.mdwn"; + ## Library functions ### `hook(@)` -- cgit v1.2.3 From 4a7558539cd9d0f1ed5c586c29811035f7c14d14 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 15:38:07 -0500 Subject: add highlevel view of when hooks are called during compile and cgi phases --- doc/plugins/write.mdwn | 97 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 78 insertions(+), 19 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index f2b96b6d9..d94216e17 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -9,16 +9,73 @@ Ikiwiki is a compiler One thing to keep in mind when writing a plugin is that ikiwiki is a wiki *compiler*. So plugins influence pages when they are built, not when they are loaded. A plugin that inserts the current time into a page, for -example, will insert the build time. Also, as a compiler, ikiwiki avoids -rebuilding pages unless they have changed, so a plugin that prints some -random or changing thing on a page will generate a static page that won't -change until ikiwiki rebuilds the page for some other reason, like the page -being edited. The [[tutorial]] has some other examples of ways that ikiwiki -being a compiler may trip up the unwary. +example, will insert the build time. + +Also, as a compiler, ikiwiki avoids rebuilding pages unless they have +changed, so a plugin that prints some random or changing thing on a page +will generate a static page that won't change until ikiwiki rebuilds the +page for some other reason, like the page being edited. + +The [[tutorial]] has some other examples of ways that ikiwiki being a +compiler may trip up the unwary. """]] [[!toc levels=2]] +## Highlevel view of ikiwiki + +Ikiwiki mostly has two modes of operation. It can either be running +as a compiler, building or updating a wiki; or as a cgi program, providing +user interface for editing pages, etc. Almost everything ikiwiki does +is accomplished by calling various hooks provided by plugins. + +### compiler + +As a compiler, starts by calling the `refresh` hook. Then it checks +the wiki's source to find new or changed pages. The `needsbuild` hook is +then called to allow manipulation of the list of pages that need to be +built. + +Now that it knows what pages it needs to build, ikiwiki runs two +compile passes. First, it runs `scan` hooks, which collect metadata about +the pages. Then it runs a page rendering pipeline, by calling in turn these +hooks: `filter`, `preprocess`, `linkify`, `htmlize`, `postscan`, +`pagetemplate`, `sanitize`, `format`. + +After all necessary pages are built, it calls the `change` hook. Finally, +if a page is was deleted, the `delete` hook is called, and the files that +page had previously produced are removed. + +### cgi + +The flow between hooks when ikiwiki is run as a cgi is best illistrated by +an example. + +* *Alice browses to a page and clicks Edit.* +* Ikiwiki is run as a cgi. It assigns Alice a session cookie, and, + by calling the `auth` hooks, sees that she is not yet logged in. +* The `sessioncgi` hooks are then called, and one of them, + from the [[editpage]] plugin, notices that the cgi has been told "do=edit". +* The [[editpage]] plugin calls the `canedit` hook to check if this + page edit is allowed. The [[signinedit]] plugin has a hook that says not: + Alice is not signed in. +* The [[signinedit]] plugin then launches the signin process. A signin + page is built by calling the `formbuilder_setup` hook. +* *Alice signs in with her openid.* +* The [[openid]] plugin's `formbuilder` hook sees that an openid was + entered in the signin form, and redirects to Alice's openid provider. +* Alice's openid provider calls back to ikiwiki. The [[openid]] plugin + has an `auth` hook that finishes the openid signin process. +* Signin complete, ikiwiki returns to what Alice was doing before; editing + a page. +* Now all the `canedit` hooks are happy. The [[editpage]] plugin calls + `formbuilder_setup` to display the page editing form. +* *Alice saves her change to the page.* +* The [[editpage]] plugin's `formbuilder` hook sees that the Save button + was pressed, and calls the `checkcontent` and `editcontent` hooks. + Then it saves the page to disk, and branches into the compiler part + of ikiwiki to refresh the wiki. + ## Types of plugins Most ikiwiki [[plugins]] are written in perl, like ikiwiki. This gives the @@ -530,13 +587,13 @@ function of the ikiwiki wrapper when it is being generated. Several variables are exported to your plugin when you `use IkiWiki;` -### %config +### `%config` A plugin can access the wiki's configuration via the `%config` hash. The best way to understand the contents of the hash is to look at your ikiwiki setup file, which sets the hash content to configure the wiki. -### %pagestate +### `%pagestate` The `%pagestate` hash can be used by plugins to save state that they will need next time ikiwiki is run. The hash holds per-page state, so to set a value, @@ -554,7 +611,7 @@ When pages are deleted, ikiwiki automatically deletes their pagestate too. Note that page state does not persist across wiki rebuilds, only across wiki updates. -### %wikistate +### `%wikistate` The `%wikistate` hash can be used by a plugin to store persistant state that is not bound to any one page. To set a value, use @@ -563,7 +620,7 @@ serialize, `$key` is any string you like, and `$id` must be the same as the "id" parameter passed to `hook()` when registering the plugin, so that the state can be dropped if the plugin is no longer used. -### %links +### `%links` The `%links` hash can be used to look up the names of each page that a page links to. The name of the page is the key; the value is an array @@ -571,7 +628,15 @@ reference. Do not modify this hash directly; call `add_link()`. $links{"foo"} = ["bar", "baz"]; -### %destsources +### `%pagesources` + +The `%pagesources` has can be used to look up the source filename +of a page. So the key is the page name, and the value is the source +filename. Do not modify this hash. + + $pagesources{"foo"} = "foo.mdwn"; + +### `%destsources` The `%destsources` hash records the name of the source file used to create each destination file. The key is the output filename (ie, @@ -581,16 +646,10 @@ destination files. Do not modify this hash directly; call `will_render()`. $destsources{"foo/index.html"} = "foo.mdwn"; -### %pagesources - -The `%pagesources` has can be used to look up the source filename -of a page. So the key is the page name, and the value is the source -filename. Do not modify this hash. - - $pagesources{"foo"} = "foo.mdwn"; - ## Library functions +Several functions are exported to your plugin when you `use IkiWiki;` + ### `hook(@)` Hook into ikiwiki's processing. See the discussion of hooks above. -- cgit v1.2.3 From 7b07286a6f4a9903d5a346205b8eaaf93dbb9d0d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 15:41:19 -0500 Subject: layout --- doc/plugins/write.mdwn | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index d94216e17..4fd9c4369 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -31,7 +31,7 @@ is accomplished by calling various hooks provided by plugins. ### compiler -As a compiler, starts by calling the `refresh` hook. Then it checks +As a compiler, ikiwiki starts by calling the `refresh` hook. Then it checks the wiki's source to find new or changed pages. The `needsbuild` hook is then called to allow manipulation of the list of pages that need to be built. @@ -48,10 +48,11 @@ page had previously produced are removed. ### cgi -The flow between hooks when ikiwiki is run as a cgi is best illistrated by +The flow between hooks when ikiwiki is run as a cgi is best illustrated by an example. -* *Alice browses to a page and clicks Edit.* +Alice browses to a page and clicks Edit. + * Ikiwiki is run as a cgi. It assigns Alice a session cookie, and, by calling the `auth` hooks, sees that she is not yet logged in. * The `sessioncgi` hooks are then called, and one of them, @@ -61,7 +62,9 @@ an example. Alice is not signed in. * The [[signinedit]] plugin then launches the signin process. A signin page is built by calling the `formbuilder_setup` hook. -* *Alice signs in with her openid.* + +Alice signs in with her openid. + * The [[openid]] plugin's `formbuilder` hook sees that an openid was entered in the signin form, and redirects to Alice's openid provider. * Alice's openid provider calls back to ikiwiki. The [[openid]] plugin @@ -70,7 +73,9 @@ an example. a page. * Now all the `canedit` hooks are happy. The [[editpage]] plugin calls `formbuilder_setup` to display the page editing form. -* *Alice saves her change to the page.* + +Alice saves her change to the page. + * The [[editpage]] plugin's `formbuilder` hook sees that the Save button was pressed, and calls the `checkcontent` and `editcontent` hooks. Then it saves the page to disk, and branches into the compiler part -- cgit v1.2.3 From f4c517110e1bc1ab9bf6e931073959cdcff1302b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 12 Feb 2010 15:52:03 -0500 Subject: formatting --- doc/plugins/write.mdwn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 4fd9c4369..a8c9de2d3 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -536,7 +536,7 @@ The data returned is a list of `%config` options, followed by a hash describing the option. There can also be an item named "plugin", which describes the plugin as a whole. For example: - return + return plugin => { description => "description of this plugin", safe => 1, @@ -736,7 +736,7 @@ By default, dependencies are full content dependencies, meaning that the page will be updated whenever anything matching the PageSpec is modified. This can be overridden by passing a `deptype` value as the third parameter. -#### `pagespec_match($$;@)` +### `pagespec_match($$;@)` Passed a page name, and [[ikiwiki/PageSpec]], returns a true value if the [[ikiwiki/PageSpec]] matches the page. @@ -766,7 +766,7 @@ dependency type from one or more of these keywords: If multiple types are specified, they are combined. -#### `bestlink($$)` +### `bestlink($$)` Given a page and the text of a link on the page, determine which existing page that link best points to. Prefers pages under a @@ -774,7 +774,7 @@ subdirectory with the same name as the source page, failing that goes down the directory tree to the base looking for matching pages, as described in [[ikiwiki/SubPage/LinkingRules]]. -#### `htmllink($$$;@)` +### `htmllink($$$;@)` Many plugins need to generate html links and add them to a page. This is done by using the `htmllink` function. The usual way to call -- cgit v1.2.3 From f1183cbf0c9c09725192dcc8384381f9112ae222 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Feb 2010 17:25:30 -0500 Subject: add ngettext support & optimize gettext handling As I was adding ngettext support, I realized I could optimize the gettext functions by memoizing the creation of the gettext object. Note that the object creation is still deferred until a gettext function is called, to avoid unnecessary startup penalties on code paths that do not need gettext. A side benefit is that separate stub functions are no longer needed to handle the C language case. --- IkiWiki.pm | 44 ++++++++++++++++++++++++++++++-------------- doc/plugins/write.mdwn | 4 ++++ 2 files changed, 34 insertions(+), 14 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index a96ff1236..b9a419d1d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -20,7 +20,7 @@ use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype add_depends pagespec_match pagespec_match_list bestlink htmllink readfile writefile pagetype srcfile pagename - displaytime will_render gettext urlto targetpage + displaytime will_render gettext ngettext urlto targetpage add_underlay pagetitle titlepage linkpage newpagefile inject add_link %config %links %pagestate %wikistate %renderedfiles @@ -1820,27 +1820,38 @@ sub file_pruned ($;$) { sub define_gettext () { # If translation is needed, redefine the gettext function to do it. # Otherwise, it becomes a quick no-op. - no warnings 'redefine'; + my $gettext_obj; + my $getobj; if ((exists $ENV{LANG} && length $ENV{LANG}) || (exists $ENV{LC_ALL} && length $ENV{LC_ALL}) || (exists $ENV{LC_MESSAGES} && length $ENV{LC_MESSAGES})) { - *gettext=sub { - my $gettext_obj=eval q{ + $getobj=sub { + $gettext_obj=eval q{ use Locale::gettext q{textdomain}; Locale::gettext->domain('ikiwiki') }; - - if ($gettext_obj) { - $gettext_obj->get(shift); - } - else { - return shift; - } }; } - else { - *gettext=sub { return shift }; - } + + no warnings 'redefine'; + *gettext=sub { + $getobj->() if $getobj; + if ($gettext_obj) { + $gettext_obj->get(shift); + } + else { + return shift; + } + }; + *ngettext=sub { + $getobj->() if $getobj; + if ($gettext_obj) { + $gettext_obj->nget(@_); + } + else { + return ($_[2] == 1 ? $_[0] : $_[1]) + } + }; } sub gettext { @@ -1848,6 +1859,11 @@ sub gettext { gettext(@_); } +sub ngettext { + define_gettext(); + ngettext(@_); +} + sub yesno ($) { my $val=shift; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index a8c9de2d3..96a2aa16d 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -911,6 +911,10 @@ time. This is the standard gettext function, although slightly optimised. +### `ngettext` + +This is the standard ngettext function, although slightly optimised. + ### `urlto($$;$)` Construct a relative url to the first parameter from the page named by the -- cgit v1.2.3 From 4be426ab1ad01a2a90151d741f737d41a12a6cbe Mon Sep 17 00:00:00 2001 From: Jon Dowland Date: Mon, 1 Mar 2010 10:28:59 +0000 Subject: wl from report to field plugin pages --- doc/plugins/contrib/report.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/report.mdwn b/doc/plugins/contrib/report.mdwn index 7130bcb5f..e8cbd0486 100644 --- a/doc/plugins/contrib/report.mdwn +++ b/doc/plugins/contrib/report.mdwn @@ -18,7 +18,7 @@ IkiWiki::Plugin::report - Produce templated reports from page field data. This plugin provides the **report** directive. This enables one to report on the structured data ("field" values) of multiple pages; the output is formatted -via a template. This depends on the "field" plugin. +via a template. This depends on the [[plugins/contrib/field]] plugin. The pages to report on are selected by a PageSpec given by the "pages" parameter. The template is given by the "template" parameter. -- cgit v1.2.3 From 0284ccf5eb6163d4fe49ac829a1f976336bc5908 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Mon, 1 Mar 2010 14:43:55 +0000 Subject: fixed typo --- doc/plugins/contrib/report.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/report.mdwn b/doc/plugins/contrib/report.mdwn index e8cbd0486..c364d4a3a 100644 --- a/doc/plugins/contrib/report.mdwn +++ b/doc/plugins/contrib/report.mdwn @@ -89,7 +89,7 @@ The "mood_summary" template might be like this: ## ### - () \[[) \[[]] ### Advanced Options -- cgit v1.2.3 From fe571e959007e7e4f895869c980b474f5ee6e995 Mon Sep 17 00:00:00 2001 From: "http://liw.fi/" Date: Mon, 1 Mar 2010 21:12:48 +0000 Subject: --- doc/plugins/rename.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/rename.mdwn b/doc/plugins/rename.mdwn index ddaede8b0..abb361329 100644 --- a/doc/plugins/rename.mdwn +++ b/doc/plugins/rename.mdwn @@ -2,7 +2,8 @@ [[!tag type/web]] This plugin allows pages or other files to be renamed using the web -interface. +interface. Following Unix tradition, renaming also allows moving to a +different directory. Users can only rename things that they are allowed to edit or upload. -- cgit v1.2.3 From 837b04759c0895d6341a6a51fc05be1c3e5ef2ca Mon Sep 17 00:00:00 2001 From: Thiana Date: Mon, 1 Mar 2010 21:17:09 +0000 Subject: --- doc/plugins/creole/discussion.mdwn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/creole/discussion.mdwn b/doc/plugins/creole/discussion.mdwn index 38ee2bd78..eab41349a 100644 --- a/doc/plugins/creole/discussion.mdwn +++ b/doc/plugins/creole/discussion.mdwn @@ -12,4 +12,9 @@ I've installed Text::WikiCreole 0.05 and enabled the plugin, but I get an error >>> forgot, done now --[[Joey]] +--- +## External Links + I'm moving over a really stinkingly old UseMod and creole seems the nearest match. I've worked out that Bare /Subpage links need to become \[\[Subpage\]\], and Top/Sub links need to be \[\[Top/Sub\]\] (or \[\[Top/Sub|Top/Sub\]\], to display in exactly the same way), but I'm stuck on generic hyperlinks. The creole cheat sheet says I should be able to do \[\[http://url.path/foo|LinkText\]\], but that comes out as a link to create the "linktext" page, and Markdown-style \[Link Text\](http://url.path/foo) just gets rendered as is. Any suggestions? --[[schmonz]] + +> Was this problem ever solved? -- Thiana -- cgit v1.2.3 From 159471c92359c2da77bd0025f1718acbe7ff2a0c Mon Sep 17 00:00:00 2001 From: "http://www.google.com/profiles/schmonz" Date: Mon, 1 Mar 2010 21:23:00 +0000 Subject: response --- doc/plugins/creole/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/creole/discussion.mdwn b/doc/plugins/creole/discussion.mdwn index eab41349a..7f47c2c97 100644 --- a/doc/plugins/creole/discussion.mdwn +++ b/doc/plugins/creole/discussion.mdwn @@ -18,3 +18,5 @@ I've installed Text::WikiCreole 0.05 and enabled the plugin, but I get an error I'm moving over a really stinkingly old UseMod and creole seems the nearest match. I've worked out that Bare /Subpage links need to become \[\[Subpage\]\], and Top/Sub links need to be \[\[Top/Sub\]\] (or \[\[Top/Sub|Top/Sub\]\], to display in exactly the same way), but I'm stuck on generic hyperlinks. The creole cheat sheet says I should be able to do \[\[http://url.path/foo|LinkText\]\], but that comes out as a link to create the "linktext" page, and Markdown-style \[Link Text\](http://url.path/foo) just gets rendered as is. Any suggestions? --[[schmonz]] > Was this problem ever solved? -- Thiana + +>> Not by me. If I were looking at the problem now, with fresh eyes, I'd probably bite the bullet and just convert everything to Markdown. --[[schmonz]] -- cgit v1.2.3 From 9d6a755d3983d1d7cd1c67c923c8907e09108a70 Mon Sep 17 00:00:00 2001 From: Thiana Date: Tue, 9 Mar 2010 00:50:45 +0000 Subject: --- doc/plugins/conditional/discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/conditional/discussion.mdwn b/doc/plugins/conditional/discussion.mdwn index 629d05940..e34df70a1 100644 --- a/doc/plugins/conditional/discussion.mdwn +++ b/doc/plugins/conditional/discussion.mdwn @@ -1,3 +1,11 @@ +## Conditional broken? + +Using \[\[!if test="tagged(plugin)" then="= Tagged as plugin =" else="*No plugins found*"]] on this wiki *should* present the 'Tagged as plugin' heading, instead it emits 'no plugins found'. Is the conditional plugin currently broken for tags or am I misusing it? Thanks. + +-- Thiana + +---- + Would there be a way for this plugin to emit fewer blank lines (i.e. *none at all*)? For example, having a look at [this page](http://www.bddebian.com/~wiki/Hurd/)'s sidebar. -- cgit v1.2.3 From 376d0dc9b76a384bc505b4ebc8c70dde4134c220 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 8 Mar 2010 20:27:30 -0500 Subject: response --- doc/plugins/conditional/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/conditional/discussion.mdwn b/doc/plugins/conditional/discussion.mdwn index e34df70a1..09e3df923 100644 --- a/doc/plugins/conditional/discussion.mdwn +++ b/doc/plugins/conditional/discussion.mdwn @@ -4,6 +4,10 @@ Using \[\[!if test="tagged(plugin)" then="= Tagged as plugin =" else="*No plugin -- Thiana +> This wiki has no page named "plugin", so nothing links to it; tags are a species of link +> so tagging a large number of pages with a tag that doesn't exist (which change has +> been reverted) doesn't make the pagespec match. It would if the tag's page existed. --[[Joey]] + ---- Would there be a way for this plugin to emit fewer blank lines (i.e. *none at all*)? -- cgit v1.2.3 From 20635d3610619814e3c36bec913d53cb83d41640 Mon Sep 17 00:00:00 2001 From: Thiana Date: Tue, 9 Mar 2010 03:55:28 +0000 Subject: Clarification request --- doc/plugins/conditional/discussion.mdwn | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/conditional/discussion.mdwn b/doc/plugins/conditional/discussion.mdwn index 09e3df923..6e84fdfc1 100644 --- a/doc/plugins/conditional/discussion.mdwn +++ b/doc/plugins/conditional/discussion.mdwn @@ -8,6 +8,19 @@ Using \[\[!if test="tagged(plugin)" then="= Tagged as plugin =" else="*No plugin > so tagging a large number of pages with a tag that doesn't exist (which change has > been reverted) doesn't make the pagespec match. It would if the tag's page existed. --[[Joey]] +>> So if I understand this correctly... Assuming the tags Tag_A and Tag_B, the existence of +>> @wiki-home@/tags/Tag_A.creole, and a number of files with a \[\[!tag Tag_A Tag_B]] the +>> following is correct? +>> +>> * \[\[!if test="tagged(Tag_A)" then="OK" else="Fail"]] => OK +>> * \[\[!if test="tagged(Tag_B)" then="OK" else="Fail"]] => Fail +>> * \[\[!if test="tagged(Tag_A) and tagged(Tag_B)" then="OK" else="Fail"]] => Fail +>> +>> Is that the expected behaviour? If so, that's not what I'm seeing here since they all result +>> in a Fail. If not, what exactly is wrong with those conditionals? Thanks. +>> +>> -- Thiana + ---- Would there be a way for this plugin to emit fewer blank lines (i.e. *none at all*)? -- cgit v1.2.3 From 03c2cf94e28ac8b90e92dbd18181d52f2338385c Mon Sep 17 00:00:00 2001 From: "http://adam.shand.net/" Date: Thu, 11 Mar 2010 05:32:00 +0000 Subject: --- doc/plugins/getsource/discussion.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/plugins/getsource/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/getsource/discussion.mdwn b/doc/plugins/getsource/discussion.mdwn new file mode 100644 index 000000000..45a1d62b5 --- /dev/null +++ b/doc/plugins/getsource/discussion.mdwn @@ -0,0 +1 @@ +It would be very cool if this plugin was enabled by default. One of the best ways to learn how to do various advanced things is to be able to "view source" on other wiki's which do things you like. -- [[AdamShand]] -- cgit v1.2.3 From ac3aac560f74457ded48ba3b5a14d0bbbf9b6d92 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Mar 2010 15:44:10 -0500 Subject: moderatedcomments: Added moderate_pagespec * moderatedcomments: Added moderate_pagespec that can be used to control which users or comment locations are moderated. This can be used, just for example, to moderate http://myopenid.com/* if you're getting a lot of spammers from one particular openid provider (who should perhaps answer your emails about them), while not moderating other users. * moderatedcomments: The moderate_users setting is deprecated. Instead, set moderate_pagespec to "!admin()" or "user(*)" instead. --- IkiWiki/Plugin/moderatedcomments.pm | 37 ++++++++++++++++++++++++++++--------- debian/changelog | 8 ++++++++ doc/plugins/moderatedcomments.mdwn | 8 +++++--- 3 files changed, 41 insertions(+), 12 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/moderatedcomments.pm b/IkiWiki/Plugin/moderatedcomments.pm index afe1ceedf..b0a328a06 100644 --- a/IkiWiki/Plugin/moderatedcomments.pm +++ b/IkiWiki/Plugin/moderatedcomments.pm @@ -17,10 +17,11 @@ sub getsetup () { rebuild => 0, section => "auth", }, - moderate_users => { - type => 'boolean', - example => 1, - description => 'Moderate comments of logged-in users?', + moderate_pagespec => { + type => 'pagespec', + example => 'user(http://*)', + description => 'PageSpec matching users or comment locations to moderate', + link => 'ikiwiki/PageSpec', safe => 1, rebuild => 0, }, @@ -32,14 +33,32 @@ sub checkcontent (@) { # only handle comments return undef unless pagespec_match($params{page}, "postcomment(*)", location => $params{page}); + + # backwards compatability + if (exists $config{moderate_users} && + ! exists $config{moderate_pagespec}) { + $config{moderate_pagespec} = $config{moderate_users} + ? "!admin()" + : "!user(*)"; + } + + # default is to moderate all except admins + if (! exists $config{moderate_pagespec}) { + $config{moderate_pagespec}="!admin()"; + } - # admins and maybe users can comment w/o moderation my $session=$params{session}; my $user=$session->param("name") if $session; - return undef if defined $user && (IkiWiki::is_admin($user) || - (exists $config{moderate_users} && ! $config{moderate_users})); - - return gettext("comment needs moderation"); + if (pagespec_match($params{page}, $config{moderate_pagespec}, + location => $params{page}, + (defined $user ? (user => $user) : ()), + (defined $ENV{REMOTE_ADDR} ? (ip => $ENV{REMOTE_ADDR}) : ()), + )) { + return gettext("comment needs moderation"); + } + else { + return undef; + } } 1 diff --git a/debian/changelog b/debian/changelog index d1253c079..c58e612db 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,14 @@ ikiwiki (3.20100303) UNRELEASED; urgency=low * Fix utf8 issues in calls to md5_hex. + * moderatedcomments: Added moderate_pagespec that can be used + to control which users or comment locations are moderated. + This can be used, just for example, to moderate http://myopenid.com/* + if you're getting a lot of spammers from one particular openid + provider (who should perhaps answer your emails about them), + while not moderating other users. + * moderatedcomments: The moderate_users setting is deprecated. Instead, + set moderate_pagespec to "!admin()" or "user(*)" instead. -- Joey Hess Tue, 09 Mar 2010 19:46:35 -0500 diff --git a/doc/plugins/moderatedcomments.mdwn b/doc/plugins/moderatedcomments.mdwn index 97924d742..c29b0b052 100644 --- a/doc/plugins/moderatedcomments.mdwn +++ b/doc/plugins/moderatedcomments.mdwn @@ -5,6 +5,8 @@ This plugin causes [[comments]] to be held for manual moderation. Admins can access the comment moderation queue via their preferences page. By default, all comments made by anyone who is not an admin will be held -for moderation. The `moderate_users` setting can be set to false to avoid -moderating comments of logged-in users, while still moderating anonymous -comments. +for moderation. The `moderate_pagespec` setting can be used to specify a +[[ikiwiki/PageSpec]] to match comments and users who should be moderated. +For example, to avoid moderating comments from logged-in users, set +`moderate_pagespec` to "!user(*)". Or to moderate everyone except for +admins, set it to "!admin(*)". -- cgit v1.2.3 From e56ec7a96c3a2064941a82619bf6cb0d2e8392e0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 13 Mar 2010 15:08:00 -0500 Subject: websetup: Add websetup_unsafe to allow marking other settings as unsafe. --- IkiWiki/Plugin/websetup.pm | 22 ++++++++++++++++++---- debian/changelog | 7 +++++++ doc/plugins/websetup.mdwn | 3 ++- 3 files changed, 27 insertions(+), 5 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/websetup.pm b/IkiWiki/Plugin/websetup.pm index 5c19c9b63..d444c0a3d 100644 --- a/IkiWiki/Plugin/websetup.pm +++ b/IkiWiki/Plugin/websetup.pm @@ -27,6 +27,13 @@ sub getsetup () { safe => 0, rebuild => 0, }, + websetup_unsafe => { + type => "string", + example => [], + description => "list of additional setup field keys to treat as unsafe", + safe => 0, + rebuild => 0, + }, websetup_show_unsafe => { type => "boolean", example => 1, @@ -57,6 +64,12 @@ sub formatexample ($$) { } } +sub issafe ($) { + my $key=shift; + + return ! grep { $_ eq $key } @{$config{websetup_unsafe}}; +} + sub showfields ($$$@) { my $form=shift; my $plugin=shift; @@ -78,7 +91,8 @@ sub showfields ($$$@) { # XXX hashes not handled yet next if ref $config{$key} && ref $config{$key} eq 'HASH' || ref $info{example} eq 'HASH'; # maybe skip unsafe settings - next if ! $info{safe} && ! ($config{websetup_show_unsafe} && $config{websetup_advanced}); + next if ! ($config{websetup_show_unsafe} && $config{websetup_advanced}) && + (! $info{safe} || ! issafe($key)); # maybe skip advanced settings next if $info{advanced} && ! $config{websetup_advanced}; # these are handled specially, so don't show @@ -156,7 +170,7 @@ sub showfields ($$$@) { if (ref $value eq 'ARRAY' || ref $info{example} eq 'ARRAY') { $value=[(ref $value eq 'ARRAY' ? map { Encode::encode_utf8($_) } @{$value} : "")]; - push @$value, "", "" if $info{safe}; # blank items for expansion + push @$value, "", "" if $info{safe} && issafe($key); # blank items for expansion } else { $value=Encode::encode_utf8($value); @@ -210,7 +224,7 @@ sub showfields ($$$@) { } } - if (! $info{safe}) { + if (! $info{safe} || ! issafe($key)) { $form->field(name => $name, disabled => 1); } else { @@ -346,7 +360,7 @@ sub showform ($$) { @value=0; } - if (! $info{safe}) { + if (! $info{safe} || ! issafe($key)) { error("unsafe field $key"); # should never happen } diff --git a/debian/changelog b/debian/changelog index 7fdbbcb63..9e779bb18 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +ikiwiki (3.20100313) UNRELEASED; urgency=low + + * websetup: Add websetup_unsafe to allow marking other settings + as unsafe. + + -- Joey Hess Sat, 13 Mar 2010 14:48:10 -0500 + ikiwiki (3.20100312) unstable; urgency=HIGH * Fix utf8 issues in calls to md5_hex. diff --git a/doc/plugins/websetup.mdwn b/doc/plugins/websetup.mdwn index f1756ba8f..b4d23ba9c 100644 --- a/doc/plugins/websetup.mdwn +++ b/doc/plugins/websetup.mdwn @@ -16,7 +16,8 @@ enabled and disabled using it too. Some settings are not considered safe enough to be manipulated over the web; these are still shown, by default, but cannot be modified. To hide them, set `websetup_show_unsafe` to false in the setup file. A few settings have too complex a data type to be -configured via the web. +configured via the web. To mark additional settings as unsafe, you can +list them in `websetup_unsafe`. Plugins that should not be enabled/disabled via the web interface can be listed in `websetup_force_plugins` in the setup file. -- cgit v1.2.3 From 0f433ed01c58978ba6d7845d5aaebb1ec8cefc9e Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Wed, 17 Mar 2010 00:42:38 +0000 Subject: link to highlight --- doc/plugins/contrib/highlightcode.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/highlightcode.mdwn b/doc/plugins/contrib/highlightcode.mdwn index 8abb76583..f1df204bb 100644 --- a/doc/plugins/contrib/highlightcode.mdwn +++ b/doc/plugins/contrib/highlightcode.mdwn @@ -1,6 +1,8 @@ [[!template id=plugin name=highlightcode author="[[sabr]]"]] [[!tag type/format]] +(An alternative to this plugin, [[plugins/highlight]], is now provided with IkiWiki. --[[smcv]]) + A small plugin to allow Ikiwiki to display source files complete with syntax highlighting. Files with recognized extensions (i.e. my-file.cpp) are be rendered just like any other Ikiwiki page. You can even edit your source files with Ikiwiki's editor. It uses the Syntax::Highlight::Engine::Kate Perl module to do the highlighting. -- cgit v1.2.3 From e67a9382f67e745af3be7d367fe7a0d36c1777e6 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 24 Mar 2010 00:29:10 +0000 Subject: Allow hooks to add sorting functions to pagespec_match_list --- IkiWiki.pm | 6 +++++- doc/ikiwiki/pagespec/sorting.mdwn | 2 ++ doc/plugins/write.mdwn | 15 +++++++++++++++ t/pagespec_match_list.t | 6 +++++- 4 files changed, 27 insertions(+), 2 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 022bfe3bd..1a4dc47dd 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2035,7 +2035,11 @@ sub pagespec_match_list ($$;@) { if (defined $params{sort}) { my $f; - if ($params{sort} eq 'title') { + + if (exists $hooks{sort}{$params{sort}}{call}) { + $f = sub { $hooks{sort}{$params{sort}}{call}($a, $b) }; + } + elsif ($params{sort} eq 'title') { $f=sub { pagetitle(basename($a)) cmp pagetitle(basename($b)) }; } elsif ($params{sort} eq 'title_natural') { diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 697818a2a..9007c23bf 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -10,4 +10,6 @@ orders can be specified. installed. Orders by title, but numbers in the title are treated as such, ("1 2 9 10 20" instead of "1 10 2 20 9") +Plugins can add additional sort orders. + [[!meta robots="noindex, follow"]] diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 96a2aa16d..bfa6617bd 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -588,6 +588,21 @@ describes the plugin as a whole. For example: This hook is used to inject C code (which it returns) into the `main` function of the ikiwiki wrapper when it is being generated. +### sort + + hook(type => "sort", id => "foo", call => \&sort_by_foo); + +This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides +an existing one. The callback is given two page names as arguments, and +returns negative, zero or positive if the first page should come before, +close to (i.e. undefined order), or after the second page. + +For instance, the built-in `title` sort order could be reimplemented as + + sub sort_by_title { + pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); + } + ## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index dd5dcc5b0..b34ee769f 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 88; +use Test::More tests => 89; BEGIN { use_ok("IkiWiki"); } @@ -9,6 +9,8 @@ BEGIN { use_ok("IkiWiki"); } $config{srcdir}=$config{destdir}="/dev/null"; IkiWiki::checkconfig(); +hook(type => "sort", id => "path", call => sub { $_[0] cmp $_[1] }); + %pagesources=( foo => "foo.mdwn", foo2 => "foo2.mdwn", @@ -34,6 +36,8 @@ is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50)], is_deeply([pagespec_match_list("foo", "post/*", sort => "title", filter => sub { $_[0] =~ /3/}) ], ["post/1", "post/2"]); +is_deeply([pagespec_match_list("foo", "*", sort => "path", num => 2)], + ["bar", "foo"]); my $r=eval { pagespec_match_list("foo", "beep") }; ok(eval { pagespec_match_list("foo", "beep") } == 0); ok(! $@, "does not fail with error when unable to match anything"); -- cgit v1.2.3 From 3b08b19b4e36f82864c73ca035cfdec83b3a43aa Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Wed, 24 Mar 2010 21:33:03 +0000 Subject: use `` to avoid markdown eating example pagespecs --- doc/plugins/moderatedcomments.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/moderatedcomments.mdwn b/doc/plugins/moderatedcomments.mdwn index c29b0b052..f9466e833 100644 --- a/doc/plugins/moderatedcomments.mdwn +++ b/doc/plugins/moderatedcomments.mdwn @@ -8,5 +8,5 @@ By default, all comments made by anyone who is not an admin will be held for moderation. The `moderate_pagespec` setting can be used to specify a [[ikiwiki/PageSpec]] to match comments and users who should be moderated. For example, to avoid moderating comments from logged-in users, set -`moderate_pagespec` to "!user(*)". Or to moderate everyone except for -admins, set it to "!admin(*)". +`moderate_pagespec` to "`!user(*)`". Or to moderate everyone except for +admins, set it to "`!admin(*)`". -- cgit v1.2.3 From 60edd2dc3157f756f4f7a213ee15836fe7bbb769 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 24 Mar 2010 23:51:48 +0000 Subject: Allow sorting to be combined and/or reversed --- IkiWiki.pm | 84 ++++++++++++++++++++++++++++----------- doc/ikiwiki/pagespec/sorting.mdwn | 4 ++ doc/plugins/write.mdwn | 17 +++++++- t/pagespec_match_list.t | 12 +++++- 4 files changed, 91 insertions(+), 26 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1a4dc47dd..ce8fdd454 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2005,6 +2005,64 @@ sub pagespec_match ($$;@) { return $sub->($page, @params); } +sub get_sort_function { + my $method = $_[0]; + + if ($method =~ m/\s/) { + my @methods = map { get_sort_function($_) } split(' ', $method); + + return sub { + foreach my $method (@methods) { + my $answer = $method->($_[0], $_[1]); + return $answer if $answer; + } + + return 0; + }; + } + + my $sense = 1; + + if ($method =~ s/^-//) { + $sense = -1; + } + + my $token = $method; + my $parameter = undef; + + if ($method =~ m/^(\w+)\((.*)\)$/) { + $token = $1; + $parameter = $2; + } + + if (exists $hooks{sort}{$token}{call}) { + my $callback = $hooks{sort}{$token}{call}; + return sub { $sense * $callback->($_[0], $_[1], $parameter) }; + } + + if ($method eq 'title') { + return sub { $sense * (pagetitle(basename($_[0])) cmp pagetitle(basename($_[1]))) }; + } + + if ($method eq 'title_natural') { + eval q{use Sort::Naturally}; + if ($@) { + error(gettext("Sort::Naturally needed for title_natural sort")); + } + return sub { $sense * Sort::Naturally::ncmp(pagetitle(basename($_[0])), pagetitle(basename($_[1]))) }; + } + + if ($method eq 'mtime') { + return sub { $sense * ($pagemtime{$_[1]} <=> $pagemtime{$_[0]}) }; + } + + if ($method eq 'age') { + return sub { $sense * ($pagectime{$_[1]} <=> $pagectime{$_[0]}) }; + } + + error sprintf(gettext("unknown sort type %s"), $method); +} + sub pagespec_match_list ($$;@) { my $page=shift; my $pagespec=shift; @@ -2034,31 +2092,9 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f; + my $f = get_sort_function($params{sort}); - if (exists $hooks{sort}{$params{sort}}{call}) { - $f = sub { $hooks{sort}{$params{sort}}{call}($a, $b) }; - } - elsif ($params{sort} eq 'title') { - $f=sub { pagetitle(basename($a)) cmp pagetitle(basename($b)) }; - } - elsif ($params{sort} eq 'title_natural') { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } - $f=sub { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) }; - } - elsif ($params{sort} eq 'mtime') { - $f=sub { $pagemtime{$b} <=> $pagemtime{$a} }; - } - elsif ($params{sort} eq 'age') { - $f=sub { $pagectime{$b} <=> $pagectime{$a} }; - } - else { - error sprintf(gettext("unknown sort type %s"), $params{sort}); - } - @candidates = sort { &$f } @candidates; + @candidates = sort { $f->($a, $b) } @candidates; } @candidates=reverse(@candidates) if $params{reverse}; diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 61516bec5..f27972d4e 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -15,6 +15,10 @@ orders can be specified. full title was set. """]] +In addition, you can combine several sort orders and/or reverse the order of +sorting, with a string like `age -title` (which would sort by age, then by +title in reverse order if two pages have the same age). + Plugins can add additional sort orders, so more might be available on this wiki. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index bfa6617bd..1010e76e4 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -593,7 +593,9 @@ function of the ikiwiki wrapper when it is being generated. hook(type => "sort", id => "foo", call => \&sort_by_foo); This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides -an existing one. The callback is given two page names as arguments, and +an existing one. + +The callback is given two page names followed by the parameter as arguments, and returns negative, zero or positive if the first page should come before, close to (i.e. undefined order), or after the second page. @@ -603,6 +605,19 @@ For instance, the built-in `title` sort order could be reimplemented as pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); } +and to sort by an arbitrary `meta` value, you could use: + + # usage: sort="meta(description)" + sub sort_by_meta { + my $param = $_[2]; + error "sort=meta requires a parameter" unless defined $param; + my $left = $pagestate{$_[0]}{meta}{$param}; + $left = "" unless defined $left; + my $right = $pagestate{$_[1]}{meta}{$param}; + $right = "" unless defined $right; + return $left cmp $right; + } + ## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index b34ee769f..309961f1c 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 89; +use Test::More tests => 90; BEGIN { use_ok("IkiWiki"); } @@ -20,6 +20,13 @@ hook(type => "sort", id => "path", call => sub { $_[0] cmp $_[1] }); "post/2" => "post/2.mdwn", "post/3" => "post/3.mdwn", ); +$IkiWiki::pagectime{foo} = 2; +$IkiWiki::pagectime{foo2} = 2; +$IkiWiki::pagectime{foo3} = 1; +$IkiWiki::pagectime{bar} = 3; +$IkiWiki::pagectime{"post/1"} = 6; +$IkiWiki::pagectime{"post/2"} = 6; +$IkiWiki::pagectime{"post/3"} = 6; $links{foo}=[qw{post/1 post/2}]; $links{foo2}=[qw{bar}]; $links{foo3}=[qw{bar}]; @@ -38,6 +45,9 @@ is_deeply([pagespec_match_list("foo", "post/*", sort => "title", ["post/1", "post/2"]); is_deeply([pagespec_match_list("foo", "*", sort => "path", num => 2)], ["bar", "foo"]); +is_deeply([pagespec_match_list("foo", "foo* or bar*", + sort => "-age title")], # oldest first, break ties by title + ["foo3", "foo", "foo2", "bar"]); my $r=eval { pagespec_match_list("foo", "beep") }; ok(eval { pagespec_match_list("foo", "beep") } == 0); ok(! $@, "does not fail with error when unable to match anything"); -- cgit v1.2.3 From b86276ffed7ee001b35cd610e5d56e5afb4088cf Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 25 Mar 2010 23:31:53 +0000 Subject: Reimplement extensible sorting mechanisms, in the same way as pagespecs --- IkiWiki.pm | 145 ++++++++++++++++++++++++++++-------------------- IkiWiki/Plugin/meta.pm | 11 ++-- doc/plugins/write.mdwn | 53 ++++++++---------- t/pagespec_match_list.t | 6 +- 4 files changed, 120 insertions(+), 95 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index ce8fdd454..a89c14058 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -37,6 +37,7 @@ our $DEPEND_LINKS=4; # Optimisation. use Memoize; memoize("abs2rel"); +memoize("cmpspec_translate"); memoize("pagespec_translate"); memoize("template_file"); @@ -1934,6 +1935,70 @@ sub add_link ($$) { unless grep { $_ eq $link } @{$links{$page}}; } +sub cmpspec_translate ($) { + my $spec = shift; + + my $code = ""; + my @data; + while ($spec =~ m{ + \s* + (-?) # group 1: perhaps negated + \s* + ( # group 2: a word + \w+\([^\)]*\) # command(params) + | + [^\s]+ # or anything else + ) + \s* + }gx) { + my $negated = $1; + my $word = $2; + my $params = undef; + + if ($word =~ m/^(\w+)\((.*)\)$/) { + # command with parameters + $params = $2; + $word = $1; + } + elsif ($word !~ m/^\w+$/) { + error(sprintf(gettext("invalid sort type %s"), $word)); + } + + if (length $code) { + $code .= " || "; + } + + if ($negated) { + $code .= "-"; + } + + if (exists $IkiWiki::PageSpec::{"cmp_$word"}) { + if (exists $IkiWiki::PageSpec::{"check_cmp_$word"}) { + $IkiWiki::PageSpec::{"check_cmp_$word"}->($params); + } + + if (defined $params) { + push @data, $params; + $code .= "IkiWiki::PageSpec::cmp_$word(\@_, \$data[$#data])"; + } + else { + $code .= "IkiWiki::PageSpec::cmp_$word(\@_, undef)"; + } + } + else { + error(sprintf(gettext("unknown sort type %s"), $word)); + } + } + + if (! length $code) { + # undefined sorting method... sort arbitrarily + return sub { 0 }; + } + + no warnings; + return eval 'sub { '.$code.' }'; +} + sub pagespec_translate ($) { my $spec=shift; @@ -2005,64 +2070,6 @@ sub pagespec_match ($$;@) { return $sub->($page, @params); } -sub get_sort_function { - my $method = $_[0]; - - if ($method =~ m/\s/) { - my @methods = map { get_sort_function($_) } split(' ', $method); - - return sub { - foreach my $method (@methods) { - my $answer = $method->($_[0], $_[1]); - return $answer if $answer; - } - - return 0; - }; - } - - my $sense = 1; - - if ($method =~ s/^-//) { - $sense = -1; - } - - my $token = $method; - my $parameter = undef; - - if ($method =~ m/^(\w+)\((.*)\)$/) { - $token = $1; - $parameter = $2; - } - - if (exists $hooks{sort}{$token}{call}) { - my $callback = $hooks{sort}{$token}{call}; - return sub { $sense * $callback->($_[0], $_[1], $parameter) }; - } - - if ($method eq 'title') { - return sub { $sense * (pagetitle(basename($_[0])) cmp pagetitle(basename($_[1]))) }; - } - - if ($method eq 'title_natural') { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } - return sub { $sense * Sort::Naturally::ncmp(pagetitle(basename($_[0])), pagetitle(basename($_[1]))) }; - } - - if ($method eq 'mtime') { - return sub { $sense * ($pagemtime{$_[1]} <=> $pagemtime{$_[0]}) }; - } - - if ($method eq 'age') { - return sub { $sense * ($pagectime{$_[1]} <=> $pagectime{$_[0]}) }; - } - - error sprintf(gettext("unknown sort type %s"), $method); -} - sub pagespec_match_list ($$;@) { my $page=shift; my $pagespec=shift; @@ -2092,7 +2099,7 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f = get_sort_function($params{sort}); + my $f = cmpspec_translate($params{sort}); @candidates = sort { $f->($a, $b) } @candidates; } @@ -2407,4 +2414,24 @@ sub match_ip ($$;@) { } } +sub cmp_title { + IkiWiki::pagetitle(IkiWiki::basename($_[0])) + cmp + IkiWiki::pagetitle(IkiWiki::basename($_[1])) +} + +sub cmp_mtime { $IkiWiki::pagemtime{$_[1]} <=> $IkiWiki::pagemtime{$_[0]} } +sub cmp_age { $IkiWiki::pagectime{$_[1]} <=> $IkiWiki::pagectime{$_[0]} } + +sub check_cmp_title_natural { + eval q{use Sort::Naturally}; + if ($@) { + error(gettext("Sort::Naturally needed for title_natural sort")); + } +} +sub cmp_title_natural { + Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), + IkiWiki::pagetitle(IkiWiki::basename($_[1]))) +} + 1 diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index a470041c9..e8cc1e392 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -13,7 +13,6 @@ sub import { hook(type => "needsbuild", id => "meta", call => \&needsbuild); hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); - hook(type => "sort", id => "meta_title", call => \&sort_meta_title); } sub getsetup () { @@ -299,10 +298,6 @@ sub titlesort { return pagetitle(IkiWiki::basename($_[0])); } -sub sort_meta_title { - return titlesort($_[0]) cmp titlesort($_[1]); -} - sub match { my $field=shift; my $page=shift; @@ -353,4 +348,10 @@ sub match_copyright ($$;@) { IkiWiki::Plugin::meta::match("copyright", @_); } +sub cmp_meta_title { + IkiWiki::Plugin::meta::titlesort($_[0]) + cmp + IkiWiki::Plugin::meta::titlesort($_[1]) +} + 1 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 1010e76e4..de2b47015 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -588,36 +588,6 @@ describes the plugin as a whole. For example: This hook is used to inject C code (which it returns) into the `main` function of the ikiwiki wrapper when it is being generated. -### sort - - hook(type => "sort", id => "foo", call => \&sort_by_foo); - -This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides -an existing one. - -The callback is given two page names followed by the parameter as arguments, and -returns negative, zero or positive if the first page should come before, -close to (i.e. undefined order), or after the second page. - -For instance, the built-in `title` sort order could be reimplemented as - - sub sort_by_title { - pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); - } - -and to sort by an arbitrary `meta` value, you could use: - - # usage: sort="meta(description)" - sub sort_by_meta { - my $param = $_[2]; - error "sort=meta requires a parameter" unless defined $param; - my $left = $pagestate{$_[0]}{meta}{$param}; - $left = "" unless defined $left; - my $right = $pagestate{$_[1]}{meta}{$param}; - $right = "" unless defined $right; - return $left cmp $right; - } - ## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` @@ -1140,6 +1110,29 @@ For example, "backlink(foo)" is influenced by the contents of page foo; they match; "created_before(foo)" is influenced by the metadata of foo; while "glob(*)" is not influenced by the contents of any page. +### Sorting plugins + +Similarly, it's possible to write plugins that add new functions as +[[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to +the IkiWiki::PageSpec package named `cmp_foo`, which will be used when sorting +by `foo` or `foo(...)` is requested. + +The function will be passed three or more parameters. The first two are +page names, and the third is `undef` if invoked as `foo`, or the parameter +`"bar"` if invoked as `foo(bar)`. It may also be passed additional, named +parameters. + +It should return the same thing as Perl's `cmp` and `<=>` operators: negative +if the first argument is less than the second, positive if the first argument +is greater, or zero if they are considered equal. It may also raise an +error using `error`, for instance if it needs a parameter but one isn't +provided. + +You can also define a function called `check_cmp_foo` in the same package. +If you do, it will be called while preparing to sort by `foo` or `foo(bar)`, +with argument `undef` or `"bar"` respectively; it may raise an error using +`error`, if sorting like that isn't going to work. + ### Setup plugins The ikiwiki setup file is loaded using a pluggable mechanism. If you look diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 309961f1c..743ae4637 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -9,7 +9,11 @@ BEGIN { use_ok("IkiWiki"); } $config{srcdir}=$config{destdir}="/dev/null"; IkiWiki::checkconfig(); -hook(type => "sort", id => "path", call => sub { $_[0] cmp $_[1] }); +{ + package IkiWiki::PageSpec; + + sub cmp_path { $_[0] cmp $_[1] } +} %pagesources=( foo => "foo.mdwn", -- cgit v1.2.3 From 0f28f310472a333134af63a18b73372f044b8278 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 26 Mar 2010 00:12:22 -0400 Subject: security? --- doc/plugins/contrib/pod/discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 doc/plugins/contrib/pod/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/pod/discussion.mdwn b/doc/plugins/contrib/pod/discussion.mdwn new file mode 100644 index 000000000..8f4b625ee --- /dev/null +++ b/doc/plugins/contrib/pod/discussion.mdwn @@ -0,0 +1,8 @@ +My one concern about this plugin is the `=for` markup in POD. + +> Some format names that formatters currently are known to +> accept include "roff", "man", "latex", "tex", "text", and "html". + +I don't know which of these [[!cpan Pod::Xml]] supports. If it currently +supports, or later support latex, that could be problimatic since that +could maybe be used to include files or run code. --[[Joey]] -- cgit v1.2.3 From 3cea3eb5da0a8f09a495deea9f2a2c73dc76deab Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Fri, 26 Mar 2010 04:30:43 +0000 Subject: response --- doc/plugins/contrib/pod/discussion.mdwn | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/pod/discussion.mdwn b/doc/plugins/contrib/pod/discussion.mdwn index 8f4b625ee..76e858680 100644 --- a/doc/plugins/contrib/pod/discussion.mdwn +++ b/doc/plugins/contrib/pod/discussion.mdwn @@ -3,6 +3,8 @@ My one concern about this plugin is the `=for` markup in POD. > Some format names that formatters currently are known to > accept include "roff", "man", "latex", "tex", "text", and "html". -I don't know which of these [[!cpan Pod::Xml]] supports. If it currently +I don't know which of these [[!cpan Pod::Xhtml]] supports. If it currently supports, or later support latex, that could be problimatic since that could maybe be used to include files or run code. --[[Joey]] + +> I don't know, either; the documentation for [[!cpan Pod:Xhtml]] is silent on this subject. --[[KathrynAndersen]] -- cgit v1.2.3 From d88af43011193bb0eef79b749ae9a93eda5d266e Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 26 Mar 2010 13:20:33 +0000 Subject: brief review of field; fieldsort plugin --- doc/plugins/contrib/field/discussion.mdwn | 62 +++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 doc/plugins/contrib/field/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn new file mode 100644 index 000000000..fc1759fab --- /dev/null +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -0,0 +1,62 @@ +Having tried out `field`, some comments (from [[smcv]]): + +The general concept looks great. + +The `pagetemplate` hook seems quite namespace-polluting: on a site containing +a list of books, I'd like to have an `author` field, but that would collide +with IkiWiki's use of `` for the author of the *page* +(i.e. me). Perhaps it'd be better if the pagetemplate hook was only active for +`` or something? (For those who want the current +behaviour, an auxiliary plugin would be easy.) + +From a coding style point of view, the `$CamelCase` variable names aren't +IkiWiki style, and the `match_foo` functions look as though they could benefit +from being thin wrappers around a common `&IkiWiki::Plugin::field::match` +function (see `meta` for a similar approach). + +I think the documentation would probably be clearer in a less manpage-like +and more ikiwiki-like style? + +If one of my branches from [[todo/allow_plugins_to_add_sorting_methods]] is +accepted, a `field()` cmp type would mean that [[plugins/contrib/report]] can +stop reimplementing sorting. Here's the implementation I'm using, with +your "sortspec" concept (a sort-hook would be very similar): if merged, +I think it should just be part of `field` rather than a separate plugin. + + # Copyright © 2010 Simon McVittie, released under GNU LGPL >= 2.1 + package IkiWiki::Plugin::fieldsort; + use warnings; + use strict; + use IkiWiki 3.00; + use IkiWiki::Plugin::field; + + sub import { + hook(type => "getsetup", id => "fieldsort", call => \&getsetup); + } + + sub getsetup () { + return + plugin => { + safe => 1, + rebuild => undef, + }, + } + + package IkiWiki::PageSpec; + + sub check_cmp_field { + if (!length $_[0]) { + error("sort=field requires a parameter"); + } + } + + sub cmp_field { + my $left = IkiWiki::Plugin::field::field_get_value($_[2], $_[0]); + my $right = IkiWiki::Plugin::field::field_get_value($_[2], $_[1]); + + $left = "" unless defined $left; + $right = "" unless defined $right; + return $left cmp $right; + } + + 1; -- cgit v1.2.3 From bea828a2f6b455c46f2b5d6c16805958a2e3412a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 26 Mar 2010 13:30:52 +0000 Subject: doesn't field+template already cover this? --- doc/plugins/contrib/ftemplate/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 doc/plugins/contrib/ftemplate/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn new file mode 100644 index 000000000..851ccf960 --- /dev/null +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -0,0 +1,6 @@ +Is this actually necessary? Doesn't the combination of [[plugins/template]] +with [[plugins/contrib/field]]'s `pagetemplate` hook provide the same +functionality? I suppose one missing thing is that `ftemplate` looks in +the "system" templates directories, not just in the wiki, but that +seems orthogonal (and might even be a good enhancement to `template`). +--[[smcv]] -- cgit v1.2.3 From fffd7e7e026f61e03b2fa052acdf7130889f6343 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 26 Mar 2010 13:43:37 +0000 Subject: oh, my mistake... this *is* necessary, but could perhaps be done better? --- doc/plugins/contrib/ftemplate/discussion.mdwn | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index 851ccf960..eb2ec6f13 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -1,6 +1,13 @@ -Is this actually necessary? Doesn't the combination of [[plugins/template]] -with [[plugins/contrib/field]]'s `pagetemplate` hook provide the same -functionality? I suppose one missing thing is that `ftemplate` looks in +I initially thought this wasn't actually necessary - the combination +of [[plugins/template]] with [[plugins/contrib/field]]'s `pagetemplate` +hook ought to provide the same functionality. However, `template` +doesn't run `pagetemplate` hooks; a more general version of this +plugin would be to have a variant of `template` that runs `pagetemplate` +hooks (probably easiest to just patch `template` to implement a +second directive, or have a special parameter `run_hooks="yes"`, +or something). + +Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that -seems orthogonal (and might even be a good enhancement to `template`). +seems orthogonal (and might be a good enhancement to `template` anyway). --[[smcv]] -- cgit v1.2.3 From b9958fe3cf1a27b58d3e2bd59c76553eb0046782 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 26 Mar 2010 14:09:04 +0000 Subject: brief review of report --- doc/plugins/contrib/report/discussion.mdwn | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/plugins/contrib/report/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn new file mode 100644 index 000000000..6b1e28f6a --- /dev/null +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -0,0 +1,23 @@ +Wow, this plugin does a lot... it seems to be `inline` (but without the feeds +or the ability to not have `archive="yes"`), plus part of +[[plugins/contrib/trail]], plus some sorting, plus an ingenious workaround +for template evaluation being relatively stateless. + +A large part of this plugin would just fall off if one of the versions of +[[todo/allow_add_plugins_to_add_sorting_methods]] was merged, which was a +large part of the idea of that feature request :-) To make use of that +you'd have to use `pagespec_match_list` in the trail case too, but that's +easy enough - just add `list => [@the_trail_pages]` to the arguments. + +Another large part would fall off if this plugin required, and internally +invoked, `inline` (like my `comments` plugin does) - `inline` runs +`pagetemplate` hooks, and in particular, it'll run the `field` hook. +Alternatively, this plugin could invoke `pagetemplate` hooks itself, +removing the special case for `field`. + +Perhaps the `headers` thing could migrate into inline somehow? That might +lead to making inline too big, though. + +Is the intention that the `trail` part is a performance hack, or a way +to select pages? How does it relate to [[todo/wikitrails]] or +[[plugins/contrib/trail]]? --[[smcv]] -- cgit v1.2.3 From 3c98cf653f6d6950a425620acf0279df902d004b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Fri, 26 Mar 2010 15:09:11 +0000 Subject: fix link --- doc/plugins/contrib/report/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index 6b1e28f6a..918d0779b 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -4,7 +4,7 @@ or the ability to not have `archive="yes"`), plus part of for template evaluation being relatively stateless. A large part of this plugin would just fall off if one of the versions of -[[todo/allow_add_plugins_to_add_sorting_methods]] was merged, which was a +"[[todo/allow_plugins_to_add_sorting_methods]]" was merged, which was a large part of the idea of that feature request :-) To make use of that you'd have to use `pagespec_match_list` in the trail case too, but that's easy enough - just add `list => [@the_trail_pages]` to the arguments. -- cgit v1.2.3 From ba05b907e3563f9aa25a4322abd9ab2d5b56b36b Mon Sep 17 00:00:00 2001 From: "http://oneingray.myopenid.com/" Date: Sun, 28 Mar 2010 15:58:37 +0000 Subject: More wishlist items for the `xslt` plugin. --- doc/plugins/contrib/xslt/discussion.mdwn | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/xslt/discussion.mdwn b/doc/plugins/contrib/xslt/discussion.mdwn index 9cda02f88..72cce083c 100644 --- a/doc/plugins/contrib/xslt/discussion.mdwn +++ b/doc/plugins/contrib/xslt/discussion.mdwn @@ -20,3 +20,30 @@ possible. Can it also read other arbitrary files, run other programs, etc? > For the second point, I think the main concern would be resource usage. XSLT is a pretty limited language; it can read other XML files, but it can't run other programs so far as I know. > -- [[KathrynAndersen]] + +>> XSLT is, indeed, a Turing-complete programming language. + However, [XML::LibXSLT][] provides a set of functions to help + to minimize the damage that may be caused by running a random + program. + +>> In particular, `max_depth ()` allows for the maximum + recursion depth to be set, while + `read_file ()`, `write_file ()`, `create_dir ()`, + `read_net ()` and `write_net ()` + are the callbacks that allow any of the possible file + operations to be denied. + +>> To be honest, I'd prefer for the `read_file ()` callback to + only grant access to the files below the Ikiwiki source + directory, and for all the `write_`… and + …`_net` callbacks to deny the access unconditionally. + +>> One more wishlist item: allow the set of locations to take + `.xsl` files from to be preconfigured, so that, e. g., + one could allow (preasumably trusted) system stylesheets, + while disallowing any stylesheets that are placed on the Wiki + itself. + +>> — Ivan Shmakov, 2010-03-28Z. + +[XML::LibXSLT]: http://search.cpan.org/~PAJAS/XML-LibXSLT/LibXSLT.pm -- cgit v1.2.3 From 386e464188d817f90e1cb6535da2db6bcfaa3fa0 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Tue, 30 Mar 2010 05:31:10 +0000 Subject: quick response --- doc/plugins/contrib/field/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index fc1759fab..4bb285a50 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -9,6 +9,10 @@ with IkiWiki's use of `` for the author of the *page* `` or something? (For those who want the current behaviour, an auxiliary plugin would be easy.) +> No, please. The idea is to be *able* to override field names if one wishes to, and choose, for yourself, non-colliding field names if one wishes not to. I don't wish to lose the power of being able to, say, define a page title with YAML format if I want to, or to write a site-specific plugin which calculates a page title, or other nifty things. +>It's not like one is going to lose the fields defined by the meta plugin; if "author" is defined by \[[!meta author=...]] then that's what will be found by "field" (provided the "meta" plugin is registered; that's what the "field_register" option is for). +>--[[KathrynAndersen]] + From a coding style point of view, the `$CamelCase` variable names aren't IkiWiki style, and the `match_foo` functions look as though they could benefit from being thin wrappers around a common `&IkiWiki::Plugin::field::match` @@ -17,6 +21,8 @@ function (see `meta` for a similar approach). I think the documentation would probably be clearer in a less manpage-like and more ikiwiki-like style? +> I don't think ikiwiki *has* a "style" for docs, does it? So I followed the Perl Module style. And I'm rather baffled as to why having the docs laid out in clear sections... make them less clear. --[[KathrynAndersen]] + If one of my branches from [[todo/allow_plugins_to_add_sorting_methods]] is accepted, a `field()` cmp type would mean that [[plugins/contrib/report]] can stop reimplementing sorting. Here's the implementation I'm using, with -- cgit v1.2.3 From 2d1e4cce45024f6b2c384eaf7b5276c448cb3a05 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Tue, 30 Mar 2010 05:38:31 +0000 Subject: response --- doc/plugins/contrib/ftemplate/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index eb2ec6f13..adb66ee6a 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -7,7 +7,11 @@ hooks (probably easiest to just patch `template` to implement a second directive, or have a special parameter `run_hooks="yes"`, or something). +> I got the impression that `pagetemplate` hooks are intended to be completely independent of `template` variables; page-template is for the actual `page.tmpl` template, while `template` is for other templates which are used inside the page content. So I don't understand why one would need a run_hooks option. --[[KathrynAndersen]] + Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that seems orthogonal (and might be a good enhancement to `template` anyway). --[[smcv]] + +> Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]] -- cgit v1.2.3 From 90c444d9f197a5a9b87d3e70248279ac68e351a6 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Tue, 30 Mar 2010 06:44:04 +0000 Subject: response --- doc/plugins/contrib/report/discussion.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index 918d0779b..42a1009cb 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -18,6 +18,17 @@ removing the special case for `field`. Perhaps the `headers` thing could migrate into inline somehow? That might lead to making inline too big, though. +> I think inline is *already* too big, honestly. --[[KathrynAndersen]] + Is the intention that the `trail` part is a performance hack, or a way to select pages? How does it relate to [[todo/wikitrails]] or [[plugins/contrib/trail]]? --[[smcv]] + +> The `trail` part is *both* a performance hack, and a way to select pages. I have over 5000 pages on my site, I need all the performance hacks I can get. +> For the performance hack, it is a way of reducing the need to iterate through every single page in the wiki in order to find matching pages. +> For the way-to-select-pages, yes, it is intended to be similar to [[todo/wikitrails]] and [[plugins/contrib/trail]] (and will be more similar with the new release which will be happening soon; it will add prev_* and next_* variables). +> The idea is that, rather than having to add special "trail" links on PageA to indicate that a page is part of the trail, +> it takes advantage of the `%links` hash, which already contains, for each page, an array of the links from that page to other pages. No need for special markup, just use what's there; a trail is defined as "all the pages linked to from page X", and since it's an array, it has an order already. +> But to avoid that being too limiting, one can use a `pages=...` pagespec to filter that list to a subset; only the pages one is interested in. +> And one can also sort it, if one so desires. +> --[[KathrynAndersen]] -- cgit v1.2.3 From 026355cfa24dc911a247dcafca10c6ea74ae515b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Tue, 30 Mar 2010 12:09:59 +0000 Subject: respond and attempt to invoke Joey :-) --- doc/plugins/contrib/ftemplate/discussion.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index adb66ee6a..de4b35ef0 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -9,9 +9,24 @@ or something). > I got the impression that `pagetemplate` hooks are intended to be completely independent of `template` variables; page-template is for the actual `page.tmpl` template, while `template` is for other templates which are used inside the page content. So I don't understand why one would need a run_hooks option. --[[KathrynAndersen]] +>> `Render`, `inline`, `comments` and `recentchanges` run `pagetemplate` +>> hooks, as does anything that uses `IkiWiki::misctemplate`. From that +>> quick survey, it seems as though `template` is the only thing that +>> uses `HTML::Template` but *doesn't* run `pagetemplate` hooks? +>> +>> It just seems strange to me that `field` needs to have its own +>> of `template` (this), its own variant of `inline` (`report`), +>> and so on - I'd tend to lean more towards having `field` +>> enhance the existing plugins. I'm not an ikiwiki committer, +>> mind... Joey, your opinion would be appreciated! --[[smcv]] + Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that seems orthogonal (and might be a good enhancement to `template` anyway). --[[smcv]] > Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]] + +>> Yeah, that's something that annoys me about `template` too. I've +>> opened a todo: [[todo/user-defined_templates_outside_the_wiki]]. +>> --s -- cgit v1.2.3 From 0503bf7c8824d941b26da4c91b4ee1f721fcf54c Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Tue, 30 Mar 2010 12:10:40 +0000 Subject: --- doc/plugins/contrib/ftemplate/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index de4b35ef0..6a1d9f685 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -15,7 +15,7 @@ or something). >> uses `HTML::Template` but *doesn't* run `pagetemplate` hooks? >> >> It just seems strange to me that `field` needs to have its own ->> of `template` (this), its own variant of `inline` (`report`), +>> variant of `template` (this), its own variant of `inline` (`report`), >> and so on - I'd tend to lean more towards having `field` >> enhance the existing plugins. I'm not an ikiwiki committer, >> mind... Joey, your opinion would be appreciated! --[[smcv]] -- cgit v1.2.3 From edcea2b98100aa1ff18b91038a33e2ea55f13850 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Tue, 30 Mar 2010 12:27:18 +0000 Subject: respond --- doc/plugins/contrib/report/discussion.mdwn | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index 42a1009cb..a6cb6f8bd 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -20,6 +20,13 @@ lead to making inline too big, though. > I think inline is *already* too big, honestly. --[[KathrynAndersen]] +>> A fair point; perhaps my complaint should be that *inline* does +>> too many orthogonal things. I suppose the headers feature wouldn't +>> really make sense in an inline that didn't have `archive="yes"`, +>> so it'd make sense to recommend this plugin as a replacement +>> for inlining with archive=yes (for which I now realise "inline" +>> is the wrong verb anyway :-) ) --s + Is the intention that the `trail` part is a performance hack, or a way to select pages? How does it relate to [[todo/wikitrails]] or [[plugins/contrib/trail]]? --[[smcv]] @@ -32,3 +39,18 @@ to select pages? How does it relate to [[todo/wikitrails]] or > But to avoid that being too limiting, one can use a `pages=...` pagespec to filter that list to a subset; only the pages one is interested in. > And one can also sort it, if one so desires. > --[[KathrynAndersen]] + +>> That's an interesting approach to trails; I'd missed the fact that +>> links are already ordered. +>> +>> This does have the same problems as tags, though: see +>> [[bugs/tagged()_matching_wikilinks]] and +>> [[todo/matching_different_kinds_of_links]]. I suppose the question +>> now is whether new code should be consistent with `tag` (and +>> potentially be fixed at the same time as tag itself), or try to +>> avoid those problems? +>> +>> The combination of `trail` with another pagespec in this plugin +>> does provide a neat way for it to work around having unwanted +>> pages in the report, by limiting by a suitable tag or subdirectory +>> or something. --s -- cgit v1.2.3 From bb8b941bfc3d3564324a23bba14dc8112d8ea6c7 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Tue, 30 Mar 2010 12:48:03 +0000 Subject: respond; correct license of fieldsort plugin to match IkiWiki --- doc/plugins/contrib/field/discussion.mdwn | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 4bb285a50..7e94a4029 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -13,6 +13,19 @@ behaviour, an auxiliary plugin would be easy.) >It's not like one is going to lose the fields defined by the meta plugin; if "author" is defined by \[[!meta author=...]] then that's what will be found by "field" (provided the "meta" plugin is registered; that's what the "field_register" option is for). >--[[KathrynAndersen]] +>> Hmm. I suppose if you put the title (or whatever) in the YAML, then +>> "almost" all the places in IkiWiki that respect titles will do the +>> right thing due to the pagetemplate hook, with the exception being +>> anything that has special side-effects inside `meta` (like `date`), +>> or anything that looks in `$pagestate{foo}{meta}` directly +>> (like `map`). Is your plan that `meta` should register itself by +>> default, and `map` and friends should be adapted to +>> work based on `getfield()` instead of `$pagestate{foo}{meta}`, then? +>> +>> (On the site I mentioned, I'm using an unmodified version of `field`, +>> and currently working around the collision by tagging books' pages +>> with `bookauthor` instead of `author` in the YAML.) --s + From a coding style point of view, the `$CamelCase` variable names aren't IkiWiki style, and the `match_foo` functions look as though they could benefit from being thin wrappers around a common `&IkiWiki::Plugin::field::match` @@ -23,13 +36,20 @@ and more ikiwiki-like style? > I don't think ikiwiki *has* a "style" for docs, does it? So I followed the Perl Module style. And I'm rather baffled as to why having the docs laid out in clear sections... make them less clear. --[[KathrynAndersen]] +>> I keep getting distracted by the big shouty headings :-) +>> I suppose what I was really getting at was that when this plugin +>> is merged, its docs will end up split between its plugin +>> page, [[plugins/write]] and [[ikiwiki/PageSpec]]; on some of the +>> contrib plugins I've added I've tried to separate the docs +>> according to how they'll hopefully be laid out after merge. --s + If one of my branches from [[todo/allow_plugins_to_add_sorting_methods]] is accepted, a `field()` cmp type would mean that [[plugins/contrib/report]] can stop reimplementing sorting. Here's the implementation I'm using, with your "sortspec" concept (a sort-hook would be very similar): if merged, I think it should just be part of `field` rather than a separate plugin. - # Copyright © 2010 Simon McVittie, released under GNU LGPL >= 2.1 + # Copyright © 2010 Simon McVittie, released under GNU GPL >= 2 package IkiWiki::Plugin::fieldsort; use warnings; use strict; -- cgit v1.2.3 From fc5445b90677489642e4ae8d5b2f6c54cdd847c5 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 31 Mar 2010 03:01:41 +0000 Subject: response --- doc/plugins/contrib/ftemplate/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index 6a1d9f685..eb84dd09b 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -20,6 +20,8 @@ or something). >> enhance the existing plugins. I'm not an ikiwiki committer, >> mind... Joey, your opinion would be appreciated! --[[smcv]] +>>> I did it that way basically because I needed the functionality ASAP, and I didn't want to step on anyone's toes, so I made them as separate plugins. If Joey wants to integrate the functionality into IkiWiki proper, I would be very happy, but I don't want to put pressure on him. --[[KathrynAndersen]] + Another missing thing is that `ftemplate` looks in the "system" templates directories, not just in the wiki, but that seems orthogonal (and might be a good enhancement to `template` anyway). -- cgit v1.2.3 From 4eed0abc8c181a027fa802d209fd95d8c10ee9f0 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Thu, 1 Apr 2010 00:23:31 +0000 Subject: response; thoughts about inline and tags --- doc/plugins/contrib/report/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index a6cb6f8bd..953509297 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -27,6 +27,8 @@ lead to making inline too big, though. >> for inlining with archive=yes (for which I now realise "inline" >> is the wrong verb anyway :-) ) --s +>>> I think *inline* would be a bit less unwieldy if there was some way of factoring out the feed stuff into a separate plugin, but I don't know if that's possible. --K.A. + Is the intention that the `trail` part is a performance hack, or a way to select pages? How does it relate to [[todo/wikitrails]] or [[plugins/contrib/trail]]? --[[smcv]] @@ -54,3 +56,7 @@ to select pages? How does it relate to [[todo/wikitrails]] or >> does provide a neat way for it to work around having unwanted >> pages in the report, by limiting by a suitable tag or subdirectory >> or something. --s + +>>> Either that, or somehow combine tagging with fields, such that one could declare a tag, and it would create both a link and a field with a given value. (I've been working on something like that, but it still has bugs). +>>> That way, the test for whether something is tagged would be something like "link(tag/foo) and field(tag foo)". +>>> --K.A. -- cgit v1.2.3 From 63bc057690d388a81e643d4556c6a001d886b59c Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Thu, 1 Apr 2010 01:35:35 +0000 Subject: --- doc/plugins/contrib/report/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index 953509297..a257198c0 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -60,3 +60,10 @@ to select pages? How does it relate to [[todo/wikitrails]] or >>> Either that, or somehow combine tagging with fields, such that one could declare a tag, and it would create both a link and a field with a given value. (I've been working on something like that, but it still has bugs). >>> That way, the test for whether something is tagged would be something like "link(tag/foo) and field(tag foo)". >>> --K.A. + +>>>> I can see that this'd work well for 1:1 relationships like next +>>>> and previous, but I don't think that'd work for pages with more than +>>>> one tag - as far as I can see, `field`'s data model is that each +>>>> page has no more than one value for each field? +>>>> [[todo/Matching_different_kinds_of_links]] has some thoughts about +>>>> how it could be implemented, though. --s -- cgit v1.2.3 From a682df9a1f14ea873c7103f80108330840a15cd0 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Thu, 1 Apr 2010 07:22:37 +0000 Subject: considering tags and fields --- doc/plugins/contrib/report/discussion.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/report/discussion.mdwn b/doc/plugins/contrib/report/discussion.mdwn index a257198c0..e23a4ced4 100644 --- a/doc/plugins/contrib/report/discussion.mdwn +++ b/doc/plugins/contrib/report/discussion.mdwn @@ -67,3 +67,9 @@ to select pages? How does it relate to [[todo/wikitrails]] or >>>> page has no more than one value for each field? >>>> [[todo/Matching_different_kinds_of_links]] has some thoughts about >>>> how it could be implemented, though. --s + +>>>>> You have a point there. I'm not sure what would be better: to add the concept of arrays/sets to `field`, or to think of tags as a special case. Problem is, I find tags as they currently exist to be too limiting. I prefer something that can be used for Faceted Tagging ; that is, things like Author:Fred Nurk, Genre:Historical, Rating:Good, and so on. Of course, that doesn't mean that each tag is limited to only one value, either; just to take the above examples, something might have more than one author, or have multiple genres (such as Historical + Romance). + +>>>>> It might be that adding arrays to the `field` plugin is a good way to go: after all, even though field=value is the most common, with the flexibility of things like YAML, one could define all sorts of things. What I'm not so sure about is how to return the values when queried, since some things would be expecting scalars all the time. Ah, perhaps I could use wantarray? +>>>>> Is there a way of checking a HTML::Template template to see if it expecting an array for a particular value? +>>>>> --[[KathrynAndersen]] -- cgit v1.2.3 From 0dad28b3530d70830456a3f8d57b0e3f3d52ee2d Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sat, 3 Apr 2010 00:45:16 +0000 Subject: reduced difference --- doc/plugins/contrib/ftemplate/discussion.mdwn | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ftemplate/discussion.mdwn b/doc/plugins/contrib/ftemplate/discussion.mdwn index eb84dd09b..1e0bca5d8 100644 --- a/doc/plugins/contrib/ftemplate/discussion.mdwn +++ b/doc/plugins/contrib/ftemplate/discussion.mdwn @@ -29,6 +29,5 @@ seems orthogonal (and might be a good enhancement to `template` anyway). > Yes, I added that because I wanted the option of not having to make all my templates work as wiki pages also. --[[KathrynAndersen]] ->> Yeah, that's something that annoys me about `template` too. I've ->> opened a todo: [[todo/user-defined_templates_outside_the_wiki]]. ->> --s +>> Joey has added support for +>> [[todo/user-defined_templates_outside_the_wiki]] now. --s -- cgit v1.2.3 From a875ee8be702bd4575e009dc652015c1157c7c2e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 3 Apr 2010 13:48:30 +0100 Subject: Split out sortnaturally into a plugin --- IkiWiki.pm | 11 ----------- IkiWiki/Plugin/sortnaturally.pm | 32 ++++++++++++++++++++++++++++++++ debian/NEWS | 8 ++++++++ doc/ikiwiki/pagespec/sorting.mdwn | 5 +++-- doc/plugins/sortnaturally.mdwn | 5 +++++ 5 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 IkiWiki/Plugin/sortnaturally.pm create mode 100644 doc/plugins/sortnaturally.mdwn (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index a89c14058..8f36f5818 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2423,15 +2423,4 @@ sub cmp_title { sub cmp_mtime { $IkiWiki::pagemtime{$_[1]} <=> $IkiWiki::pagemtime{$_[0]} } sub cmp_age { $IkiWiki::pagectime{$_[1]} <=> $IkiWiki::pagectime{$_[0]} } -sub check_cmp_title_natural { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } -} -sub cmp_title_natural { - Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), - IkiWiki::pagetitle(IkiWiki::basename($_[1]))) -} - 1 diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm new file mode 100644 index 000000000..0023f31f9 --- /dev/null +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -0,0 +1,32 @@ +#!/usr/bin/perl +# Sort::Naturally-powered title_natural sort order for IkiWiki +package IkiWiki::Plugin::sortnaturally; + +use IkiWiki 3.00; +no warnings; + +sub import { + hook(type => "getsetup", id => "sortnaturally", call => \&getsetup); +} + +sub getsetup { + return + plugin => { + safe => 1, + rebuild => 1, + }, +} + +sub checkconfig () { + eval q{use Sort::Naturally}; + error $@ if $@; +} + +package IkiWiki::PageSpec; + +sub cmp_title_natural { + Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), + IkiWiki::pagetitle(IkiWiki::basename($_[1]))) +} + +1; diff --git a/debian/NEWS b/debian/NEWS index 50332670f..614eb11f8 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,11 @@ +ikiwiki (3.20100320) UNRELEASED; urgency=low + + The sort="title_natural" option on [[!inline]] etc. now requires the + new sortnaturally plugin. This is not enabled by default, because it requires + the Sort::Naturally module. + + -- Simon McVittie Sat, 03 Apr 2010 13:46:08 +0100 + ikiwiki (3.20091017) unstable; urgency=low To take advantage of significant performance improvements, all diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index f27972d4e..ba995a521 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -6,9 +6,10 @@ orders can be specified. * `age` - List pages from the most recently created to the oldest. * `mtime` - List pages with the most recently modified first. * `title` - Order by title (page name). -* `title_natural` - Only available if [[!cpan Sort::Naturally]] is - installed. Orders by title, but numbers in the title are treated +[[!if test="enabled(sortnaturally)" then=""" +* `title_natural` - Orders by title, but numbers in the title are treated as such, ("1 2 9 10 20" instead of "1 10 2 20 9") +"""]] [[!if test="enabled(meta)" then=""" * `meta_title` - Order according to the `\[[!meta title="foo" sort="bar"]]` or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no diff --git a/doc/plugins/sortnaturally.mdwn b/doc/plugins/sortnaturally.mdwn new file mode 100644 index 000000000..91f373f6b --- /dev/null +++ b/doc/plugins/sortnaturally.mdwn @@ -0,0 +1,5 @@ +[[!template id=plugin name=sortnaturally core=1 author="[[chrysn]], [[smcv]]"]] +[[!tag type/meta]] + +This plugin provides the `title_natural` [[ikiwiki/pagespec/sorting]] order, +which uses Sort::Naturally to sort numbered pages in a more natural order. -- cgit v1.2.3 From 75fd08046548940c443c46bcdf9a5b0b6968b175 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 3 Apr 2010 13:49:20 +0100 Subject: Remove support for check_cmp_foo (pre-sort checks) --- IkiWiki.pm | 4 ---- doc/plugins/write.mdwn | 5 ----- 2 files changed, 9 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 8f36f5818..7547f1751 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1973,10 +1973,6 @@ sub cmpspec_translate ($) { } if (exists $IkiWiki::PageSpec::{"cmp_$word"}) { - if (exists $IkiWiki::PageSpec::{"check_cmp_$word"}) { - $IkiWiki::PageSpec::{"check_cmp_$word"}->($params); - } - if (defined $params) { push @data, $params; $code .= "IkiWiki::PageSpec::cmp_$word(\@_, \$data[$#data])"; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index de2b47015..06c8f8e44 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1128,11 +1128,6 @@ is greater, or zero if they are considered equal. It may also raise an error using `error`, for instance if it needs a parameter but one isn't provided. -You can also define a function called `check_cmp_foo` in the same package. -If you do, it will be called while preparing to sort by `foo` or `foo(bar)`, -with argument `undef` or `"bar"` respectively; it may raise an error using -`error`, if sorting like that isn't going to work. - ### Setup plugins The ikiwiki setup file is loaded using a pluggable mechanism. If you look -- cgit v1.2.3 From 04a59b3c65e8e60805b6ed6d11d448b1d5babe64 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 3 Apr 2010 13:57:38 +0100 Subject: Move sort hooks to the IkiWiki::SortSpec namespace Also rename cmpspec_translate (internal function) to sortspec_translate for consistency. --- IkiWiki.pm | 14 ++++++++------ IkiWiki/Plugin/meta.pm | 2 ++ IkiWiki/Plugin/sortnaturally.pm | 2 +- doc/plugins/write.mdwn | 2 +- t/pagespec_match_list.t | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 7547f1751..d716e8b39 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -37,7 +37,7 @@ our $DEPEND_LINKS=4; # Optimisation. use Memoize; memoize("abs2rel"); -memoize("cmpspec_translate"); +memoize("sortspec_translate"); memoize("pagespec_translate"); memoize("template_file"); @@ -1935,7 +1935,7 @@ sub add_link ($$) { unless grep { $_ eq $link } @{$links{$page}}; } -sub cmpspec_translate ($) { +sub sortspec_translate ($) { my $spec = shift; my $code = ""; @@ -1972,13 +1972,13 @@ sub cmpspec_translate ($) { $code .= "-"; } - if (exists $IkiWiki::PageSpec::{"cmp_$word"}) { + if (exists $IkiWiki::SortSpec::{"cmp_$word"}) { if (defined $params) { push @data, $params; - $code .= "IkiWiki::PageSpec::cmp_$word(\@_, \$data[$#data])"; + $code .= "IkiWiki::SortSpec::cmp_$word(\@_, \$data[$#data])"; } else { - $code .= "IkiWiki::PageSpec::cmp_$word(\@_, undef)"; + $code .= "IkiWiki::SortSpec::cmp_$word(\@_, undef)"; } } else { @@ -2095,7 +2095,7 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f = cmpspec_translate($params{sort}); + my $f = sortspec_translate($params{sort}); @candidates = sort { $f->($a, $b) } @candidates; } @@ -2410,6 +2410,8 @@ sub match_ip ($$;@) { } } +package IkiWiki::SortSpec; + sub cmp_title { IkiWiki::pagetitle(IkiWiki::basename($_[0])) cmp diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index e8cc1e392..cd7d0d127 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -348,6 +348,8 @@ sub match_copyright ($$;@) { IkiWiki::Plugin::meta::match("copyright", @_); } +package IkiWiki::SortSpec; + sub cmp_meta_title { IkiWiki::Plugin::meta::titlesort($_[0]) cmp diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm index 0023f31f9..f498820a5 100644 --- a/IkiWiki/Plugin/sortnaturally.pm +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -22,7 +22,7 @@ sub checkconfig () { error $@ if $@; } -package IkiWiki::PageSpec; +package IkiWiki::SortSpec; sub cmp_title_natural { Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 06c8f8e44..b67142230 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1114,7 +1114,7 @@ while "glob(*)" is not influenced by the contents of any page. Similarly, it's possible to write plugins that add new functions as [[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to -the IkiWiki::PageSpec package named `cmp_foo`, which will be used when sorting +the IkiWiki::SortSpec package named `cmp_foo`, which will be used when sorting by `foo` or `foo(...)` is requested. The function will be passed three or more parameters. The first two are diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 743ae4637..68112f5c0 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -10,7 +10,7 @@ $config{srcdir}=$config{destdir}="/dev/null"; IkiWiki::checkconfig(); { - package IkiWiki::PageSpec; + package IkiWiki::SortSpec; sub cmp_path { $_[0] cmp $_[1] } } -- cgit v1.2.3 From c1a42e76bc6667bfb2882a12d53c25d9f952ca82 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 2 Apr 2010 00:28:02 +0100 Subject: implement typed links; add tagged_is_strict config option --- IkiWiki.pm | 58 ++++++++++++++++++---- IkiWiki/Plugin/tag.pm | 36 +++++++++----- IkiWiki/Render.pm | 33 ++++++++++++ .../tagged__40____41___matching_wikilinks.mdwn | 3 ++ doc/ikiwiki/pagespec.mdwn | 3 ++ doc/plugins/tag.mdwn | 5 ++ doc/plugins/write.mdwn | 21 +++++++- t/index.t | 17 +++++-- t/tag.t | 45 +++++++++++++++++ 9 files changed, 193 insertions(+), 28 deletions(-) create mode 100755 t/tag.t (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 6739ba56c..25e9247b2 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -14,7 +14,7 @@ use open qw{:utf8 :std}; use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles %pagesources %destsources %depends %depends_simple %hooks - %forcerebuild %loaded_plugins}; + %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks}; use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype @@ -24,7 +24,7 @@ our @EXPORT = qw(hook debug error template htmlpage deptype add_underlay pagetitle titlepage linkpage newpagefile inject add_link %config %links %pagestate %wikistate %renderedfiles - %pagesources %destsources); + %pagesources %destsources %typedlinks); our $VERSION = 3.00; # plugin interface version, next is ikiwiki version our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE our $installdir='/usr'; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE @@ -1503,7 +1503,7 @@ sub loadindex () { if (! $config{rebuild}) { %pagesources=%pagemtime=%oldlinks=%links=%depends= %destsources=%renderedfiles=%pagecase=%pagestate= - %depends_simple=(); + %depends_simple=%typedlinks=%oldtypedlinks=(); } my $in; if (! open ($in, "<", "$config{wikistatedir}/indexdb")) { @@ -1569,6 +1569,14 @@ sub loadindex () { if (exists $d->{state}) { $pagestate{$page}=$d->{state}; } + if (exists $d->{typedlinks}) { + $typedlinks{$page}=$d->{typedlinks}; + + while (my ($type, $links) = each %{$typedlinks{$page}}) { + next unless %$links; + $oldtypedlinks{$page}{$type} = {%$links}; + } + } } $oldrenderedfiles{$page}=[@{$d->{dest}}]; } @@ -1617,6 +1625,10 @@ sub saveindex () { $index{page}{$src}{depends_simple} = $depends_simple{$page}; } + if (exists $typedlinks{$page} && %{$typedlinks{$page}}) { + $index{page}{$src}{typedlinks} = $typedlinks{$page}; + } + if (exists $pagestate{$page}) { foreach my $id (@hookids) { foreach my $key (keys %{$pagestate{$page}{$id}}) { @@ -1926,12 +1938,17 @@ sub inject { use warnings; } -sub add_link ($$) { +sub add_link ($$;$) { my $page=shift; my $link=shift; + my $type=shift; push @{$links{$page}}, $link unless grep { $_ eq $link } @{$links{$page}}; + + if (defined $type) { + $typedlinks{$page}{$type}{$link} = 1; + } } sub pagespec_translate ($) { @@ -2212,6 +2229,11 @@ sub match_link ($$;@) { $link=derel($link, $params{location}); my $from=exists $params{location} ? $params{location} : ''; + my $linktype=$params{linktype}; + my $qualifier=''; + if (defined $linktype) { + $qualifier=" with type $linktype"; + } my $links = $IkiWiki::links{$page}; return IkiWiki::FailReason->new("$page has no links", $page => $IkiWiki::DEPEND_LINKS, "" => 1) @@ -2219,19 +2241,33 @@ sub match_link ($$;@) { my $bestlink = IkiWiki::bestlink($from, $link); foreach my $p (@{$links}) { if (length $bestlink) { - return IkiWiki::SuccessReason->new("$page links to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if $bestlink eq IkiWiki::bestlink($page, $p); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}) && $bestlink eq IkiWiki::bestlink($page, $p)) { + return IkiWiki::SuccessReason->new("$page links to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } } else { - return IkiWiki::SuccessReason->new("$page links to page $p matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if match_glob($p, $link, %params); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}) && match_glob($p, $link, %params)) { + return IkiWiki::SuccessReason->new("$page links to page $p$qualifier, matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } my ($p_rel)=$p=~/^\/?(.*)/; $link=~s/^\///; - return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if match_glob($p_rel, $link, %params); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p_rel}) && match_glob($p_rel, $link, %params)) { + return IkiWiki::SuccessReason->new("$page links to page $p_rel$qualifier, matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } } } - return IkiWiki::FailReason->new("$page does not link to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1); + return IkiWiki::FailReason->new("$page does not link to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1); +} + +sub match_typedlink($$;@) { + my $page = shift; + my $args = shift; + + if ($args =~ /^(\w+)\s+(.*)$/) { + return match_link($page, $2, @_, linktype => $1); + } + + return IkiWiki::ErrorReason->new("typedlink expects e.g. 'tag *' but got: $args"); } sub match_backlink ($$;@) { diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index cdcfaf536..af4bff1bc 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -6,8 +6,6 @@ use warnings; use strict; use IkiWiki 3.00; -my %tags; - sub import { hook(type => "getopt", id => "tag", call => \&getopt); hook(type => "getsetup", id => "tag", call => \&getsetup); @@ -36,6 +34,13 @@ sub getsetup () { safe => 1, rebuild => 1, }, + tagged_is_strict => { + type => "boolean", + default => 0, + description => "if 1, tagged() doesn't match normal WikiLinks to tag pages", + safe => 1, + rebuild => 1, + }, } sub tagpage ($) { @@ -71,9 +76,8 @@ sub preprocess_tag (@) { foreach my $tag (keys %params) { $tag=linkpage($tag); - $tags{$page}{$tag}=1; # hidden WikiLink - add_link($page, tagpage($tag)); + add_link($page, tagpage($tag), 'tag'); } return ""; @@ -87,15 +91,13 @@ sub preprocess_taglink (@) { return join(" ", map { if (/(.*)\|(.*)/) { my $tag=linkpage($2); - $tags{$params{page}}{$tag}=1; - add_link($params{page}, tagpage($tag)); + add_link($params{page}, tagpage($tag), 'tag'); return taglink($params{page}, $params{destpage}, $tag, linktext => pagetitle($1)); } else { my $tag=linkpage($_); - $tags{$params{page}}{$tag}=1; - add_link($params{page}, tagpage($tag)); + add_link($params{page}, tagpage($tag), 'tag'); return taglink($params{page}, $params{destpage}, $tag); } } @@ -110,17 +112,19 @@ sub pagetemplate (@) { my $destpage=$params{destpage}; my $template=$params{template}; + my $tags = $typedlinks{$page}{tag}; + $template->param(tags => [ map { link => taglink($page, $destpage, $_, rel => "tag") - }, sort keys %{$tags{$page}} - ]) if exists $tags{$page} && %{$tags{$page}} && $template->query(name => "tags"); + }, sort keys %$tags + ]) if defined $tags && %$tags && $template->query(name => "tags"); if ($template->query(name => "categories")) { # It's an rss/atom template. Add any categories. - if (exists $tags{$page} && %{$tags{$page}}) { + if (defined $tags && %$tags) { $template->param(categories => [map { category => $_ }, - sort keys %{$tags{$page}}]); + sort keys %$tags]); } } } @@ -130,7 +134,13 @@ package IkiWiki::PageSpec; sub match_tagged ($$;@) { my $page = shift; my $glob = shift; - return match_link($page, IkiWiki::Plugin::tag::tagpage($glob)); + + if ($IkiWiki::config{tagged_is_strict}) { + return match_link($page, IkiWiki::Plugin::tag::tagpage($glob), linktype => 'tag'); + } + else { + return match_link($page, IkiWiki::Plugin::tag::tagpage($glob)); + } } 1 diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index abafb0887..5810fc974 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -167,6 +167,7 @@ sub scan ($) { else { $links{$page}=[]; } + delete $typedlinks{$page}; run_hooks(scan => sub { shift->( @@ -398,6 +399,7 @@ sub find_del_files ($) { push @del, $pagesources{$page}; } $links{$page}=[]; + delete $typedlinks{$page}; $renderedfiles{$page}=[]; $pagemtime{$page}=0; } @@ -499,6 +501,29 @@ sub remove_unrendered () { } } +sub link_types_changed ($$) { + # each is of the form { type => { link => 1 } } + my $new = shift; + my $old = shift; + + return 0 if !defined $new && !defined $old; + return 1 if !defined $new || !defined $old; + + while (my ($type, $links) = each %$new) { + foreach my $link (keys %$links) { + return 1 unless exists $old{$type}{$link}; + } + } + + while (my ($type, $links) = each %$old) { + foreach my $link (keys %$links) { + return 1 unless exists $new{$type}{$link}; + } + } + + return 0; +} + sub calculate_changed_links ($$$) { my ($changed, $del, $oldlink_targets)=@_; @@ -525,6 +550,14 @@ sub calculate_changed_links ($$$) { } $linkchangers{lc($page)}=1; } + + # we currently assume that changing the type of a link doesn't + # change backlinks + if (!exists $linkchangers{lc($page)}) { + if (link_types_changed($typedlinks{$page}, $oldlinktypes{$page})) { + $linkchangers{lc($page)}=1; + } + } } return \%backlinkchanged, \%linkchangers; diff --git a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn index e7e4af7c3..9037d6c02 100644 --- a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn +++ b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn @@ -28,6 +28,9 @@ rationale on this, or what am I doing wrong, and how to achieve what I want? >> is valid. [[todo/matching_different_kinds_of_links]] is probably >> how it will eventually be solved. --[[Joey]] +>>> [[Done]]: you can now set the `tagged_is_strict` config option to `1` +>>> if you don't want `tagged` to match other wikilinks. --[[smcv]] + > And this is an illustration why a clean work-around (without changing the software) is not possible: while thinking about [[todo/matching_different_kinds_of_links]], I thought one could work around the problem by simply explicitly including the kind of the relation into the link target (like the tagbase in tags), and by having a separate page without the "tagbase" to link to when one wants simply to refer to the tag without tagging. But this won't work: one has to at least once refer to the real tag page if one wants to talk about it, and this reference will count as tagging (unwanted). --Ivan Z. > But well, perhaps there is a workaround without introducing different kinds of links. One could modify the [[tag plugin|plugins/tag]] so that it adds 2 links to a page: for tagging -- `tagbase/TAG`, and for navigation -- `tagdescription/TAG` (displayed at the bottom). Then the `tagdescription/TAG` page would hold whatever list one wishes (with `tagged(TAG)` in the pagespec), and whenever one wants to merely refer to the tag, one should link to `tagdescription/TAG`--this link won't count as tagging. So, `tagbase/TAG` would become completely auxiliary (internal) link targets for ikiwiki, the users would edit or link to only `tagdescription/TAG`. --Ivan Z. diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index 5c191f23f..ca6693024 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -52,6 +52,9 @@ Some more elaborate limits can be added to what matches using these functions: specified IP address. * "`postcomment(glob)`" - matches only when comments are being posted to a page matching the specified glob +* "`typedlink(type glob)`" - matches pages that link to a given page (or glob) + with a given link type. Plugins can create links with a specific type: + for instance, the tag plugin creates links of type `tag`. For example, to match all pages in a blog that link to the page about music and were written in 2005: diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index 8ff70a069..8cd79da41 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -8,6 +8,11 @@ These directives allow tagging pages. It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to match pages that are tagged with a specific tag. +If the `tagged_is_strict` config option is set, `tagged()` will only match +tags explicitly set with [[ikiwiki/directive/tag]] or +[[ikiwiki/directive/taglink]]; if not (the default), it will also match +any other [[WikiLinks|ikiwiki/WikiLink]] to the tag page. + [[!if test="enabled(tag)" then=""" This wiki has the tag plugin enabled, so you'll see a note below that this page is tagged with the "tags" tag. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 96a2aa16d..fe7cf0183 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -633,6 +633,22 @@ reference. Do not modify this hash directly; call `add_link()`. $links{"foo"} = ["bar", "baz"]; +### `%typedlinks` + +The `%typedlinks` hash records links of specific types. Do not modify this +hash directly; call `add_link()`. The keys are page names, and the values +are hash references. In each page's hash reference, the keys are link types +defined by plugins, and the values are hash references with link targets +as keys, and 1 as a dummy value, something like this: + + $typedlinks{"foo"} = { + tag => { short_word => 1, metasyntactic_variable => 1 }, + next_page => { bar => 1 }, + }; + +Ordinary [[WikiLinks|ikiwiki/WikiLink]] appear in `%links`, but not in +`%typedlinks`. + ### `%pagesources` The `%pagesources` has can be used to look up the source filename @@ -939,11 +955,14 @@ Optionally, a third parameter can be passed, to specify the preferred filename of the page. For example, `targetpage("foo", "rss", "feed")` will yield something like `foo/feed.rss`. -### `add_link($$)` +### `add_link($$;$)` This adds a link to `%links`, ensuring that duplicate links are not added. Pass it the page that contains the link, and the link text. +An optional third parameter sets the link type (`undef` produces an ordinary +[[ikiwiki/WikiLink]]). + ## Miscellaneous ### Internal use pages diff --git a/t/index.t b/t/index.t index 2f23524a7..44273059d 100755 --- a/t/index.t +++ b/t/index.t @@ -4,7 +4,7 @@ use strict; use IkiWiki; package IkiWiki; # use internal variables -use Test::More tests => 27; +use Test::More tests => 31; $config{wikistatedir}="/tmp/ikiwiki-test.$$"; system "rm -rf $config{wikistatedir}"; @@ -31,6 +31,7 @@ $renderedfiles{"bar"}=["bar.html", "bar.rss", "sparkline-foo.gif"]; $renderedfiles{"bar.png"}=["bar.png"]; $links{"Foo"}=["bar.png"]; $links{"bar"}=["Foo", "new-page"]; +$typedlinks{"bar"}={tag => {"Foo" => 1}}; $links{"bar.png"}=[]; $depends{"Foo"}={}; $depends{"bar"}={"foo*" => 1}; @@ -45,7 +46,7 @@ ok(-s "$config{wikistatedir}/indexdb", "index file created"); # Clear state. %oldrenderedfiles=%pagectime=(); -%pagesources=%pagemtime=%oldlinks=%links=%depends= +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= %destsources=%renderedfiles=%pagecase=%pagestate=(); ok(loadindex(), "load index"); @@ -104,10 +105,16 @@ is_deeply(\%destsources, { "sparkline-foo.gif" => "bar", "bar.png" => "bar.png", }, "%destsources generated correctly"); +is_deeply(\%typedlinks, { + bar => {tag => {"Foo" => 1}}, +}, "%typedlinks loaded correctly"); +is_deeply(\%oldtypedlinks, { + bar => {tag => {"Foo" => 1}}, +}, "%oldtypedlinks loaded correctly"); # Clear state. %oldrenderedfiles=%pagectime=(); -%pagesources=%pagemtime=%oldlinks=%links=%depends= +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= %destsources=%renderedfiles=%pagecase=%pagestate=(); # When state is loaded for a wiki rebuild, only ctime and oldrenderedfiles @@ -140,5 +147,9 @@ is_deeply(\%pagecase, { }, "%pagecase generated correctly"); is_deeply(\%destsources, { }, "%destsources generated correctly"); +is_deeply(\%typedlinks, { +}, "%typedlinks cleared correctly"); +is_deeply(\%oldtypedlinks, { +}, "%oldtypedlinks cleared correctly"); system "rm -rf $config{wikistatedir}"; diff --git a/t/tag.t b/t/tag.t new file mode 100755 index 000000000..3383fd475 --- /dev/null +++ b/t/tag.t @@ -0,0 +1,45 @@ +#!/usr/bin/perl +package IkiWiki; + +use warnings; +use strict; +use Test::More tests => 10; + +BEGIN { use_ok("IkiWiki"); } +BEGIN { use_ok("IkiWiki::Plugin::tag"); } + +ok(! system("rm -rf t/tmp; mkdir t/tmp")); + +$config{userdir} = "users"; +$config{tagbase} = "tags"; +$config{tagged_is_strict} = 1; + +%oldrenderedfiles=%pagectime=(); +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= +%destsources=%renderedfiles=%pagecase=%pagestate=(); + +foreach my $page (qw(tags/numbers tags/letters one two alpha beta)) { + $pagesources{$page} = "$page.mdwn"; + $pagemtime{$page} = $pagectime{$page} = 1000000; +} + +$links{one}=[qw(tags/numbers alpha tags/letters)]; +$links{two}=[qw(tags/numbers)]; +$links{alpha}=[qw(tags/letters one)]; +$links{beta}=[qw(tags/letters)]; +$typedlinks{one}={tag => {"tags/numbers" => 1 }}; +$typedlinks{two}={tag => {"tags/numbers" => 1 }}; +$typedlinks{alpha}={tag => {"tags/letters" => 1 }}; +$typedlinks{beta}={tag => {"tags/letters" => 1 }}; + +ok(pagespec_match("one", "tagged(numbers)")); +ok(!pagespec_match("two", "tagged(alpha)")); +ok(pagespec_match("one", "link(tags/numbers)")); +ok(pagespec_match("one", "link(alpha)")); + +ok(pagespec_match("one", "typedlink(tag tags/numbers)")); +ok(!pagespec_match("one", "typedlink(tag tags/letters)")); +# invalid syntax +ok(pagespec_match("one", "typedlink(tag)")->isa("IkiWiki::ErrorReason")); + +1; -- cgit v1.2.3 From ef6344144051ed70649ccbff01bcc4fce927ee2f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 4 Apr 2010 00:24:27 +0100 Subject: Remove tagged_is_strict option, and just behave as though it was enabled Jon was worried about the backwards-compatibility break involved in making tagged() not match non-tag links, but Joey seems less concerned about it. --- IkiWiki/Plugin/tag.pm | 17 +---------------- doc/bugs/tagged__40____41___matching_wikilinks.mdwn | 3 +-- doc/plugins/tag.mdwn | 5 ----- t/tag.t | 1 - 4 files changed, 2 insertions(+), 24 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index af4bff1bc..7a85874f6 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -34,13 +34,6 @@ sub getsetup () { safe => 1, rebuild => 1, }, - tagged_is_strict => { - type => "boolean", - default => 0, - description => "if 1, tagged() doesn't match normal WikiLinks to tag pages", - safe => 1, - rebuild => 1, - }, } sub tagpage ($) { @@ -132,15 +125,7 @@ sub pagetemplate (@) { package IkiWiki::PageSpec; sub match_tagged ($$;@) { - my $page = shift; - my $glob = shift; - - if ($IkiWiki::config{tagged_is_strict}) { - return match_link($page, IkiWiki::Plugin::tag::tagpage($glob), linktype => 'tag'); - } - else { - return match_link($page, IkiWiki::Plugin::tag::tagpage($glob)); - } + return match_link($_[0], IkiWiki::Plugin::tag::tagpage($_[1]), linktype => 'tag'); } 1 diff --git a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn index 9037d6c02..a211654f1 100644 --- a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn +++ b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn @@ -28,8 +28,7 @@ rationale on this, or what am I doing wrong, and how to achieve what I want? >> is valid. [[todo/matching_different_kinds_of_links]] is probably >> how it will eventually be solved. --[[Joey]] ->>> [[Done]]: you can now set the `tagged_is_strict` config option to `1` ->>> if you don't want `tagged` to match other wikilinks. --[[smcv]] +>>> [[Done]]: `tagged` no longer matches other wikilinks. --[[smcv]] > And this is an illustration why a clean work-around (without changing the software) is not possible: while thinking about [[todo/matching_different_kinds_of_links]], I thought one could work around the problem by simply explicitly including the kind of the relation into the link target (like the tagbase in tags), and by having a separate page without the "tagbase" to link to when one wants simply to refer to the tag without tagging. But this won't work: one has to at least once refer to the real tag page if one wants to talk about it, and this reference will count as tagging (unwanted). --Ivan Z. diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index 8cd79da41..8ff70a069 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -8,11 +8,6 @@ These directives allow tagging pages. It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to match pages that are tagged with a specific tag. -If the `tagged_is_strict` config option is set, `tagged()` will only match -tags explicitly set with [[ikiwiki/directive/tag]] or -[[ikiwiki/directive/taglink]]; if not (the default), it will also match -any other [[WikiLinks|ikiwiki/WikiLink]] to the tag page. - [[!if test="enabled(tag)" then=""" This wiki has the tag plugin enabled, so you'll see a note below that this page is tagged with the "tags" tag. diff --git a/t/tag.t b/t/tag.t index 3383fd475..cf3bbdf01 100755 --- a/t/tag.t +++ b/t/tag.t @@ -12,7 +12,6 @@ ok(! system("rm -rf t/tmp; mkdir t/tmp")); $config{userdir} = "users"; $config{tagbase} = "tags"; -$config{tagged_is_strict} = 1; %oldrenderedfiles=%pagectime=(); %pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= -- cgit v1.2.3 From 20040772cecbddf07ab6369a22ab2fe1ad794b48 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sun, 4 Apr 2010 00:27:20 +0000 Subject: update fieldsort plugin to be compatible with the latest version of my branch --- doc/plugins/contrib/field/discussion.mdwn | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 7e94a4029..ad17f87e6 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -68,15 +68,13 @@ I think it should just be part of `field` rather than a separate plugin. }, } - package IkiWiki::PageSpec; + package IkiWiki::SortSpec; - sub check_cmp_field { + sub cmp_field { if (!length $_[0]) { error("sort=field requires a parameter"); } - } - sub cmp_field { my $left = IkiWiki::Plugin::field::field_get_value($_[2], $_[0]); my $right = IkiWiki::Plugin::field::field_get_value($_[2], $_[1]); -- cgit v1.2.3 From 834936a408d0d9f481071fbcaefc67273eabb60c Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sun, 4 Apr 2010 14:03:51 +0000 Subject: bug report + patch: unnecessary YAML::Any dependency --- doc/plugins/contrib/field/discussion.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index ad17f87e6..c2b75a76d 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -84,3 +84,11 @@ I think it should just be part of `field` rather than a separate plugin. } 1; + +------- + +Bug report: `field` has an unnecessary `use YAML::Any`, presumably from before +you separated out `ymlfront`. Trivial patch available from +field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: +) +--[[smcv]] -- cgit v1.2.3 From f6dde92957f8b21d8823f2e51d9e3c48bbad7146 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sun, 4 Apr 2010 14:05:42 +0000 Subject: advertise some bugfixes --- doc/plugins/contrib/ymlfront/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/plugins/contrib/ymlfront/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ymlfront/discussion.mdwn b/doc/plugins/contrib/ymlfront/discussion.mdwn new file mode 100644 index 000000000..f437624b6 --- /dev/null +++ b/doc/plugins/contrib/ymlfront/discussion.mdwn @@ -0,0 +1,4 @@ +My field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: +) +has some fixes for compatibility with old YAML modules, mostly done by imitating +Joey's code in IkiWiki::Setup::Yaml. Please consider merging :-) --[[smcv]] -- cgit v1.2.3 From a01028ae8156679a108a40c62aa6b4cc3e2b3ae7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Apr 2010 17:02:10 -0400 Subject: txt: Add a special case for robots.txt. --- IkiWiki/Plugin/txt.pm | 9 ++++++++- debian/changelog | 1 + doc/plugins/txt.mdwn | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/txt.pm b/IkiWiki/Plugin/txt.pm index 1ed9f0856..0d9a0b35b 100644 --- a/IkiWiki/Plugin/txt.pm +++ b/IkiWiki/Plugin/txt.pm @@ -39,7 +39,14 @@ sub filter (@) { my %params = @_; my $content = $params{content}; - if (defined $pagesources{$params{page}} && $pagesources{$params{page}} =~ /\.txt$/) { + if (defined $pagesources{$params{page}} && + $pagesources{$params{page}} =~ /\.txt$/) { + if ($pagesources{$params{page}} eq 'robots.txt' && + $params{page} eq $params{destpage}) { + will_render($params{page}, 'robots.txt'); + writefile('robots.txt', $config{destdir}, $content); + } + encode_entities($content, "<>&"); if ($findurl) { my $finder = URI::Find->new(sub { diff --git a/debian/changelog b/debian/changelog index be89d0918..77d17f566 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ ikiwiki (3.20100404) UNRELEASED; urgency=low * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) * comments: Fix missing entity encoding in title. + * txt: Add a special case for robots.txt. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/plugins/txt.mdwn b/doc/plugins/txt.mdwn index 420898d09..a3087c9e0 100644 --- a/doc/plugins/txt.mdwn +++ b/doc/plugins/txt.mdwn @@ -12,3 +12,8 @@ The only exceptions are that [[WikiLinks|ikiwiki/WikiLink]] and [[directives|ikiwiki/directive]] are still expanded by ikiwiki, and that, if the [[!cpan URI::Find]] perl module is installed, URLs in the txt file are converted to hyperlinks. + +---- + +As a special case, a file `robots.txt` will be copied intact into the +`destdir`, as well as creating a wiki page named "robots". -- cgit v1.2.3 From cb8b2f80b2f8c91eba3f3a6a5b9913ab80326df8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 5 Apr 2010 22:50:51 +0100 Subject: Use $a and $b for SortSpec cmp callbacks --- IkiWiki.pm | 27 ++++++++++++++++++--------- IkiWiki/Plugin/meta.pm | 14 ++++++-------- IkiWiki/Plugin/sortnaturally.pm | 4 ++-- doc/plugins/write.mdwn | 20 ++++++++++---------- t/pagespec_match_list.t | 2 +- 5 files changed, 37 insertions(+), 30 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index d716e8b39..da36494fb 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1975,10 +1975,10 @@ sub sortspec_translate ($) { if (exists $IkiWiki::SortSpec::{"cmp_$word"}) { if (defined $params) { push @data, $params; - $code .= "IkiWiki::SortSpec::cmp_$word(\@_, \$data[$#data])"; + $code .= "IkiWiki::SortSpec::cmp_$word(\$data[$#data])"; } else { - $code .= "IkiWiki::SortSpec::cmp_$word(\@_, undef)"; + $code .= "IkiWiki::SortSpec::cmp_$word(undef)"; } } else { @@ -2095,9 +2095,8 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f = sortspec_translate($params{sort}); - - @candidates = sort { $f->($a, $b) } @candidates; + @candidates = IkiWiki::SortSpec::sort_pages($params{sort}, + @candidates); } @candidates=reverse(@candidates) if $params{reverse}; @@ -2412,13 +2411,23 @@ sub match_ip ($$;@) { package IkiWiki::SortSpec; +# This is in the SortSpec namespace so that the $a and $b that sort() uses +# $IkiWiki::SortSpec::a and $IkiWiki::SortSpec::b, so that plugins' cmp +# functions can access them easily. +sub sort_pages +{ + my $f = IkiWiki::sortspec_translate(shift); + + return sort $f @_; +} + sub cmp_title { - IkiWiki::pagetitle(IkiWiki::basename($_[0])) + IkiWiki::pagetitle(IkiWiki::basename($a)) cmp - IkiWiki::pagetitle(IkiWiki::basename($_[1])) + IkiWiki::pagetitle(IkiWiki::basename($b)) } -sub cmp_mtime { $IkiWiki::pagemtime{$_[1]} <=> $IkiWiki::pagemtime{$_[0]} } -sub cmp_age { $IkiWiki::pagectime{$_[1]} <=> $IkiWiki::pagectime{$_[0]} } +sub cmp_mtime { $IkiWiki::pagemtime{$b} <=> $IkiWiki::pagemtime{$a} } +sub cmp_age { $IkiWiki::pagectime{$b} <=> $IkiWiki::pagectime{$a} } 1 diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 4992617d0..553f93455 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -374,25 +374,23 @@ sub match_copyright ($$;@) { package IkiWiki::SortSpec; sub cmp_meta { - my $left = $_[0]; - my $right = $_[1]; - my $meta = $_[2]; + my $meta = $_[0]; error(gettext("sort=meta requires a parameter")) unless defined $meta; if ($meta eq 'updated' || $meta eq 'date') { - return IkiWiki::Plugin::meta::get_sort_key($left, $meta) + return IkiWiki::Plugin::meta::get_sort_key($a, $meta) <=> - IkiWiki::Plugin::meta::get_sort_key($right, $meta); + IkiWiki::Plugin::meta::get_sort_key($b, $meta); } - return IkiWiki::Plugin::meta::get_sort_key($left, $meta) + return IkiWiki::Plugin::meta::get_sort_key($a, $meta) cmp - IkiWiki::Plugin::meta::get_sort_key($right, $meta); + IkiWiki::Plugin::meta::get_sort_key($b, $meta); } # A prototype of how sort=title could behave in 4.0 or something sub cmp_meta_title { - $_[2] = 'title'; + $_[0] = 'title'; return cmp_meta(@_); } diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm index f498820a5..92453749d 100644 --- a/IkiWiki/Plugin/sortnaturally.pm +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -25,8 +25,8 @@ sub checkconfig () { package IkiWiki::SortSpec; sub cmp_title_natural { - Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), - IkiWiki::pagetitle(IkiWiki::basename($_[1]))) + Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($a)), + IkiWiki::pagetitle(IkiWiki::basename($b))) } 1; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index b67142230..f42cc86ae 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1117,16 +1117,16 @@ Similarly, it's possible to write plugins that add new functions as the IkiWiki::SortSpec package named `cmp_foo`, which will be used when sorting by `foo` or `foo(...)` is requested. -The function will be passed three or more parameters. The first two are -page names, and the third is `undef` if invoked as `foo`, or the parameter -`"bar"` if invoked as `foo(bar)`. It may also be passed additional, named -parameters. - -It should return the same thing as Perl's `cmp` and `<=>` operators: negative -if the first argument is less than the second, positive if the first argument -is greater, or zero if they are considered equal. It may also raise an -error using `error`, for instance if it needs a parameter but one isn't -provided. +The names of pages to be compared are in the global variables `$a` and `$b` +in the IkiWiki::SortSpec package. The function should return the same thing +as Perl's `cmp` and `<=>` operators: negative if `$a` is less than `$b`, +positive if `$a` is greater, or zero if they are considered equal. It may +also raise an error using `error`, for instance if it needs a parameter but +one isn't provided. + +The function will also be passed one or more parameters. The first is +`undef` if invoked as `foo`, or the parameter `"bar"` if invoked as `foo(bar)`; +it may also be passed additional, named parameters. ### Setup plugins diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 68112f5c0..2ad7a9105 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -12,7 +12,7 @@ IkiWiki::checkconfig(); { package IkiWiki::SortSpec; - sub cmp_path { $_[0] cmp $_[1] } + sub cmp_path { $a cmp $b } } %pagesources=( -- cgit v1.2.3 From 5f8df5828834c0163d04ad3b949888d78e37ae73 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Tue, 6 Apr 2010 03:59:09 +0000 Subject: --- doc/plugins/contrib/ymlfront/discussion.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ymlfront/discussion.mdwn b/doc/plugins/contrib/ymlfront/discussion.mdwn index f437624b6..ce3b2b483 100644 --- a/doc/plugins/contrib/ymlfront/discussion.mdwn +++ b/doc/plugins/contrib/ymlfront/discussion.mdwn @@ -2,3 +2,6 @@ My field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb ) has some fixes for compatibility with old YAML modules, mostly done by imitating Joey's code in IkiWiki::Setup::Yaml. Please consider merging :-) --[[smcv]] + +> I would if I could *find* it. I checked out the "field-etc" branch, but I can't find the plugins in question under IkiWiki/Plugin; am I looking in the wrong place, or what? +> --[[KathrynAndersen]] -- cgit v1.2.3 From 06f58b1b888a6cea1a9a5cce9e098428f0adab75 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Tue, 6 Apr 2010 04:00:47 +0000 Subject: response --- doc/plugins/contrib/field/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index c2b75a76d..af5bfd6c9 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -92,3 +92,5 @@ you separated out `ymlfront`. Trivial patch available from field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: ) --[[smcv]] + +> Can do for the field plugin (delete one line? Easy.) Will push when I get to a better connection. --[[KathrynAndersen]] -- cgit v1.2.3 From 2efec70c7e55f9426d7051ffebc6c1eb55afb16b Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Tue, 6 Apr 2010 10:47:28 +0000 Subject: oops, branch returned now --- doc/plugins/contrib/ymlfront/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/ymlfront/discussion.mdwn b/doc/plugins/contrib/ymlfront/discussion.mdwn index ce3b2b483..3ad02af29 100644 --- a/doc/plugins/contrib/ymlfront/discussion.mdwn +++ b/doc/plugins/contrib/ymlfront/discussion.mdwn @@ -5,3 +5,7 @@ Joey's code in IkiWiki::Setup::Yaml. Please consider merging :-) --[[smcv]] > I would if I could *find* it. I checked out the "field-etc" branch, but I can't find the plugins in question under IkiWiki/Plugin; am I looking in the wrong place, or what? > --[[KathrynAndersen]] + +>> Sorry, I accidentally removed `field-etc` by pushing with `--mirror` from a +>> different checkout. I've put it back; it's a branch from your `ikiplugins.git`, +>> so yes, the code should be in `IkiWiki/Plugin`. --[[smcv]] -- cgit v1.2.3 From 089a7faff8defe98ffc593702be93f8f35d2153a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Apr 2010 13:25:26 -0400 Subject: first question --- doc/plugins/contrib/field/discussion.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index af5bfd6c9..646a5f3f4 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -94,3 +94,18 @@ field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: --[[smcv]] > Can do for the field plugin (delete one line? Easy.) Will push when I get to a better connection. --[[KathrynAndersen]] + +---- + +Disclaimer: I've only looked at this plugin and ymlfront, not other related +stuff yet. (I quite like ymlfront, so I looked at this as its dependency. :) +I also don't want to annoy you with a lot of design discussion +if your main goal was to write a plugin that did exactly what you wanted. + +My first question is: Why we need another plugin storing metadata +about the page, when we already have the meta plugin? Much of the +complication around the field plugin has to do with it accessing info +belonging to the meta plugin, and generalizing that to be able to access +info stored by other plugins too. (But I don't see any other plugins that +currently store such info). Then too, it raises points of confusion like +smcv's discuission of field author vs meta author above. --[[Joey]] -- cgit v1.2.3 From 6fd59908ba8f6999f63c94c918f8c309ed108f74 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Apr 2010 14:06:29 -0400 Subject: comment --- doc/plugins/contrib/pod/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/pod/discussion.mdwn b/doc/plugins/contrib/pod/discussion.mdwn index 76e858680..9187b1350 100644 --- a/doc/plugins/contrib/pod/discussion.mdwn +++ b/doc/plugins/contrib/pod/discussion.mdwn @@ -8,3 +8,7 @@ supports, or later support latex, that could be problimatic since that could maybe be used to include files or run code. --[[Joey]] > I don't know, either; the documentation for [[!cpan Pod:Xhtml]] is silent on this subject. --[[KathrynAndersen]] + +>> I'm afraid the only approach is to audit the existing code in the perl +>> module(s), and then hope nothing is added to them later that opens a +>> security hole. --[[Joey]] -- cgit v1.2.3 From 121405e8aa80e7ceb5283b0ff8c9865458a6dd52 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Tue, 6 Apr 2010 23:09:59 +0000 Subject: response to Joey and smcv --- doc/plugins/contrib/field/discussion.mdwn | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 646a5f3f4..b243e2dfe 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -21,7 +21,9 @@ behaviour, an auxiliary plugin would be easy.) >> (like `map`). Is your plan that `meta` should register itself by >> default, and `map` and friends should be adapted to >> work based on `getfield()` instead of `$pagestate{foo}{meta}`, then? ->> + +>>> Based on `field_get_value()`, yes. That would be my ideal. Do you think I should implement that as an ikiwiki branch? --[[KathrynAndersen]] + >> (On the site I mentioned, I'm using an unmodified version of `field`, >> and currently working around the collision by tagging books' pages >> with `bookauthor` instead of `author` in the YAML.) --s @@ -94,6 +96,7 @@ field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: --[[smcv]] > Can do for the field plugin (delete one line? Easy.) Will push when I get to a better connection. --[[KathrynAndersen]] +>> Done! -K.A. ---- @@ -109,3 +112,16 @@ belonging to the meta plugin, and generalizing that to be able to access info stored by other plugins too. (But I don't see any other plugins that currently store such info). Then too, it raises points of confusion like smcv's discuission of field author vs meta author above. --[[Joey]] + +> The point is exactly in the generalization, to provide a uniform interface for accessing structured data, no matter what the source of it, whether that be the meta plugin or some other plugin. + +> There were a few reasons for this: + +>1. In converting my site over from PmWiki, I needed something that was equivalent to PmWiki's Page-Text-Variables (which is how PmWiki implements structured data). +>2. I also wanted an equivalent of PmWiki's Page-Variables, which, rather than being simple variables, are the return-value of a function. This gives one a lot of power, because one can do calculations, derive one thing from another. Heck, just being able to have a "basename" variable is useful. +>3. I noticed that in the discussion about structured data, it was mired down in disagreements about what form the structured data should take; I wanted to overcome that hurdle by decoupling the form from the content. +>4. I actually use this to solve (1), because, while I do use ymlfront, initially my pages were in PmWiki format (I wrote (another) unreleased plugin which parses PmWiki format) including PmWiki's Page-Text-Variables for structured data. So I needed something that could deal with multiple formats. + +> So, yes, it does cater to mostly my personal needs, but I think it is more generally useful, also. +> --[[KathrynAndersen]] + -- cgit v1.2.3 From 1158fe8f4400943d7a24350c6ac8fee6a95c2bed Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Wed, 7 Apr 2010 02:55:50 +0000 Subject: further discussion, point out potential XSS --- doc/plugins/contrib/field/discussion.mdwn | 110 ++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index b243e2dfe..16b40cf06 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -24,10 +24,64 @@ behaviour, an auxiliary plugin would be easy.) >>> Based on `field_get_value()`, yes. That would be my ideal. Do you think I should implement that as an ikiwiki branch? --[[KathrynAndersen]] +>>>> This doesn't solve cases where certain fields are treated specially; for +>>>> instance, putting a `\[[!meta permalink]]` on a page is not the same as +>>>> putting it in `ymlfront` (in the latter case you won't get your +>>>> `` header), and putting `\[[!meta date]]` is not the same as putting +>>>> `date` in `ymlfront` (in the latter case, `%pagectime` won't be changed). +>>>> +>>>> One way to resolve that would be to have `ymlfront`, or similar, be a +>>>> front-end for `meta` rather than for `field`, and call +>>>> `IkiWiki::Plugin::meta::preprocess` (or a refactored-out function that's +>>>> similar). +>>>> +>>>> There are also some cross-site scripting issues (see below)... --[[smcv]] + >> (On the site I mentioned, I'm using an unmodified version of `field`, >> and currently working around the collision by tagging books' pages >> with `bookauthor` instead of `author` in the YAML.) --s +>> Revisiting this after more thought, the problem here is similar to the +>> possibility that a wiki user adds a `meta` shortcut +>> to [[shortcuts]], or conversely, that a plugin adds a `cpan` directive +>> that conflicts with the `cpan` shortcut that pages already use. (In the +>> case of shortcuts, this is resolved by having plugin-defined directives +>> always win.) For plugin-defined meta keywords this is the plugin +>> author's/wiki admin's problem - just don't enable conflicting plugins! - +>> but it gets scary when you start introducing things like `ymlfront`, which +>> allow arbitrary, wiki-user-defined fields, even ones that subvert +>> other plugins' assumptions. +>> +>> The `pagetemplate` hook is particularly alarming because page templates are +>> evaluated in many contexts, not all of which are subject to the +>> htmlscrubber or escaping; because the output from `field` isn't filtered, +>> prefixed or delimited, when combined with an arbitrary-key-setting plugin +>> like `ymlfront` it can interfere with other plugins' expectations +>> and potentially cause cross-site scripting exploits. For instance, `inline` +>> has a `pagetemplate` hook which defines the `FEEDLINKS` template variable +>> to be a blob of HTML to put in the `` of the page. As a result, this +>> YAML would be bad: +>> +>> --- +>> FEEDLINKS: +>> --- +>> +>> (It might require a different case combination due to implementation +>> details, I'm not sure.) +>> +>> It's difficult for `field` to do anything about this, because it doesn't +>> know whether a field is meant to be plain text, HTML, a URL, or something +>> else. +>> +>> If `field`'s `pagetemplate` hook did something more limiting - like +>> only emitting template variables starting with `field_`, or from some +>> finite set, or something - then this would cease to be a problem, I think? +>> +>> `ftemplate` and `getfield` don't have this problem, as far as I can see, +>> because their output is in contexts where the user could equally well have +>> written raw HTML directly; the user can cause themselves confusion, but +>> can't cause harmful output. --[[smcv]] + From a coding style point of view, the `$CamelCase` variable names aren't IkiWiki style, and the `match_foo` functions look as though they could benefit from being thin wrappers around a common `&IkiWiki::Plugin::field::match` @@ -125,3 +179,59 @@ smcv's discuission of field author vs meta author above. --[[Joey]] > So, yes, it does cater to mostly my personal needs, but I think it is more generally useful, also. > --[[KathrynAndersen]] +>> Is it fair to say, then, that `field`'s purpose is to take other +>> plugins' arbitrary per-page data, and present it as a single +>> merged/flattened string => string map per page? From the plugins +>> here, things you then use that merged map for include: +>> +>> * sorting - stolen by [[todo/allow_plugins_to_add_sorting_methods]] +>> * substitution into pages with Perl-like syntax - `getfield` +>> * substitution into wiki-defined templates - the `pagetemplate` +>> hook +>> * substitution into user-defined templates - `ftemplate` +>> +>> As I mentioned above, the flattening can cause collisions (and in the +>> `pagetemplate` case, even security problems). +>> +>> I wonder whether conflating Page Text Variables with Page Variables +>> causes `field` to be more general than it needs to be? +>> To define a Page Variable (function-like field), you need to write +>> a plugin containing that Perl function; if we assume that `field` +>> or something resembling it gets merged into ikiwiki, then it's +>> reasonable to expect third-party plugins to integrate with whatever +>> scaffolding there is for these (either in an enabled-by-default +>> plugin that most people are expected to leave enabled, like `meta` +>> now, or in the core), and it doesn't seem onerous to expect each +>> plugin that wants to participate in this mechanism to have code to +>> do so. While it's still contrib, `field` could just have a special case +>> for the meta plugin, rather than the converse? +>> +>> If Page Text Variables are limited to being simple strings as you +>> suggest over in [[forum/an_alternative_approach_to_structured_data]], +>> then they're functionally similar to `meta` fields, so one way to +>> get their functionality would be to extend `meta` so that +>> +>> \[[!meta badger="mushroom"]] +>> +>> (for an unrecognised keyword `badger`) would store +>> `$pagestate{$page}{meta}{badger} = "mushroom"`? Getting this to +>> appear in templates might be problematic, because a naive +>> `pagetemplate` hook would have the same problem that `field` combined +>> with `ymlfront` currently does. +>> +>> One disadvantage that would appear if the function-like and +>> meta-like fields weren't in the same namespace would be that it +>> wouldn't be possible to switch a field from being meta-like to being +>> function-like without changing any wiki content that referenced it. +>> +>> Perhaps meta-like fields should just *be* `meta` (with the above +>> enhancement), as a trivial case of function-like fields? That would +>> turn `ymlfront` into an alternative syntax for `meta`, I think? +>> That, in turn, would hopefully solve the special-fields problem, +>> by just delegating it to meta. I've been glad of the ability to define +>> new ad-hoc fields with this plugin without having to write an extra plugin +>> to do so (listing books with a `bookauthor` and sorting them by +>> `"field(bookauthor) title"`), but that'd be just as easy if `meta` +>> accepted ad-hoc fields? +>> +>> --[[smcv]] -- cgit v1.2.3 From 3b1dd03c7e7f56eaf6da956779c885c2e9e7ef53 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Apr 2010 22:57:02 -0400 Subject: improve wording to not encourage explicitly passing undef --- doc/plugins/write.mdwn | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index fe7cf0183..71ff1fd29 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -960,8 +960,8 @@ will yield something like `foo/feed.rss`. This adds a link to `%links`, ensuring that duplicate links are not added. Pass it the page that contains the link, and the link text. -An optional third parameter sets the link type (`undef` produces an ordinary -[[ikiwiki/WikiLink]]). +An optional third parameter sets the link type. If not specified, +it is an ordinary [[ikiwiki/WikiLink]]. ## Miscellaneous -- cgit v1.2.3 From e12cd5f293fea9d85c7e4cdc86e2bf9381d5676a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Wed, 7 Apr 2010 03:03:40 +0000 Subject: update fieldsort plugin again; remove obsolete bug + fix note (thanks!) --- doc/plugins/contrib/field/discussion.mdwn | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 16b40cf06..2ea195e5b 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -131,8 +131,8 @@ I think it should just be part of `field` rather than a separate plugin. error("sort=field requires a parameter"); } - my $left = IkiWiki::Plugin::field::field_get_value($_[2], $_[0]); - my $right = IkiWiki::Plugin::field::field_get_value($_[2], $_[1]); + my $left = IkiWiki::Plugin::field::field_get_value($_[0], $a); + my $right = IkiWiki::Plugin::field::field_get_value($_[0], $b); $left = "" unless defined $left; $right = "" unless defined $right; @@ -141,17 +141,6 @@ I think it should just be part of `field` rather than a separate plugin. 1; -------- - -Bug report: `field` has an unnecessary `use YAML::Any`, presumably from before -you separated out `ymlfront`. Trivial patch available from -field-etc branch in git://git.pseudorandom.co.uk/git/smcv/ikiwiki.git (gitweb: -) ---[[smcv]] - -> Can do for the field plugin (delete one line? Easy.) Will push when I get to a better connection. --[[KathrynAndersen]] ->> Done! -K.A. - ---- Disclaimer: I've only looked at this plugin and ymlfront, not other related -- cgit v1.2.3 From be2af2e5c1ddfe90802a67aa150cf17dbe903df0 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Apr 2010 23:19:00 -0400 Subject: add cpan link --- doc/plugins/sortnaturally.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/sortnaturally.mdwn b/doc/plugins/sortnaturally.mdwn index 91f373f6b..a16381946 100644 --- a/doc/plugins/sortnaturally.mdwn +++ b/doc/plugins/sortnaturally.mdwn @@ -1,5 +1,6 @@ [[!template id=plugin name=sortnaturally core=1 author="[[chrysn]], [[smcv]]"]] [[!tag type/meta]] -This plugin provides the `title_natural` [[ikiwiki/pagespec/sorting]] order, -which uses Sort::Naturally to sort numbered pages in a more natural order. +This plugin provides the `title_natural` [[ikiwiki/pagespec/sorting]] +order, which uses [[!cpan Sort::Naturally]] to sort numbered pages in a +more natural order. -- cgit v1.2.3 From d58444a3e956e329cea4cbcdddcba99664ee585e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 7 Apr 2010 00:01:38 -0400 Subject: note about sort and dependency types There's a gotcha where pagespec_match_list is used with a dependency type that is not a full content dependency, and so ikiwiki does not know that a content change to a page that sorted too low to match needs to trigger a rebuild, since its sort order may have changed. Inline is mostly ok re this, as it does use content dependencies. Except for in the case of raw mode. But then, page metadata is documented to not be loaded, so it doesn't make sense to use sortspecs that depend on metadata. I hope. :) --- doc/plugins/write.mdwn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 05ddf2215..707622956 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -734,7 +734,10 @@ Additional named parameters can be specified: * `filter` is a reference to a function, that is called and passed a page, and returns true if the page should be filtered out of the list. * `sort` specifies a sort order for the list. See - [[ikiwiki/PageSpec/sorting]] for the avilable sort methods. + [[ikiwiki/PageSpec/sorting]] for the avilable sort methods. Note that + if a sort method is specified that depends on the + page content (such as 'meta(foo)'), the deptype needs to be set to + a content dependency. * `reverse` if true, sorts in reverse. * `num` if nonzero, specifies the maximum number of matching pages that will be returned. -- cgit v1.2.3 From 2e9fae5c11d9fabf6270de18d0c26bc251750b09 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 7 Apr 2010 15:12:39 +0000 Subject: response about XSS, meta and pagetemplates --- doc/plugins/contrib/field/discussion.mdwn | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 2ea195e5b..dd9342224 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -224,3 +224,32 @@ smcv's discuission of field author vs meta author above. --[[Joey]] >> accepted ad-hoc fields? >> >> --[[smcv]] + +>>> Your point above about cross-site scripting is a valid one, and something I +>>> hadn't thought of (oops). + +>>> I still want to be able to populate pagetemplate templates with field, because I +>>> use it for a number of things, such as setting which CSS files to use for a +>>> given page, and, as I said, for titles. But apart from the titles, I +>>> realize I've been setting them in places other than the page data itself. +>>> (Another unreleased plugin, `concon`, uses Config::Context to be able to +>>> set variables on a per-site, per-directory and a per-page basis). + +>>> The first possible solution is what you suggested above: for field to only +>>> set values in pagetemplate which are prefixed with *field_*. I don't think +>>> this is quite satisfactory, since that would still mean that people could +>>> put un-scrubbed values into a pagetemplate, albeit they would be values +>>> named field_foo, etc. + +>>> An alternative solution would be to classify field registration as "secure" +>>> and "insecure". Sources such as ymlfront would be insecure, sources such +>>> as concon (or the $config hash) would be secure, since they can't be edited +>>> as pages. Then, when doing pagetemplate substitution (but not ftemplate +>>> substitution) the insecure sources could be HTML-escaped. + +>>> Another problem, as you point out, is special-case fields, such as a number of +>>> those defined by `meta`, which have side-effects associated with them, more +>>> than just providing a value to pagetemplate. Perhaps `meta` should deal with +>>> the side-effects, but use `field` as an interface to get the values of those special fields. + +>>> --[[KathrynAndersen]] -- cgit v1.2.3 From e46a3b753463e71d8a24c35a5035cfbc47dd4816 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Wed, 7 Apr 2010 17:39:04 +0000 Subject: "safe" and "unsafe" too simplistic, I suspect --- doc/plugins/contrib/field/discussion.mdwn | 49 ++++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index dd9342224..24c37cc4c 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -239,13 +239,60 @@ smcv's discuission of field author vs meta author above. --[[Joey]] >>> set values in pagetemplate which are prefixed with *field_*. I don't think >>> this is quite satisfactory, since that would still mean that people could >>> put un-scrubbed values into a pagetemplate, albeit they would be values ->>> named field_foo, etc. +>>> named field_foo, etc. --[[KathrynAndersen]] + +>>>> They can already do similar; `PERMALINK` is pre-sanitized to +>>>> ensure that it's a "safe" URL, but if an extremely confused wiki admin was +>>>> to put `COPYRIGHT` in their RSS/Atom feed's ``, a malicious user +>>>> could put an unsafe (e.g. Javascript) URL in there (`COPYRIGHT` *is* +>>>> HTML-scrubbed, but "javascript:alert('pwned!')" is just text as far as a +>>>> HTML sanitizer is concerned, so it passes straight through). The solution +>>>> is to not use variables in situations where that variable would be +>>>> inappropriate. Because `field` is so generic, the definition of what's +>>>> appropriate is difficult. --[[smcv]] >>> An alternative solution would be to classify field registration as "secure" >>> and "insecure". Sources such as ymlfront would be insecure, sources such >>> as concon (or the $config hash) would be secure, since they can't be edited >>> as pages. Then, when doing pagetemplate substitution (but not ftemplate >>> substitution) the insecure sources could be HTML-escaped. +>>> --[[KathrynAndersen]] + +>>>> Whether you trust the supplier of data seems orthogonal to whether its value +>>>> is (meant to be) interpreted as plain text, HTML, a URL or what? +>>>> +>>>> Even in cases where you trust the supplier, you need to escape things +>>>> suitably for the context, not for security but for correctness. The +>>>> definition of the value, and the context it's being used in, changes the +>>>> processing you need to do. An incomplete list: +>>>> +>>>> * HTML used as HTML needs to be html-scrubbed if and only if untrusted +>>>> * URLs used as URLs need to be put through `safeurl()` if and only if +>>>> untrusted +>>>> * HTML used as plain text needs tags removed regardless +>>>> * URLs used as plain text are safe +>>>> * URLs or plain text used in HTML need HTML-escaping (and URLs also need +>>>> `safeurl()` if untrusted) +>>>> * HTML or plain text used in URLs need URL-escaping (and the resulting +>>>> URL might need sanitizing too?) +>>>> +>>>> I can't immediately think of other data types we'd be interested in beyond +>>>> text, HTML and URL, but I'm sure there are plenty. +>>>> +>>>> One reasonable option would be to declare that `field` takes text-valued +>>>> fields, in which case either consumers need to escape +>>>> it with ``, and not interpret it as a URL +>>>> without first checking `safeurl`), or the pagetemplate hook needs to +>>>> pre-escape. +>>>> +>>>> Another reasonable option would be to declare that `field` takes raw HTML, +>>>> in which case consumers need to only use it in contexts that will be +>>>> HTML-scrubbed (but it becomes unsuitable for using as text - problematic +>>>> for text-based things like sorting or URLs, and not ideal for searching). +>>>> +>>>> You could even let each consumer choose how it's going to use the field, +>>>> by having the `foo` field generate `TEXT_FOO` and `HTML_FOO` variables? +>>>> --[[smcv]] >>> Another problem, as you point out, is special-case fields, such as a number of >>> those defined by `meta`, which have side-effects associated with them, more -- cgit v1.2.3 From 15a65ffae67b7eaf2702b3a42edee95daf8f4c89 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 7 Apr 2010 23:29:25 +0000 Subject: further response to smcv on pagetemplates --- doc/plugins/contrib/field/discussion.mdwn | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 24c37cc4c..36c2118e7 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -278,13 +278,34 @@ smcv's discuission of field author vs meta author above. --[[Joey]] >>>> >>>> I can't immediately think of other data types we'd be interested in beyond >>>> text, HTML and URL, but I'm sure there are plenty. ->>>> + +>>>>> But isn't this a problem with anything that uses pagetemplates? Or is +>>>>> the point that, with plugins other than `field`, they all know, +>>>>> beforehand, the names of all the fields that they are dealing with, and +>>>>> thus the writer of the plugin knows which treatment each particular field +>>>>> needs? For example, that `meta` knows that `title` needs to be +>>>>> HTML-escaped, and that `baseurl` doesn't. In that case, yes, I see the problem. +>>>>> It's a tricky one. It isn't as if there's only ever going to be a fixed set of fields that need different treatment, either. Because the site admin is free to add whatever fields they like to the page template (if they aren't using the default one, that is. I'm not using the default one myself). +>>>>> Mind you, for trusted sources, since the person writing the page template and the person providing the variable are the same, they themselves would know whether the value will be treated as HTML, plain text, or a URL, and thus could do the needed escaping themselves when writing down the value. + +>>>>> Looking at the content of the default `page.tmpl` let's see what variables fall into which categories: +>>>>> * Used as URL: BASEURL, EDITURL, PARENTLINKS->URL, RECENTCHANGESURL, HISTORYURL, GETSOURCEURL, PREFSURL, OTHERLANGUAGES->URL, ADDCOMMENTURL, BACKLINKS->URL, MORE_BACKLINKS->URL +>>>>> * Used as part of a URL: FAVICON, LOCAL_CSS +>>>>> * Needs to be HTML-escaped: TITLE +>>>>> * Used as-is (as HTML): FEEDLINKS, RELVCS, META, PERCENTTRANSLATED, SEARCHFORM, COMMENTSLINK, DISCUSSIONLINK, OTHERLANGUAGES->PERCENT, SIDEBAR, CONTENT, COMMENTS, TAGS->LINK, COPYRIGHT, LICENSE, MTIME, EXTRAFOOTER + +>>>>> This looks as if only TITLE needs HTML-escaping all the time, and that the URLS all end with "URL" in their name. Unfortunately the FAVICON and LOCAL_CSS which are part of URLS don't have "URL" in their name, though that's fair enough, since they aren't full URLs. + +>>>>> --K.A. + >>>> One reasonable option would be to declare that `field` takes text-valued >>>> fields, in which case either consumers need to escape >>>> it with ``, and not interpret it as a URL >>>> without first checking `safeurl`), or the pagetemplate hook needs to >>>> pre-escape. ->>>> + +>>>>> Since HTML::Template does have the ability to do ESCAPE=HTML/URL/JS, why not take advantage of that? Some things, like TITLE, probably should have ESCAPE=HTML all the time; that would solve the "to escape or not to escape" problem that `meta` has with titles. After all, when one *sorts* by title, one doesn't really want HTML-escaping in it; only when one uses it in a template. -- K.A. + >>>> Another reasonable option would be to declare that `field` takes raw HTML, >>>> in which case consumers need to only use it in contexts that will be >>>> HTML-scrubbed (but it becomes unsuitable for using as text - problematic @@ -294,6 +315,8 @@ smcv's discuission of field author vs meta author above. --[[Joey]] >>>> by having the `foo` field generate `TEXT_FOO` and `HTML_FOO` variables? >>>> --[[smcv]] +>>>>> Something similar is already done in `template` and `ftemplate` with the `raw_` prefix, which determines whether the variable should have `htmlize` run over it first before the value is applied to the template. Of course, that isn't scrubbing or escaping, because with those templates, the scrubbing is done afterwards as part of the normal processing. + >>> Another problem, as you point out, is special-case fields, such as a number of >>> those defined by `meta`, which have side-effects associated with them, more >>> than just providing a value to pagetemplate. Perhaps `meta` should deal with -- cgit v1.2.3 From ce9cf967d01eb8e112c19d9f7b1c9a727717ef30 Mon Sep 17 00:00:00 2001 From: "http://kerravonsen.dreamwidth.org/" Date: Wed, 7 Apr 2010 23:33:04 +0000 Subject: formatting --- doc/plugins/contrib/field/discussion.mdwn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/field/discussion.mdwn b/doc/plugins/contrib/field/discussion.mdwn index 36c2118e7..103e061e5 100644 --- a/doc/plugins/contrib/field/discussion.mdwn +++ b/doc/plugins/contrib/field/discussion.mdwn @@ -289,10 +289,11 @@ smcv's discuission of field author vs meta author above. --[[Joey]] >>>>> Mind you, for trusted sources, since the person writing the page template and the person providing the variable are the same, they themselves would know whether the value will be treated as HTML, plain text, or a URL, and thus could do the needed escaping themselves when writing down the value. >>>>> Looking at the content of the default `page.tmpl` let's see what variables fall into which categories: ->>>>> * Used as URL: BASEURL, EDITURL, PARENTLINKS->URL, RECENTCHANGESURL, HISTORYURL, GETSOURCEURL, PREFSURL, OTHERLANGUAGES->URL, ADDCOMMENTURL, BACKLINKS->URL, MORE_BACKLINKS->URL ->>>>> * Used as part of a URL: FAVICON, LOCAL_CSS ->>>>> * Needs to be HTML-escaped: TITLE ->>>>> * Used as-is (as HTML): FEEDLINKS, RELVCS, META, PERCENTTRANSLATED, SEARCHFORM, COMMENTSLINK, DISCUSSIONLINK, OTHERLANGUAGES->PERCENT, SIDEBAR, CONTENT, COMMENTS, TAGS->LINK, COPYRIGHT, LICENSE, MTIME, EXTRAFOOTER + +>>>>> * **Used as URL:** BASEURL, EDITURL, PARENTLINKS->URL, RECENTCHANGESURL, HISTORYURL, GETSOURCEURL, PREFSURL, OTHERLANGUAGES->URL, ADDCOMMENTURL, BACKLINKS->URL, MORE_BACKLINKS->URL +>>>>> * **Used as part of a URL:** FAVICON, LOCAL_CSS +>>>>> * **Needs to be HTML-escaped:** TITLE +>>>>> * **Used as-is (as HTML):** FEEDLINKS, RELVCS, META, PERCENTTRANSLATED, SEARCHFORM, COMMENTSLINK, DISCUSSIONLINK, OTHERLANGUAGES->PERCENT, SIDEBAR, CONTENT, COMMENTS, TAGS->LINK, COPYRIGHT, LICENSE, MTIME, EXTRAFOOTER >>>>> This looks as if only TITLE needs HTML-escaping all the time, and that the URLS all end with "URL" in their name. Unfortunately the FAVICON and LOCAL_CSS which are part of URLS don't have "URL" in their name, though that's fair enough, since they aren't full URLs. -- cgit v1.2.3 From 358fa953e189d6f8a7925be8533fe7b7c5699503 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Apr 2010 16:40:01 -0400 Subject: sidebar: Now a sidebar directive can be used to override the sidebar shown on a page. --- IkiWiki/Plugin/sidebar.pm | 42 +++++++++++++++++++++++++++++++++++++- debian/changelog | 2 ++ doc/ikiwiki/directive/sidebar.mdwn | 14 +++++++++++++ doc/plugins/sidebar.mdwn | 17 +++++++-------- 4 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 doc/ikiwiki/directive/sidebar.mdwn (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm index 41812e1c1..d63cb5246 100644 --- a/IkiWiki/Plugin/sidebar.pm +++ b/IkiWiki/Plugin/sidebar.pm @@ -10,6 +10,7 @@ use IkiWiki 3.00; sub import { hook(type => "getsetup", id => "sidebar", call => \&getsetup); + hook(type => "preprocess", id => "sidebar", call => \&preprocess); hook(type => "pagetemplate", id => "sidebar", call => \&pagetemplate); } @@ -21,9 +22,39 @@ sub getsetup () { }, } +my %pagesidebar; + +sub preprocess (@) { + my %params=@_; + my $content=shift; + shift; + + if (! defined $content) { + error(gettext("sidebar content not specified")); + } + + my $page=$params{page}; + return "" unless $page eq $params{destpage}; + my $file = $pagesources{$page}; + my $type = pagetype($file); + + $pagesidebar{$page}= + IkiWiki::htmlize($page, $page, $type, + IkiWiki::linkify($page, $page, + IkiWiki::preprocess($page, $page, + IkiWiki::filter($page, $page, $content)))); + + return ""; +} + +my $oldfile; +my $oldcontent; + sub sidebar_content ($) { my $page=shift; + return $pagesidebar{$page} if exists $pagesidebar{$page}; + my $sidebar_page=bestlink($page, "sidebar") || return; my $sidebar_file=$pagesources{$sidebar_page} || return; my $sidebar_type=pagetype($sidebar_file); @@ -34,7 +65,16 @@ sub sidebar_content ($) { # currently requires a wiki rebuild. add_depends($page, $sidebar_page); - my $content=readfile(srcfile($sidebar_file)); + my $content; + if (defined $oldfile && $sidebar_file eq $oldfile) { + $content=$oldcontent; + } + else { + $content=readfile(srcfile($sidebar_file)); + $oldcontent=$content; + $oldfile=$sidebar_file; + } + return unless length $content; return IkiWiki::htmlize($sidebar_page, $page, $sidebar_type, IkiWiki::linkify($sidebar_page, $page, diff --git a/debian/changelog b/debian/changelog index 03361e6a0..267a2fd7a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -37,6 +37,8 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low in a tag cloud. This is useful to put in a sidebar. * Rework example blog front page. * CSS and templates for sidebar changed to use a class, not an id. + * sidebar: Now a sidebar directive can be used to override the sidebar + shown on a page. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/ikiwiki/directive/sidebar.mdwn b/doc/ikiwiki/directive/sidebar.mdwn new file mode 100644 index 000000000..46f016747 --- /dev/null +++ b/doc/ikiwiki/directive/sidebar.mdwn @@ -0,0 +1,14 @@ +The `sidebar` directive is supplied by the [[!iki plugins/sidebar desc=sidebar]] plugin. + +This directive specifies a custom sidebar to display on the page, instead +of any sidebar that is displayed globally. + +## examples + + \[[!sidebar """ + This is my custom sidebar for this page. + + \[[!calendar pages="posts/*"]] + """]] + +[[!meta robots="noindex, follow"]] diff --git a/doc/plugins/sidebar.mdwn b/doc/plugins/sidebar.mdwn index 4e356d65a..cd0f0ecf1 100644 --- a/doc/plugins/sidebar.mdwn +++ b/doc/plugins/sidebar.mdwn @@ -10,15 +10,16 @@ Typically this will be a page in the root of the wiki, but it can also be a [[plugins/sidebar|plugins/sidebar]], will be treated as a sidebar for the [[plugins]] page, and of all of its SubPages, if the plugin is enabled. -Note that to disable a sidebar for a [[ikiwiki/SubPage]] of a page that has -a sidebar, you can create a sidebar page that is completely empty. This -will turn off the sidebar altogether. +There is also a [[ikiwiki/directive/sidebar]] directive that can be used +to provide a custom sidebar content for a page. -Warning: Any change to the sidebar will cause a rebuild of the whole wiki, -since every page includes a copy that has to be updated. This can -especially be a problem if the sidebar includes an [[ikiwiki/directive/inline]] -directive, since any changes to pages inlined into the sidebar -will change the sidebar and cause a full wiki rebuild. +---- + +Warning: Any change to the sidebar page will cause a rebuild of the whole +wiki, since every page includes a copy that has to be updated. This can +especially be a problem if the sidebar includes an +[[ikiwiki/directive/inline]] directive, since any changes to pages inlined +into the sidebar will change the sidebar and cause a full wiki rebuild. Instead, if you include a [[ikiwiki/directive/map]] directive on the sidebar, and it does not use the `show` parameter, only adding or removing pages -- cgit v1.2.3 From 1f7175e891f87c350decc1ec821bebb5adc22c2a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Apr 2010 17:31:50 -0400 Subject: sidebar: Add global_sidebars setting. --- IkiWiki/Plugin/sidebar.pm | 9 +++++++++ debian/changelog | 1 + doc/ikiwiki/directive/sidebar.mdwn | 4 ++-- doc/plugins/sidebar.mdwn | 8 +++++--- 4 files changed, 17 insertions(+), 5 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm index d63cb5246..1b302dcf9 100644 --- a/IkiWiki/Plugin/sidebar.pm +++ b/IkiWiki/Plugin/sidebar.pm @@ -20,6 +20,13 @@ sub getsetup () { safe => 1, rebuild => 1, }, + global_sidebars => { + type => "boolean", + examples => 1, + description => "show sidebar page on all pages?" + safe => 1, + rebuild => 1, + }, } my %pagesidebar; @@ -55,6 +62,8 @@ sub sidebar_content ($) { return $pagesidebar{$page} if exists $pagesidebar{$page}; + return if defined $config{global_sidebars} && !$config{global_sidebars}; + my $sidebar_page=bestlink($page, "sidebar") || return; my $sidebar_file=$pagesources{$sidebar_page} || return; my $sidebar_type=pagetype($sidebar_file); diff --git a/debian/changelog b/debian/changelog index af19f4a00..c379253d7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -40,6 +40,7 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * sidebar: Now a sidebar directive can be used to override the sidebar shown on a page. * Enable calendar and sidebar in auto-blog.setup. + * sidebar: Add global_sidebars setting. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/ikiwiki/directive/sidebar.mdwn b/doc/ikiwiki/directive/sidebar.mdwn index 46f016747..34f078672 100644 --- a/doc/ikiwiki/directive/sidebar.mdwn +++ b/doc/ikiwiki/directive/sidebar.mdwn @@ -1,7 +1,7 @@ The `sidebar` directive is supplied by the [[!iki plugins/sidebar desc=sidebar]] plugin. -This directive specifies a custom sidebar to display on the page, instead -of any sidebar that is displayed globally. +This directive specifies a custom sidebar to display on the page, +overriding any sidebar that is displayed globally. ## examples diff --git a/doc/plugins/sidebar.mdwn b/doc/plugins/sidebar.mdwn index cd0f0ecf1..012733456 100644 --- a/doc/plugins/sidebar.mdwn +++ b/doc/plugins/sidebar.mdwn @@ -1,9 +1,11 @@ [[!template id=plugin name=sidebar author="Tuomo Valkonen"]] [[!tag type/chrome]] -If this plugin is enabled, then a sidebar is added to pages in the wiki. -The content of the sidebar is simply the content of a page named -"sidebar" (ie, create a "sidebar.mdwn"). +This plugin allows adding a sidebar to pages in the wiki. + +By default, and unless the `global_sidebars` setting is turned off, +a sidebar is added to all pages in the wiki. The content of the sidebar +is simply the content of a page named "sidebar" (ie, create a "sidebar.mdwn"). Typically this will be a page in the root of the wiki, but it can also be a [[ikiwiki/SubPage]]. In fact, this page, -- cgit v1.2.3 From 142e025ae471c91e68a23476f700df0b8ad6b31d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 15 Apr 2010 20:12:03 -0400 Subject: calendar: Improved display of arrows. --- IkiWiki/Plugin/calendar.pm | 21 +++++++++++---------- debian/changelog | 1 + doc/plugins/calendar.mdwn | 2 ++ doc/style.css | 8 ++++++++ 4 files changed, 22 insertions(+), 10 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index 0f0e9518a..aeb5f3d29 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -164,11 +164,11 @@ sub format_month (@) { # Start producing the month calendar $calendar=< - - $purl - $url - $nurl - + + $purl + $url + $nurl + EOF @@ -312,13 +312,14 @@ sub format_year (@) { add_depends($params{page}, "$archivebase/$nyear", deptype("presence")); # Start producing the year calendar + my $m=$params{months_per_row}-2; $calendar=< - - $purl - $url - $nurl - + + $purl + $url + $nurl + Months diff --git a/debian/changelog b/debian/changelog index e4056fdc6..737d73655 100644 --- a/debian/changelog +++ b/debian/changelog @@ -43,6 +43,7 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * sidebar: Add global_sidebars setting. * conditional: Fix bug that forced "all" mode off by default. * calendarmonth.tmpl: The month calendar is now put in a sidebar. + * calendar: Improved display of arrows. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/plugins/calendar.mdwn b/doc/plugins/calendar.mdwn index 49fd90627..76e718a3b 100644 --- a/doc/plugins/calendar.mdwn +++ b/doc/plugins/calendar.mdwn @@ -14,6 +14,7 @@ customization. * `month-calendar` - The month calendar as a whole. * `month-calendar-head` - The head of the month calendar (ie,"March"). +* `month-calendar-arrow` - Arrow pointing to previous/next month. * `month-calendar-day-head` - A column head in the month calendar (ie, a day-of-week abbreviation). * `month-calendar-day-noday`, `month-calendar-day-link`, @@ -27,6 +28,7 @@ customization. weekends. * `year-calendar` - The year calendar as a whole. * `year-calendar-head` - The head of the year calendar (ie, "2007"). +* `year-calendar-arrow` - Arrow pointing to previous/next year. * `year-calendar-subhead` - For example, "Months". * `year-calendar-month-link`, `year-calendar-month-nolink`, `year-calendar-month-future`, `year-calendar-this-month` - The month diff --git a/doc/style.css b/doc/style.css index 44e06ae4f..7ffcf9fe2 100644 --- a/doc/style.css +++ b/doc/style.css @@ -431,3 +431,11 @@ pre.hl { color:#000000; background-color:#ffffff; } /* For the calendar plugin. */ .month-calendar-day-this-day { background-color: #eee; } .year-calendar-this-month { background-color: #eee; } +.month-calendar-arrow A:link, +.year-calendar-arrow A:link, +.month-calendar-arrow A:visited, +.year-calendar-arrow A:visited { + text-decoration: none; + font-weight: normal; + font-size: 150%; +} -- cgit v1.2.3 From b14f84c4acccbc8450a9102b3b647013989b27bb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Apr 2010 17:02:29 -0400 Subject: --gettime revamp * Rename --getctime to --gettime. (The old name still works for backwards compatability.) * --gettime now also looks up last modification time. * Add rcs_getmtime to plugin API; currently only implemented for git. --- IkiWiki.pm | 8 +++++-- IkiWiki/Plugin/bzr.pm | 5 +++++ IkiWiki/Plugin/cvs.pm | 5 +++++ IkiWiki/Plugin/darcs.pm | 5 +++++ IkiWiki/Plugin/git.pm | 5 +++++ IkiWiki/Plugin/mercurial.pm | 5 +++++ IkiWiki/Plugin/monotone.pm | 5 +++++ IkiWiki/Plugin/norcs.pm | 7 +++++- IkiWiki/Plugin/svn.pm | 5 +++++ IkiWiki/Plugin/tla.pm | 5 +++++ IkiWiki/Render.pm | 18 +++++++++++++--- debian/changelog | 5 +++++ .../How_does_ikiwiki_remember_times__63__.mdwn | 25 ++++++---------------- ...old_repository_to_new_ikiwiki_system__63__.mdwn | 4 ---- doc/plugins/write.mdwn | 7 ++++++ doc/rcs.mdwn | 8 +++++-- doc/tips/Importing_posts_from_Wordpress.mdwn | 2 +- doc/tips/inside_dot_ikiwiki/discussion.mdwn | 7 +++--- doc/todo/auto_getctime_on_fresh_build.mdwn | 8 +++++-- doc/usage.mdwn | 10 ++++----- ikiwiki.in | 3 ++- mtime-to-git | 14 ------------ 22 files changed, 109 insertions(+), 57 deletions(-) delete mode 100755 mtime-to-git (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1730e476a..7655dada5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -440,10 +440,10 @@ sub getsetup () { safe => 0, rebuild => 0, }, - getctime => { + gettime => { type => "internal", default => 0, - description => "running in getctime mode", + description => "running in gettime mode", safe => 0, rebuild => 0, }, @@ -1790,6 +1790,10 @@ sub rcs_getctime ($) { $hooks{rcs}{rcs_getctime}{call}->(@_); } +sub rcs_getmtime ($) { + $hooks{rcs}{rcs_getmtime}{call}->(@_); +} + sub rcs_receive () { $hooks{rcs}{rcs_receive}{call}->(); } diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 0efc26b49..f79ca7c8f 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -20,6 +20,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -306,4 +307,8 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for bzr\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index 26a3e9dd2..360d97249 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -49,6 +49,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub genwrapper () { @@ -485,4 +486,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for cvs\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm index bc8394b90..c1d6661d3 100644 --- a/IkiWiki/Plugin/darcs.pm +++ b/IkiWiki/Plugin/darcs.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub silentsystem (@) { @@ -427,4 +428,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for darcs\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index b02f4a5ed..86d80186f 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -25,6 +25,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); hook(type => "rcs", id => "rcs_receive", call => \&rcs_receive); } @@ -634,6 +635,10 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for git\n"; # TODO +} + sub rcs_receive () { # The wiki may not be the only thing in the git repo. # Determine if it is in a subdirectory by examining the srcdir, diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index ea00a3364..34e009c7a 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -20,6 +20,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -254,4 +255,8 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for mercurial\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm index c33cf7e3a..67d4abbaa 100644 --- a/IkiWiki/Plugin/monotone.pm +++ b/IkiWiki/Plugin/monotone.pm @@ -23,6 +23,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -693,4 +694,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for monotone\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/norcs.pm b/IkiWiki/Plugin/norcs.pm index e6a05a3c5..053652a5f 100644 --- a/IkiWiki/Plugin/norcs.pm +++ b/IkiWiki/Plugin/norcs.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub getsetup () { @@ -63,7 +64,11 @@ sub rcs_diff ($) { } sub rcs_getctime ($) { - error gettext("getctime not implemented"); + return 0; +} + +sub rcs_getmtime ($) { + return 0; } 1 diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm index 7d27ec842..85c205f09 100644 --- a/IkiWiki/Plugin/svn.pm +++ b/IkiWiki/Plugin/svn.pm @@ -19,6 +19,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -379,4 +380,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for svn\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm index 764da9b98..f5ad0cc96 100644 --- a/IkiWiki/Plugin/tla.pm +++ b/IkiWiki/Plugin/tla.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -284,4 +285,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for tla\n"; # TODO +} + 1 diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index e98888d76..e1cb68462 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -365,14 +365,26 @@ sub find_new_files ($) { } else { push @new, $file; - if ($config{getctime} && -e "$config{srcdir}/$file") { + if ($config{gettime} && -e "$config{srcdir}/$file") { eval { - my $time=rcs_getctime("$config{srcdir}/$file"); - $pagectime{$page}=$time; + my $ctime=rcs_getctime("$config{srcdir}/$file"); + if ($ctime > 0) { + $pagectime{$page}=$ctime; + } }; if ($@) { print STDERR $@; } + my $mtime; + eval { + my $mtime=rcs_getmtime("$config{srcdir}/$file"); + }; + if ($@) { + print STDERR $@; + } + elsif ($mtime > 0) { + utime($mtime, $mtime, "$config{srcdir}/$file"); + } } } $pagecase{lc $page}=$page; diff --git a/debian/changelog b/debian/changelog index 737d73655..615d5916f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -44,6 +44,11 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * conditional: Fix bug that forced "all" mode off by default. * calendarmonth.tmpl: The month calendar is now put in a sidebar. * calendar: Improved display of arrows. + * Rename --getctime to --gettime. (The old name still works for + backwards compatability.) + * --gettime now also looks up last modification time. + * Add rcs_getmtime to plugin API; currently only implemented + for git. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn index 6ce576db1..6b7739fd0 100644 --- a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn +++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn @@ -20,15 +20,17 @@ Do I have it right? > Some VCS, like git, set the file mtimes to the current time > when making a new checkout, so they will be lost if you do that. > The creation times can be retrived using the `--getctime` option. -> I suppose it might be nice if there were a `--getmtime` that pulled -> true modification times out of the VCS, but I haven't found it a big -> deal in practice for the last modification times to be updated to the -> current time when rebuilding a wiki like this. --[[Joey]] +> --[[Joey]] > > > Thanks for the clarification. I ran some tests of my own to make sure I understand it right, and I'm satisfied > > that the order of posts in my blog can be retrieved from the VCS using the `--getctime` option, at least if I > > choose to order my posts by creation time rather than modification time. But I now know that I can't rely on > > page modification times in ikiwiki as these can be lost permanently. +> +> > > Update: It's now renamed to `--gettime`, and pulls both the creation +> > > and modification times. Also, per [[todo/auto_getctime_on_fresh_build]], +> > > this is now done automatically the first time ikiwiki builds a +> > > srcdir. So, no need to worry about this any more! --[[Joey]] > > > > I would suggest that there should at least be a `--getmtime` option like you describe, and perhaps that > > `--getctime` and `--getmtime` be _on by default_. In my opinion the creation times and modification times of @@ -91,19 +93,6 @@ Do I have it right? > A quick workaround for me to get modification times right is the following > little zsh script, which unfortunately only works for git: - #!/usr/bin/env zsh - - set +x - - for FILE in **/*(.); do - TIMES="`git log --pretty=format:%ai $FILE`" - MTIME="`echo $TIMES | head -n1`" - - if [ ! -z $MTIME ]; then - echo touch -m -d "$MTIME" $FILE - touch -m -d "$MTIME" $FILE - fi - - done +>> Elided; no longer needed since --gettime does that, and much faster! --[[Joey]] > --[[David_Riebenbauer]] diff --git a/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn b/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn index fe67e6aba..d7a33b526 100644 --- a/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn +++ b/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn @@ -20,10 +20,6 @@ How do I set up an ikiwiki system using a pre-existing repository (instead of cr > recreate the ikiwiki srcdir > 3. `git clone` from the bare git repository a second time, > to create a checkout you can manually edit (optional) -> 4. run `ikiwiki --getctime --setup your.setup` -> The getctime will ensure page creation times are accurate -> by putting the info out of the git history, -> and only needs to be done once. > > If you preserved your repository, but not the setup file, > the easiest way to make one is probably to run diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 707622956..cf7044b2c 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1085,6 +1085,13 @@ it up in the history. It's ok if this is not implemented, and throws an error. +#### `rcs_getmtime($)` + +This is used to get the page modification time for a file from the RCS, by +looking it up in the history. + +It's ok if this is not implemented, and throws an error. + #### `rcs_receive()` This is called when ikiwiki is running as a pre-receive hook (or diff --git a/doc/rcs.mdwn b/doc/rcs.mdwn index 4e7a8d2a6..b5bfc2414 100644 --- a/doc/rcs.mdwn +++ b/doc/rcs.mdwn @@ -14,8 +14,10 @@ use, some advanced or special features are not supported in all of them. Lack of support in [[ikiwiki-makerepo]] or auto.setup can make it harder to set up a wiki using that revision control system. The `rcs_commit_staged` hook is needed to use [[attachments|plugins/attachment]] or -[[plugins/comments]]. And so on. The table below summarises this for each -revision control system and links to more information about each. +[[plugins/comments]]. `rcs_getctime` may be implemented in a fast way +(ie, one log lookup for all files), or very slowly (one lookup per file). +And so on. The table below summarises this for each revision control +system and links to more information about each. [[!table data=""" feature |[[git]]|[[svn]]|[[bzr]] |[[monotone]]|[[mercurial]]|[[darcs]]|[[tla]] |[[cvs]] @@ -25,6 +27,8 @@ auto.setup |yes |yes |incomplete|yes |incomplete |yes `rcs_rename` |yes |yes |yes |yes |no |yes |no |yes `rcs_remove` |yes |yes |yes |yes |no |yes |no |yes `rcs_diff` |yes |yes |yes |yes |no |yes |yes |yes +`rcs_getctime` |fast |slow |slow |slow |slow |slow |slow |slow +`rcs_getmtime` |fast |no |no |no |no |no |no |no anonymous push |yes |no |no |no |no |no |no |no conflict handling |yes |yes |yes |buggy |yes |yes |yes |yes """]] diff --git a/doc/tips/Importing_posts_from_Wordpress.mdwn b/doc/tips/Importing_posts_from_Wordpress.mdwn index 59330caa4..8774c9723 100644 --- a/doc/tips/Importing_posts_from_Wordpress.mdwn +++ b/doc/tips/Importing_posts_from_Wordpress.mdwn @@ -1,6 +1,6 @@ Use case: You want to move away from Wordpress to Ikiwiki as your blogging/website platform, but you want to retain your old posts. -[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. It retains creation time of each post, so you can use Ikiwiki's --getctime to get the preserve creation times on checkout. +[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. It retains creation time of each post, so you can use Ikiwiki's --gettime to get the preserve creation times on checkout. WordPress categories are mapped onto Ikiwiki tags. The ability to import comments is planned. diff --git a/doc/tips/inside_dot_ikiwiki/discussion.mdwn b/doc/tips/inside_dot_ikiwiki/discussion.mdwn index 34d5b9252..69df369ec 100644 --- a/doc/tips/inside_dot_ikiwiki/discussion.mdwn +++ b/doc/tips/inside_dot_ikiwiki/discussion.mdwn @@ -6,14 +6,15 @@ My database appears corrupted: No idea how this happened. I've blown it away and recreated it but, for future reference, is there any less violent way to recover from this situation? I miss having the correct created and last edited times. --[[sabr]] > update: fixed ctimes and mtimes using [these instructions](http://u32.net/Mediawiki_Conversion/Git_Import/#Correct%20Creation%20and%20Last%20Edited%20time) --[[sabr]] -> That's overly complex. Just run `ikiwiki -setup your.setup -getctime`. +> That's overly complex. Just run `ikiwiki -setup your.setup -gettime`. > BTW, I'd be interested in examining such a corrupt storable file to try > to see what happened to it. --[[Joey]] ->> --getctime appears to only set the last edited date. It's not supposed to set the creation date, is it? The only place that info is stored is in the git repo. +>> --gettime appears to only set the last edited date. It's not supposed to set the creation date, is it? The only place that info is stored is in the git repo. >>> Pulling the page creation date out of the git history is exactly what ->>> --getctime does. --[[Joey]] +>>> --gettime does. (It used to be called --getctime, and only do that; now +>>> it also pulls out the last modified date). --[[Joey]] >> Alas, I seem to have lost the bad index file to periodic /tmp wiping; I'll send it to you if it happens again. --[[sabr]] diff --git a/doc/todo/auto_getctime_on_fresh_build.mdwn b/doc/todo/auto_getctime_on_fresh_build.mdwn index ea95fb8c9..760c56fa1 100644 --- a/doc/todo/auto_getctime_on_fresh_build.mdwn +++ b/doc/todo/auto_getctime_on_fresh_build.mdwn @@ -1,9 +1,13 @@ [[!tag wishlist]] -It might be a good idea to enable --getctime when `.ikiwiki` does not +It might be a good idea to enable --gettime when `.ikiwiki` does not exist. This way a new checkout of a `srcdir` would automatically get -ctimes right. (Running --getctime whenever a rebuild is done would be too +ctimes right. (Running --gettime whenever a rebuild is done would be too slow.) --[[Joey]] Could this be too annoying in some cases, eg, checking out a large wiki that needs to get set up right away? --[[Joey]] + +> Not for git with the new, optimised --getctime. For other VCS.. well, +> pity they're not as fast as git ;), but it is a one-time expense... +> [[done]] --[[Joey]] diff --git a/doc/usage.mdwn b/doc/usage.mdwn index db1e36a10..553fef01e 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -320,13 +320,11 @@ also be configured using a setup file. intercepted. If you enable this option then you must run at least the CGI portion of ikiwiki over SSL. -* --getctime +* --gettime - Pull creation time for each new page out of the revision control - system. This rarely used option provides a way to get the real creation - times of items in weblogs, such as when building a wiki from a new - VCS checkout. It is unoptimised and quite slow. It is best used - with --rebuild, to force ikiwiki to get the ctime for all pages. + Extract creation and modification times for each new page from the + the revision control's log. This is done automatically when building a + wiki for the first time, so you normally do not need to use this option. * --set var=value diff --git a/ikiwiki.in b/ikiwiki.in index 38e4d3201..801ff9a0b 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -44,7 +44,8 @@ sub getconfig () { "wrappergroup=s" => \$config{wrappergroup}, "usedirs!" => \$config{usedirs}, "prefix-directives!" => \$config{prefix_directives}, - "getctime" => \$config{getctime}, + "getctime" => \$config{gettime}, + "gettime" => \$config{gettime}, "numbacklinks=i" => \$config{numbacklinks}, "rcs=s" => \$config{rcs}, "no-rcs" => sub { $config{rcs}="" }, diff --git a/mtime-to-git b/mtime-to-git deleted file mode 100755 index 9875af5d7..000000000 --- a/mtime-to-git +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# Sets mtimes of all files in the tree their last change date -# based on git's log. Useful to avoid too new dates after a -# fresh checkout, which lead to ikiwiki unnecessarily rebuilding -# basewiki files on upgrade. -if [ -d .git ]; then - for file in $(git ls-files); do - date="$(git log -1 --date=rfc "$file" | grep ^Date: | sed -e 's/Date://')" - if [ -n "$date" ]; then - echo "$date $file" - touch -d"$date" $file - fi - done -fi -- cgit v1.2.3 From dee2940c0bc97080088c99f399cd0ff0df3bec23 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Apr 2010 18:29:45 -0400 Subject: automatically run --gettime, and optimise it for git * Automatically run --gettime the first time ikiwiki is run on a given srcdir. * Optimise --gettime for git, so it's appropriatly screamingly fast. (This could be done for other backends too.) * However, --gettime for git no longer follows renames. * Use above to fix up timestamps on docwiki, as well as ensure that timestamps on basewiki files shipped in the deb are sane. --- IkiWiki.pm | 2 +- IkiWiki/Plugin/git.pm | 48 ++++++++++++++++++++++++++++++++++++------------ IkiWiki/Render.pm | 11 +++++++++-- debian/changelog | 7 +++++++ debian/control | 2 +- doc/plugins/write.mdwn | 4 ++++ doc/usage.mdwn | 2 +- docwiki.setup | 17 ++++++++++++++++- ikiwiki.in | 2 +- 9 files changed, 76 insertions(+), 19 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 7655dada5..b37b1f344 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -442,7 +442,6 @@ sub getsetup () { }, gettime => { type => "internal", - default => 0, description => "running in gettime mode", safe => 0, rebuild => 0, @@ -1512,6 +1511,7 @@ sub loadindex () { open ($in, "<", "$config{wikistatedir}/indexdb") || return; } else { + $config{gettime}=1; # first build return; } } diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 86d80186f..aa402c04f 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -616,27 +616,51 @@ sub rcs_diff ($) { } } -sub rcs_getctime ($) { +{ +my %time_cache; + +sub findtimes ($$) { my $file=shift; + my $id=shift; # 0 = mtime ; 1 = ctime + # Remove srcdir prefix $file =~ s/^\Q$config{srcdir}\E\/?//; - my @raw_lines = run_or_die('git', 'log', - '--follow', '--no-merges', - '--pretty=raw', '--raw', '--abbrev=40', '--always', '-c', - '-r', '--', $file); - my @ci; - while (my $parsed = parse_diff_tree("", \@raw_lines)) { - push @ci, $parsed; + if (! keys %time_cache) { + my $date; + foreach my $line (run_or_die('git', 'log', + '--pretty=format:%ct', + '--name-only', '--relative')) { + if (! defined $date && $line =~ /^(\d+)$/) { + $date=$line; + } + elsif (! length $line) { + $date=undef; + } + else { + if (! $time_cache{$line}) { + $time_cache{$line}[0]=$date; # mtime + } + $time_cache{$line}[1]=$date; # ctime + } + } } - my $ctime = $ci[$#ci]->{'author_epoch'}; - debug("ctime for '$file': ". localtime($ctime)); - return $ctime; + return exists $time_cache{$file} ? $time_cache{$file}[$id] : 0; +} + +} + +sub rcs_getctime ($) { + my $file=shift; + + return findtimes($file, 1); } sub rcs_getmtime ($) { - error "rcs_getmtime is not implemented for git\n"; # TODO + my $file=shift; + + return findtimes($file, 0); } sub rcs_receive () { diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index e1cb68462..a6b0f0617 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -352,6 +352,8 @@ sub find_new_files ($) { my @new; my @internal_new; + my $times_noted; + foreach my $file (@$files) { my $page=pagename($file); if (exists $pagesources{$page} && $pagesources{$page} ne $file) { @@ -363,7 +365,12 @@ sub find_new_files ($) { if (isinternal($page)) { push @internal_new, $file; } - else { + elsif ($config{rcs}) { + if (! $times_noted) { + debug(sprintf(gettext("querying %s for file creation and modification times.."), $config{rcs})); + $times_noted=1; + } + push @new, $file; if ($config{gettime} && -e "$config{srcdir}/$file") { eval { @@ -377,7 +384,7 @@ sub find_new_files ($) { } my $mtime; eval { - my $mtime=rcs_getmtime("$config{srcdir}/$file"); + $mtime=rcs_getmtime("$config{srcdir}/$file"); }; if ($@) { print STDERR $@; diff --git a/debian/changelog b/debian/changelog index 615d5916f..60a67cbe3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,8 +47,15 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * Rename --getctime to --gettime. (The old name still works for backwards compatability.) * --gettime now also looks up last modification time. + * Automatically run --gettime the first time ikiwiki is run on + a given srcdir. * Add rcs_getmtime to plugin API; currently only implemented for git. + * Optimise --gettime for git, so it's appropriatly screamingly + fast. (This could be done for other backends too.) + * However, --gettime for git no longer follows renames. + * Use above to fix up timestamps on docwiki, as well as ensure that + timestamps on basewiki files shipped in the deb are sane. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/debian/control b/debian/control index 87f7d8209..ae06f32b0 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: dpkg-dev (>= 1.9.0), libxml-simple-perl, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, wdg-html-validator, libhtml-parser-perl, liburi-perl, perlmagick, po4a (>= 0.34), - libfile-chdir-perl + libfile-chdir-perl, Maintainer: Joey Hess Uploaders: Josh Triplett Standards-Version: 3.8.4 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index cf7044b2c..0bf6fcf48 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1085,6 +1085,8 @@ it up in the history. It's ok if this is not implemented, and throws an error. +If the RCS cannot determine a ctime for the file, return 0. + #### `rcs_getmtime($)` This is used to get the page modification time for a file from the RCS, by @@ -1092,6 +1094,8 @@ looking it up in the history. It's ok if this is not implemented, and throws an error. +If the RCS cannot determine a mtime for the file, return 0. + #### `rcs_receive()` This is called when ikiwiki is running as a pre-receive hook (or diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 553fef01e..2e12517ea 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -320,7 +320,7 @@ also be configured using a setup file. intercepted. If you enable this option then you must run at least the CGI portion of ikiwiki over SSL. -* --gettime +* --gettime, --no-gettime Extract creation and modification times for each new page from the the revision control's log. This is done automatically when building a diff --git a/docwiki.setup b/docwiki.setup index 8278b73ea..6bc200066 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -1,6 +1,18 @@ #!/usr/bin/perl # Configuration file for ikiwiki to build its documentation wiki. +# Use git during the build, if it's available and if we're building +# from a git checkout. This ensures ikiwiki gets the right mtimes and +# ctimes for files in the doc wiki. +our $rcs="norcs"; +BEGIN { + my $git=`which git 2>&1`; + chomp $git; + if (-x $git && -d ".git") { + $rcs="git"; + } +} + use IkiWiki::Setup::Standard { wikiname => "ikiwiki", srcdir => "doc", @@ -9,7 +21,7 @@ use IkiWiki::Setup::Standard { underlaydirbase => "underlays", underlaydir => "underlays/basewiki", discussion => 0, - exclude => qr/\/discussion|bugs\/*|todo\/*|forum\/*/, + exclude => qr/\/discussion|bugs\/*|todo\/*|forum\/*/, # save space locale => '', verbose => 1, syslog => 0, @@ -17,4 +29,7 @@ use IkiWiki::Setup::Standard { usedirs => 0, prefix_directives => 1, add_plugins => [qw{goodstuff version haiku polygen fortune table}], + disable_plugins => [qw{recentchanges}], # not appropriate for doc dir + rcs => $rcs, + gitorigin_branch => '', # don't pull during build } diff --git a/ikiwiki.in b/ikiwiki.in index 801ff9a0b..acd37f802 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -45,7 +45,7 @@ sub getconfig () { "usedirs!" => \$config{usedirs}, "prefix-directives!" => \$config{prefix_directives}, "getctime" => \$config{gettime}, - "gettime" => \$config{gettime}, + "gettime!" => \$config{gettime}, "numbacklinks=i" => \$config{numbacklinks}, "rcs=s" => \$config{rcs}, "no-rcs" => sub { $config{rcs}="" }, -- cgit v1.2.3 From ca02c57ee47d4c05946c0c34eee32a0ad4ec6b01 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 17 Apr 2010 14:07:12 -0400 Subject: document add_autofile --- doc/plugins/write.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 0bf6fcf48..e33c99421 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -966,6 +966,22 @@ added. Pass it the page that contains the link, and the link text. An optional third parameter sets the link type. If not specified, it is an ordinary [[ikiwiki/WikiLink]]. +### `add_autofile($$$)` + +Sometimes you may want to add a file to the `srcdir`. For example, +[[plugins/tag]] pages can be automatically created as needed. This function +can be used to do that. + +The three parameters are the filename to add, the name of the plugin, +and a callback function. The callback will be called if it is appropriate +to automatically add the file, and should then take care of creating it, +and doing anything else it needs to (such as checking it into revision +control). Note that the callback may not always be called. For example, +if an automatically added file is deleted by the user, ikiwiki will avoid +re-adding it again. + +This function needs to be called during the scan hook, or earlier to work. + ## Miscellaneous ### Internal use pages -- cgit v1.2.3 From 59ceeb5621ae0ae2bcb7501c6ac0c7a06562a7cc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 17 Apr 2010 17:15:07 -0400 Subject: improve docs --- doc/plugins/write.mdwn | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index e33c99421..5190a26ed 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -968,9 +968,9 @@ it is an ordinary [[ikiwiki/WikiLink]]. ### `add_autofile($$$)` -Sometimes you may want to add a file to the `srcdir`. For example, -[[plugins/tag]] pages can be automatically created as needed. This function -can be used to do that. +Sometimes you may want to add a file to the `srcdir` as a result of content +of other pages. For example, [[plugins/tag]] pages can be automatically +created as needed. This function can be used to do that. The three parameters are the filename to add, the name of the plugin, and a callback function. The callback will be called if it is appropriate @@ -980,7 +980,8 @@ control). Note that the callback may not always be called. For example, if an automatically added file is deleted by the user, ikiwiki will avoid re-adding it again. -This function needs to be called during the scan hook, or earlier to work. +This function needs to be called during the scan hook, or earlier in the +build process, in order to add the file early enough for it to be built. ## Miscellaneous -- cgit v1.2.3 From 9c8761ba49b06a76a923eb91735f842f419d2916 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 21 Apr 2010 14:27:12 -0400 Subject: add_autofile filename should be relative to srcdir --- doc/plugins/write.mdwn | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 5190a26ed..404c3b44f 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -972,13 +972,13 @@ Sometimes you may want to add a file to the `srcdir` as a result of content of other pages. For example, [[plugins/tag]] pages can be automatically created as needed. This function can be used to do that. -The three parameters are the filename to add, the name of the plugin, -and a callback function. The callback will be called if it is appropriate -to automatically add the file, and should then take care of creating it, -and doing anything else it needs to (such as checking it into revision -control). Note that the callback may not always be called. For example, -if an automatically added file is deleted by the user, ikiwiki will avoid -re-adding it again. +The three parameters are the filename to create (relative to the `srcdir`), +the name of the plugin, and a callback function. The callback will be +called if it is appropriate to automatically add the file, and should then +take care of creating it, and doing anything else it needs to (such as +checking it into revision control). Note that the callback may not always +be called. For example, if an automatically added file is deleted by the +user, ikiwiki will avoid re-adding it again. This function needs to be called during the scan hook, or earlier in the build process, in order to add the file early enough for it to be built. -- cgit v1.2.3 From 204c0a63f3fd7673dac83da6aa5f9c9e3cc9a6c5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 21 Apr 2010 15:22:05 -0400 Subject: document tag_autocreate --- debian/changelog | 2 ++ doc/plugins/tag.mdwn | 3 +++ doc/roadmap.mdwn | 1 + 3 files changed, 6 insertions(+) (limited to 'doc/plugins') diff --git a/debian/changelog b/debian/changelog index b7ec99463..d66b5e4d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low [ Joey Hess ] + * tag: Automatic creation of tag pages can now be enabled using + the tag_autocreate setting. (David Riebenbauer) * bzr: Fix bzr log parsing to work with bzr 2.0. (liw) * comments: Fix missing entity encoding in title. * txt: Add a special case for robots.txt. diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index 8ff70a069..bdf39d7e8 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -8,6 +8,9 @@ These directives allow tagging pages. It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to match pages that are tagged with a specific tag. +If the `tag_autocreate` setting is enabled, tag pages will automatically be +created as needed. + [[!if test="enabled(tag)" then=""" This wiki has the tag plugin enabled, so you'll see a note below that this page is tagged with the "tags" tag. diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 0c7bf2fa8..8e2a01827 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -78,6 +78,7 @@ Probably incomplete list: * Make pagespecs match relative by default? (see [[discussion]]) * Flip wikilinks? (see [[todo/link_plugin_perhaps_too_general?]]) * YADA format setup files per default? +* Enable `tag_autocreate` by default. In general, we try to use [[ikiwiki-transition]] or forced rebuilds on upgrade to deal with changes that break compatability. Some things that -- cgit v1.2.3 From d048e9c64aca24b8e064aaf1608862b50c427de2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 21 Apr 2010 20:39:20 -0400 Subject: turn on tag_autocreate by default if tagbase is set --- IkiWiki/Plugin/tag.pm | 5 +++-- debian/NEWS | 4 ++++ doc/ikiwiki/directive/tag.mdwn | 3 ++- doc/plugins/tag.mdwn | 8 ++++++-- 4 files changed, 15 insertions(+), 5 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index cd7ecc212..62f030f4e 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -36,7 +36,7 @@ sub getsetup () { }, tag_autocreate => { type => "boolean", - example => 0, + example => 1, description => "autocreate new tag pages?", safe => 1, rebuild => undef, @@ -67,7 +67,8 @@ sub htmllink_tag ($$$;@) { sub gentag ($) { my $tag=shift; - if ($config{tag_autocreate}) { + if ($config{tag_autocreate} || + ($config{tagbase} && ! defined $config{tag_autocreate})) { my $tagpage=taglink($tag); if ($tagpage=~/^\.\/(.*)/) { $tagpage=$1; diff --git a/debian/NEWS b/debian/NEWS index 9fd882ad2..8b87bc601 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -11,6 +11,10 @@ ikiwiki (3.20100406) unstable; urgency=low not regular wikilinks. If your wiki accidentially relied on the old, buggy behavior, you might need to change pagespecs to use `link()`. + Tag pages can automatically be created as new tags are used. This + feature is enabled by default if you have configured a tagbase. It + can be turned on or off using the `tag_autocreate` setting. + The title_natural sort method (as used by the inline directive, etc) have been moved to the new sortnaturally plugin, which is not enabled by default since it requires the Sort::Naturally perl module. diff --git a/doc/ikiwiki/directive/tag.mdwn b/doc/ikiwiki/directive/tag.mdwn index 807a96f25..c8d9b9816 100644 --- a/doc/ikiwiki/directive/tag.mdwn +++ b/doc/ikiwiki/directive/tag.mdwn @@ -19,7 +19,8 @@ instead: Note that if the wiki is configured to use a tagbase, then the tags will be located under a base directory, such as "tags/". This is a useful way to avoid having to write the full path to tags, if you want to keep them -grouped together out of the way. +grouped together out of the way. Also, since ikiwiki then knows where to put +tags, it will automatically create tag pages when new tags are used. Bear in mind that specifying a tagbase means you will need to incorporate it into the `link()` [[ikiwiki/PageSpec]] you use: e.g., if your tagbase is diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index bdf39d7e8..8e1286e62 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -8,8 +8,12 @@ These directives allow tagging pages. It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to match pages that are tagged with a specific tag. -If the `tag_autocreate` setting is enabled, tag pages will automatically be -created as needed. +The `tagbase` setting can be used to make tags default to being put in a +particular subdirectory. + +The `tag_autocreate` setting can be used to control whether new tag pages +are created as needed. It defaults to being done only if a `tagbase` is +set. [[!if test="enabled(tag)" then=""" This wiki has the tag plugin enabled, so you'll see a note below that this -- cgit v1.2.3 From 17a89d3d19f3a04ca2686ff18df127e5afaf9577 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 21 Apr 2010 21:57:12 -0400 Subject: update --- doc/plugins/tag/discussion.mdwn | 1 + doc/todo/auto-create_tag_pages_according_to_a_template.mdwn | 2 ++ 2 files changed, 3 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/tag/discussion.mdwn b/doc/plugins/tag/discussion.mdwn index 03dcb7b2f..dfd749252 100644 --- a/doc/plugins/tag/discussion.mdwn +++ b/doc/plugins/tag/discussion.mdwn @@ -28,3 +28,4 @@ See [[todo/auto-create tag pages according to a template]] -- Jeremy Schultz +`tag_autocreate` can now enable this. --[[Joey]] diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index 32870dd3d..1e0a910f4 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -247,3 +247,5 @@ I've tested it somewhat. --[[Joey]] [da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0 (commitdiff for da5d29f95f6e693e8c14be1b896cf25cf4fdb3c0) [a358d74bef51dae31332ff27e897fe04834571e6]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=a358d74bef51dae31332ff27e897fe04834571e6 (commitdiff for a358d74bef51dae31332ff27e897fe04834571e6) [981400177d68a279f485727be3f013e68f0bf691]: http://git.liegesta.at/?p=ikiwiki.git;a=commitdiff;h=981400177d68a279f485727be3f013e68f0bf691 (commitdiff for 981400177d68a279f485727be3f013e68f0bf691) + +[[!tag done]] -- cgit v1.2.3 From 584391aedd2f5392db7e9d3d46cf202d6cb8e951 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 14:07:45 -0400 Subject: clarify --- doc/plugins/write.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 404c3b44f..9e8c59f63 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -315,9 +315,9 @@ a new custom parameter to the template. This hook allows plugins to change the [[template|wikitemplates]] that is used for a page in the wiki. The hook is passed a "page" parameter, and -should return the name of the template file to use, or undef if it doesn't -want to change the default ("page.tmpl"). Template files are looked for in -/usr/share/ikiwiki/templates by default. +should return the name of the template file to use (relative to the +template directory), or undef if it doesn't want to change the default +("page.tmpl"). ### sanitize -- cgit v1.2.3 From 23d62f42bd8fe18087cd293962a79d937cf5a3bc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 14:35:00 -0400 Subject: remove add_templates option Templates are moving into the srcdir, and will also be searched for in configured underlays, so this is redundant. --- IkiWiki.pm | 9 +-------- IkiWiki/Plugin/underlay.pm | 11 ----------- doc/plugins/underlay.mdwn | 6 ------ 3 files changed, 1 insertion(+), 25 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index ec8b32a63..c2c2337b4 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -157,13 +157,6 @@ sub getsetup () { safe => 0, # path rebuild => 1, }, - templatedirs => { - type => "internal", - default => [], - description => "additional directories containing template files", - safe => 0, - rebuild => 0, - }, underlaydir => { type => "string", default => "$installdir/share/ikiwiki/basewiki", @@ -1661,7 +1654,7 @@ sub saveindex () { sub template_file ($) { my $template=shift; - foreach my $dir ($config{templatedir}, @{$config{templatedirs}}, + foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { return "$dir/$template" if -e "$dir/$template"; } diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 116fe7324..3ea19c635 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -27,14 +27,6 @@ sub getsetup () { safe => 0, rebuild => 1, }, - add_templates => { - type => "string", - example => ["$ENV{HOME}/.ikiwiki/templates"], - description => "extra template directories to add", - advanced => 1, - safe => 0, - rebuild => 1, - }, } sub checkconfig () { @@ -43,9 +35,6 @@ sub checkconfig () { add_underlay($dir); } } - if ($config{add_templates}) { - push @{$config{templatedirs}}, @{$config{add_templates}}; - } } 1; diff --git a/doc/plugins/underlay.mdwn b/doc/plugins/underlay.mdwn index 8836a394c..0cf819472 100644 --- a/doc/plugins/underlay.mdwn +++ b/doc/plugins/underlay.mdwn @@ -12,9 +12,3 @@ revision control, like photos or software releases. Directories in `add_underlays` should usually be absolute. If relative, they're interpreted as relative to the parent directory of the basewiki underlay, which is probably not particularly useful in this context. - --- - -This plugin also adds an `add_templates` option to the setup file. -Its value is a list of template directories to look for template files in, -if they are not present in the `templatedir`. -- cgit v1.2.3 From abd233931247ef38f1b084afd5906619f02c13b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 15:34:32 -0400 Subject: look for templates in srcdir and underlays, first This entailed changing template_params; it no longer takes the template filename as its first parameter. Add template_depends to api and replace calls to template() with template_depends() in appropriate places, where a dependency should be added on the template. Other plugins don't use template(), so will need further work. Also, includes are disabled for security. Enabling includes only when using templates from the templatedir would be nice, but would add a lot of complexity to the implementation. --- IkiWiki.pm | 59 +++++++++++++++++++++++++++------------------- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/editpage.pm | 2 +- IkiWiki/Plugin/google.pm | 2 +- IkiWiki/Plugin/inline.pm | 22 ++++++++++------- IkiWiki/Plugin/search.pm | 2 +- IkiWiki/Render.pm | 4 +++- doc/plugins/write.mdwn | 8 +++++++ 8 files changed, 63 insertions(+), 38 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index c2c2337b4..1327e4db5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -18,8 +18,8 @@ use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %autofiles}; use Exporter q{import}; -our @EXPORT = qw(hook debug error template htmlpage deptype - add_depends pagespec_match pagespec_match_list bestlink +our @EXPORT = qw(hook debug error htmlpage template template_depends + deptype add_depends pagespec_match pagespec_match_list bestlink htmllink readfile writefile pagetype srcfile pagename displaytime will_render gettext ngettext urlto targetpage add_underlay pagetitle titlepage linkpage newpagefile @@ -1652,47 +1652,58 @@ sub saveindex () { } sub template_file ($) { - my $template=shift; + my $name=shift; + my $template=srcfile("templates/$name", 1); + return $template if defined $template; + foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { - return "$dir/$template" if -e "$dir/$template"; + return "$dir/$name" if -e "$dir/$name"; } return; } sub template_params (@) { - my $filename=template_file(shift); - - if (! defined $filename) { - return if wantarray; - return ""; - } + filter => sub { + my $text_ref = shift; + ${$text_ref} = decode_utf8(${$text_ref}); + }, + loop_context_vars => 1, + die_on_bad_params => 0, + @_, + no_includes => 1, +} - my @ret=( - filter => sub { - my $text_ref = shift; - ${$text_ref} = decode_utf8(${$text_ref}); - }, - filename => $filename, - loop_context_vars => 1, - die_on_bad_params => 0, +sub template ($;@) { + require HTML::Template; + return HTML::Template->new(template_params( + filename => template_file(shift), @_ - ); - return wantarray ? @ret : {@ret}; + )); } -sub template ($;@) { +sub template_depends ($$;@) { + my $name=shift; + my $page=shift; + + if (defined $page) { + add_depends($page, "templates/$name"); + } + my $filename=template_file($name); + require HTML::Template; - return HTML::Template->new(template_params(@_)); + return HTML::Template->new(template_params( + filename => $filename, + @_ + )); } sub misctemplate ($$;@) { my $title=shift; my $pagebody=shift; - my $template=template("misc.tmpl"); - $template->param( + my $template=template("misc.tmpl", title => $title, indexlink => indexlink(), wikiname => $config{wikiname}, diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 58bd4b851..ed75a6e46 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -274,7 +274,7 @@ sub editcomment ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => scalar IkiWiki::template_params('editcomment.tmpl'), + template => template('editcomment.tmpl'), ); IkiWiki::decode_form_utf8($form); diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 26e38abc1..5c94ecbca 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -78,7 +78,7 @@ sub cgi_editpage ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => scalar template_params("editpage.tmpl"), + template => template("editpage.tmpl"), ); decode_form_utf8($form); diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm index 48ad4c8ce..68cb16513 100644 --- a/IkiWiki/Plugin/google.pm +++ b/IkiWiki/Plugin/google.pm @@ -36,7 +36,7 @@ sub pagetemplate (@) { # Add search box to page header. if ($template->query(name => "searchform")) { if (! defined $form) { - my $searchform = template("googleform.tmpl", blind_cache => 1); + my $searchform = template_depends("googleform.tmpl", $page, blind_cache => 1); $searchform->param(url => $config{url}); $form=$searchform->output; } diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 3359af314..043649742 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -299,7 +299,7 @@ sub preprocess_inline (@) { (exists $params{postform} && yesno($params{postform}))) && IkiWiki->can("cgi_editpage")) { # Add a blog post form, with feed buttons. - my $formtemplate=template("blogpost.tmpl", blind_cache => 1); + my $formtemplate=template_depends("blogpost.tmpl", $params{page}, blind_cache => 1); $formtemplate->param(cgiurl => $config{cgiurl}); $formtemplate->param(rootpage => rootpage(%params)); $formtemplate->param(rssurl => $rssurl) if $feeds && $rss; @@ -320,19 +320,23 @@ sub preprocess_inline (@) { } elsif ($feeds && !$params{preview} && ($emptyfeeds || @feedlist)) { # Add feed buttons. - my $linktemplate=template("feedlink.tmpl", blind_cache => 1); + my $linktemplate=template_depends("feedlink.tmpl", $params{page}, blind_cache => 1); $linktemplate->param(rssurl => $rssurl) if $rss; $linktemplate->param(atomurl => $atomurl) if $atom; $ret.=$linktemplate->output; } if (! $feedonly) { - require HTML::Template; - my @params=IkiWiki::template_params($params{template}.".tmpl", blind_cache => 1); - if (! @params) { - error sprintf(gettext("nonexistant template %s"), $params{template}); + my $template; + if (! $raw) { + eval { + $template=template_depends($params{template}.".tmpl", $params{page}, + blind_cache => 1); + }; + if (! $@ || ! $template) { + error sprintf(gettext("nonexistant template %s"), $params{template}); + } } - my $template=HTML::Template->new(@params) unless $raw; my $needcontent=$raw || (!($archive && $quick) && $template->query(name => 'content')); foreach my $page (@list) { @@ -534,7 +538,7 @@ sub genfeed ($$$$$@) { my $url=URI->new(encode_utf8(urlto($page,"",1))); - my $itemtemplate=template($feedtype."item.tmpl", blind_cache => 1); + my $itemtemplate=template_depends($feedtype."item.tmpl", $page, blind_cache => 1); my $content=""; my $lasttime = 0; foreach my $p (@pages) { @@ -598,7 +602,7 @@ sub genfeed ($$$$$@) { $lasttime = $pagemtime{$p} if $pagemtime{$p} > $lasttime; } - my $template=template($feedtype."page.tmpl", blind_cache => 1); + my $template=template_depends($feedtype."page.tmpl", $page, blind_cache => 1); $template->param( title => $page ne "index" ? pagetitle($page) : $config{wikiname}, wikiname => $config{wikiname}, diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index a1e7026ca..55edf8752 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -52,7 +52,7 @@ sub pagetemplate (@) { # Add search box to page header. if ($template->query(name => "searchform")) { if (! defined $form) { - my $searchform = template("searchform.tmpl", blind_cache => 1); + my $searchform = template_depends("searchform.tmpl", $page, blind_cache => 1); $searchform->param(searchaction => $config{cgiurl}); $form=$searchform->output; } diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 49d080c16..7cf19645e 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -74,7 +74,9 @@ sub genpage ($$) { $templatefile=$file; } }); - my $template=template(defined $templatefile ? $templatefile : 'page.tmpl', blind_cache => 1); + my $template=template_depends( + defined $templatefile ? $templatefile : 'page.tmpl', $page, + blind_cache => 1); my $actions=0; if (length $config{cgiurl}) { diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 9e8c59f63..eaa008131 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -705,6 +705,14 @@ Creates and returns a [[!cpan HTML::Template]] object. The first parameter is the name of the file in the template directory. The optional remaining parameters are passed to `HTML::Template->new`. +### `template_depends($$;@)` + +Use this instead of `template()` if the content of a template is being +included into a page. This causes the page to depend on the template, +so it will be updated if the template is modified. + +Like `template()`, except the second parameter is the page. + ### `htmlpage($)` Passed a page name, returns the base name that will be used for a the html -- cgit v1.2.3 From 54898d16d4c86fddcb1b5588eac67a729c14deeb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Apr 2010 14:44:37 -0400 Subject: allow a bare page name to be specified as a template --- IkiWiki.pm | 31 +++++++++++++++++++++---------- doc/plugins/write.mdwn | 11 +++++++++-- template-transition-notes | 1 + 3 files changed, 31 insertions(+), 12 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 0aaf60569..03441b594 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1653,9 +1653,18 @@ sub saveindex () { sub template_file ($) { my $name=shift; + + my $tpage="templates/$name"; + if ($name !~ /\.tmpl$/ && exists $pagesources{$tpage}) { + $tpage=$pagesources{$tpage}; + $name.=".tmpl"; + } - my $template=srcfile("templates/$name", 1); - return $template if defined $template; + my $template=srcfile($tpage, 1); + if (defined $template) { + return $template, $tpage if wantarray; + return $template; + } foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { @@ -1664,18 +1673,16 @@ sub template_file ($) { return; } -sub template ($;@) { - template_depends(shift, undef, @_); -} - sub template_depends ($$;@) { my $name=shift; my $page=shift; - - if (defined $page) { - add_depends($page, "templates/$name"); + + my ($filename, $tpage)=template_file($name); + if (defined $page && defined $tpage) { + add_depends($page, $tpage); } - my $filename=template_file($name); + + return unless defined $filename; require HTML::Template; return HTML::Template->new( @@ -1691,6 +1698,10 @@ sub template_depends ($$;@) { ); } +sub template ($;@) { + template_depends(shift, undef, @_); +} + sub misctemplate ($$;@) { my $title=shift; my $pagebody=shift; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index eaa008131..1407b5a12 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -702,8 +702,15 @@ the entire wiki build and make the wiki unusable. ### `template($;@)` Creates and returns a [[!cpan HTML::Template]] object. The first parameter -is the name of the file in the template directory. The optional remaining -parameters are passed to `HTML::Template->new`. +is the name of the template file. The optional remaining parameters are +passed to `HTML::Template->new`. + +The template file is first looked for in the templates/ subdirectory of the +srcdir. Failing that, it is looked for in the templatedir. Typically +the filename will have a ".tmpl" extension. If a filename with no extension +is passed, a wiki page in templates/ with its name is used as the template. +That should only be done for templates which it is safe to let wiki users +edit. ### `template_depends($$;@)` diff --git a/template-transition-notes b/template-transition-notes index 193dd79d4..ccff3e78f 100644 --- a/template-transition-notes +++ b/template-transition-notes @@ -3,3 +3,4 @@ * includes no longer allowed in templates * template directive no longer uses $foo.tmpl , only page $foo. +* template_params removed (not exported API) -- cgit v1.2.3 From 78fd3b35a2805489185a14e00b53b450eec961f1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Apr 2010 15:02:07 -0400 Subject: allow template pages to not be under templates/ --- IkiWiki.pm | 4 +++- doc/plugins/write.mdwn | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 03441b594..78612cd08 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1654,7 +1654,7 @@ sub saveindex () { sub template_file ($) { my $name=shift; - my $tpage="templates/$name"; + my $tpage=($name =~ /^\//) ? $name : "templates/$name"; if ($name !~ /\.tmpl$/ && exists $pagesources{$tpage}) { $tpage=$pagesources{$tpage}; $name.=".tmpl"; @@ -1665,6 +1665,8 @@ sub template_file ($) { return $template, $tpage if wantarray; return $template; } + + $name=~s:/::; # avoid path traversal foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 1407b5a12..00b54bdd3 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -705,12 +705,14 @@ Creates and returns a [[!cpan HTML::Template]] object. The first parameter is the name of the template file. The optional remaining parameters are passed to `HTML::Template->new`. -The template file is first looked for in the templates/ subdirectory of the -srcdir. Failing that, it is looked for in the templatedir. Typically -the filename will have a ".tmpl" extension. If a filename with no extension -is passed, a wiki page in templates/ with its name is used as the template. -That should only be done for templates which it is safe to let wiki users -edit. +Normally, the template file is first looked for in the templates/ subdirectory +of the srcdir. Failing that, it is looked for in the templatedir. + +Wiki pages can be used as templates. This should be done only for templates +which it is safe to let wiki users edit. Enable it by passing a filename +with no ".tmpl" extension. Template pages are normally looked for in +the templates/ directory. If the page name starts with "/", a page +elsewhere in the wiki can be used. ### `template_depends($$;@)` -- cgit v1.2.3 From 7e79da76332b93214a7d9a5c91bc046db4219ee2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Apr 2010 16:10:46 -0400 Subject: template docu reorg Remove wikitemplates page; fold its contents into templates page. Update all backlinks. Document new ability to put templates inside srcdir. --- doc/bugs/SSI_include_stripped_from_mdwn.mdwn | 2 +- doc/bugs/login_page_non-obvious_with_openid.mdwn | 4 +- doc/features.mdwn | 2 +- doc/freesoftware.mdwn | 2 +- doc/ikiwiki-calendar.mdwn | 2 +- doc/ikiwiki/directive/edittemplate.mdwn | 2 +- doc/ikiwiki/directive/pagetemplate.mdwn | 8 +- doc/ikiwiki/directive/template.mdwn | 8 +- doc/plugins/autoindex.mdwn | 2 +- doc/plugins/map/discussion.mdwn | 2 +- doc/plugins/pagetemplate.mdwn | 6 +- doc/plugins/template.mdwn | 4 +- doc/plugins/write.mdwn | 4 +- doc/templates.mdwn | 91 +++++++++++++++++++--- doc/tips/comments_feed.mdwn | 2 +- ...o-create_tag_pages_according_to_a_template.mdwn | 2 +- doc/todo/auto_rebuild_on_template_change.mdwn | 2 +- doc/todo/html.mdwn | 2 +- doc/todo/multiple_templates.mdwn | 2 +- doc/usage.mdwn | 5 +- doc/wikitemplates.mdwn | 52 ------------- doc/wikitemplates/discussion.mdwn | 46 ----------- 22 files changed, 111 insertions(+), 141 deletions(-) delete mode 100644 doc/wikitemplates.mdwn delete mode 100644 doc/wikitemplates/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/bugs/SSI_include_stripped_from_mdwn.mdwn b/doc/bugs/SSI_include_stripped_from_mdwn.mdwn index 5519e45c6..270da86d3 100644 --- a/doc/bugs/SSI_include_stripped_from_mdwn.mdwn +++ b/doc/bugs/SSI_include_stripped_from_mdwn.mdwn @@ -10,7 +10,7 @@ If I have a <--#include virtual="foo" --> in some file, it gets stripped, > Anyway, it makes sense for the htmlscrubber to strip server-side > includes because otherwise your wiki could be attacked > by them being added to it. If you want to use both the htmlscrubber and -> SSI together, I'd suggest you modify the [[wikitemplates]] +> SSI together, I'd suggest you modify the [[templates]] > and put the SSI on there. > > Ie, `page.tmpl` has a diff --git a/doc/bugs/login_page_non-obvious_with_openid.mdwn b/doc/bugs/login_page_non-obvious_with_openid.mdwn index 1d087985a..9aa702037 100644 --- a/doc/bugs/login_page_non-obvious_with_openid.mdwn +++ b/doc/bugs/login_page_non-obvious_with_openid.mdwn @@ -36,7 +36,7 @@ If you want to keep it as one form, then perhaps using some javascript to disabl > that allows modifying that form, but does not allow creating a separate > form. The best way to make it obvious how to use it currently is to just > disable password auth, then it's nice and simple. :-) Javascript is an -> interesting idea. It's also possible to write a custom [[signin.tmpl wikitemplates]] that +> interesting idea. It's also possible to write a custom [[templates]] that > is displayed instead of the regular signin form, and it should be > possible to use that to manually lay it out better than FormBuilder > manages with its automatic layout. --[[Joey]] @@ -44,4 +44,4 @@ If you want to keep it as one form, then perhaps using some javascript to disabl > I've improved the form, I think it's more obvious now that the openid > stuff is separate. Good enough to call this [[done]]. I think. --[[Joey]] ->> Looks good, thanks! :-) -- [[AdamShand]] \ No newline at end of file +>> Looks good, thanks! :-) -- [[AdamShand]] diff --git a/doc/features.mdwn b/doc/features.mdwn index ab521213d..07ce648ea 100644 --- a/doc/features.mdwn +++ b/doc/features.mdwn @@ -72,7 +72,7 @@ you would care to syndicate. Ikiwiki aims to produce [valid XHTML 1.0](http://validator.w3.org/check?url=referer). Ikiwiki -generates html using [[templates|wikitemplates]], and uses [[css]], so you +generates html using [[templates]], and uses [[css]], so you can change the look and layout of all pages in any way you would like. ## [[Plugins]] diff --git a/doc/freesoftware.mdwn b/doc/freesoftware.mdwn index 7ac1ac6b4..2243d9b1f 100644 --- a/doc/freesoftware.mdwn +++ b/doc/freesoftware.mdwn @@ -4,7 +4,7 @@ ikiwiki, and this documentation wiki, are licensed under the terms of the GNU [[GPL]], version 2 or later. The parts of ikiwiki that become part of your own wiki (the [[basewiki]] -pages (but not the smilies) and the [[templates|wikitemplates]]) are licensed +pages (but not the smilies) and the [[templates]]) are licensed as follows: > Redistribution and use in source and compiled forms, with or without diff --git a/doc/ikiwiki-calendar.mdwn b/doc/ikiwiki-calendar.mdwn index c1f4d7267..03cbdd86c 100644 --- a/doc/ikiwiki-calendar.mdwn +++ b/doc/ikiwiki-calendar.mdwn @@ -43,7 +43,7 @@ An example crontab: # TEMPLATES -This command uses two [[template|wikitemplates]] to generate +This command uses two [[templates]] to generate the pages, `calendarmonth.tmpl` and `calendaryear.tmpl`. # AUTHOR diff --git a/doc/ikiwiki/directive/edittemplate.mdwn b/doc/ikiwiki/directive/edittemplate.mdwn index d731bdb47..c486e821b 100644 --- a/doc/ikiwiki/directive/edittemplate.mdwn +++ b/doc/ikiwiki/directive/edittemplate.mdwn @@ -21,7 +21,7 @@ something like: Details: The template page can also contain [[!cpan HTML::Template]] directives, -similar to other ikiwiki [[templates]]. Currently only one variable is +like other ikiwiki [[templates]]. Currently only one variable is set: `` is replaced with the name of the page being created. diff --git a/doc/ikiwiki/directive/pagetemplate.mdwn b/doc/ikiwiki/directive/pagetemplate.mdwn index 8ad901c1a..401b38099 100644 --- a/doc/ikiwiki/directive/pagetemplate.mdwn +++ b/doc/ikiwiki/directive/pagetemplate.mdwn @@ -1,17 +1,13 @@ The `pagetemplate` directive is supplied by the [[!iki plugins/pagetemplate desc=pagetemplate]] plugin. -This directive allows a page to be displayed using a different template than -the default `page.tmpl` template. +This directive allows a page to be displayed using a different +[[template|templates]] than the default `page.tmpl` template. The page text is inserted into the template, so the template controls the overall look and feel of the wiki page. This is in contrast to the [[ikiwiki/directive/template]] directive, which allows inserting templates _into_ the body of a page. -This directive can only reference templates that are already installed -by the system administrator, typically into the -`/usr/share/ikiwiki/templates` directory. Example: - \[[!pagetemplate template="my_fancy.tmpl"]] [[!meta robots="noindex, follow"]] diff --git a/doc/ikiwiki/directive/template.mdwn b/doc/ikiwiki/directive/template.mdwn index ae71ba5b5..052ca7873 100644 --- a/doc/ikiwiki/directive/template.mdwn +++ b/doc/ikiwiki/directive/template.mdwn @@ -1,7 +1,11 @@ The `template` directive is supplied by the [[!iki plugins/template desc=template]] plugin. -[[Templates]] are files that can be filled out and inserted into pages in the -wiki, by using the template directive. The directive has an `id` parameter +The template directive allows wiki pages to be used as templates. +These templates can be filled out and inserted into other pages in the +wiki using the directive. The [[templates]] page lists templates +that can be used with this directive. + +The directive has an `id` parameter that identifies the template to use. The remaining parameters are used to fill out the template. diff --git a/doc/plugins/autoindex.mdwn b/doc/plugins/autoindex.mdwn index d1133e4f5..7c4e40419 100644 --- a/doc/plugins/autoindex.mdwn +++ b/doc/plugins/autoindex.mdwn @@ -3,5 +3,5 @@ This plugin searches for [[SubPages|ikiwiki/subpage]] with a missing parent page, and generates the parent pages. The generated page content is -controlled by the `autoindex.tmpl` [[template|wikitemplates]], which by +controlled by the `autoindex.tmpl` [[template|templates]], which by default, uses a [[map]] to list the SubPages. diff --git a/doc/plugins/map/discussion.mdwn b/doc/plugins/map/discussion.mdwn index 2f7b140d6..54c921b0f 100644 --- a/doc/plugins/map/discussion.mdwn +++ b/doc/plugins/map/discussion.mdwn @@ -1,7 +1,7 @@ I'm wanting a [[map]] (with indentation levels) showing page _titles_ instead of page 'names'. As far as I can see, this is not an option with existing plugins - I can get a list of pages using [[inline]] and -appropriate [[wikitemplates]], but that has no indentation and therefore +appropriate [[templates]], but that has no indentation and therefore doesn't show structure well. The quick way is to modify the map plugin to have a 'titles' option. The diff --git a/doc/plugins/pagetemplate.mdwn b/doc/plugins/pagetemplate.mdwn index 53f069d0d..8254e14c5 100644 --- a/doc/plugins/pagetemplate.mdwn +++ b/doc/plugins/pagetemplate.mdwn @@ -3,8 +3,4 @@ This plugin provides the [[ikiwiki/directive/pagetemplate]] [[ikiwiki/directive]], which allows a page to be displayed -using a different [[template|wikitemplates]] than the default. - -This plugin can only use templates that are already installed in -`/usr/share/ikiwiki/templates` (or wherever ikiwiki is configured to look for -them). You can choose to use any .tmpl files in that directory. +using a different [[template|templates]] than the default. diff --git a/doc/plugins/template.mdwn b/doc/plugins/template.mdwn index da775f232..8d17e2825 100644 --- a/doc/plugins/template.mdwn +++ b/doc/plugins/template.mdwn @@ -3,5 +3,5 @@ This plugin provides the [[ikiwiki/directive/template]] [[ikiwiki/directive]]. With this plugin, you can set up templates, and cause them to be filled out -and inserted into pages in the wiki. It's documented and existing templates -are listed in the [[templates]] page. +and inserted into pages in the wiki. Existing templates are listed in the +[[templates]] page. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 00b54bdd3..9128c7f54 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -297,7 +297,7 @@ value is ignored. hook(type => "pagetemplate", id => "foo", call => \&pagetemplate); -[[Templates|wikitemplates]] are filled out for many different things in +[[Templates]] are filled out for many different things in ikiwiki, like generating a page, or part of a blog page, or an rss feed, or a cgi. This hook allows modifying the variables available on those templates. The function is passed named parameters. The "page" and @@ -313,7 +313,7 @@ a new custom parameter to the template. hook(type => "templatefile", id => "foo", call => \&templatefile); -This hook allows plugins to change the [[template|wikitemplates]] that is +This hook allows plugins to change the [[template|templates]] that is used for a page in the wiki. The hook is passed a "page" parameter, and should return the name of the template file to use (relative to the template directory), or undef if it doesn't want to change the default diff --git a/doc/templates.mdwn b/doc/templates.mdwn index f2b581d2f..f7b3adae5 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -1,17 +1,88 @@ -[[!meta robots="noindex, follow"]] -[[!if test="enabled(template)" -then="This wiki has templates **enabled**." -else="This wiki has templates **disabled**." -]] +[[Ikiwiki]] uses many templates for many purposes. By editing its templates, +you can fully customise this site. -Templates are files that can be filled out and inserted into pages in the -wiki. +[[!if test="enabled(template)" then=""" +## The template directive +The template directive allows wiki pages to be used as templates. +These templates can be filled out and inserted into other pages in the +wiki using the directive. +"""]] [[!if test="enabled(template) and enabled(inline)" then=""" - -These templates are available for use with the template directive. - [[!inline pages="templates/* and !*/discussion" feeds=no archive=yes sort=title template=titlepage rootpage=templates postformtext="Add a new template named:"]] """]] + +[[!if test="enabled(edittemplate)" then=""" +## The edittemplate directive + +The edittemplate directive can be used to make new pages default to +containing text from a template, which can be filled as out the page is +edited. +"""]] + +## Wiki templates + +These templates are used to build the wiki. The aim is to keep almost all +html out of ikiwiki and in the templates. + +* `page.tmpl` - Used for displaying all regular wiki pages. +* `misc.tmpl` - Generic template used for any page that doesn't + have a custom template. +* `editpage.tmpl` - Create/edit page. +* `change.tmpl` - Used to create a page describing a change made to the wiki. +* `passwordmail.tmpl` - Not a html template, this is used to + generate a mail with an url the user can use to reset their password. +* `rsspage.tmpl` - Used for generating rss feeds for [[blogs|blog]]. +* `rssitem.tmpl` - Used for generating individual items on rss feeds. +* `atompage.tmpl` - Used for generating atom feeds for blogs. +* `atomitem.tmpl` - Used for generating individual items on atom feeds. +* `inlinepage.tmpl` - Used for adding a page inline in a blog + page. +* `archivepage.tmpl` - Used for listing a page in a blog archive page. +* `microblog.tmpl` - Used for showing a microblogging post inline. +* `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links) +* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used. +* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create + a page for a post. +* `searchform.tmpl` - Used by the [[plugins/search]] plugin to add a search + form to wiki pages. +* `searchquery.tmpl` - This is an omega template, used by the + [[plugins/search]] plugin. +* `comment.tmpl` - This template is used to display a comment + by the [[plugins/comments]] plugin. +* `editcomment.tmpl` - This template is the comment post form for the + [[plugins/comments]] plugin. +* `commentmoderation.tmpl` - This template is used to produce the comment + moderation form. +* `recentchanges.tmpl` - This template is used for listing a change + on the RecentChanges page. + +[[!if test="enabled(pagetemplate)" then=""" +## The pagetemplate directive + +The pagetemplate directive can allow individual pages to use a +different template than `page.tmpl`. +"""]] + +## Template locations + +Templates are located in `/usr/share/ikiwiki/templates` by default; +the `templatedir` setting can be used to make another directory be +searched first. Customized templates can also be placed inside the +"templates/" directory in your wiki's source. + +## Template syntax + +Ikiwiki uses the HTML::Template module as its template engine. This +supports things like conditionals and loops in templates and is pretty easy +to learn. All you really need to know are a few things: + +* To insert the value of a template variable, use ``. +* To make a block of text conditional on a variable being set use + `text`. +* To use one block of text if a variable is set and a second if it's not, + use `textother text` + +[[!meta robots="noindex, follow"]] diff --git a/doc/tips/comments_feed.mdwn b/doc/tips/comments_feed.mdwn index 6f8137256..6d4dbb803 100644 --- a/doc/tips/comments_feed.mdwn +++ b/doc/tips/comments_feed.mdwn @@ -6,5 +6,5 @@ add a feed that contains all the comments posted to any page. Here's how: \[[!inline pages="internal(*/comment_*)" template=comment]] The special [[ikiwiki/PageSpec]] matches all comments. The -[[template|wikitemplates]] causes the comments to be displayed formatted +[[template|templates]] causes the comments to be displayed formatted nicely. diff --git a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn index f6d444890..7eb404910 100644 --- a/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn +++ b/doc/todo/auto-create_tag_pages_according_to_a_template.mdwn @@ -17,7 +17,7 @@ The new tag file is then complied during the change phase. *see git history of this page if you want the patch --[[smcv]]* -This uses a [[template|wikitemplates]] called `autotagpage.tmpl`, here is my template file: +This uses a [[template|templates]] called `autotagpage.tmpl`, here is my template file: \[[!inline pages="link()" archive="yes"]] diff --git a/doc/todo/auto_rebuild_on_template_change.mdwn b/doc/todo/auto_rebuild_on_template_change.mdwn index a112cb9da..838d15c1a 100644 --- a/doc/todo/auto_rebuild_on_template_change.mdwn +++ b/doc/todo/auto_rebuild_on_template_change.mdwn @@ -6,7 +6,7 @@ This would allow setting: templatedir => "$srcdir/templates", -.. and then the [[wikitemplates]] are managed like other wiki files; and +.. and then the [[templates]] are managed like other wiki files; and like other wiki files, a change to them automatically updates dependent pages. diff --git a/doc/todo/html.mdwn b/doc/todo/html.mdwn index 44f20c876..4f4542be2 100644 --- a/doc/todo/html.mdwn +++ b/doc/todo/html.mdwn @@ -1,6 +1,6 @@ Create some nice(r) stylesheets. Should be doable w/o touching a single line of code, just -editing the [[wikitemplates]] and/or editing [[style.css]]. +editing the [[templates]] and/or editing [[style.css]]. [[done]] ([[css_market]] ..) diff --git a/doc/todo/multiple_templates.mdwn b/doc/todo/multiple_templates.mdwn index 72783c556..30fb8d6ee 100644 --- a/doc/todo/multiple_templates.mdwn +++ b/doc/todo/multiple_templates.mdwn @@ -1,4 +1,4 @@ -> Another useful feature might be to be able to choose a different [[template|wikitemplates]] +> Another useful feature might be to be able to choose a different [[template|templates]] > file for some pages; [[blog]] pages would use a template different from the > home page, even if both are managed in the same repository, etc. diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 2e12517ea..9cf61cc6c 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -120,10 +120,11 @@ also be configured using a setup file. * --templatedir dir - Specify the directory that the page [[templates|wikitemplates]] are stored in. + Specify the directory that [[templates|templates]] are stored in. Default is `/usr/share/ikiwiki/templates`, or another location as configured at build time. If the templatedir is changed, missing templates will still - be searched for in the default location as a fallback. + be searched for in the default location as a fallback. Templates can also be + placed in the "templates/" subdirectory of the srcdir. Note that if you choose to copy and modify ikiwiki's templates, you will need to be careful to keep them up to date when upgrading to new versions of diff --git a/doc/wikitemplates.mdwn b/doc/wikitemplates.mdwn deleted file mode 100644 index 6e5a7261d..000000000 --- a/doc/wikitemplates.mdwn +++ /dev/null @@ -1,52 +0,0 @@ -ikiwiki uses the HTML::Template module as its template engine. This -supports things like conditionals and loops in templates and is pretty easy -to learn. - -The aim is to keep almost all html out of ikiwiki and in the templates. - -It ships with some basic templates which can be customised. These are -located in `/usr/share/ikiwiki/templates` by default; the `templatedir` -setting can be used to make another directory be searched first. - -* `page.tmpl` - Used for displaying all regular wiki pages. -* `misc.tmpl` - Generic template used for any page that doesn't - have a custom template. -* `editpage.tmpl` - Create/edit page. -* `change.tmpl` - Used to create a page describing a change made to the wiki. -* `passwordmail.tmpl` - Not a html template, this is used to - generate a mail with an url the user can use to reset their password. -* `rsspage.tmpl` - Used for generating rss feeds for [[blogs|blog]]. -* `rssitem.tmpl` - Used for generating individual items on rss feeds. -* `atompage.tmpl` - Used for generating atom feeds for blogs. -* `atomitem.tmpl` - Used for generating individual items on atom feeds. -* `inlinepage.tmpl` - Used for adding a page inline in a blog - page. -* `archivepage.tmpl` - Used for listing a page in a blog archive page. -* `microblog.tmpl` - Used for showing a microblogging post inline. -* `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links) -* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used. -* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create - a page for a post. -* `searchform.tmpl` - Used by the [[plugins/search]] plugin to add a search - form to wiki pages. -* `searchquery.tmpl` - This is an omega template, used by the - [[plugins/search]] plugin. -* `comment.tmpl` - This template is used to display a comment - by the [[plugins/comments]] plugin. -* `editcomment.tmpl` - This template is the comment post form for the - [[plugins/comments]] plugin. -* `commentmoderation.tmpl` - This template is used to produce the comment - moderation form. -* `recentchanges.tmpl` - This template is used for listing a change - on the RecentChanges page. - -The [[plugins/pagetemplate]] plugin can allow individual pages to use a -different template than `page.tmpl`. - -The [[plugins/template]] plugin also uses templates, though those -[[templates]] are typically stored as pages in the wiki, and are inserted -into pages. - -The [[plugins/edittemplate]] plugin is used to make new pages default to -containing text from a template, which can be filled as out the page is -edited. diff --git a/doc/wikitemplates/discussion.mdwn b/doc/wikitemplates/discussion.mdwn deleted file mode 100644 index f97444e5f..000000000 --- a/doc/wikitemplates/discussion.mdwn +++ /dev/null @@ -1,46 +0,0 @@ -## Place for local templates -Where does one put any locally modified templates for an individual ikiwiki? --Ivan Z. - -> You can put them whereever you like; the `templatedir` controls -> where ikiwiki looks for them. --[[Joey]] - -Thank you for your response! My question arose out of my intention to make -custom templates for a wiki--specifically suited for the kind of content -it will have--so, that would mean I would want to distribute them through -git together with other content of the wiki. So, for this case the -separation of conceptually ONE thing (the content, the templates, and the -config option which orders to use these templates) into THREE separate -files/repos (the main content repo, the repo with templates, and the config -file) is not convenient: instead of distributing a single repo, I have to -tell people to take three things if they want to replicate this wiki. How -would you solve this inconvenience? Perhaps, a default location of the -templates *inside* the source repo would do?--Ivan Z. - -> I would avoid putting the templates in a subdirectory of the ikiwiki srcdir. -> (I'd also avoid putting the ikiwiki setup file there.) -> While it's safe to do either in some cases, there are configurations where -> it's unsafe. For example, a malicious user could use attachment handling to -> replace those files with their own, bad versions. -> -> So, two ideas for where to put the templatedir and ikiwiki setup. - -> * The easiest option is to put your wiki content in a subdirectory -> ("wiki", say) and point `srcdir` at that. -> then you can have another subdirectory for the wikitemplates, -> and put the setup file at the top. -> * Another option if using git would be to have a separate branch, -> in the same git repository, that holds wikitemplates and the setup file. -> Then you check out the repository once to make the `srcdir` available, -> and have a second checkout, of the other branch, to make the other stuff -> available. -> -> Note that with either of these methods, you have to watch out if -> giving other direct commit access to the repository. They could -> still edit the setup file and templates, so only trusted users should -> be given access. (It is, however, perfectly safe to let people edit -> the wiki via the web, and is even safe to configure -> [[tips/untrusted_git_push]] to such a repository.) --[[Joey]] - -Thanks, that's a nice and simple idea: to have a subdirectory! I'll try it. --Ivan Z. - -A [[!taglink wish|wishlist]]: the ikiwiki program could be improved so that it follows the same logic as git in looking for its config: it could ascend directories until it finds an `.ikiwiki/` directory with `.ikiwiki/setup` and then uses that configuration. Now I'm tired to always type `ikiwiki --setup path/to/the/setup --refresh` when working in my working clone of the sources; I'd like to simply type `ikiwiki` instead, and let it find the setup file. The default location to look for templates could also be made to be a sibling of the setup file: `.ikiwiki/templates/`. --Ivan Z. -- cgit v1.2.3 From c2656f08f3a3671b0ba7dc861d53347c7f695ec1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Apr 2010 16:11:33 -0400 Subject: template() - return params in list context I forgot CGI::Formbuilder's horrible interface that needs template parameters instead of a constructed object. --- IkiWiki.pm | 7 +- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/editpage.pm | 2 +- doc/plugins/write.mdwn | 8 +- po/bg.po | 236 ++++++++++++++++++++++--------------------- po/cs.po | 243 +++++++++++++++++++++++--------------------- po/da.po | 242 ++++++++++++++++++++++++-------------------- po/de.po | 242 ++++++++++++++++++++++++-------------------- po/es.po | 246 ++++++++++++++++++++++++--------------------- po/fr.po | 242 ++++++++++++++++++++++++-------------------- po/gu.po | 235 +++++++++++++++++++++++-------------------- po/ikiwiki.pot | 218 ++++++++++++++++++++------------------- po/it.po | 242 ++++++++++++++++++++++++-------------------- po/pl.po | 241 +++++++++++++++++++++++--------------------- po/sv.po | 236 ++++++++++++++++++++++--------------------- 15 files changed, 1416 insertions(+), 1226 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 8bae6b72f..c218ed8ab 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1690,8 +1690,7 @@ sub template_depends ($$;@) { return unless defined $filename; - require HTML::Template; - return HTML::Template->new( + my @opts=( filter => sub { my $text_ref = shift; ${$text_ref} = decode_utf8(${$text_ref}); @@ -1702,6 +1701,10 @@ sub template_depends ($$;@) { @_, no_includes => 1, ); + return @opts if wantarray; + + require HTML::Template; + return HTML::Template->new(@opts); } sub template ($;@) { diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index ed75a6e46..f7dc99dca 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -274,7 +274,7 @@ sub editcomment ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => template('editcomment.tmpl'), + template => { template('editcomment.tmpl') }, ); IkiWiki::decode_form_utf8($form); diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 5c94ecbca..7bb6eb07c 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -78,7 +78,7 @@ sub cgi_editpage ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => template("editpage.tmpl"), + template => { template("editpage.tmpl") }, ); decode_form_utf8($form); diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 9128c7f54..a9ea7db73 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -701,9 +701,11 @@ the entire wiki build and make the wiki unusable. ### `template($;@)` -Creates and returns a [[!cpan HTML::Template]] object. The first parameter -is the name of the template file. The optional remaining parameters are -passed to `HTML::Template->new`. +Creates and returns a [[!cpan HTML::Template]] object. (In a list context, +returns the parameters needed to construct the obhect.) + +The first parameter is the name of the template file. The optional remaining +parameters are passed to `HTML::Template->new`. Normally, the template file is first looked for in the templates/ subdirectory of the srcdir. Failing that, it is looked for in the templatedir. diff --git a/po/bg.po b/po/bg.po index 5585a10d6..f85323ea3 100644 --- a/po/bg.po +++ b/po/bg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-bg\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-01-12 01:19+0200\n" "Last-Translator: Damyan Ivanov \n" "Language-Team: Bulgarian \n" @@ -55,7 +55,7 @@ msgstr "Предпочитанията са запазени." msgid "You are banned." msgstr "Достъпът ви е забранен." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Грешка" @@ -137,7 +137,7 @@ msgstr "създаване на нова страницa „%s”" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "готово" @@ -178,7 +178,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -210,55 +210,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "създаване на %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -268,7 +268,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -298,14 +298,14 @@ msgstr "премахване на старата страница „%s”" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "създаване на %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "промяна на %s" @@ -325,9 +325,10 @@ msgstr "не е указан файл на обвивката" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "грешка при обработване на шаблона" #: ../IkiWiki/Plugin/format.pm:30 @@ -358,18 +359,18 @@ msgstr "грешка при четене на „%s”: %s" msgid "%s is an attachment, not a page." msgstr "" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -458,12 +459,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "" +msgid "template %s not found" +msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "модулът „RPC::XML::Client” не е намерен; източникът не е проверен" @@ -494,21 +495,25 @@ msgstr "" "грешка при зареждането на perl-модула „Markdown.pm” (%s) или „/usr/bin/" "markdown” (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 #, fuzzy msgid "stylesheet not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "шаблонът „%s” не е намерен" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Огледала" @@ -525,10 +530,6 @@ msgstr "" msgid "more" msgstr "" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "функцията „getctime” не е реализирана" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -546,39 +547,39 @@ msgstr "Всички страници имат връзки от други ст msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Акаунтът е създаден. Можете да влезете." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Грешка при създаване на акаунта." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Грешка при изпращане на поща" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -609,94 +610,94 @@ msgstr "модулът „RPC::XML::Client” не е намерен; източ msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "промяна на %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "приставката „linkmap”: грешка при изпълнение на „dot”" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -841,44 +842,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "не е указан файл на обвивката" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "обновяване на страницата „%s”" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "обновяване на страниците от уики „%s”: %s от потребител „%s”" @@ -983,21 +984,21 @@ msgstr "" msgid "parse fail at line %d: %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "създаване на нова страницa „%s”" + +#: ../IkiWiki/Plugin/template.pm:33 #, fuzzy msgid "missing id parameter" msgstr "липсващ параметър „id” на шаблона" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" +#, fuzzy, perl-format +msgid "%s not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/template.pm:66 -#, fuzzy -msgid "failed to process:" -msgstr "грешка при обработване на шаблона" - #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "" @@ -1056,54 +1057,59 @@ msgstr "" msgid "bad file name %s" msgstr "пропускане на невалидното име на файл „%s”" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "сканиране на „%s”" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "пропускане на невалидното име на файл „%s”" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "премахване на старата страница „%s”" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "обновяване на страницата „%s”, съдържаща препратки към „%s”" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "премахване на „%s” понеже не се генерира от „%s”" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "обновяване на страницата „%s”, зависеща от „%s”" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "обновяване на „%s” и осъвременяване на обратните връзки" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: неуспех при обновяване на страницата „%s”" @@ -1176,64 +1182,65 @@ msgstr "формат: ikiwiki [опции] източник местоназна msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "генериране на обвивки..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "обновяване на уики..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "осъвременяване на уики..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Дискусия" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "При използване на пареметъра „--cgi” е необходимо да се укаже и " "местоположението на уикито чрез параметъра „--url”" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "открита е циклична завидимост при %s на „%s” на дълбочина %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "непознат вид сортиране „%s”" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "непознат вид сортиране „%s”" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "грешка при четене на „%s”: %s" @@ -1258,6 +1265,13 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "грешка при обработване на шаблона" + +#~ msgid "getctime not implemented" +#~ msgstr "функцията „getctime” не е реализирана" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "грешка при запис на файла „%s”: %s" @@ -1316,10 +1330,6 @@ msgstr "" #~ "изпълнява като „svn post-commit hook”. Няма да бъдат разпратени " #~ "известявания" -#, fuzzy -#~ msgid "%s not found" -#~ msgstr "шаблонът „%s” не е намерен" - #~ msgid "What's this?" #~ msgstr "Какво е това?" diff --git a/po/cs.po b/po/cs.po index 0b45bb97a..71195bae2 100644 --- a/po/cs.po +++ b/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-09-11 20:23+0200\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" @@ -55,7 +55,7 @@ msgstr "Nastavení uloženo." msgid "You are banned." msgstr "Jste vyhoštěni." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Chyba" @@ -136,7 +136,7 @@ msgstr "vytvářím novou stránku %s" msgid "deleting bucket.." msgstr "mažu bucket..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "hotovo" @@ -174,7 +174,7 @@ msgstr "chybné jméno souboru s přílohou" msgid "attachment upload" msgstr "příloha nahrána" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "automatické vytváření indexu" @@ -208,55 +208,55 @@ msgstr "komentář musí mít obsah" msgid "Anonymous" msgstr "Anonym" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "chybný název stránky" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "komentář k %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "stránka „%s“ neexistuje, takže nemůžete komentovat" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "komentáře na stránce „%s“ jsou uzamčeny" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "komentář uložen pro schválení" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Váš komentář bude zobrazen po schválení moderátorem" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Přidán komentář" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Přidán komentář: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "nejste přihlášeni jako správce" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Schvalování komentářů" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "schvalování komentářů" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -266,7 +266,7 @@ msgstr[1] "Komentáře" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Komentáře" @@ -297,14 +297,14 @@ msgstr "odstraňuji starý náhled %s" msgid "%s is not an editable page" msgstr "%s není editovatelná stránka" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "vytvářím %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "upravuji %s" @@ -322,9 +322,11 @@ msgstr "nebyl zadán parametr match" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s byla zaregistrována pro %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "nepodařilo se zpracovat" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "nepodařilo se zpracovat:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -352,18 +354,18 @@ msgstr "není stránkou" msgid "%s is an attachment, not a page." msgstr "%s není ani příloha, ani stránka." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "nejste oprávněni měnit %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "nemůžete pracovat se souborem s přístupovým oprávněními %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "nejste oprávněni měnit přístupová oprávnění souborů" @@ -445,12 +447,12 @@ msgstr "parametry %s a %s nelze použít zároveň" msgid "Add a new post titled:" msgstr "Přidat nový příspěvek nazvaný:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "neexistující šablona %s" +msgid "template %s not found" +msgstr "šablona %s nebyla nalezena" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client nebyl nalezen, nepinkám" @@ -478,18 +480,23 @@ msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" "selhalo nahrání perlového modulu Markdown.pm (%s) nebo /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "styl nebyl nalezen" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "stránka, na kterou vede přesměrování, nebyla nalezena" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "cykly nejsou v přesměrování povoleny" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "vyžaduje parametry „from“ a „to“" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Zrcadla" @@ -507,10 +514,6 @@ msgstr "schvalování komentářů" msgid "more" msgstr "více" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime není implementováno" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Přihlásit pomocí" @@ -527,39 +530,39 @@ msgstr "Na každou stránku vede odkaz z jiné stránky." msgid "bad or missing template" msgstr "chybná nebo chybějící šablona" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Vytvoření účtu bylo úspěšné. Nyní se můžete přihlásit." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Chyba při vytváření účtu." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "Bez e-mailové adresy nelze zaslat postup na resetování hesla." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Nepodařilo se odeslat email." -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "Postup na resetování hesla vám byl odeslán na e-mail." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "chybné URL pro resetování hesla" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "resetování hesla bylo zamítnuto" @@ -589,40 +592,40 @@ msgstr "LWP nebyl nalezen, nepinkám" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "varování: rozpoznána stará verze po4a, doporučen přechod na 0.35." -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s není platným kódem jazyka" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" "%s není platnou hodnotou parametru po_link_to, používám po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" "po_link_to=negotiated vyžaduje zapnuté usedirs, používám po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "znovusestavuji všechny stránky, aby se opravily meta nadpisy" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "sestavuji %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "aktualizovány PO soubory" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -630,7 +633,7 @@ msgstr "" "Nemohu odstranit překlad. Nicméně pokud bude odstraněna hlavní stránka, " "budou odstraněny také její překlady." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -638,50 +641,50 @@ msgstr "" "Nemohu přejmenovat překlad. Nicméně pokud bude přejmenována hlavní stránka, " "budou přejmenovány také její překlady." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT soubor (%s) neexistuje" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "nepodařilo se zkopírovat PO soubor na %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "nepodařilo se aktualizovat %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "nepodařilo se zkopírovat POT soubor na %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "nepodařilo se přeložit %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "odstraněny zastaralé PO soubory" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "nepodařilo se zapsat %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "překlad se nezdařil" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "neplatná gettext data, pro pokračování v úpravách se vraťte na předchozí " @@ -825,44 +828,44 @@ msgstr "%s není ve zdrojovém adresáři a proto nelze přejmenovat" msgid "no change to the file name was specified" msgstr "jméno souboru nebylo změněno" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "neplatné jméno" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s již existuje" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s již na disku existuje" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "přejmenování %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Také přejmenovat podstránky a přílohy" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Najednou lze přejmenovat pouze jednu přílohu." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Vyberte přílohu, kterou chcete přejmenovat." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "přejmenování %s na %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "aktualizace pro přejmenování %s na %s" @@ -960,18 +963,19 @@ msgstr "Stáhnout zdrojová data" msgid "parse fail at line %d: %s" msgstr "zpracovávání selhalo na řádku %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "vytvářím novou stránku %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "chybí parametr id" #: ../IkiWiki/Plugin/template.pm:47 #, perl-format -msgid "template %s not found" -msgstr "šablona %s nebyla nalezena" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "nepodařilo se zpracovat:" +msgid "%s not found" +msgstr "%s nenalezen" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1034,12 +1038,12 @@ msgstr "nemohu určit identitu nedůvěryhodného uživatele %s" msgid "bad file name %s" msgstr "chybné jméno souboru %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "prohledávám %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1048,42 +1052,47 @@ msgstr "" "v cestě ke zdrojovému adresáři (%s) byl nalezen symbolický odkaz -- chcete-" "li to povolit, nastavte proměnnou allow_symlinks_before_srcdir" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "přeskakuji chybné jméno souboru %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s má několik možných zdrojových stránek" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "odstraňuji starou stránku %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "sestavuji %s, která odkazuje na %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "odstraňuji %s, již není sestavována pomocí %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "sestavuji %s, která závisí na %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "sestavuji %s, aby se aktualizovaly zpětné odkazy" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: nelze sestavit %s" @@ -1156,63 +1165,64 @@ msgstr "použití: ikiwiki [volby] zdroj cíl" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup konfigurační.soubor" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "použití: --set proměnná=hodnota" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "použití: --set proměnná=hodnota" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "generuji obaly..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "znovusestavuji wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "obnovuji wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskuse" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Při použití --cgi musíte pomocí --url zadat url k wiki" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "nelze použít několik rcs modulů" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "nepodařilo se nahrát externí modul vyžadovaný modulem %s: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Byla rozpoznána smyčka na %s v hloubce %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "ano" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Pro řazení pomocí title_natural je nutný modul Sort::Naturally" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "neznámý typ řazení %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "neznámý typ řazení %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "nelze vybrat stránky: %s" @@ -1237,6 +1247,18 @@ msgstr "Který uživatel (wiki účet nebo openid) bude správce?" msgid "What is the domain name of the web server?" msgstr "Jaké je doménové jméno webového serveru?" +#~ msgid "failed to process" +#~ msgstr "nepodařilo se zpracovat" + +#~ msgid "nonexistant template %s" +#~ msgstr "neexistující šablona %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime není implementováno" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Pro řazení pomocí title_natural je nutný modul Sort::Naturally" + #~ msgid "failed to read %s" #~ msgstr "nepodařilo se přečíst %s" @@ -1284,9 +1306,6 @@ msgstr "Jaké je doménové jméno webového serveru?" #~ "REV není nastavena, není spuštěna ze svn post-commit, nemohu zaslat " #~ "oznámení" -#~ msgid "%s not found" -#~ msgstr "%s nenalezen" - #~ msgid "What's this?" #~ msgstr "Co to je?" diff --git a/po/da.po b/po/da.po index be7a95e6a..f830d667d 100644 --- a/po/da.po +++ b/po/da.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.14159\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-07-23 01:07+0200\n" "Last-Translator: Jonas Smedegaard \n" "Language-Team: None\n" @@ -59,7 +59,7 @@ msgstr "Indstillinger gemt" msgid "You are banned." msgstr "Du er banlyst." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Fejl" @@ -140,7 +140,7 @@ msgstr "opretter ny side %s" msgid "deleting bucket.." msgstr "sletter bundt.." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "færdig" @@ -181,7 +181,7 @@ msgstr "dårligt vedhæftningsfilnavn" msgid "attachment upload" msgstr "vedhæftningsoplægning" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "automatisk indeks-dannelse" @@ -215,55 +215,55 @@ msgstr "kommentar skal have indhold" msgid "Anonymous" msgstr "Anonym" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "dårligt sidenavn" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "kommenterer på %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "siden '%s' eksisterer ikke, så du kan ikke kommentere" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "kommentarer på side '%s' er lukket" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "kommentar gemt for moderering" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Din kommentar vil blive tilføjet efter moderatorgenemsyn" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Tilføjede en kommentar" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Tilføjede en kommentar: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "du er ikke logget på som en administrator" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Kommentarmoderering" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "kommentarkoderering" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -273,7 +273,7 @@ msgstr[1] "Kommentarer" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Kommentarer" @@ -304,14 +304,14 @@ msgstr "fjerner gammelt smugkig %s" msgid "%s is not an editable page" msgstr "%s er ikke en redigérbar side" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "opretter %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "redigerer %s" @@ -329,9 +329,11 @@ msgstr "sammenligning ikke angivet" msgid "edittemplate %s registered for %s" msgstr "redigeringsskabelon %s registreret for %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "dannelsen mislykkedes" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "dannelsen mislykkedes:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -360,18 +362,18 @@ msgstr "kan ikke få sider til at passe sammen: %s" msgid "%s is an attachment, not a page." msgstr "%s er ikke en redigérbar side" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "Du har ikke lov til at ændre %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "du kan ikke påvirke en fil med modus %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "du har ikke lov til at ændre modus for filer" @@ -456,12 +458,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "Tilføj nyt indlæg med følgende titel:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "ikke-eksisterende skabelon: %s" +msgid "template %s not found" +msgstr "skabelon %s ikke fundet" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client ikke fundet, pinger ikke" @@ -491,18 +493,23 @@ msgstr "" "Indlæsning af perl-modulet Markdown.pm (%s) eller /usr/bin/markdown (%s) " "mislykkedes" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "stilsnit (stylesheet) ikke fundet" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "henvisningsside ikke fundet" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "ring af henvisninger er ikke tilladt" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "kræver 'from'- og 'to'-parametre" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Spejle" @@ -520,10 +527,6 @@ msgstr "kommentarkoderering" msgid "more" msgstr "mere" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime ikke implementeret" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Log på med" @@ -540,40 +543,40 @@ msgstr "Alle sider har henvisninger fra andre sider." msgid "bad or missing template" msgstr "dårlig eller manglende skabelon" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Konto korrekt oprettet. Nu kan du logge på." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Fejl ved kontooprettelse." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "Ingen emailadresse, så kan ikke sende adgangskodenulstillingsinstruktioner." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Afsendelse af mail mislykkedes" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "Du har fået tilsendt adgangskodenulstillingsinstruktioner." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "Ukorrekt adgangskodenumstillings-URL" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "adgangskodenulstilling afvist" @@ -603,12 +606,12 @@ msgstr "LWP ikke fundet, pinger ikke" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s er ikke en gyldig sprogkode" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -616,7 +619,7 @@ msgstr "" "%s er ikke en gyldig værdi for po_link_to, falder tilbage til " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -624,21 +627,21 @@ msgstr "" "po_link_to=negotiated kræver at usedirs er aktiveret, falder tilbage til " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "gendanner alle sider for at korrigere meta titler" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "danner %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "opdaterer PO-filer" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -646,7 +649,7 @@ msgstr "" "Kan ikke fjerne en oversættelse. Fjern i stedet hovedsiden, så fjernes dens " "oversættelser også." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -654,50 +657,50 @@ msgstr "" "Kan ikke omdøbe en oversættelse. Omdøb i stedet hovedsiden, så omdøbes dens " "oversættelser også." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT-filen %s eksisterer ikke" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "kopiering af POT-filen til %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "opdatering af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "kopiering af POT-filen til %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "oversættelse af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "forældede PO filer fjernet" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "skrivning af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "oversættelse mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "forkert gettext-data, gå tilbage til forrige side og fortsæt redigering" @@ -840,44 +843,44 @@ msgstr "%s er ikke i srcdir, så kan ikke blive omdøbt" msgid "no change to the file name was specified" msgstr "ingen ændring til filnavnet blev angivet" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "ugyldigt navn" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s eksisterer allerede" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s eksisterer allerede på disken" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "omdøb %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Omdøb også UnderSider og vedhæftninger" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Kun en vedhæftning kan blive omdøbt ad gangen." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Vælg vedhæftningen som skal omdøbes." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "omdøb %s til %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "opdatering til omdøbning af %s til %s" @@ -975,18 +978,19 @@ msgstr "Direkte datanedlastning" msgid "parse fail at line %d: %s" msgstr "afkodningsfejl på linje %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "opretter ny side %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "manglende id-parameter" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "skabelon %s ikke fundet" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "dannelsen mislykkedes:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "fødning ikke fundet" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1049,12 +1053,12 @@ msgstr "kan ikke afgøre id for ikke-tillidsfulde skribent %s" msgid "bad file name %s" msgstr "dårligt filnavn %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "gennemlæser %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1063,42 +1067,47 @@ msgstr "" "symbolsk lænke fundet i srcdir-sti (%s) -- sæt allow_symlinks_before_srcdir " "for at tillade dette" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "udelader forkert filnavn %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s har flere mulige kildesider" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "fjerner gammel side %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "danner %s, som henviser til %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "fjerner %s, ikke længere dannet af %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "danner %s, som afhænger af %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "danner %s, for at opdatere dens krydshenvisninger (backlinks)" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kan ikke danne %s" @@ -1171,64 +1180,65 @@ msgstr "brug: ikiwiki [valg] kilde mål" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup opsætningsfil" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "brug: --set var=værdi" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "brug: --set var=værdi" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "bygger wrappers.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "genopbygger wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "genopfrisker wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Skal angive url til wiki med --url når der bruges --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "kan ikke bruge flere samtidige RCS-udvidelser" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" "indlæsning af ekstern udvidelse krævet af udvidelsen %s mislykkedes: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "forudberegningssløkke fundet på %s ved dybde %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "ja" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally krævet for title_natural sortering" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "ukendt sorteringsform %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "ukendt sorteringsform %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "kan ikke få sider til at passe sammen: %s" @@ -1253,6 +1263,18 @@ msgstr "Hvilken bruger (wiki konto eller openid) skal være administrator?" msgid "What is the domain name of the web server?" msgstr "Hvad er webserverens domænenavn?" +#~ msgid "failed to process" +#~ msgstr "dannelsen mislykkedes" + +#~ msgid "nonexistant template %s" +#~ msgstr "ikke-eksisterende skabelon: %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime ikke implementeret" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally krævet for title_natural sortering" + #~ msgid "failed to read %s" #~ msgstr "læsning af %s mislykkedes" diff --git a/po/de.po b/po/de.po index e5a18d47b..2452c8d21 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.14159\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2010-03-14 16:09+0530\n" "Last-Translator: Sebastian Kuhnert \n" "Language-Team: German \n" @@ -56,7 +56,7 @@ msgstr "Einstellungen gespeichert." msgid "You are banned." msgstr "Sie sind ausgeschlossen worden." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Fehler" @@ -137,7 +137,7 @@ msgstr "erstelle neue Seite %s" msgid "deleting bucket.." msgstr "lösche Behälter (bucket)..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "fertig" @@ -176,7 +176,7 @@ msgstr "fehlerhafter Dateiname für Anhang" msgid "attachment upload" msgstr "Anhang hochladen" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "automatische Index-Erstellung" @@ -210,56 +210,56 @@ msgstr "ein Kommentar sollte Inhalt haben" msgid "Anonymous" msgstr "Anonym" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "fehlerhafter Seitenname" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "kommentiere %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" "Seite %s existiert nicht, Sie können sie deshalb auch nicht kommentieren" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "Kommentare zur Seite %s sind gesperrt" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "Der Kommentar wurde zur Moderation gespeichert" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Ihr Kommentar wird nach Moderation verschickt" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Kommentar hinzugefügt" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Kommentar hinzugefügt: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "Sie sind nicht als Administrator angemeldet" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Kommentar-Moderation" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "Kommentar-Moderation" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -269,7 +269,7 @@ msgstr[1] "%i Kommentare" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "Kommentieren" @@ -299,14 +299,14 @@ msgstr "entferne alte Vorschau %s" msgid "%s is not an editable page" msgstr "Seite %s kann nicht bearbeitet werden" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "erstelle %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "bearbeite %s" @@ -324,9 +324,11 @@ msgstr "Übereinstimmung nicht angegeben" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s für %s registriert" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "Ablauf fehlgeschlagen" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "Fehler beim Ablauf:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -354,18 +356,18 @@ msgstr "Keine Seite" msgid "%s is an attachment, not a page." msgstr "Seite %s ist ein Anhang und keine Seite." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "Sie dürfen %s nicht verändern" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "Sie können eine Datei mit den Zugriffsrechten %s nicht nutzen" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "Sie dürfen die Zugriffsrechte der Datei nicht ändern" @@ -451,12 +453,12 @@ msgstr "die Parameter %s und %s können nicht zusammen benutzt werden" msgid "Add a new post titled:" msgstr "Füge einen neuen Beitrag hinzu. Titel:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "nicht-vorhandene Vorlage %s" +msgid "template %s not found" +msgstr "Vorlage %s nicht gefunden" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client nicht gefunden, führe Ping nicht aus" @@ -487,18 +489,23 @@ msgstr "" "laden des Perlmoduls Markdown.pm (%s) oder /usr/bin/markdown (%s) " "fehlgeschlagen" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "Stylesheet nicht gefunden" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "Umleitungsseite nicht gefunden" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "Zyklische Umleitungen sind nicht erlaubt" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "erfordert die Parameter 'from' und 'to'" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Spiegel" @@ -515,10 +522,6 @@ msgstr "Kommentar muss moderiert werden" msgid "more" msgstr "mehr" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime ist nicht implementiert" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Anmelden mit" @@ -535,41 +538,41 @@ msgstr "Alle Seiten haben mindestens einen Verweis von einer anderen Seite." msgid "bad or missing template" msgstr "fehlerhafte oder fehlende Vorlage" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "Ihre Benutzerseite: " -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "Benutzerseite erstellen" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Kontoerstellung erfolgreich. Sie können sich jetzt anmelden." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Konto konnte nicht erstellt werden." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "es gibt keine E-Mail Adresse, deshalb kann keine Anweisung zum Zurücksetzen " "des Passwortes zugeschickt werden." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Es konnte keine E-Mail versandt werden" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "Ihnen wurden Anweisungen zum Zurücksetzen des Passworts zugesandt." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "fehlerhafte URL zum Zurücksetzen des Passworts" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "zurücksetzen des Passworts abgelehnt" @@ -599,12 +602,12 @@ msgstr "LWP nicht gefunden, führe Ping nicht aus" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "Warnung: Altes po4a erkannt! Empfehle Aktualisierung auf 0.35" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s ist keine gültige Sprachkodierung" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -612,7 +615,7 @@ msgstr "" "%s ist kein gültiger Wert für po_link_to, greife zurück auf " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -620,21 +623,21 @@ msgstr "" "po_link_to=negotiated benötigt usedirs eingeschaltet, greife zurück auf " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "um die meta-titeln zu reparieren werden alle Seiten neu erstellt" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "erzeuge %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "PO-Dateien aktualisiert" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -642,7 +645,7 @@ msgstr "" "Übersetzung kann nicht entfernt werden. Wenn die Master Seite entfernt wird, " "werden auch ihre Übersetzungen entfernt." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -650,50 +653,50 @@ msgstr "" "Eine Übersetzung kann nicht umbenannt werden. Wenn die Master Seite " "unbenannt wird, werden auch ihre Übersetzungen unbenannt." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT-Datei (%s) existiert nicht" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "konnte die PO-Datei nicht aus dem Underlay nach %s kopieren" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "aktualisieren von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "kopieren der POT-Datei nach %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "übersetzen von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "überflüssige PO-Dateien wurden entfernt" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "schreiben von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "übersetzen fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "ungültige gettext Datei, gehe zurück zur vorherigen Seite um weiter zu " @@ -839,44 +842,44 @@ msgstr "%s ist nicht im srcdir und kann deshalb nicht umbenannt werden" msgid "no change to the file name was specified" msgstr "es wurde keine Änderung des Dateinamens angegeben" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "unzulässiger Name" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s existiert bereits" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s existiert bereits auf der Festplatte" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "benenne %s um" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Auch Unterseiten (SubPages) und Anhänge umbenennen" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Es kann immer nur ein Anhang gleichzeitig umbenannt werden." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Bitte wählen Sie den Anhang aus, der umbenannt werden soll." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "benenne %s in %s um" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "aktualisiert zum Umbenennen von %s nach %s" @@ -974,18 +977,19 @@ msgstr "Direkter Daten-Download" msgid "parse fail at line %d: %s" msgstr "Auswertungsfehler in Zeile %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "erstelle neue Seite %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "fehlender Parameter id" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "Vorlage %s nicht gefunden" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "Fehler beim Ablauf:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "Vorlage (feed) nicht gefunden" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1051,12 +1055,12 @@ msgstr "" msgid "bad file name %s" msgstr "fehlerhafter Dateiname %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "durchsuche %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1065,42 +1069,47 @@ msgstr "" "symbolischer Verweis im srcdir Pfad (%s) gefunden -- setzen Sie " "allow_symlinks_before_srcdir, um dies zu erlauben" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "überspringe fehlerhaften Dateinamen %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s hat mehrere mögliche Quellseiten" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "entferne alte Seite %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "erzeuge %s, die auf %s verweist" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "entferne %s, wird nicht länger von %s erzeugt" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "erzeuge %s, die von %s abhängt" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "erzeuge %s, um dessen Rückverweise zu aktualisieren" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kann %s nicht erzeugen" @@ -1176,66 +1185,67 @@ msgstr "Aufruf: ikiwiki [Optionen] Quelle Ziel" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup Konfigurationsdatei" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "Aufruf: --set Variable=Wert" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "Aufruf: --set Variable=Wert" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "erzeuge Wrapper.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "erzeuge Wiki neu.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "aktualisiere Wiki.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Es muss eine URL zum Wiki mit --url angegeben werden, wenn --cgi verwandt " "wird" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" "Es können nicht mehrere Versionskontrollsystem-Erweiterungen verwandt werden" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Laden der für %s benötigten externen Erweiterung fehlgeschlagen: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Präprozessorschleife auf %s in Tiefe %i erkannt" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "ja" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally wird benötigt für title_natural sort" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "Unbekannter Sortierungstyp %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "Unbekannter Sortierungstyp %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "Kann die Seiten nicht zuordnen: %s" @@ -1260,6 +1270,18 @@ msgstr "Wer (Wiki-Konto oder OpenID) soll Administrator sein?" msgid "What is the domain name of the web server?" msgstr "Wie lautet der Domainname des Webservers?" +#~ msgid "failed to process" +#~ msgstr "Ablauf fehlgeschlagen" + +#~ msgid "nonexistant template %s" +#~ msgstr "nicht-vorhandene Vorlage %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime ist nicht implementiert" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally wird benötigt für title_natural sort" + #~ msgid "failed to read %s" #~ msgstr "lesen von %s fehlgeschlagen" diff --git a/po/es.po b/po/es.po index 413572866..a6f3a2c6b 100644 --- a/po/es.po +++ b/po/es.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: es\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-06-14 12:32+0200\n" "Last-Translator: Victor Moral \n" "Language-Team: \n" @@ -60,7 +60,7 @@ msgstr "Las preferencias se han guardado." msgid "You are banned." msgstr "Ha sido expulsado." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Error" @@ -142,7 +142,7 @@ msgstr "creando nueva página %s" msgid "deleting bucket.." msgstr "borrando el directorio.." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "completado" @@ -183,7 +183,7 @@ msgstr "nombre de archivo adjunto erróneo" msgid "attachment upload" msgstr "enviado el adjunto" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "creación de índice automática" @@ -217,55 +217,55 @@ msgstr "Un comentario debe tener algún contenido" msgid "Anonymous" msgstr "Anónimo" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "nombre de página erróneo" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "creando comentarios en la página %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "la página '%s' no existe, así que no se puede comentar sobre ella" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "los comentarios para la página '%s' están cerrados" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "comentario guardado a la espera de aprobación" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Su comentario será publicado después de que el moderador lo revise" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Añadir un comentario" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Comentario añadido: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "No está registrado como un administrador" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Aprobación de comentarios" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "aprobación de comentarios" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -275,7 +275,7 @@ msgstr[1] "Comentarios" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Comentarios" @@ -306,14 +306,14 @@ msgstr "eliminando la antigua previsualización %s" msgid "%s is not an editable page" msgstr "la página %s no es modificable" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "creando página %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "modificando página %s" @@ -331,9 +331,11 @@ msgstr "falta indicar la coincidencia de páginas (match)" msgid "edittemplate %s registered for %s" msgstr "plantilla de edición %s registrada para %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "fallo en el proceso" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "se ha producido un error fatal mientras procesaba la plantilla:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -362,18 +364,18 @@ msgstr "no encuentro páginas coincidentes: %s" msgid "%s is an attachment, not a page." msgstr "la página %s no es modificable" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "No puede cambiar %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "no puede actuar sobre un archivo con permisos %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "No puede cambiar los permisos de acceso de un archivo" @@ -460,12 +462,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "Añadir una entrada nueva titulada:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "la plantilla %s no existe " +msgid "template %s not found" +msgstr "no he encontrado la plantilla %s" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "No he encontrado el componente RPC::XML::Client, no envío señal alguna" @@ -495,18 +497,23 @@ msgstr "" "no he podido cargar el módulo Perl Markdown.pm (%s) ó no he podido ejecutar " "el programa /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "hoja de estilo no encontrada " -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "falta la página a donde redirigir" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "ciclo de redirección no permitido" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "los parámetros 'from' y 'to' son obligatorios" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Réplicas" @@ -524,10 +531,6 @@ msgstr "aprobación de comentarios" msgid "more" msgstr "ver más" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "la funcionalidad getctime no está incluida" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Identificarse mediante " @@ -545,43 +548,43 @@ msgstr "Todas las páginas están referenciadas entre sí." msgid "bad or missing template" msgstr "plantilla errónea ó no existente" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Cuenta de usuario creada con éxito. Ahora puede identificarse." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Error creando la cuenta de usuario." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "No tengo dirección de correo electrónica, así que no puedo enviar " "instrucciones para reiniciar la contraseña" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "No he podido enviar el mensaje de correo electrónico" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" "Las instrucciones para reiniciar la contraseña se le han enviado por correo " "electrónico" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "el url para reiniciar la contraseña es incorrecto" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "reinicio de contraseña denegado" @@ -611,94 +614,94 @@ msgstr "No he encontrado el componente LWP, no envío señal alguna" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "%s no es un archivo" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "Informaremos a %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, fuzzy, perl-format msgid "POT file (%s) does not exist" msgstr "No existe la página %s." -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "dimensionamiento fallido: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "dimensionamiento fallido: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "no he podido ejecutar el programa dot" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -840,44 +843,44 @@ msgstr "%s no está en el directorio fuente por lo que no puede ser renombrado" msgid "no change to the file name was specified" msgstr "no se ha indicado cambio alguno en el nombre del archivo" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "nombre no válido" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s ya existe" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s ya existe en el disco" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "cambiando de nombre %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "También cambia de nombre las subpáginas y los adjuntos" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Únicamente un adjunto puede ser renombrado a la vez." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Por favor, seleccione el adjunto al que cambiar el nombre." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "%s cambia de nombre a %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "actualizado el cambio de nombre de %s a %s" @@ -979,18 +982,19 @@ msgstr "Enlace directo para descarga" msgid "parse fail at line %d: %s" msgstr "error de análisis en la línea %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "creando nueva página %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "falta el parámetro \"id\"" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "no he encontrado la plantilla %s" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "se ha producido un error fatal mientras procesaba la plantilla:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "fuente de datos no encontrada" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1055,12 +1059,12 @@ msgstr "no puedo determinar el identificador de un usuario no fiable como %s" msgid "bad file name %s" msgstr "el nombre de archivo %s es erróneo" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "explorando %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1069,44 +1073,49 @@ msgstr "" "encontrado un enlace simbólico en la ruta del directorio fuente (%s) -- use " "la directiva allow_symlinks_before_srcdir para permitir la acción" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "ignorando el archivo %s porque su nombre no es correcto" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s tiene mútiples páginas fuente posibles" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "eliminando la antigua página %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "convirtiendo la página %s, la cual referencia a %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "eliminando la página %s puesto que ya no se deriva de %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "convirtiendo la página %s, la cual depende de %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "" "convirtiendo la página %s para actualizar la lista de páginas que hacen " "referencia a ella." -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: no puedo convertir la página %s" @@ -1181,69 +1190,68 @@ msgstr "uso: ikiwiki [opciones] origen destino" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup archivo_de_configuración" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "uso: --set variable=valor" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "uso: --set variable=valor" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "generando programas auxiliares.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "reconstruyendo el wiki.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "actualizando el wiki.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Comentarios" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Es obligatorio especificar un url al wiki con el parámetro --url si se " "utiliza el parámetro --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "no puedo emplear varios complementos rcs" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "no he podido cargar el complemento externo %s necesario para %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" "se ha detectado en la página %s un bucle de preprocesado en la iteración " "número %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "si" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" -"Se necesita el módulo Sort::Naturally para el tipo de ordenación " -"title_natural" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "no conozco este tipo de ordenación %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "no conozco este tipo de ordenación %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "no encuentro páginas coincidentes: %s" @@ -1271,6 +1279,20 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "¿ Cuál es el dominio para el servidor web ?" +#~ msgid "failed to process" +#~ msgstr "fallo en el proceso" + +#~ msgid "nonexistant template %s" +#~ msgstr "la plantilla %s no existe " + +#~ msgid "getctime not implemented" +#~ msgstr "la funcionalidad getctime no está incluida" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "" +#~ "Se necesita el módulo Sort::Naturally para el tipo de ordenación " +#~ "title_natural" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "no puedo leer de %s: %s " diff --git a/po/fr.po b/po/fr.po index 6be9482ce..b98a498c0 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.141\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-08-17 10:06+0200\n" "Last-Translator: Philippe Batailler \n" "Language-Team: French \n" @@ -57,7 +57,7 @@ msgstr "Les préférences ont été enregistrées." msgid "You are banned." msgstr "Vous avez été banni." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Erreur" @@ -138,7 +138,7 @@ msgstr "Création de la nouvelle page %s" msgid "deleting bucket.." msgstr "Suppression du compartiment S3 (« bucket »)..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "Terminé" @@ -176,7 +176,7 @@ msgstr "Nom de la pièce jointe incorrect" msgid "attachment upload" msgstr "Envoi de la pièce jointe" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "Génération de l'index automatique" @@ -210,55 +210,55 @@ msgstr "Un commentaire doit avoir un contenu." msgid "Anonymous" msgstr "Anonyme" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "Nom de page incorrect" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "Faire un commentaire sur %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "La page '%s' n'existe pas, commentaire impossible." -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "Le commentaire pour la page '%s' est terminé." -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "Le commentaire a été enregistré, en attente de « modération »" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Votre commentaire sera publié après vérification par le modérateur" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Commentaire ajouté" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Commentaire ajouté : %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "Vous n'êtes pas authentifié comme administrateur" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Modération du commentaire" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "modération du commentaire" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -268,7 +268,7 @@ msgstr[1] "Commentaires" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Commentaires" @@ -299,14 +299,14 @@ msgstr "Suppression de l'ancienne prévisualisation %s" msgid "%s is not an editable page" msgstr "%s n'est pas une page éditable" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "Création de %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "Édition de %s" @@ -324,9 +324,11 @@ msgstr "correspondance non indiquée" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s enregistré pour %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "Échec du traitement" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "Échec du traitement :" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -354,18 +356,18 @@ msgstr "Ce n'est pas une page." msgid "%s is an attachment, not a page." msgstr "%s est une pièce jointe, pas une page." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "Vous n'êtes pas autorisé à modifier %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "Vous ne pouvez pas modifier un fichier dont le mode est %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "Vous n'êtes pas autorisé à modifier le mode des fichiers" @@ -452,12 +454,12 @@ msgstr "Les paramètres %s et %s ne peuvent être utilisés ensemble." msgid "Add a new post titled:" msgstr "Ajouter un nouvel article dont le titre est :" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "Le modèle de page %s n'existe pas" +msgid "template %s not found" +msgstr "Modèle de page %s introuvable" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client introuvable, pas de réponse au ping" @@ -486,18 +488,23 @@ msgstr "" "Échec du chargement du module Perl Markdown.pm (%s) ou de /usr/bin/markdown " "(%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "Feuille de style introuvable " -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "Page de redirection introuvable" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "Redirection cyclique non autorisée" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "les paramètres « from » et « to » sont nécessaires." + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Miroirs" @@ -515,10 +522,6 @@ msgstr "modération du commentaire" msgid "more" msgstr "lire la suite" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime n'est pas implémenté" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "S'identifier en tant que" @@ -535,43 +538,43 @@ msgstr "Toutes les pages sont liées à d'autres pages." msgid "bad or missing template" msgstr "Modèle de page incorrect ou manquant" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Le compte a été créé. Vous pouvez maintenant vous identifier." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Erreur lors de la création du compte." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "Aucune adresse indiquée. Impossible d'envoyer les instructions pour " "réinitialiser le mot de passe." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Impossible d'envoyer un courriel" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" "Vous avez reçu un message contenant les instructions pour réinitialiser le " "mot de passe" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "Adresse pour la réinitialisation du mot de passe incorrecte" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "réinitialisation du mot de passe refusée" @@ -603,12 +606,12 @@ msgstr "" "Note : ancienne version de po4a détectée. Il est recommandé d'installer la " "version 0.35." -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s n'est pas un code de langue valable" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -616,7 +619,7 @@ msgstr "" "%s n'est pas une valeur correcte pour po_link_to, retour à la valeur par " "défaut." -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -624,23 +627,23 @@ msgstr "" "po_link_to=negotiated nécessite que usedirs soit activé, retour à " "po_link_to=default." -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" "Reconstruction de toutes les pages pour corriger les titres (greffon " "« meta »)." -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "construction de %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "Fichiers PO mis à jour." -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -648,7 +651,7 @@ msgstr "" "Impossible de supprimer cette traduction. Si la page maître est supprimée, " "alors ses traductions seront supprimées." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -656,50 +659,50 @@ msgstr "" "Impossible de renommer cette traduction. Si la page maître est renommée, " "alors ses traductions pourront être renommées." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "Le fichier POT %s n'existe pas." -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "Impossible de copier le fichier PO underlay dans %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "Impossible de mettre à jour %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "Impossible de copier le fichier POT dans %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "Impossible de traduire %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "Fichiers PO obsolètes supprimés." -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "Impossible de modifier %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "Impossible de traduire" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "Données gettext incorrectes, retour à la page précédente pour la poursuite " @@ -844,44 +847,44 @@ msgstr "%s n'est pas dans srcdir. Impossible de le renommer" msgid "no change to the file name was specified" msgstr "Aucun changement dans le nom du fichier n'a été spécifié" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "Appellation interdite" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s existe déjà" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s existe déjà sur le disque" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "%s renommé" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "« SubPages » et attachements renommés." -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Modification de pièce jointe : une seule à la fois" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Veuillez sélectionner la pièce jointe à renommer" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "Renomme %s en %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "mise à jour, suite au changement de %s en %s" @@ -979,18 +982,19 @@ msgstr "Téléchargement direct des données" msgid "parse fail at line %d: %s" msgstr "Erreur d'analyse à la ligne %d : %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "Création de la nouvelle page %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "Paramètre d'identification manquant" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "Modèle de page %s introuvable" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "Échec du traitement :" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "Flux introuvable " #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1054,12 +1058,12 @@ msgstr "" msgid "bad file name %s" msgstr "Nom de fichier incorrect %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "Examen de %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1068,42 +1072,47 @@ msgstr "" "Lien symbolique trouvé dans l'adresse de srcdir (%s) -- pour l'autoriser, " "activez le paramètre « allow_symlinks_before_srcdir »." -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "Omission du fichier au nom incorrect %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s peut être associé à plusieurs pages source." -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "Suppression de l'ancienne page %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "Reconstruction de %s, qui est lié à %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "Suppression de %s, qui n'est plus rendu par %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "Reconstruction de %s, qui dépend de %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "Reconstruction de %s, afin de mettre à jour ses rétroliens" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki : impossible de reconstruire %s" @@ -1181,64 +1190,65 @@ msgstr "Syntaxe : ikiwiki [options] source destination" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup fichier de configuration" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "Syntaxe : -- set var=valeur" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "Syntaxe : -- set var=valeur" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "Création des fichiers CGI..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "Reconstruction du wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "Rafraîchissement du wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Discussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Vous devez indiquer l'URL du wiki par --url lors de l'utilisation de --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "Impossible d'utiliser plusieurs systèmes de contrôle des versions" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Impossible de charger le greffon externe nécessaire au greffon %s : %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Une boucle de prétraitement a été détectée sur %s à hauteur de %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "oui" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally est nécessaire pour un tri « title_natural »" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "Type de tri %s inconnu" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "Type de tri %s inconnu" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "Impossible de trouver les pages %s" @@ -1263,6 +1273,18 @@ msgstr "Identifiant de l'administrateur (utilisateur du wiki ou openid) :" msgid "What is the domain name of the web server?" msgstr "Nom de domaine du serveur HTTP :" +#~ msgid "failed to process" +#~ msgstr "Échec du traitement" + +#~ msgid "nonexistant template %s" +#~ msgstr "Le modèle de page %s n'existe pas" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime n'est pas implémenté" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally est nécessaire pour un tri « title_natural »" + #~ msgid "failed to read %s" #~ msgstr "Impossible de lire %s" diff --git a/po/gu.po b/po/gu.po index d4bfd42c0..4f652358d 100644 --- a/po/gu.po +++ b/po/gu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-gu\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-01-11 16:05+0530\n" "Last-Translator: Kartik Mistry \n" "Language-Team: Gujarati \n" @@ -54,7 +54,7 @@ msgstr "પ્રાથમિકતાઓ સંગ્રહાઇ." msgid "You are banned." msgstr "તમારા પર પ્રતિબંધ છે." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "ક્ષતિ" @@ -135,7 +135,7 @@ msgstr "નવું પાનું %s બનાવે છે" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "સંપૂર્ણ" @@ -176,7 +176,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -208,55 +208,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "%s બનાવે છે" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -266,7 +266,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -296,14 +296,14 @@ msgstr "જુનાં પાનાં દૂર કરે છે %s" msgid "%s is not an editable page" msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "%s બનાવે છે" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "%s સુધારે છે" @@ -323,9 +323,10 @@ msgstr "આવરણ ફાઇલનામ સ્પષ્ટ કરેલ ન msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "ક્રિયા કરવામાં નિષ્ફળ:" #: ../IkiWiki/Plugin/format.pm:30 @@ -356,18 +357,18 @@ msgstr "વાંચી શકાતી નથી %s: %s" msgid "%s is an attachment, not a page." msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -453,12 +454,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "આ શિર્ષકથી નવું પોસ્ટ ઉમેરો:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "અસ્તિત્વમાં ન હોય તેવું ટેમ્પલેટ %s" +msgid "template %s not found" +msgstr "ટેમ્પલેટ %s મળ્યું નહી" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client મળ્યું નહી, પિંગ કરવામાં આવતું નથી" @@ -485,20 +486,24 @@ msgstr "" msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "Markdown.pm પર્લ મોડ્યુલ (%s) અથવા /usr/bin/markdown (%s) લાવવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "સ્ટાઇલશીટ મળ્યું નહી" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "ફીડ મળ્યું નહી" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "ફીડ મળ્યું નહી" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "મિરરો" @@ -515,10 +520,6 @@ msgstr "" msgid "more" msgstr "વધુ" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime અમલમાં મૂકાયેલ નથી" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -536,39 +537,39 @@ msgstr "બધા પાનાંઓ બીજા પાનાંઓ વડે msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "ખાતું બનાવવાનું સફળ. તમે હવે લોગઇન કરી શકો છો." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "ખાતું બનાવવામાં ક્ષતિ." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "મેઇલ મોકલવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -599,94 +600,94 @@ msgstr "RPC::XML::Client મળ્યું નહી, પિંગ કરવા msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "%s સુધારે છે" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "માપ બદલવામાં નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "%s લખવામાં નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "ડોટ ચલાવવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -831,44 +832,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "આવરણ ફાઇલનામ સ્પષ્ટ કરેલ નથી" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "રેન્ડર કરે છે %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "%s નો સુધારો %s નાં %s વડે" @@ -970,19 +971,20 @@ msgstr "સીધી માહિતી ડાઉનલોડ" msgid "parse fail at line %d: %s" msgstr "ઉકેલવાનું લીટી %d પર નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "નવું પાનું %s બનાવે છે" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "ખોવાયેલ આઇડી વિકલ્પ" #: ../IkiWiki/Plugin/template.pm:47 #, perl-format -msgid "template %s not found" +msgid "%s not found" msgstr "ટેમ્પલેટ %s મળ્યું નહી" -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "ક્રિયા કરવામાં નિષ્ફળ:" - #: ../IkiWiki/Plugin/teximg.pm:72 #, fuzzy msgid "missing tex code" @@ -1042,54 +1044,59 @@ msgstr "" msgid "bad file name %s" msgstr "ખરાબ ફાઇલ નામ છોડી દે છે %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "%s શોધે છે" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "ખરાબ ફાઇલ નામ છોડી દે છે %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "જુનાં પાનાં દૂર કરે છે %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "રેન્ડર કરે છે %s, જે %s સાથે જોડાણ ધરાવે છે" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "દૂર કરે છે %s, હવે %s વડે રેન્ડર કરાતું નથી" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "રેન્ડર કરે છે %s, જે %s પર આધારિત છે" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "રેન્ડર કરે છે %s, તેનાં પાછળનાં જોડાણો સુધારવા માટે" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: %s રેન્ડર કરી શકાતું નથી" @@ -1162,62 +1169,63 @@ msgstr "ઉપયોગ: ikiwiki [વિકલ્પો] source dest" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "આવરણ બનાવે છે.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "વીકી ફરીથી બનાવે છે.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "વીકીને તાજી કરે છે.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "ચર્ચા" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "જ્યારે --cgi ઉપયોગ કરતાં હોય ત્યારે વીકીનું યુઆરએલ સ્પષ્ટ કરવું જ પડશે" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "%s પર શોધાયેલ લુપ %s પર ચલાવે છે %i ઉંડાણ પર" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "વાંચી શકાતી નથી %s: %s" @@ -1242,6 +1250,16 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "ક્રિયા કરવામાં નિષ્ફળ:" + +#~ msgid "nonexistant template %s" +#~ msgstr "અસ્તિત્વમાં ન હોય તેવું ટેમ્પલેટ %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime અમલમાં મૂકાયેલ નથી" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "%s વાંચવામાં નિષ્ફળ: %s" @@ -1295,9 +1313,6 @@ msgstr "" #~ msgstr "" #~ "REV ગોઠવેલ નથી, svn post-commit hook માંથી ચાલતું નથી, નોંધ મોકલી શકાશે નહી" -#~ msgid "%s not found" -#~ msgstr "ટેમ્પલેટ %s મળ્યું નહી" - #~ msgid "What's this?" #~ msgstr "આ શું છે?" diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index c2f4e24a9..638e724d5 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -55,7 +55,7 @@ msgstr "" msgid "You are banned." msgstr "" -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "" @@ -136,7 +136,7 @@ msgstr "" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "" @@ -174,7 +174,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -206,55 +206,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -264,7 +264,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -294,14 +294,14 @@ msgstr "" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "" @@ -319,8 +319,9 @@ msgstr "" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +msgid "failed to process template:" msgstr "" #: ../IkiWiki/Plugin/format.pm:30 @@ -349,18 +350,18 @@ msgstr "" msgid "%s is an attachment, not a page." msgstr "" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -442,12 +443,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" +msgid "template %s not found" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "" @@ -474,18 +475,22 @@ msgstr "" msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "" @@ -502,10 +507,6 @@ msgstr "" msgid "more" msgstr "" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -522,39 +523,39 @@ msgstr "" msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -584,93 +585,93 @@ msgstr "" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -812,44 +813,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "" @@ -947,17 +948,18 @@ msgstr "" msgid "parse fail at line %d: %s" msgstr "" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, perl-format +msgid "creating tag page %s" +msgstr "" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "" #: ../IkiWiki/Plugin/template.pm:47 #, perl-format -msgid "template %s not found" -msgstr "" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" +msgid "%s not found" msgstr "" #: ../IkiWiki/Plugin/teximg.pm:72 @@ -1017,54 +1019,59 @@ msgstr "" msgid "bad file name %s" msgstr "" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." msgstr "" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:434 +#, perl-format +msgid "removing obsolete %s" +msgstr "" + +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "" @@ -1137,62 +1144,63 @@ msgstr "" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "" -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "" -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "" -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" +#: ../IkiWiki.pm:2009 +#, perl-format +msgid "invalid sort type %s" msgstr "" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "" diff --git a/po/it.po b/po/it.po index b1b3dbd55..45efc2d3f 100644 --- a/po/it.po +++ b/po/it.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-08-16 11:01+0100\n" "Last-Translator: Luca Bruno \n" "Language-Team: Italian TP \n" @@ -53,7 +53,7 @@ msgstr "Preferenze salvate." msgid "You are banned." msgstr "Avete ricevuto un ban." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Errore" @@ -135,7 +135,7 @@ msgstr "creazione nuova pagina %s" msgid "deleting bucket.." msgstr "eliminazione contenitore..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "fatto" @@ -173,7 +173,7 @@ msgstr "nome file dell'allegato non valido" msgid "attachment upload" msgstr "carica allegato" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "generazione automatica dell'indice" @@ -207,55 +207,55 @@ msgstr "i commenti devono avere un contenuto" msgid "Anonymous" msgstr "Anonimo" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "nome pagina non valido" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "commento su %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "la pagina «%s» non esiste, impossibile commentarla" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "i commenti per la pagina «%s» sono chiusi" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "commento trattenuto per moderazione" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Il commento sarà pubblicato dopo la verifica del moderatore" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Aggiunto commento" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Aggiunto commento: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "non siete autenticati come amministratore" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Moderazione commenti" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "moderazione commento" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -265,7 +265,7 @@ msgstr[1] "Commenti" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Commenti" @@ -296,14 +296,14 @@ msgstr "rimozione vecchia anteprima %s" msgid "%s is not an editable page" msgstr "%s non è una pagina modificabile" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "creazione %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "modifica %s" @@ -321,9 +321,11 @@ msgstr "corrispondenza non specificata" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s registrato per %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "errore nell'elaborazione" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "errore nell'elaborazione:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -351,18 +353,18 @@ msgstr "non è una pagina" msgid "%s is an attachment, not a page." msgstr "%s è un allegato, non una pagina." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "non è permesso modificare %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "non è permesso lavorare su un file in modalità %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "non è permesso cambiare la modalità del file" @@ -447,12 +449,12 @@ msgstr "i parametri %s e %s non possono essere usati insieme" msgid "Add a new post titled:" msgstr "Aggiungere un nuovo articolo dal titolo:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "modello %s non esistente" +msgid "template %s not found" +msgstr "modello %s non trovato" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client non trovato, impossibile inviare ping" @@ -481,18 +483,23 @@ msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" "impossibile caricare il modulo perl Markdown.pm (%s) o /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "foglio di stile non trovato" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "pagina di reindirizzamento non trovata" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "ciclo di reindirizzamento non ammesso" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "sono richiesti i parametri \"to\" e \"from\"" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Mirror" @@ -510,10 +517,6 @@ msgstr "moderazione commento" msgid "more" msgstr "altro" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime non implementata" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Accedi tramite" @@ -530,42 +533,42 @@ msgstr "Tutte le pagine hanno collegamenti in entrata da altre pagine." msgid "bad or missing template" msgstr "modello errato o mancante" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Account creato con successo. È ora possibile effettuare l'accesso." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Errore nella creazione dell'account." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "Nessun indirizzo email, impossibile inviare per email le istruzioni per " "reimpostare la password." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Impossibile spedire il messaggio" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" "Il messaggio con le istruzioni per reimpostare la password è stato inviato." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "url per il reset della password non corretto" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "reset della password non permesso" @@ -597,19 +600,19 @@ msgstr "" "attenzione: è presente un vecchio po4a. Si raccomanda di aggiornare almeno " "alla versione 0.35." -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s non è una codifica di lingua valida" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" "%s non è un valore per po_link_to valido, verrà utilizzato po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -617,21 +620,21 @@ msgstr "" "po_link_to=negotiated richiede che venga abilitato usedirs, verrà utilizzato " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "rigenerazione di tutte le pagine per sistemare i meta-titoli" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "compilazione di %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "file PO aggiornati" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -639,7 +642,7 @@ msgstr "" "Impossibile eliminare una traduzione. Tuttavia, se la pagina principale è " "stata eliminata anche le traduzioni lo saranno." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -647,50 +650,50 @@ msgstr "" "Impossibile rinominare una traduzione. Tuttavia, se la pagina principale è " "stata rinominata anche le traduzioni lo saranno." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "Il file POT (%s) non esiste" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "impossibile copiare il file PO di underlay in %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "impossibile aggiornare %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "impossibile copiare il file POT in %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/D" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "impossibile tradurre %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "file PO obsoleti rimossi" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "impossibile scrivere %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "impossibile tradurre" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "dati gettext non validi, tornare alle pagina precedente per continuare le " @@ -836,44 +839,44 @@ msgstr "%s non è in src, quindi non può essere rinominato" msgid "no change to the file name was specified" msgstr "non è stata specificata nessuna modifica al nome del file" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "nome non valido" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s esiste già" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s già presente su disco" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "rinomina di %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Rinomina anche SottoPagine e allegati" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Si può rinominare un solo allegato alla volta." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Selezionare l'allegato da rinominare." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "rinomina %s in %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "aggiornamento per rinomina di %s in %s" @@ -971,18 +974,19 @@ msgstr "Scaricamento diretto dei dati" msgid "parse fail at line %d: %s" msgstr "errore di interpretazione alla riga %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "creazione nuova pagina %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "parametro id mancante" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "modello %s non trovato" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "errore nell'elaborazione:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "notiziario non trovato" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1045,12 +1049,12 @@ msgstr "impossibile determinare l'id del committer non fidato %s" msgid "bad file name %s" msgstr "nome file %s scorretto" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "scansione %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1059,42 +1063,47 @@ msgstr "" "collegamento simbolico trovato nel percorso srcdir (%s) -- impostare " "allow_symlinks_before_srcdir per abilitare questa configurazione" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "ignorato il file dal nome scorretto %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s ha diverse pagine sorgenti possibili" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "rimozione della vecchia pagina %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "compilazione di %s, che è collegato a %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "rimozione di %s, non più richiesto da %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "compilazione di %s, che dipende da %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "compilazione di %s, per aggiornare i collegamenti ai precedenti" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: impossibile compilare %s" @@ -1168,63 +1177,64 @@ msgstr "utilizzo: ikiwiki [opzioni] sorgente destinazione" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup configfile" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "utilizzo: --set var=valore" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "utilizzo: --set var=valore" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "generazione contenitori..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "ricostruzione wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "aggiornamento wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Discussione" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Occorre specificare l'url del wiki tramite --url quando si usa --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "impossibile usare più plugin rcs" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "impossibile caricare il plugin esterno per il plugin %s: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "ciclo del preprocessore individuato su %s alla profondità %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "sì" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally è richiesto per l'ordinamento title_natural" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "ordinamento %s sconosciuto" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "ordinamento %s sconosciuto" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "impossibile trovare pagine corrispondenti: %s" @@ -1249,6 +1259,18 @@ msgstr "Quale utente (openid o del wiki) sarà l'amministratore?" msgid "What is the domain name of the web server?" msgstr "Qual è il nome del dominio del server web?" +#~ msgid "failed to process" +#~ msgstr "errore nell'elaborazione" + +#~ msgid "nonexistant template %s" +#~ msgstr "modello %s non esistente" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime non implementata" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally è richiesto per l'ordinamento title_natural" + #~ msgid "failed to read %s" #~ msgstr "impossibile leggere %s" diff --git a/po/pl.po b/po/pl.po index 9fb3cacc0..837c5acd2 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 1.51\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-04-27 22:05+0200\n" "Last-Translator: Pawel Tecza \n" "Language-Team: Debian L10n Polish \n" @@ -57,7 +57,7 @@ msgstr "Preferencje zapisane." msgid "You are banned." msgstr "Twój dostęp został zabroniony przez administratora." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Błąd" @@ -139,7 +139,7 @@ msgstr "tworzenie nowej strony %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "gotowe" @@ -180,7 +180,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -212,55 +212,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "tworzenie %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -270,7 +270,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -300,14 +300,14 @@ msgstr "usuwanie starej strony %s" msgid "%s is not an editable page" msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "tworzenie %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "edycja %s" @@ -327,9 +327,10 @@ msgstr "nieokreślona nazwa pliku osłony" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "awaria w trakcie przetwarzania:" #: ../IkiWiki/Plugin/format.pm:30 @@ -360,18 +361,18 @@ msgstr "awaria w trakcie odczytu %s: %s" msgid "%s is an attachment, not a page." msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -460,12 +461,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "Tytuł nowego wpisu" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "brakujący szablon %s" +msgid "template %s not found" +msgstr "nieznaleziony szablon %s" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "Nieznaleziony moduł RPC::XML::Client, brak możliwości pingowania" @@ -497,21 +498,25 @@ msgstr "" "Awaria w trakcie ładowania perlowego modułu Markdown.pm (%s) lub " "uruchamiania programu /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 #, fuzzy msgid "stylesheet not found" msgstr "nieznaleziony szablon ze stylami CSS" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "nieznaleziony kanał RSS" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "nieznaleziony kanał RSS" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Kopie lustrzane" @@ -528,10 +533,6 @@ msgstr "" msgid "more" msgstr "więcej" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "niedostępna funkcja getctime" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -549,39 +550,39 @@ msgstr "Dla każdej strony istnieje odnośnik z innej strony" msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Konto założone pomyślnie. Teraz można zalogować się." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Błąd w trakcie zakładania konta." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Awaria w trakcie wysyłania wiadomości" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -612,94 +613,94 @@ msgstr "Nieznaleziony moduł RPC::XML::Client, brak możliwości pingowania" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "edycja %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "awaria w trakcie zmiany rozmiaru: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "awaria w trakcie zapisu %s: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "awaria w trakcie uruchamiania dot" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -846,44 +847,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "nieokreślona nazwa pliku osłony" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "renderowanie %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "aktualizacja stron wiki %s: %s przez użytkownika %s" @@ -990,20 +991,20 @@ msgstr "Bezpośrednie pobieranie danych" msgid "parse fail at line %d: %s" msgstr "awaria w trakcie przetwarzania linii %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "tworzenie nowej strony %s" + +#: ../IkiWiki/Plugin/template.pm:33 #, fuzzy msgid "missing id parameter" msgstr "brakujący parametr id" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "nieznaleziony szablon %s" - -#: ../IkiWiki/Plugin/template.pm:66 -#, fuzzy -msgid "failed to process:" -msgstr "awaria w trakcie przetwarzania:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "nie znaleziono %s" #: ../IkiWiki/Plugin/teximg.pm:72 #, fuzzy @@ -1064,54 +1065,59 @@ msgstr "" msgid "bad file name %s" msgstr "pomijanie nieprawidłowej nazwy pliku %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "skanowanie %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "pomijanie nieprawidłowej nazwy pliku %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "usuwanie starej strony %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "renderowanie %s z odnośnikiem do %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "usuwanie %s nie tworzonego już przez %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "renderowanie %s zależącego od %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "renderowanie %s w celu aktualizacji powrotnych odnośników" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: awaria w trakcie tworzenia %s" @@ -1184,64 +1190,65 @@ msgstr "użycie: ikiwiki [parametry] źródło cel" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "tworzenie osłon..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "przebudowywanie wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "odświeżanie wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Dyskusja" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Użycie parametru --cgi wymaga podania adresu URL do wiki za pomocą parametru " "--url" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "polecenie preprocesora %s wykryte w %s na głębokości %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "nieznany sposób sortowania %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "nieznany sposób sortowania %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "awaria w trakcie odczytu %s: %s" @@ -1266,6 +1273,16 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "awaria w trakcie przetwarzania:" + +#~ msgid "nonexistant template %s" +#~ msgstr "brakujący szablon %s" + +#~ msgid "getctime not implemented" +#~ msgstr "niedostępna funkcja getctime" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "awaria w trakcie odczytu %s: %s" @@ -1323,10 +1340,6 @@ msgstr "" #~ "Brak możliwości wysłania powiadomień od Subversion przez \"haczyk\" post-" #~ "commit z powodu nieustawionego parametru REV" -#, fuzzy -#~ msgid "%s not found" -#~ msgstr "nie znaleziono %s" - #~ msgid "What's this?" #~ msgstr "Więcej o OpenID" diff --git a/po/sv.po b/po/sv.po index 0d4c6202e..2cba1cc2e 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-01-10 23:47+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -54,7 +54,7 @@ msgstr "Inställningar sparades." msgid "You are banned." msgstr "Du är bannlyst." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Fel" @@ -136,7 +136,7 @@ msgstr "skapar nya sidan %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "klar" @@ -177,7 +177,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -209,55 +209,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "skapar %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -267,7 +267,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -297,14 +297,14 @@ msgstr "tar bort gammal sida %s" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "skapar %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "redigerar %s" @@ -324,9 +324,10 @@ msgstr "filnamn för wrapper har inte angivits" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "misslyckades med att behandla mall:" #: ../IkiWiki/Plugin/format.pm:30 @@ -357,18 +358,18 @@ msgstr "kan inte läsa %s: %s" msgid "%s is an attachment, not a page." msgstr "" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -455,12 +456,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "" +msgid "template %s not found" +msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client hittades inte, pingar inte" @@ -490,21 +491,25 @@ msgstr "" "misslyckades med att läsa in Perl-modulen Markdown.pm (%s) eller /usr/bin/" "markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 #, fuzzy msgid "stylesheet not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "mallen %s hittades inte" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Speglar" @@ -521,10 +526,6 @@ msgstr "" msgid "more" msgstr "" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime inte implementerad" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -542,39 +543,39 @@ msgstr "Alla sidor länkas till av andra sidor." msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Kontot har skapats. Du kan nu logga in." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Fel vid skapandet av konto." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Misslyckades med att skicka e-post" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -605,94 +606,94 @@ msgstr "RPC::XML::Client hittades inte, pingar inte" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "redigerar %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "linkmap misslyckades att köra dot" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -836,44 +837,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "filnamn för wrapper har inte angivits" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "ritar upp %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "uppdatering av %s, %s av %s" @@ -978,21 +979,21 @@ msgstr "" msgid "parse fail at line %d: %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "skapar nya sidan %s" + +#: ../IkiWiki/Plugin/template.pm:33 #, fuzzy msgid "missing id parameter" msgstr "mall saknar id-parameter" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" +#, fuzzy, perl-format +msgid "%s not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/template.pm:66 -#, fuzzy -msgid "failed to process:" -msgstr "misslyckades med att behandla mall:" - #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "" @@ -1051,54 +1052,59 @@ msgstr "" msgid "bad file name %s" msgstr "hoppar över felaktigt filnamn %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "söker av %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "hoppar över felaktigt filnamn %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "tar bort gammal sida %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "ritar upp %s, vilken länkar till %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "tar bort %s, som inte längre ritas upp av %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "ritar upp %s, vilken är beroende av %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "ritar upp %s, för att uppdatera dess bakåtlänkar" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kan inte rita upp %s" @@ -1171,62 +1177,63 @@ msgstr "användning: ikiwiki [flaggor] källa mål" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "genererar wrappers.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "bygger om wiki.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "uppdaterar wiki.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Måste ange url till wiki med --url när --cgi används" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "%s förbehandlingsslinga detekterades på %s, djup %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "okänd sorteringstyp %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "okänd sorteringstyp %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "kan inte läsa %s: %s" @@ -1251,6 +1258,13 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "misslyckades med att behandla mall:" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime inte implementerad" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "misslyckades med att skriva %s: %s" @@ -1305,10 +1319,6 @@ msgstr "" #~ "REV är inte inställt, kör inte från svn post-commit-hook, kan inte skicka " #~ "notifieringar" -#, fuzzy -#~ msgid "%s not found" -#~ msgstr "mallen %s hittades inte" - #~ msgid "What's this?" #~ msgstr "Vad är det här?" -- cgit v1.2.3 From 970373548fda77223ebbeb6aadbdbe4884b67cef Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 2 May 2010 13:44:13 -0400 Subject: Add parameter to displaytime to specify that it is a pubdate, and in html5 mode, use time tag. --- IkiWiki.pm | 22 ++++++++++++++++++++-- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/inline.pm | 12 +----------- IkiWiki/Plugin/relativedate.pm | 15 ++++++++++++--- IkiWiki/Render.pm | 2 +- debian/changelog | 7 +++++++ doc/bugs/html5_support.mdwn | 3 +++ doc/plugins/write.mdwn | 5 ++++- 8 files changed, 49 insertions(+), 19 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index ed57710bb..c428de77f 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -998,10 +998,18 @@ sub abs2rel ($$) { return $ret; } -sub displaytime ($;$) { +sub displaytime ($;$$) { # Plugins can override this function to mark up the time to # display. - return ''.formattime(@_).''; + my $time=formattime($_[0], $_[1]); + if ($config{html5}) { + return ''; + } + else { + return ''.$time.''; + } } sub formattime ($;$) { @@ -1017,6 +1025,16 @@ sub formattime ($;$) { return decode_utf8(POSIX::strftime($format, localtime($time))); } +sub date_3339 ($) { + my $time=shift; + + my $lc_time=POSIX::setlocale(&POSIX::LC_TIME); + POSIX::setlocale(&POSIX::LC_TIME, "C"); + my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", gmtime($time)); + POSIX::setlocale(&POSIX::LC_TIME, $lc_time); + return $ret; +} + sub beautify_urlpath ($) { my $url=shift; diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index f7dc99dca..02f1d9301 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -672,7 +672,7 @@ sub previewcomment ($$$) { my $template = template("comment.tmpl"); $template->param(content => $preview); - $template->param(ctime => displaytime($time)); + $template->param(ctime => displaytime($time, undef, 1)); IkiWiki::run_hooks(pagetemplate => sub { shift->(page => $location, diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 95fe90312..2df59f414 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -358,7 +358,7 @@ sub preprocess_inline (@) { $template->param(pageurl => urlto($page, $params{destpage})); $template->param(inlinepage => $page); $template->param(title => pagetitle(basename($page))); - $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat})); + $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}, 1)); $template->param(mtime => displaytime($pagemtime{$page}, $params{timeformat})); $template->param(first => 1) if $page eq $list[0]; $template->param(last => 1) if $page eq $list[$#list]; @@ -500,16 +500,6 @@ sub date_822 ($) { return $ret; } -sub date_3339 ($) { - my $time=shift; - - my $lc_time=POSIX::setlocale(&POSIX::LC_TIME); - POSIX::setlocale(&POSIX::LC_TIME, "C"); - my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", gmtime($time)); - POSIX::setlocale(&POSIX::LC_TIME, $lc_time); - return $ret; -} - sub absolute_urls ($$) { # sucky sub because rss sucks my $content=shift; diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index 7e615f7f1..fe8ef0901 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -43,9 +43,10 @@ sub include_javascript ($;$) { '" type="text/javascript" charset="utf-8">'; } -sub mydisplaytime ($;$) { +sub mydisplaytime ($;$$) { my $time=shift; my $format=shift; + my $pubdate=shift; # This needs to be in a form that can be parsed by javascript. # Being fairly human readable is also nice, as it will be exposed @@ -53,8 +54,16 @@ sub mydisplaytime ($;$) { my $gmtime=decode_utf8(POSIX::strftime("%a, %d %b %Y %H:%M:%S %z", localtime($time))); - return ''. - IkiWiki::formattime($time, $format).''; + my $mid=' class="relativedate" title="'.$gmtime.'">'. + IkiWiki::formattime($time, $format); + + if ($config{html5}) { + return '