From 566c1af2aafa7b371a07f5229513ac2014e93fd9 Mon Sep 17 00:00:00 2001 From: "http://alcopop.org/me/openid/" Date: Mon, 20 Oct 2008 10:25:49 -0400 Subject: split into subpages? --- doc/plugins/write/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/write/discussion.mdwn b/doc/plugins/write/discussion.mdwn index 039775b79..9a36d7b0b 100644 --- a/doc/plugins/write/discussion.mdwn +++ b/doc/plugins/write/discussion.mdwn @@ -40,3 +40,7 @@ distributed wiki. > > OTOH, if something can be added to the documentation that encourages > good behavior, that'd be a good thing ... --[[Joey]] + +--- + +I would find this page clearer split up into sub-pages. Does anyone agree/disagree? -- [[JonDowland]] -- cgit v1.2.3 From 47294262929f6bcb1f25bf25504d53a3b864da43 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Oct 2008 16:55:38 -0400 Subject: pull together info on converting to ikiwiki from other systems --- doc/convert.mdwn | 7 +++++++ doc/index/discussion.mdwn | 4 ++++ doc/plugins/contrib/mediawiki,mdwn | 5 +++++ doc/tips/convert_MoinMoin_and_TWiki_to_ikiwiki.mdwn | 3 +++ doc/tips/convert_mediawiki_to_ikiwiki.mdwn | 4 ++++ 5 files changed, 23 insertions(+) create mode 100644 doc/convert.mdwn create mode 100644 doc/plugins/contrib/mediawiki,mdwn create mode 100644 doc/tips/convert_MoinMoin_and_TWiki_to_ikiwiki.mdwn create mode 100644 doc/tips/convert_mediawiki_to_ikiwiki.mdwn (limited to 'doc/plugins') diff --git a/doc/convert.mdwn b/doc/convert.mdwn new file mode 100644 index 000000000..871cd31fe --- /dev/null +++ b/doc/convert.mdwn @@ -0,0 +1,7 @@ +Do you have an existing wiki or blog using other software, and would like +to convert it to ikiwiki? Various tools and techniques have been developed +to handle such conversions. + +* [[tips/convert_mediawiki_to_ikiwiki]] +* [[tips/convert_MoinMoin_and_TWiki_to_ikiwiki]] +* [[tips/convert_blogger_blogs_to_ikiwiki]] diff --git a/doc/index/discussion.mdwn b/doc/index/discussion.mdwn index 89e12e6c2..d52cb0a2d 100644 --- a/doc/index/discussion.mdwn +++ b/doc/index/discussion.mdwn @@ -288,6 +288,10 @@ easily, perl is possible (but I'm not strong in perl). >>> It appears the scripts were never posted? I recently imported my Mediawiki site into Iki. If it helps, my notes are here: --[[sabr]] +>>>>> The scripts have been posted now, see [[joshtriplett]]'s user page, +>>>>> and I've pulled together all ways I can find to [[convert]] other +>>>>> systems into ikiwiki. --[[Joey]] + ---- # LaTeX support? diff --git a/doc/plugins/contrib/mediawiki,mdwn b/doc/plugins/contrib/mediawiki,mdwn new file mode 100644 index 000000000..162937ed9 --- /dev/null +++ b/doc/plugins/contrib/mediawiki,mdwn @@ -0,0 +1,5 @@ +[[!template id=plugin name=sar author="[[sabr]]"]] +[[!tag type/format]] + +[The Mediawiki plugin](http://u32.net/Mediawiki_Plugin/) allows ikiwiki to +process pages written using MediaWiki markup. diff --git a/doc/tips/convert_MoinMoin_and_TWiki_to_ikiwiki.mdwn b/doc/tips/convert_MoinMoin_and_TWiki_to_ikiwiki.mdwn new file mode 100644 index 000000000..5565dbd8a --- /dev/null +++ b/doc/tips/convert_MoinMoin_and_TWiki_to_ikiwiki.mdwn @@ -0,0 +1,3 @@ +[[JoshTriplett]] has developed scripts to convert MoinMoin and TWiki wikis +to ikiwikis backed by a git repository, including full history. For +details, see [[his_user_page|JoshTriplett]]. diff --git a/doc/tips/convert_mediawiki_to_ikiwiki.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn new file mode 100644 index 000000000..f03703b46 --- /dev/null +++ b/doc/tips/convert_mediawiki_to_ikiwiki.mdwn @@ -0,0 +1,4 @@ +[[sabr]] explains how to [import MediaWiki content into +git](http://u32.net/Mediawiki_Conversion/index.html?updated), including +full edit hostory. The [[plugins/contrib/mediawiki]] plugin can then be +used by ikiwiki to build the wiki. -- cgit v1.2.3 From f1213d3ab77218695bb2e3b6fd948eb4827c6ef5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Oct 2008 16:57:37 -0400 Subject: fix name --- doc/plugins/contrib/mediawiki,mdwn | 5 ----- doc/plugins/contrib/mediawiki.mdwn | 5 +++++ 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 doc/plugins/contrib/mediawiki,mdwn create mode 100644 doc/plugins/contrib/mediawiki.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/mediawiki,mdwn b/doc/plugins/contrib/mediawiki,mdwn deleted file mode 100644 index 162937ed9..000000000 --- a/doc/plugins/contrib/mediawiki,mdwn +++ /dev/null @@ -1,5 +0,0 @@ -[[!template id=plugin name=sar author="[[sabr]]"]] -[[!tag type/format]] - -[The Mediawiki plugin](http://u32.net/Mediawiki_Plugin/) allows ikiwiki to -process pages written using MediaWiki markup. diff --git a/doc/plugins/contrib/mediawiki.mdwn b/doc/plugins/contrib/mediawiki.mdwn new file mode 100644 index 000000000..162937ed9 --- /dev/null +++ b/doc/plugins/contrib/mediawiki.mdwn @@ -0,0 +1,5 @@ +[[!template id=plugin name=sar author="[[sabr]]"]] +[[!tag type/format]] + +[The Mediawiki plugin](http://u32.net/Mediawiki_Plugin/) allows ikiwiki to +process pages written using MediaWiki markup. -- cgit v1.2.3 From 22ec2912bed5e0f40c35f78500c2c34cd3b7949c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Oct 2008 16:58:22 -0400 Subject: update --- doc/plugins/contrib/mediawiki.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/mediawiki.mdwn b/doc/plugins/contrib/mediawiki.mdwn index 162937ed9..c0a23254f 100644 --- a/doc/plugins/contrib/mediawiki.mdwn +++ b/doc/plugins/contrib/mediawiki.mdwn @@ -1,4 +1,4 @@ -[[!template id=plugin name=sar author="[[sabr]]"]] +[[!template id=plugin name=mediawiki author="[[sabr]]"]] [[!tag type/format]] [The Mediawiki plugin](http://u32.net/Mediawiki_Plugin/) allows ikiwiki to -- cgit v1.2.3 From df22dd5cbdb50f5686d15af7d288de05c4629029 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Oct 2008 16:59:34 -0400 Subject: add header --- doc/plugins/contrib/highlightcode.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/highlightcode.mdwn b/doc/plugins/contrib/highlightcode.mdwn index 9b43a106c..8abb76583 100644 --- a/doc/plugins/contrib/highlightcode.mdwn +++ b/doc/plugins/contrib/highlightcode.mdwn @@ -1,3 +1,6 @@ +[[!template id=plugin name=highlightcode author="[[sabr]]"]] +[[!tag type/format]] + 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 eea52bccc967890c89cc9f87b16844a0a87ce5dc Mon Sep 17 00:00:00 2001 From: intrigeri Date: Mon, 20 Oct 2008 18:54:04 -0400 Subject: initial plugin public apparition --- doc/plugins/contrib/po.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 doc/plugins/contrib/po.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn new file mode 100644 index 000000000..06d491d01 --- /dev/null +++ b/doc/plugins/contrib/po.mdwn @@ -0,0 +1,16 @@ +I've been working on a plugin called "po", that adds support for multi-lingual wikis, +translated with gettext, using [po4a](http://po4a.alioth.debian.org/). + +More information: + +* It can be found in my "po" branch on http://repo.or.cz/w/ikiwiki/intrigeri.git +* It involves adding three hooks to ikiwiki core. +* It is documented (including TODO and plans for next work steps) in `doc/plugins/po.mdwn`, which can be found in the same branch. +* No public demo site is available so far, I'm working on this. + +My plan is to get this plugin clean enough to be included in ikiwiki. + +The current version is a proof-of-concept, mature enough for me to dare submitting it here, +but I'm prepared to hear various helpful remarks, and to rewrite parts of it as needed. + +Any thoughts on this? -- cgit v1.2.3 From 93959d45db207690da03f1da216894821bfd78da Mon Sep 17 00:00:00 2001 From: intrigeri Date: Mon, 20 Oct 2008 18:56:21 -0400 Subject: formatting, added git clone information --- doc/plugins/contrib/po.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index 06d491d01..b22b8c179 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -3,7 +3,7 @@ translated with gettext, using [po4a](http://po4a.alioth.debian.org/). More information: -* It can be found in my "po" branch on http://repo.or.cz/w/ikiwiki/intrigeri.git +* It can be found in [my "po" branch](http://repo.or.cz/w/ikiwiki/intrigeri.git?a=shortlog;h=refs/heads/po): `git clone git://repo.or.cz/ikiwiki/intrigeri.git` * It involves adding three hooks to ikiwiki core. * It is documented (including TODO and plans for next work steps) in `doc/plugins/po.mdwn`, which can be found in the same branch. * No public demo site is available so far, I'm working on this. -- cgit v1.2.3 From 2c89dacde45d257207067cdeeb84dc7923f6cdad Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Oct 2008 19:18:49 -0400 Subject: wow --- doc/plugins/contrib/po.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index 06d491d01..83fc6c57c 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -14,3 +14,17 @@ The current version is a proof-of-concept, mature enough for me to dare submitti but I'm prepared to hear various helpful remarks, and to rewrite parts of it as needed. Any thoughts on this? + +> Well, I think it's pretty stunning what you've done here. Seems very +> complete and well thought out. I have not read the code in great detail +> yet. +> +> Just using po files is an approach I've never seen tried with a wiki. I +> suspect it will work better for some wikis than others. For wikis that +> just want translations that match the master language as closely as +> possible and don't wander off and diverge, it seems perfect. (But what happens +> if someone edits the Discussion page of a translated page?) +> +> Please keep me posted, when you get closer to having all issues solved +> and ready for merging I can do a review and hopefully help with the +> security items you listed. --[[Joey]] -- cgit v1.2.3 From ee1ccfa863b9d56cf7ec987f7fee89c98c484b0b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Oct 2008 19:22:22 -0400 Subject: use relativedate as the css class for dates that should display relative --- IkiWiki/Plugin/relativedate.pm | 2 +- doc/plugins/relativedate.mdwn | 6 +++--- underlays/javascript/relativedate.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index d9d8f7776..f4dba61a4 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -53,7 +53,7 @@ sub display ($;$) { #{{{ my $gmtime=decode_utf8(POSIX::strftime("%a, %d %b %Y %H:%M:%S %z", localtime($time))); - return ''. + return ''. IkiWiki::formattime($time, $format).''; } #}}} diff --git a/doc/plugins/relativedate.mdwn b/doc/plugins/relativedate.mdwn index 121bce477..32f8c798b 100644 --- a/doc/plugins/relativedate.mdwn +++ b/doc/plugins/relativedate.mdwn @@ -10,7 +10,7 @@ show the absolute date instead. Also, this plugin can be used with other plugins like [[prettydate]] that change how the absolute date is displayed. If this plugin is enabled, you may also add relative dates to pages in the -wiki, by using html elements in the "date" class. For example, this will -display as a relative date: +wiki, by using html elements in the "relativedate" class. For example, this +will display as a relative date: - Fri Oct 17 18:36:13 EDT 2008 + Fri Oct 17 18:36:13 EDT 2008 diff --git a/underlays/javascript/relativedate.js b/underlays/javascript/relativedate.js index c5e62b3cc..8e05d4065 100644 --- a/underlays/javascript/relativedate.js +++ b/underlays/javascript/relativedate.js @@ -1,4 +1,4 @@ -// Causes html elements in the 'date' and 'pagedate' classes to be displayed +// Causes html elements in the 'relativedate' class to be displayed // as relative dates. The date is parsed from the title attribute, or from // the element content. @@ -7,7 +7,7 @@ var dateElements; hook("onload", getDates); function getDates() { - dateElements = getElementsByClass('date'); + dateElements = getElementsByClass('relativedate'); for (var i = 0; i < dateElements.length; i++) { var elt = dateElements[i]; var title = elt.attributes.title; -- cgit v1.2.3 From 94797b66c4d7f807245aa4bf09dd645468079142 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Mon, 20 Oct 2008 19:45:49 -0400 Subject: answering joey --- doc/plugins/contrib/po.mdwn | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index ad06e8570..cbc046d98 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -28,3 +28,19 @@ Any thoughts on this? > Please keep me posted, when you get closer to having all issues solved > and ready for merging I can do a review and hopefully help with the > security items you listed. --[[Joey]] + +>> Thanks a lot for your quick review, it's reassuring to hear such nice words +>> from you. I did not want to design and write a full translation system, when +>> tools such as gettext/po4a already have all the needed functionality, for cases +>> where the master/slave languages paradigm fits. +>> Integrating these tools into ikiwiki plugin system was a pleasure. +>> +>> I'll tell you when I'm ready for merging, but in the meantime, +>> I'd like you to review the changes I did to the core (3 added hooks). +>> Can you please do this? If not, I'll go on and hope I'm not going to far in +>> the wrong direction. +>> +>> The Discussion pages issue is something I am not sure about yet. But I will +>> probably decide that "slave" pages, being only translations, don't deserve +>> a discussion page: the discussion should happen in the language in which the +>> pages are written for real, which is the "master" one. --[[intrigeri]] -- cgit v1.2.3 From ec566c02fdf4e1f76e6559afbb8c01ec772412f8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Oct 2008 20:57:42 -0400 Subject: response --- doc/plugins/contrib/po.mdwn | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index cbc046d98..30ede95a6 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -40,6 +40,14 @@ Any thoughts on this? >> Can you please do this? If not, I'll go on and hope I'm not going to far in >> the wrong direction. >> +>>> Sure.. I'm not completly happy with any of the hooks since they're very +>>> special purpose, and also since `run_hooks` is not the best interface +>>> for a hook that modifies a variable, where only the last hook run will +>>> actually do anything. It might be better to just wrap +>>> `targetpage`, `bestlink`, and `beautify_urlpath`. But, I noticed +>>> the other day that such wrappers around exported functions are only visible by +>>> plugins loaded after the plugin that defines them. +>> >> The Discussion pages issue is something I am not sure about yet. But I will >> probably decide that "slave" pages, being only translations, don't deserve >> a discussion page: the discussion should happen in the language in which the -- cgit v1.2.3 From 64d2ba358d306da18a09020119a94d525093ca03 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 21 Oct 2008 14:59:02 -0400 Subject: added link to po plugin --- doc/plugins/contrib/linguas.mdwn | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/linguas.mdwn b/doc/plugins/contrib/linguas.mdwn index 0c3366846..bf502606e 100644 --- a/doc/plugins/contrib/linguas.mdwn +++ b/doc/plugins/contrib/linguas.mdwn @@ -10,7 +10,8 @@ Download: [linguas.pm](http://ettin.org/pub/ikiwiki/linguas.pm) (2006-08-21). Note that even though it is still available for download, this plugin is no longer actively maintained. If you are interested in multilingual wiki pages, you -can also take a look at other approaches such as [[todo/l10n]] or Lars Wirzenius's +can also take a look at other approaches such as [[todo/l10n]], [[plugins/contrib/po]], +or Lars Wirzenius's [Static website, with translations, using IkiWiki](http://liw.iki.fi/liw/log/2007-05.html#20070528b). Usage -- cgit v1.2.3 From 70e0c9447add5853aa745f1f1e681e849f56c6f7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 21 Oct 2008 17:09:44 -0400 Subject: change obsolete example --- doc/plugins/write/external.mdwn | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write/external.mdwn b/doc/plugins/write/external.mdwn index 272f74a7c..e30bf2ff3 100644 --- a/doc/plugins/write/external.mdwn +++ b/doc/plugins/write/external.mdwn @@ -96,14 +96,13 @@ the sentinal. ## Function injection -Some parts of ikiwiki are extensible by adding functions. For example, the -RCS interface relies on plugins providing several IkiWiki::rcs_* functions. +Some parts of ikiwiki are extensible by adding or overriding functions. It's actually possible to do this from an external plugin too. -To make your external plugin provide an `IkiWiki::rcs_update` function, for +To make your external plugin override the `IkiWiki::formattime` function, for example, make an RPC call to `inject`. Pass it named parameters "name" and "call", where "name" is the name of the function to inject into perl (here -"Ikiwiki::rcs_update" and "call" is the RPC call ikiwiki will make whenever +"Ikiwiki::formattime" and "call" is the RPC call ikiwiki will make whenever that function is run. If the RPC call is memoizable, you can also pass a "memoize" parameter, set -- cgit v1.2.3 From e75818572fff5256d16221a2b065b214d8cb9f5d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 21 Oct 2008 17:57:19 -0400 Subject: function injection overhaul Add an inject function, that can be used by plugins that want to replace one of ikiwiki's functions with their own version. (This is a scary thing that grubs through the symbol table, and replaces all exported occurances of a function with the injected version.) external: RPC functions can be injected to replace exported functions. Removed the stupid displaytime hook, and use injection instead. --- IkiWiki.pm | 46 +++++++++++++++++++++++++------------- IkiWiki/Plugin/external.pm | 8 ++++++- IkiWiki/Plugin/relativedate.pm | 4 ++-- debian/changelog | 5 +++++ doc/plugins/contrib/po.mdwn | 5 +++++ doc/plugins/write.mdwn | 50 ++++++++++++++++++++++++++++++++++++++++++ plugins/externaldemo | 10 ++++----- po/ikiwiki.pot | 14 ++++++------ 8 files changed, 111 insertions(+), 31 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 207ca87fb..e0454963d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -21,6 +21,7 @@ our @EXPORT = qw(hook debug error template htmlpage add_depends pagespec_match bestlink htmllink readfile writefile pagetype srcfile pagename displaytime will_render gettext urlto targetpage add_underlay pagetitle titlepage linkpage newpagefile + inject %config %links %pagestate %wikistate %renderedfiles %pagesources %destsources); our $VERSION = 2.00; # plugin interface version, next is ikiwiki version @@ -898,23 +899,13 @@ sub abs2rel ($$) { #{{{ } #}}} sub displaytime ($;$) { #{{{ - my $time=shift; - my $format=shift; - if (exists $hooks{displaytime}) { - my $ret; - run_hooks(displaytime => sub { - $ret=shift->($time, $format) - }); - return $ret; - } - else { - return formattime($time, $format); - } + # Plugins can override this function to mark up the time to + # display. + return ''.formattime(@_).''; } #}}} sub formattime ($;$) { #{{{ - # Plugins can override this function to mark up the time for - # display. + # Plugins can override this function to format the time. my $time=shift; my $format=shift; if (! defined $format) { @@ -1676,6 +1667,31 @@ sub yesno ($) { #{{{ return (defined $val && lc($val) eq gettext("yes")); } #}}} +sub inject { #{{{ + # Injects a new function into the symbol table to replace an + # exported function. + my %params=@_; + + # This is deep ugly perl foo, beware. + no strict; + no warnings; + if (! defined $params{parent}) { + $params{parent}='::'; + $params{old}=\&{$params{name}}; + $params{name}=~s/.*:://; + } + my $parent=$params{parent}; + foreach my $ns (grep /^\w+::/, keys %{$parent}) { + $ns = $params{parent} . $ns; + inject(%params, parent => $ns) unless $ns eq '::main::'; + *{$ns . $params{name}} = $params{call} + if exists ${$ns}{$params{name}} && + \&{${$ns}{$params{name}}} == $params{old}; + } + use strict; + use warnings; +} #}}} + sub pagespec_merge ($$) { #{{{ my $a=shift; my $b=shift; @@ -1770,7 +1786,7 @@ sub pagespec_valid ($) { #{{{ my $sub=pagespec_translate($spec); return ! $@; } #}}} - + sub glob2re ($) { #{{{ my $re=quotemeta(shift); $re=~s/\\\*/.*/g; diff --git a/IkiWiki/Plugin/external.pm b/IkiWiki/Plugin/external.pm index 287e118f1..4ce9c8bab 100644 --- a/IkiWiki/Plugin/external.pm +++ b/IkiWiki/Plugin/external.pm @@ -202,10 +202,16 @@ sub inject ($@) { #{{{ my $sub = sub { IkiWiki::Plugin::external::rpc_call($plugin, $params{call}, @_) }; + $sub=memoize($sub) if $params{memoize}; + + # This will add it to the symbol table even if not present. no warnings; eval qq{*$params{name}=\$sub}; use warnings; - memoize($params{name}) if $params{memoize}; + + # This will ensure that everywhere it was exported to sees + # the injected version. + IkiWiki::inject(name => $params{name}, call => $sub); return 1; } #}}} diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index f4dba61a4..dc8f7d538 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -12,7 +12,7 @@ sub import { #{{{ add_underlay("javascript"); hook(type => "getsetup", id => "relativedate", call => \&getsetup); hook(type => "format", id => "relativedate", call => \&format); - hook(type => "displaytime", id => "relativedate", call => \&display); + inject(name => "IkiWiki::displaytime", call => \&mydisplaytime); } # }}} sub getsetup () { #{{{ @@ -43,7 +43,7 @@ sub include_javascript ($;$) { #{{{ '" type="text/javascript" charset="utf-8">'; } #}}} -sub display ($;$) { #{{{ +sub mydisplaytime ($;$) { #{{{ my $time=shift; my $format=shift; diff --git a/debian/changelog b/debian/changelog index 928cd8666..e1baea8ce 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,11 @@ ikiwiki (2.68) UNRELEASED; urgency=low the toplevel tagpage, and not closer subpages. The html links already went there, but internally the links were not recorded as absolute, which could cause confusing backlinks etc. + * Add an inject function, that can be used by plugins that want to + replace one of ikiwiki's functions with their own version. + (This is a scary thing that grubs through the symbol table, and replaces + all exported occurances of a function with the injected version.) + * external: RPC functions can be injected to replace exported functions. -- Joey Hess Fri, 17 Oct 2008 20:11:02 -0400 diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index 30ede95a6..c4b7f9ee9 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -47,6 +47,11 @@ Any thoughts on this? >>> `targetpage`, `bestlink`, and `beautify_urlpath`. But, I noticed >>> the other day that such wrappers around exported functions are only visible by >>> plugins loaded after the plugin that defines them. +>>> +>>> Update: Take a look at the new "Function overriding" section of +>>> [[plugins/write]]. I think you can just inject wrappers about a few ikiwiki +>>> functions, rather than adding hooks. The `inject` function is pretty +>>> insane^Wlow level, but seems to work great. --[[Joey]] >> >> The Discussion pages issue is something I am not sure about yet. But I will >> probably decide that "slave" pages, being only translations, don't deserve diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 856b34ba1..2e11e6234 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -854,6 +854,56 @@ By the way, to parse a ikiwiki setup file and populate `%config`, a program just needs to do something like: `use IkiWiki::Setup; IkiWiki::Setup::load($filename)` +### Function overriding + +Sometimes using ikiwiki's pre-defined hooks is not enough. Your plugin +may need to replace one of ikiwiki's own functions with a modified version, +or wrap one of the functions. + +For example, your plugin might want to override `displaytime`, to change +the html markup used when displaying a date. Or it might want to override +`IkiWiki::formattime`, to change how a date is formatted. Or perhaps you +want to override `bestlink` and change how ikiwiki deals with WikiLinks. + +By venturing into this territory, your plugin is becoming tightly tied to +ikiwiki's internals. And it might break if those internals change. But +don't let that stop you, if you're brave. + +Ikiwiki provides an `inject()` function, that is a powerful way to replace +any function with one of your own. This even allows you to inject a +replacement for an exported function, like `bestlink`. Everything that +imports that function will get your version instead. Pass it the name of +the function to replace, and a new function to call. + +For example, here's how to replace `displaytime` with a version using HTML 5 +markup: + + inject(name => 'IkiWiki::displaytime', call => sub { + return ""; + }); + +Here's how to wrap `bestlink` with a version that tries to handle +plural words: + + my $origbestlink=\&bestlink; + inject(name => 'IkiWiki::bestlink', call => \&mybestlink); + + sub deplural ($) { + my $word=shift; + $word =~ s/e?s$//; # just an example :-) + return $word; + } + + sub mybestlink ($$) { + my $page=shift; + my $link=shift; + my $ret=$origbestlink->($page, $link); + if (! length $ret) { + $ret=$origbestlink->($page, deplural($link)); + } + return $ret; + } + ### Javascript Some plugins use javascript to make ikiwiki look a bit more web-2.0-ish. diff --git a/plugins/externaldemo b/plugins/externaldemo index 4d13f2444..be7aba8b9 100755 --- a/plugins/externaldemo +++ b/plugins/externaldemo @@ -106,9 +106,8 @@ sub import { rpc_call("getvar", "config", "url")."\n"; # Here's an example of how to inject an arbitrary function into - # ikiwiki, replacing a core function. - # Note use of automatic memoization. - rpc_call("inject", name => "IkiWiki::formattime", + # ikiwiki. Note use of automatic memoization. + rpc_call("inject", name => "IkiWiki::bob", call => "formattime", memoize => 1); print STDERR "externaldemo plugin successfully imported\n"; @@ -126,9 +125,8 @@ sub preprocess { return "externaldemo plugin preprocessing on $title!"; } -sub formattime { - print STDERR "externaldemo plugin's formattime called via RPC"; - return scalar "formatted time: ".localtime(shift); +sub bob { + print STDERR "externaldemo plugin's bob called via RPC"; } # Now all that's left to do is loop and handle each incoming RPC request. diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 335575f02..4452ea8dc 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: 2008-10-19 20:06-0400\n" +"POT-Creation-Date: 2008-10-21 17:51-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -48,7 +48,7 @@ msgstr "" msgid "You are banned." msgstr "" -#: ../IkiWiki/CGI.pm:385 ../IkiWiki/CGI.pm:386 ../IkiWiki.pm:1182 +#: ../IkiWiki/CGI.pm:385 ../IkiWiki/CGI.pm:386 ../IkiWiki.pm:1175 msgid "Error" msgstr "" @@ -913,25 +913,25 @@ msgstr "" msgid "refreshing wiki.." msgstr "" -#: ../IkiWiki.pm:458 +#: ../IkiWiki.pm:459 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" -#: ../IkiWiki.pm:504 +#: ../IkiWiki.pm:505 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:533 +#: ../IkiWiki.pm:534 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1165 +#: ../IkiWiki.pm:1158 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1674 +#: ../IkiWiki.pm:1667 msgid "yes" msgstr "" -- cgit v1.2.3 From b33ce3139cd5be5e5d903c62ce1e281af2645d6f Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 21 Oct 2008 19:17:49 -0400 Subject: thanks! --- doc/plugins/contrib/po.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index c4b7f9ee9..f60b8fbea 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -53,6 +53,10 @@ Any thoughts on this? >>> functions, rather than adding hooks. The `inject` function is pretty >>> insane^Wlow level, but seems to work great. --[[Joey]] >> +>>>> Thanks a lot, it seems to be a nice interface for what I was trying to achieve. +>>>> I may be forced to wait two long weeks before I have a chance to confirm +>>>> this. Stay tuned. --[[intrigeri]] +>> >> The Discussion pages issue is something I am not sure about yet. But I will >> probably decide that "slave" pages, being only translations, don't deserve >> a discussion page: the discussion should happen in the language in which the -- cgit v1.2.3 From 97b94e4e88c8aab955451121eb984ee568530caa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 21 Oct 2008 20:37:49 -0400 Subject: displaytime hook is gone --- doc/plugins/write.mdwn | 7 ------- 1 file changed, 7 deletions(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 2e11e6234..0d244e1f5 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -360,13 +360,6 @@ This hook is called whenever ikiwiki normally saves its state, just before the state is saved. The function can save other state, modify values before they're saved, etc. -### displaytime - - hook(type => "displaytime", id => "foo", call => \&display); - -This hook can be registered to override the regular `displaytime` function. -Only the last displaytime hook will be used. - ### renamepage hook(type => "renamepage", id => "foo", call => \&renamepage); -- cgit v1.2.3 From 094af3d113f375f7faf2abf283615582a9977a65 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 22 Oct 2008 20:52:34 -0400 Subject: initial support for git repos with untrusted committers Still need to wire up the calls to check_* , but it's cold out here and my hands are going numb, so enough for now. --- IkiWiki.pm | 11 +++++ IkiWiki/Plugin/git.pm | 115 ++++++++++++++++++++++++++++++++++++++++++++----- doc/plugins/write.mdwn | 9 ++++ doc/rcs/details.mdwn | 3 ++ doc/rcs/git.mdwn | 27 ++++++++++++ ikiwiki.in | 3 ++ 6 files changed, 158 insertions(+), 10 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index e0454963d..245eaafba 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -382,6 +382,13 @@ sub getsetup () { #{{{ safe => 0, rebuild => 0, }, + test_receive => { + type => "internal", + default => 0, + description => "running in receive test mode", + safe => 0, + rebuild => 0, + }, getctime => { type => "internal", default => 0, @@ -1575,6 +1582,10 @@ sub rcs_getctime ($) { #{{{ $hooks{rcs}{rcs_getctime}{call}->(@_); } #}}} +sub rcs_test_receive ($) { #{{{ + $hooks{rcs}{rcs_test_receive}{call}->(@_); +} #}}} + sub globlist_to_pagespec ($) { #{{{ my @globlist=split(' ', shift); diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 14b0ab285..1facb14c0 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.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_test_receive", call => \&rcs_test_receive); } #}}} sub checkconfig () { #{{{ @@ -32,12 +33,21 @@ sub checkconfig () { #{{{ if (! defined $config{gitmaster_branch}) { $config{gitmaster_branch}="master"; } - if (defined $config{git_wrapper} && length $config{git_wrapper}) { + if (defined $config{git_wrapper} && + length $config{git_wrapper}) { push @{$config{wrappers}}, { wrapper => $config{git_wrapper}, wrappermode => (defined $config{git_wrappermode} ? $config{git_wrappermode} : "06755"), }; } + if (defined $config{git_test_receive_wrapper} && + length $config{git_test_receive_wrapper}) { + push @{$config{wrappers}}, { + test_receive => 1, + wrapper => $config{git_test_receive_wrapper}, + wrappermode => "0755", + }; + } } #}}} sub getsetup () { #{{{ @@ -60,6 +70,20 @@ sub getsetup () { #{{{ safe => 0, rebuild => 0, }, + git_test_receive_wrapper => { + type => "string", + example => "/git/wiki.git/hooks/pre-receive", + description => "git pre-receive hook to generate", + safe => 0, # file + rebuild => 0, + }, + git_untrusted_committers => { + type => "string", + example => [], + description => "unix users whose commits should be checked by the pre-receive hook", + safe => 0, + rebuild => 0, + }, historyurl => { type => "string", example => "http://git.example.com/gitweb.cgi?p=wiki.git;a=history;f=[[file]]", @@ -320,6 +344,9 @@ sub parse_diff_tree ($@) { #{{{ 'file' => decode("utf8", $file), 'sha1_from' => $sha1_from[0], 'sha1_to' => $sha1_to, + 'mode_from' => $mode_from[0], + 'mode_to' => $mode_to, + 'status' => $status, }; } next; @@ -331,14 +358,12 @@ sub parse_diff_tree ($@) { #{{{ } #}}} sub git_commit_info ($;$) { #{{{ - # Return an array of commit info hashes of num commits (default: 1) + # Return an array of commit info hashes of num commits # starting from the given sha1sum. - my ($sha1, $num) = @_; - $num ||= 1; - - my @raw_lines = run_or_die('git', 'log', "--max-count=$num", + my @raw_lines = run_or_die('git', 'log', + (defined $num ? "--max-count=$num" : ""), '--pretty=raw', '--raw', '--abbrev=40', '--always', '-c', '-r', $sha1, '--', '.'); my ($prefix) = run_or_die('git', 'rev-parse', '--show-prefix'); @@ -355,7 +380,6 @@ sub git_commit_info ($;$) { #{{{ sub git_sha1 (;$) { #{{{ # Return head sha1sum (of given file). - my $file = shift || q{--}; # Ignore error since a non-existing file might be given. @@ -378,7 +402,6 @@ sub rcs_update () { #{{{ sub rcs_prepedit ($) { #{{{ # Return the commit sha1sum of the file when editing begins. # This will be later used in rcs_commit if a merge is required. - my ($file) = @_; return git_sha1($file); @@ -475,7 +498,7 @@ sub rcs_recentchanges ($) { #{{{ error($@) if $@; my @rets; - foreach my $ci (git_commit_info('HEAD', $num)) { + foreach my $ci (git_commit_info('HEAD', $num || 1)) { # Skip redundant commits. next if ($ci->{'comment'} && @{$ci->{'comment'}}[0] eq $dummy_commit_msg); @@ -558,11 +581,83 @@ sub rcs_getctime ($) { #{{{ $file =~ s/^\Q$config{srcdir}\E\/?//; my $sha1 = git_sha1($file); - my $ci = git_commit_info($sha1); + my $ci = git_commit_info($sha1, 1); my $ctime = $ci->{'author_epoch'}; debug("ctime for '$file': ". localtime($ctime)); return $ctime; } #}}} +sub rcs_test_receive () { #{{{ + # quick success if the user is trusted + my $committer=(getpwuid($<))[0]; + if (! defined $committer) { + error("cannot determine username for $<"); + } + exit 0 if ! ref $config{git_untrusted_committers} || + ! grep { $_ eq $committer } @{$config{git_untrusted_committers}}; + + # The wiki may not be the only thing in the git repo. + # Determine if it is in a subdirectory by examining the srcdir, + # and its parents, looking for the .git directory. + my $subdir=""; + my $dir=$config{srcdir}; + while (! -d "$dir/.git") { + $subdir=IkiWiki::basename($dir)."/".$subdir; + $dir=IkiWiki::dirname($dir); + if (! length $dir) { + error("cannot determine root of git repo"); + } + } + + my @errors; + while (<>) { + chomp; + my ($oldrev, $newrev, $refname) = split(' ', $_, 3); + + # only allow changes to gitmaster_branch + if ($refname !~ /^refs\/heads\/\Q$config{gitmaster_branch}\E$/) { + push @errors, sprintf(gettext("you are not allowed to change %s"), $refname); + } + + foreach my $ci (git_commit_info($oldrev."..".$newrev)) { + foreach my $detail (@{ $ci->{'details'} }) { + my $file = $detail->{'file'}; + + # check that all changed files are in the subdir + if (length $subdir && + ! ($file =~ s/^\Q$subdir\E//)) { + push @errors, sprintf(gettext("you are not allowed to change %s"), $file); + next; + } + + if ($detail->{'mode_from'} ne $detail->{'mode_to'}) { + push @errors, gettext("you are not allowed to change file modes"); + } + + if ($detail->{'status'} =~ /^D+\d*/) { + # TODO check_canremove + } + elsif ($detail->{'status'} !~ /^[MA]+\d*$/) { + push @errors, "unknown status ".$detail->{'status'}; + } + else { + # TODO check_canedit + # TODO check_canattach + } + } + } + } + + if (@errors) { + # TODO clean up objects from failed push + + print STDERR "$_\n" foreach @errors; + exit 1; + } + else { + exit 0; + } +} #}}} + 1 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 0d244e1f5..5a5db6be0 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -820,6 +820,15 @@ it up in the history. It's ok if this is not implemented, and throws an error. +#### `rcs_test_receive()` + +This is used to test if changes pushed into the RCS should be accepted. +Ikiwiki will be running as a pre-receive hook (or equivilant) and should +examine the incoming changes, decide if they are allowed, and communicate +that to the RCS. + +This is optional, and doesn't make sense for all RCSs. + ### PageSpec plugins It's also possible to write plugins that add new functions to diff --git a/doc/rcs/details.mdwn b/doc/rcs/details.mdwn index e62f3ef49..089221cab 100644 --- a/doc/rcs/details.mdwn +++ b/doc/rcs/details.mdwn @@ -280,6 +280,9 @@ Here is a how a commit from a remote repository works: * git-commit in the remote repository * git-push, pushes the commit to the master repo on the server +* (Optionally, the master repo's pre-receive hook runs, and checks that the + update only modifies files that the pushing user is allowed to update. + If not, it aborts the receive.) * the master repo's post-update hook notices this update, and runs ikiwiki * ikiwiki notices the modifies page source, and compiles it diff --git a/doc/rcs/git.mdwn b/doc/rcs/git.mdwn index b210af825..2a6feecf5 100644 --- a/doc/rcs/git.mdwn +++ b/doc/rcs/git.mdwn @@ -100,6 +100,33 @@ repository, should only be writable by the wiki's admin, and *not* by the group. Take care that ikiwiki uses a umask that does not cause files in the srcdir to become group writable. (umask 022 will work.) +## git repository with untrusted committers + +By default, anyone who can commit to the git repository can modify any file +on the wiki however they like. A `pre-receive` hook can be set up to limit +incoming commits from untrusted users. Then the same limits that are placed +on edits via the web will be in effect for commits to git for the users. +They will not be allowed to edit locked pages, they will only be able to +delete pages that the [[plugins/remove]] configuration allows them to +remove, and they will only be allowed to add non-page attachments that the +[[plugins/attachment]] configuration allows. + +To enable this, you need to set up the git repository to have multiple +committers. Trusted committers, including the user that ikiwiki runs as, +will not have their commits checked by the `pre-receive` hook. Untrusted +committers will have their commits checked. The configuration settings to +enable are `git_test_receive_wrapper`, which enables generation of a +`pre-receive` hook, and `git_untrusted_committers`, which is a list of +usernames of the untrusted committers. + +Note that when the `pre-receive` hook is checking incoming changes, it +ignores the git authorship information, and uses the username of the unix +user who made the commit. Then tests including the `locked_pages` [[PageSpec]] +are checked to see if that user can edit the pages in the commit. + +You can even set up an anonymous user, to allow anyone to push +changes in via git rather than using the web interface. + ## Optionally using a local wiki to preview changes When working on the "working clones" to add content to your wiki, diff --git a/ikiwiki.in b/ikiwiki.in index 4f24cfc2e..873bde0df 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -183,6 +183,9 @@ sub main () { #{{{ elsif ($config{post_commit} && ! commit_hook_enabled()) { # do nothing } + elsif ($config{test_receive}) { + rcs_test_receive(); + } else { if ($config{rebuild}) { debug(gettext("rebuilding wiki..")); -- cgit v1.2.3 From 4669eab596c8d90de0cf9f9d359ad8dd8f48edb5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 23 Oct 2008 16:29:50 -0400 Subject: more work on untrusted committers Wired up check_canedit and check_canremove, still need to deal with check_canattach, and test. --- IkiWiki.pm | 4 +- IkiWiki/Plugin/editpage.pm | 2 +- IkiWiki/Plugin/git.pm | 70 ++++++++++++++++--------------- IkiWiki/Plugin/remove.pm | 2 +- IkiWiki/Receive.pm | 101 +++++++++++++++++++++++++++++++++++++++++++++ doc/plugins/write.mdwn | 24 ++++++++--- doc/rcs/git.mdwn | 2 +- ikiwiki.in | 10 ++++- 8 files changed, 168 insertions(+), 47 deletions(-) create mode 100644 IkiWiki/Receive.pm (limited to 'doc/plugins') diff --git a/IkiWiki.pm b/IkiWiki.pm index 245eaafba..698244187 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1582,8 +1582,8 @@ sub rcs_getctime ($) { #{{{ $hooks{rcs}{rcs_getctime}{call}->(@_); } #}}} -sub rcs_test_receive ($) { #{{{ - $hooks{rcs}{rcs_test_receive}{call}->(@_); +sub rcs_receive ($) { #{{{ + $hooks{rcs}{rcs_receive}{call}->(@_); } #}}} sub globlist_to_pagespec ($) { #{{{ diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 30c93df20..fe2864bac 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -122,7 +122,7 @@ sub cgi_editpage ($$) { #{{{ my $absolute=($page =~ s#^/+##); if (! defined $page || ! length $page || file_pruned($page, $config{srcdir})) { - error("bad page name"); + error(gettext("bad page name")); } my $baseurl = urlto($page, undef, 1); diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 1facb14c0..234e7af2e 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -23,7 +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_test_receive", call => \&rcs_test_receive); + hook(type => "rcs", id => "rcs_receive", call => \&rcs_receive); } #}}} sub checkconfig () { #{{{ @@ -77,7 +77,7 @@ sub getsetup () { #{{{ safe => 0, # file rebuild => 0, }, - git_untrusted_committers => { + untrusted_committers => { type => "string", example => [], description => "unix users whose commits should be checked by the pre-receive hook", @@ -588,15 +588,7 @@ sub rcs_getctime ($) { #{{{ return $ctime; } #}}} -sub rcs_test_receive () { #{{{ - # quick success if the user is trusted - my $committer=(getpwuid($<))[0]; - if (! defined $committer) { - error("cannot determine username for $<"); - } - exit 0 if ! ref $config{git_untrusted_committers} || - ! grep { $_ eq $committer } @{$config{git_untrusted_committers}}; - +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, # and its parents, looking for the .git directory. @@ -610,54 +602,64 @@ sub rcs_test_receive () { #{{{ } } - my @errors; + my @rets; while (<>) { chomp; my ($oldrev, $newrev, $refname) = split(' ', $_, 3); # only allow changes to gitmaster_branch if ($refname !~ /^refs\/heads\/\Q$config{gitmaster_branch}\E$/) { - push @errors, sprintf(gettext("you are not allowed to change %s"), $refname); + error sprintf(gettext("you are not allowed to change %s"), $refname); } foreach my $ci (git_commit_info($oldrev."..".$newrev)) { foreach my $detail (@{ $ci->{'details'} }) { my $file = $detail->{'file'}; - # check that all changed files are in the subdir + # check that all changed files are in the + # subdir if (length $subdir && ! ($file =~ s/^\Q$subdir\E//)) { - push @errors, sprintf(gettext("you are not allowed to change %s"), $file); - next; + error sprintf(gettext("you are not allowed to change %s"), $file); } - if ($detail->{'mode_from'} ne $detail->{'mode_to'}) { - push @errors, gettext("you are not allowed to change file modes"); + my $action; + my $mode; + if ($detail->{'status'} =~ /^[M]+\d*$/) { + $action="change"; + $mode=$detail->{'mode_to'}; } - - if ($detail->{'status'} =~ /^D+\d*/) { - # TODO check_canremove + elsif ($detail->{'status'} =~ /^[AM]+\d*$/) { + $action="add"; + $mode=$detail->{'mode_to'}; } - elsif ($detail->{'status'} !~ /^[MA]+\d*$/) { - push @errors, "unknown status ".$detail->{'status'}; + elsif ($detail->{'status'} =~ /^[DAM]+\d*/) { + $action="remove"; + $mode=$detail->{'mode_from'}; } else { - # TODO check_canedit - # TODO check_canattach + error "unknown status ".$detail->{'status'}; } + + # test that the file mode is ok + if ($mode !~ /^100[64][64][64]$/) { + error sprintf(gettext("you cannot act on a file with mode %s"), $mode); + } + if ($action eq "change") { + if ($detail->{'mode_from'} ne $detail->{'mode_to'}) { + error gettext("you are not allowed to change file modes"); + } + } + + push @rets, { + file => $file, + action => $action, + }; } } } - if (@errors) { - # TODO clean up objects from failed push - - print STDERR "$_\n" foreach @errors; - exit 1; - } - else { - exit 0; - } + return @rets; } #}}} 1 diff --git a/IkiWiki/Plugin/remove.pm b/IkiWiki/Plugin/remove.pm index 68bf9d1ee..c512b3b97 100644 --- a/IkiWiki/Plugin/remove.pm +++ b/IkiWiki/Plugin/remove.pm @@ -41,7 +41,7 @@ sub check_canremove ($$$) { #{{{ error(sprintf(gettext("%s is not a file"), $file)); } - # Must be editiable. + # Must be editable. IkiWiki::check_canedit($page, $q, $session); # If a user can't upload an attachment, don't let them delete it. diff --git a/IkiWiki/Receive.pm b/IkiWiki/Receive.pm new file mode 100644 index 000000000..63944bb81 --- /dev/null +++ b/IkiWiki/Receive.pm @@ -0,0 +1,101 @@ +#!/usr/bin/perl + +package IkiWiki::Receive; + +use warnings; +use strict; +use IkiWiki; + +sub getuser () { #{{{ + my $user=(getpwuid($<))[0]; + if (! defined $user) { + error("cannot determine username for $<"); + } + return $user; +} #}}} + +sub trusted () { #{{{ + my $user=getuser(); + return ! ref $config{untrusted_committers} || + ! grep { $_ eq $user } @{$config{untrusted_committers}}; +} #}}} + +sub test () { #{{{ + exit 0 if trusted(); + IkiWiki::rcs_test_receive(); + + # Dummy up a cgi environment to use when calling check_canedit + # and friends. + eval q{use CGI}; + error($@) if $@; + my $cgi=CGI->new; + require IkiWiki::CGI; + my $session=IkiWiki::cgi_getsession($cgi); + my $user=getuser(); + $session->param("name", $user); + $ENV{REMOTE_ADDR}='unknown' unless exists $ENV{REMOTE_ADDR}; + + lockwiki(); + loadindex(); + + my %newfiles; + + foreach my $change (IkiWiki::rcs_receive()) { + # This untaint is safe because we check file_pruned and + # wiki_file_regexp. + my $file=$change->{file}=~/$config{wiki_file_regexp}/; + $file=possibly_foolish_untaint($file); + if (! defined $file || ! length $file || + IkiWiki::file_pruned($file, $config{srcdir})) { + error(gettext("bad file name")); + } + + my $type=pagetype($file); + my $page=pagename($file) if defined $type; + + if ($change->{action} eq 'add') { + $newfiles{$file}=1; + } + + if ($change->{action} eq 'change' || + $change->{action} eq 'add') { + if (defined $page) { + if (IkiWiki->can("check_canedit") && + IkiWiki::check_canedit($page, $cgi, $session)) { + next; + } + } + else { + # TODO + #if (IkiWiki::Plugin::attachment->can("check_canattach") && + # IkiWiki::Plugin::attachment::check_canattach($session, $file, $path)) { + # next; + #} + } + } + elsif ($change->{action} eq 'remove') { + # check_canremove tests to see if the file is present + # on disk. This will fail is a single commit adds a + # file and then removes it again. Avoid the problem + # by not testing the removal in such pairs of changes. + # (The add is still tested, just to make sure that + # no data is added to the repo that a web edit + # could add.) + next if $newfiles{$file}; + + if (IkiWiki::Plugin::remove->can("check_canremove") && + IkiWiki::Plugin::remove::check_canremove(defined $page ? $page : $file, $cgi, $session)) { + next; + } + } + else { + error "unknown action ".$change->{action}; + } + + error sprintf(gettext("you are not allowed to change %s"), $file); + } + + exit 0; +} #}}} + +1 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 5a5db6be0..9f096e4f7 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -820,14 +820,26 @@ it up in the history. It's ok if this is not implemented, and throws an error. -#### `rcs_test_receive()` +#### `rcs_receive()` -This is used to test if changes pushed into the RCS should be accepted. -Ikiwiki will be running as a pre-receive hook (or equivilant) and should -examine the incoming changes, decide if they are allowed, and communicate -that to the RCS. +This is called when ikiwiki is running as a pre-receive hook (or +equivilant), and is testing if changes pushed into the RCS from an +untrusted user should be accepted. This is optional, and doesn't make +sense to implement for all RCSs. -This is optional, and doesn't make sense for all RCSs. +It should examine the incoming changes, and do any sanity +checks that are appropriate for the RCS to limit changes to safe file adds, +removes, and renames. If something bad is found, it should exit +nonzero, to abort the push. Otherwise, it should return a list of +files that were changed, in the form: + + { + file => # name of file that was changed + action => # either "add", "change", or "remove" + } + +The list will then be checked to make sure that each change is one that +is allowed to be made via the web interface. ### PageSpec plugins diff --git a/doc/rcs/git.mdwn b/doc/rcs/git.mdwn index 2a6feecf5..6ba0da894 100644 --- a/doc/rcs/git.mdwn +++ b/doc/rcs/git.mdwn @@ -116,7 +116,7 @@ committers. Trusted committers, including the user that ikiwiki runs as, will not have their commits checked by the `pre-receive` hook. Untrusted committers will have their commits checked. The configuration settings to enable are `git_test_receive_wrapper`, which enables generation of a -`pre-receive` hook, and `git_untrusted_committers`, which is a list of +`pre-receive` hook, and `untrusted_committers`, which is a list of usernames of the untrusted committers. Note that when the `pre-receive` hook is checking incoming changes, it diff --git a/ikiwiki.in b/ikiwiki.in index 22addb463..60663bc89 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -119,10 +119,15 @@ sub getconfig () { #{{{ } delete $ENV{WRAPPED_OPTIONS}; - # optimisation for no-op post_commit if ($config{post_commit} && ! commit_hook_enabled()) { + # optimisation for no-op post_commit exit 0; } + elsif ($config{test_receive}) { + # quick success if the user is trusted + require IkiWiki::Receive; + exit 0 if IkiWiki::Receive::trusted(); + } loadplugins(); checkconfig(); @@ -190,7 +195,8 @@ sub main () { #{{{ # do nothing } elsif ($config{test_receive}) { - rcs_test_receive(); + require IkiWiki::Receive; + IkiWiki::Receive::test(); } else { if ($config{rebuild}) { -- cgit v1.2.3 From ad9e443f22a139c71f0cd05885cda3e418f27567 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 23 Oct 2008 16:56:40 -0400 Subject: check_canattach hooked up --- IkiWiki/Plugin/git.pm | 33 ++++++++++++++++++++++++++------- IkiWiki/Receive.pm | 9 ++++----- doc/plugins/write.mdwn | 5 ++++- 3 files changed, 34 insertions(+), 13 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 234e7af2e..bdac6f7a1 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -9,6 +9,7 @@ use open qw{:utf8 :std}; my $sha1_pattern = qr/[0-9a-fA-F]{40}/; # pattern to validate Git sha1sums my $dummy_commit_msg = 'dummy commit'; # message to skip in recent changes +my $no_chdir=0; sub import { #{{{ hook(type => "checkconfig", id => "git", call => \&checkconfig); @@ -127,8 +128,10 @@ sub safe_git (&@) { #{{{ if (!$pid) { # In child. # Git commands want to be in wc. - chdir $config{srcdir} - or error("Cannot chdir to $config{srcdir}: $!"); + if (! $no_chdir) { + chdir $config{srcdir} + or error("Cannot chdir to $config{srcdir}: $!"); + } exec @cmdline or error("Cannot exec '@cmdline': $!"); } # In parent. @@ -606,13 +609,20 @@ sub rcs_receive () { #{{{ while (<>) { chomp; my ($oldrev, $newrev, $refname) = split(' ', $_, 3); - + # only allow changes to gitmaster_branch if ($refname !~ /^refs\/heads\/\Q$config{gitmaster_branch}\E$/) { error sprintf(gettext("you are not allowed to change %s"), $refname); } - - foreach my $ci (git_commit_info($oldrev."..".$newrev)) { + + # Avoid chdir when running git here, because the changes + # are in the master git repo, not the srcdir repo. + # The pre-recieve hook already puts us in the right place. + $no_chdir=1; + my @changes=git_commit_info($oldrev."..".$newrev); + $no_chdir=0; + + foreach my $ci (@changes) { foreach my $detail (@{ $ci->{'details'} }) { my $file = $detail->{'file'}; @@ -623,8 +633,7 @@ sub rcs_receive () { #{{{ error sprintf(gettext("you are not allowed to change %s"), $file); } - my $action; - my $mode; + my ($action, $mode, $path); if ($detail->{'status'} =~ /^[M]+\d*$/) { $action="change"; $mode=$detail->{'mode_to'}; @@ -632,6 +641,15 @@ sub rcs_receive () { #{{{ elsif ($detail->{'status'} =~ /^[AM]+\d*$/) { $action="add"; $mode=$detail->{'mode_to'}; + if (! pagetype($file)) { + eval q{use File::Temp}; + die $@ if $@; + my $fh; + ($fh, $path)=tempfile("XXXXXXXXXX", UNLINK => 1); + if (system("git show ".$detail->{sha1_to}." > '$path'") != 0) { + error("failed writing temp file"); + } + } } elsif ($detail->{'status'} =~ /^[DAM]+\d*/) { $action="remove"; @@ -654,6 +672,7 @@ sub rcs_receive () { #{{{ push @rets, { file => $file, action => $action, + path => $path, }; } } diff --git a/IkiWiki/Receive.pm b/IkiWiki/Receive.pm index 63944bb81..4d437cf78 100644 --- a/IkiWiki/Receive.pm +++ b/IkiWiki/Receive.pm @@ -66,11 +66,10 @@ sub test () { #{{{ } } else { - # TODO - #if (IkiWiki::Plugin::attachment->can("check_canattach") && - # IkiWiki::Plugin::attachment::check_canattach($session, $file, $path)) { - # next; - #} + if (IkiWiki::Plugin::attachment->can("check_canattach") && + IkiWiki::Plugin::attachment::check_canattach($session, $file, $change->{path})) { + next; + } } } elsif ($change->{action} eq 'remove') { diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 9f096e4f7..7fbe4bd57 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -829,13 +829,16 @@ sense to implement for all RCSs. It should examine the incoming changes, and do any sanity checks that are appropriate for the RCS to limit changes to safe file adds, -removes, and renames. If something bad is found, it should exit +removes, and changes. If something bad is found, it should exit nonzero, to abort the push. Otherwise, it should return a list of files that were changed, in the form: { file => # name of file that was changed action => # either "add", "change", or "remove" + path => # temp file containing the new file content, only + # needed for "add", and only if the file is an + # attachment, not a page } The list will then be checked to make sure that each change is one that -- cgit v1.2.3 From 0a081d78c4b4f24592f19e896b4f7daea30e9ef1 Mon Sep 17 00:00:00 2001 From: tschwinge Date: Fri, 24 Oct 2008 05:40:52 -0400 Subject: Typo fix. --- doc/plugins/write.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 7fbe4bd57..5ee4acb53 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -823,7 +823,7 @@ 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 -equivilant), and is testing if changes pushed into the RCS from an +equivalent), and is testing if changes pushed into the RCS from an untrusted user should be accepted. This is optional, and doesn't make sense to implement for all RCSs. -- cgit v1.2.3 From 0196e1f9fcfebbf904e59c029e494cb2186793e6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 24 Oct 2008 13:29:41 -0400 Subject: updates --- IkiWiki/Plugin/git.pm | 2 +- doc/plugins/pingee.mdwn | 2 +- doc/users/xma/discussion.mdwn | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index e565f6369..3a8476e7d 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -619,7 +619,7 @@ sub rcs_receive () { #{{{ # Avoid chdir when running git here, because the changes # are in the master git repo, not the srcdir repo. - # The pre-recieve hook already puts us in the right place. + # The pre-receive hook already puts us in the right place. $no_chdir=1; my @changes=git_commit_info($oldrev."..".$newrev); $no_chdir=0; diff --git a/doc/plugins/pingee.mdwn b/doc/plugins/pingee.mdwn index d012004f9..6156c235f 100644 --- a/doc/plugins/pingee.mdwn +++ b/doc/plugins/pingee.mdwn @@ -3,7 +3,7 @@ This plugin causes ikiwiki to listen for pings, typically delivered from another ikiwiki instance using the [[pinger]] plugin. When a ping is -recieved, ikiwiki will update the wiki, the same as if `ikiwiki --refresh` +received, ikiwiki will update the wiki, the same as if `ikiwiki --refresh` were ran at the command line. An url such as the following is used to trigger a ping: diff --git a/doc/users/xma/discussion.mdwn b/doc/users/xma/discussion.mdwn index c2bb62062..34adbf821 100644 --- a/doc/users/xma/discussion.mdwn +++ b/doc/users/xma/discussion.mdwn @@ -14,3 +14,5 @@ How do you edit this wiki (I mean [ikiwiki]) without the web browser ? Is there > for ikiwiki. --[[Joey]] > > I'll think about it. It may solve some of my offline-being issues. --[[intrigeri]] + +>>>> Now developed! --[[Joey]] -- cgit v1.2.3 From 1a883b3c504a543c8f4a5b5bb9687e7770f28a4f Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 24 Oct 2008 13:44:03 -0400 Subject: include temp file for attachment change too --- IkiWiki/Plugin/git.pm | 23 +++++++++++++---------- IkiWiki/Receive.pm | 2 +- doc/plugins/write.mdwn | 4 ++-- 3 files changed, 16 insertions(+), 13 deletions(-) (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 3a8476e7d..84df56181 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -619,7 +619,7 @@ sub rcs_receive () { #{{{ # Avoid chdir when running git here, because the changes # are in the master git repo, not the srcdir repo. - # The pre-receive hook already puts us in the right place. + # The pre-recieve hook already puts us in the right place. $no_chdir=1; my @changes=git_commit_info($oldrev."..".$newrev); $no_chdir=0; @@ -643,15 +643,6 @@ sub rcs_receive () { #{{{ elsif ($detail->{'status'} =~ /^[AM]+\d*$/) { $action="add"; $mode=$detail->{'mode_to'}; - if (! pagetype($file)) { - eval q{use File::Temp}; - die $@ if $@; - my $fh; - ($fh, $path)=File::Temp::tempfile("XXXXXXXXXX", UNLINK => 1); - if (system("git show ".$detail->{sha1_to}." > '$path'") != 0) { - error("failed writing temp file"); - } - } } elsif ($detail->{'status'} =~ /^[DAM]+\d*/) { $action="remove"; @@ -670,6 +661,18 @@ sub rcs_receive () { #{{{ error gettext("you are not allowed to change file modes"); } } + + # extract attachment to temp file + if (($action eq 'add' || $action eq 'change') && + ! pagetype($file)) { + eval q{use File::Temp}; + die $@ if $@; + my $fh; + ($fh, $path)=File::Temp::tempfile("XXXXXXXXXX", UNLINK => 1); + if (system("git show ".$detail->{sha1_to}." > '$path'") != 0) { + error("failed writing temp file"); + } + } push @rets, { file => $file, diff --git a/IkiWiki/Receive.pm b/IkiWiki/Receive.pm index c69911a7c..9a672abc9 100644 --- a/IkiWiki/Receive.pm +++ b/IkiWiki/Receive.pm @@ -45,7 +45,7 @@ sub test () { #{{{ $file=IkiWiki::possibly_foolish_untaint($file); if (! defined $file || ! length $file || IkiWiki::file_pruned($file, $config{srcdir})) { - error(gettext("bad file name")); + error(gettext("bad file name %s"), $file); } my $type=pagetype($file); diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 5ee4acb53..abcabbdc3 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -837,8 +837,8 @@ files that were changed, in the form: file => # name of file that was changed action => # either "add", "change", or "remove" path => # temp file containing the new file content, only - # needed for "add", and only if the file is an - # attachment, not a page + # needed for "add"/"change", and only if the file + # is an attachment, not a page } The list will then be checked to make sure that each change is one that -- cgit v1.2.3 From 65bf71d387ba406d4fcf697d76151b6953176cf8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 26 Oct 2008 19:43:57 -0400 Subject: organizing and pulling together syntax highlighting info --- doc/plugins/contrib/sourcehighlight.mdwn | 5 ++ doc/todo/syntax_highlighting.mdwn | 54 ++++++++++++++++++++++ ...wiki-formatted_comments_with_syntax_plugin.mdwn | 5 +- 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 doc/todo/syntax_highlighting.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/sourcehighlight.mdwn b/doc/plugins/contrib/sourcehighlight.mdwn index 2eb22e6ed..fb368945b 100644 --- a/doc/plugins/contrib/sourcehighlight.mdwn +++ b/doc/plugins/contrib/sourcehighlight.mdwn @@ -20,3 +20,8 @@ This problem with sourcehighlight needs to be fixed before it is very useful. - Is there a way to configure the colors used by source-highlight (other than editing the globally installed "default.style" file)? It would help if I could pass the command arbitrary command-line arguments; then I could configure which config file it's supposed to use. For instance, I'm not a fan of hard-coding the colors into the HTML output. IMHO, css-style formatting should be preferred. All that can be set via the command line ... --Peter > I don't really have time right now, but it should be easy to add, if you look at how src-lang is handled. Patches are welcome :-) --[[DavidBremner]] + +Note that [[Will]] wrote a plugin that uses source-highlight also. It's +available +[here|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]]. +--[[Joey]] diff --git a/doc/todo/syntax_highlighting.mdwn b/doc/todo/syntax_highlighting.mdwn new file mode 100644 index 000000000..e992cc514 --- /dev/null +++ b/doc/todo/syntax_highlighting.mdwn @@ -0,0 +1,54 @@ +There's been a lot of work on contrib syntax highlighting plugins. One should be +picked and added to ikiwiki core. + +Ideally, it should support both converting whole source files into wiki +pages, as well as doing syntax highlighting as a preprocessor directive +(which is either passed the text, or reads it from a file). + +The big list of possibilities: + +* [[plugins/contrib/highlightcode]] uses [[cpan Syntax::Highlight::Engine::Kate]], + operates on whole source files only, has a few bugs (see + [here](http://u32.net/Highlight_Code_Plugin/), and needs to be updated to + support [[bugs/multiple_pages_with_same_name]]. +* [[cpan IkiWiki-Plugin-syntax]] only operates as a directive. + Interestingly, it supports multiple highlighting backends, including Kate + and Vim. +* [[plugins/contrib/syntax]] only operates as a directive + ([[not_on_source_code_files|automatic_use_of_syntax_plugin_on_source_code_files]]), + and uses [[cpan Text::VimColor]]. +* [[plugins/contrib/sourcehighlight]] uses src-highlight, and operates on + whole source files only. Needs to be updated to + support [[bugs/multiple_pages_with_same_name]]. +* [[sourcecode|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]] + also uses src-highlight, and operates on whole source files. + Has problems with [[bugs/multiple_pages_with_same_name]]. + +General problems: + +* Using non-perl syntax highlighting backends is slow. I'd prefer either + using a perl module, or a multiple-backend solution that can use a perl + module as one option. +* Currently no single plugin supports both modes of operation (directive + and whole source file to page). +* Nothing seems to support + [[wiki-formatted_comments|wiki-formatted_comments_with_syntax_plugin]] + inside source files. Doing this probably means post-processing the + results of the highlighting engine, to find places where it's highlighted + comments, and then running them through the ikiwiki rendering pipeline. + This seems fairly doable with [[cpan Syntax::Highlight::Engine::Kate]], + at least. +* The whole-file plugins tend to have a problem that things that look like + wikilinks in the source code get munged into links by ikiwiki, which can + have confusing results. Similar problem with preprocessor directives. +* The whole-file plugins all get confused if there is a `foo.c` and a `foo.h`. + This is trivially fixable now by passing the keepextension option when + registering the htmlize hooks, though. +* Whole-file plugins register a bunch of htmlize hooks. The wacky thing + about it is that, when creating a new page, you can then pick "c" or + "h" or "pl" etc from the dropdown that normally has "mdwn" etc in it. + Is this a bug, or a feature? (Even if a feature, plugins with many + extensions make the dropdown unusable..) +* The per page highlighters can't handle "Makefile", or other files + without a significant extension. +* diff --git a/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn b/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn index 08ca61b0c..a5244c9ef 100644 --- a/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn +++ b/doc/todo/wiki-formatted_comments_with_syntax_plugin.mdwn @@ -1 +1,4 @@ -[[Wishlist]] item: I'd love to see the ability to optionally switch back to wiki syntax within the comments of code pretty-printed with the [[plugins/contrib/syntax]] plugin. This would allow the use of links and formatting in comments. +[[Wishlist]] item: I'd love to see the ability to optionally switch back to +wiki syntax within the comments of code pretty-printed with the +[[plugins/contrib/syntax]] plugin. This would allow the use of links and +formatting in comments. -- cgit v1.2.3 From 3c487585765a9106ffe07698819858dfd4d38fd4 Mon Sep 17 00:00:00 2001 From: "https://yag.myopenid.com//" Date: Wed, 29 Oct 2008 15:09:56 -0400 Subject: Fixed broken link. --- ...fault_content_for___42__copyright__42___and___42__license__42__.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn b/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn index b4a7cd5d6..3efc68418 100644 --- a/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn +++ b/doc/plugins/contrib/default_content_for___42__copyright__42___and___42__license__42__.mdwn @@ -27,7 +27,7 @@ Somewhat more detailed usage documentation would be appreciated. I tried to setu those plugins with a current ikiwiki release, i.e. 2.61, but they appeared to do nothing, really. Also, those example pages don't seem to use those plugins, even; they set "copyright" and "license" properties using ordinary [[meta]] tags. Maybe -I'm missing something terribly obvious? --[[Peter]] +I'm missing something terribly obvious? --Peter > Only obvious if you read the source :-). You need to put a file named "copyright.html" >(respectively "license.html") in your wiki. Everything underneath that (in the wikilink sense) will use that >content for the license or copyright. Saves putting \[[meta license="foo"]] in every page [[DavidBremner]] -- cgit v1.2.3 From 3d72fd8f265703a46ab9bd5af268547eafea0292 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 29 Oct 2008 18:05:56 -0400 Subject: wording --- doc/plugins/rst.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/plugins') diff --git a/doc/plugins/rst.mdwn b/doc/plugins/rst.mdwn index 9355597ac..5e97e2d80 100644 --- a/doc/plugins/rst.mdwn +++ b/doc/plugins/rst.mdwn @@ -11,7 +11,7 @@ ikiwiki. Limitations include: * There are issues with inserting raw html into documents, as ikiwiki does with [[WikiLinks|ikiwiki/WikiLink]] and many - preprocessor [[directives|ikiwiki/directive]]. + [[directives|ikiwiki/directive]]. So while you may find this useful for importing old files into your wiki, using this as your main markup language in ikiwiki isn't recommended at -- cgit v1.2.3 From 40b6033917be90377d3abc86b5fdd6479ae104fd Mon Sep 17 00:00:00 2001 From: "http://lollipopman.myopenid.com/" Date: Thu, 30 Oct 2008 08:28:28 -0400 Subject: --- doc/plugins/autoindex/discussion.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 doc/plugins/autoindex/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/autoindex/discussion.mdwn b/doc/plugins/autoindex/discussion.mdwn new file mode 100644 index 000000000..82e30aab1 --- /dev/null +++ b/doc/plugins/autoindex/discussion.mdwn @@ -0,0 +1,7 @@ +Would it be possible to add an option to only generate the index files +for the html output and not place the markdown files in the wiki source? + +The reason being that I have a lot of directories which need to be autoindexed, +but I would prefer if the index files didn't clutter up my git repository. + +even without that feature the plugin is a great help, thanks -- cgit v1.2.3 From 547d296924b27b196fdc0d7c3c88e19ad1a4755f Mon Sep 17 00:00:00 2001 From: jwalzer Date: Thu, 30 Oct 2008 12:22:51 -0400 Subject: opml-Plugin - Stub-Page --- doc/plugins/contrib/opml.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 doc/plugins/contrib/opml.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/opml.mdwn b/doc/plugins/contrib/opml.mdwn new file mode 100644 index 000000000..3f98e8065 --- /dev/null +++ b/doc/plugins/contrib/opml.mdwn @@ -0,0 +1,11 @@ +[[!template id=plugin name=opml author="[[JanWalzer|jwalzer]]"]] +[[!tag type/format]] + +The idea of this plugin is to parse in an OPML-File and output a linklist, maybe some customization. +OPML-Files are xml-files that most RSS-Readers write out, to summarize their subscribes feedlist. + +I have a "dumb" perlscript running on my website, that tries to do a opml2mdwn transformation, but its quite bad on that. + +This Plugin is **NOT Ready** in any way. I'm just putting this page up as a hook, to discuss it. + +I intend to work on this, but I'd appreciate any help on this. -- cgit v1.2.3 From 8f5723e1d572664ecac4d0aeed079ab3365719cc Mon Sep 17 00:00:00 2001 From: jwalzer Date: Thu, 30 Oct 2008 12:27:09 -0400 Subject: start discussion of the plugin --- doc/plugins/contrib/opml/discussion.mdwn | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 doc/plugins/contrib/opml/discussion.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/contrib/opml/discussion.mdwn b/doc/plugins/contrib/opml/discussion.mdwn new file mode 100644 index 000000000..3a145c79a --- /dev/null +++ b/doc/plugins/contrib/opml/discussion.mdwn @@ -0,0 +1,4 @@ +If this is the wrong place for the development of the plugin, please mode it on to a more appropriate one. + +Currently I'm quite stuck with the perl-stuff itself. I'm trying to become comfortable with the language, but it seems, the language doesn't like me. I'm lost in complex datastructures, when trying to iterate through the output of XML::Simple. --[[Jan|jwalzer]] + -- cgit v1.2.3 From bb841f94f47d865e4c78bd4f27c5f9cc04dc1557 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 31 Oct 2008 16:42:20 -0400 Subject: format: New plugin, allows embedding differntly formatted text inside a page (ie, otl inside a mdwn page, or syntax highlighted code inside a page). --- IkiWiki/Plugin/format.pm | 29 +++++++++++++++++++++++++++++ debian/changelog | 3 +++ doc/ikiwiki/directive/format.mdwn | 21 +++++++++++++++++++++ doc/plugins/format.mdwn | 9 +++++++++ doc/todo/syntax_highlighting.mdwn | 4 ++-- po/bg.po | 29 +++++++++++++++++++---------- po/cs.po | 29 +++++++++++++++++++---------- po/da.po | 29 +++++++++++++++++++---------- po/de.po | 29 +++++++++++++++++++---------- po/es.po | 29 +++++++++++++++++++---------- po/fr.po | 29 +++++++++++++++++++---------- po/gu.po | 29 +++++++++++++++++++---------- po/ikiwiki.pot | 13 +++++++++++-- po/pl.po | 29 +++++++++++++++++++---------- po/sv.po | 29 +++++++++++++++++++---------- po/vi.po | 29 +++++++++++++++++++---------- 16 files changed, 265 insertions(+), 104 deletions(-) create mode 100644 IkiWiki/Plugin/format.pm create mode 100644 doc/ikiwiki/directive/format.mdwn create mode 100644 doc/plugins/format.mdwn (limited to 'doc/plugins') diff --git a/IkiWiki/Plugin/format.pm b/IkiWiki/Plugin/format.pm new file mode 100644 index 000000000..a219190e8 --- /dev/null +++ b/IkiWiki/Plugin/format.pm @@ -0,0 +1,29 @@ +#!/usr/bin/perl +package IkiWiki::Plugin::format; + +use warnings; +use strict; +use IkiWiki 2.00; + +sub import { #{{{ + hook(type => "preprocess", id => "format", call => \&preprocess); +} #}}} + +sub preprocess (@) { #{{{ + my $format=$_[0]; + shift; shift; + my $text=$_[0]; + shift; shift; + my %params=@_; + + if (! defined $format || ! defined $text) { + error(gettext("must specify format and text")); + } + elsif (! exists $IkiWiki::hooks{htmlize}{$format}) { + error(sprintf(gettext("unsupported page format %s"), $format)); + } + + return IkiWiki::htmlize($params{page}, $params{destpage}, $format, $text); +} #}}} + +1 diff --git a/debian/changelog b/debian/changelog index 0c3fded41..ca0433d10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -39,6 +39,9 @@ ikiwiki (2.68) UNRELEASED; urgency=low * shortcut: Fix display of shortcuts while previewing. * Preserve syslog setting when doing `ikiwiki -setup foo -dumpsetup bar` * Several fixes to --render mode. + * format: New plugin, allows embedding differntly formatted text inside a + page (ie, otl inside a mdwn page, or syntax highlighted code inside a + page). -- Joey Hess Fri, 17 Oct 2008 20:11:02 -0400 diff --git a/doc/ikiwiki/directive/format.mdwn b/doc/ikiwiki/directive/format.mdwn new file mode 100644 index 000000000..94cf1b04f --- /dev/null +++ b/doc/ikiwiki/directive/format.mdwn @@ -0,0 +1,21 @@ +The `format` directive is supplied by the [[!iki plugins/format desc=format]] +plugin. + +The directive allows formatting a chunk of text using any available page +format. It takes two parameters. First is the type of format to use, +ie the extension that would be used for a standalone file of this type. +Second is the text to format. + +For example, this will embed an otl outline inside a page using mdwn or +some other format: + + \[[!format otl """ + foo + 1 + 2 + bar + 3 + 4 + """]] + +[[!meta robots="noindex, follow"]] diff --git a/doc/plugins/format.mdwn b/doc/plugins/format.mdwn new file mode 100644 index 000000000..91e707fcf --- /dev/null +++ b/doc/plugins/format.mdwn @@ -0,0 +1,9 @@ +[[!template id=plugin name=format core=0 author="[[Joey]]"]] +[[!tag type/format]] + +This plugin allows mixing different page formats together, by embedding +text formatted one way inside a page formatted another way. This is done +using the [[ikiwiki/directive/format]] [[ikiwiki/directive]]. + +For example, it could be used to embed an [[otl]] outline inside a page +that is formatted as [[mdwn]]. diff --git a/doc/todo/syntax_highlighting.mdwn b/doc/todo/syntax_highlighting.mdwn index 43878437f..bb1c84f02 100644 --- a/doc/todo/syntax_highlighting.mdwn +++ b/doc/todo/syntax_highlighting.mdwn @@ -73,8 +73,8 @@ That would run the text through the pl htmlizer, from the syntax hightligh plugin. OTOH, if "rst" were given, it would run the text through the rst htmlizer. So, more generic, allows mixing different types of markup on one page, as well as syntax highlighting. Does require specifying the type of -format, instead of allows it to be guessed (which some syntax highlighters -can do). +format, instead of allowing it to be guessed (which some syntax highlighters +can do). (This directive is now implemented..) Hmm, this would also allow comments inside source files to have mdwn embedded in them, without making the use of mdwn a special case, or needing diff --git a/po/bg.po b/po/bg.po index 471e03119..19b0fff50 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: 2008-10-26 15:03-0400\n" +"POT-Creation-Date: 2008-10-31 16:37-0400\n" "PO-Revision-Date: 2007-01-12 01:19+0200\n" "Last-Translator: Damyan Ivanov \n" "Language-Team: Bulgarian \n" @@ -131,7 +131,7 @@ msgstr "създаване на нова страницa „%s”" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:205 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:206 msgid "done" msgstr "готово" @@ -253,22 +253,31 @@ msgstr "" msgid "failed to process" msgstr "грешка при обработване на шаблона" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, perl-format +msgid "unsupported page format %s" +msgstr "" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "грешшка в приставката „fortune”" -#: ../IkiWiki/Plugin/git.pm:617 ../IkiWiki/Plugin/git.pm:635 +#: ../IkiWiki/Plugin/git.pm:618 ../IkiWiki/Plugin/git.pm:636 #: ../IkiWiki/Receive.pm:129 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:657 +#: ../IkiWiki/Plugin/git.pm:658 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:661 +#: ../IkiWiki/Plugin/git.pm:662 msgid "you are not allowed to change file modes" msgstr "" @@ -686,11 +695,11 @@ msgstr "" msgid "search" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:27 +#: ../IkiWiki/Plugin/shortcut.pm:28 msgid "shortcut plugin will not work without a shortcuts.mdwn" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:36 +#: ../IkiWiki/Plugin/shortcut.pm:38 #, fuzzy msgid "missing name or url parameter" msgstr "препратката няма указани параметрите „name” или „url”" @@ -698,7 +707,7 @@ msgstr "препратката няма указани параметрите #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:45 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, fuzzy, perl-format msgid "shortcut %s points to %s" msgstr "препратката „%s” сочи към „%s”" @@ -970,11 +979,11 @@ msgstr "" msgid "generating wrappers.." msgstr "генериране на обвивки..." -#: ../ikiwiki.in:194 +#: ../ikiwiki.in:195 msgid "rebuilding wiki.." msgstr "обновяване на уики..." -#: ../ikiwiki.in:197 +#: ../ikiwiki.in:198 msgid "refreshing wiki.." msgstr "осъвременяване на уики..." diff --git a/po/cs.po b/po/cs.po index ece992c47..6cbb0c596 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: 2008-10-26 15:03-0400\n" +"POT-Creation-Date: 2008-10-31 16:37-0400\n" "PO-Revision-Date: 2007-05-09 21:21+0200\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" @@ -128,7 +128,7 @@ msgstr "vytvářím novou stránku %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:205 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:206 msgid "done" msgstr "hotovo" @@ -250,22 +250,31 @@ msgstr "" msgid "failed to process" msgstr "nepodařilo se zpracovat:" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, perl-format +msgid "unsupported page format %s" +msgstr "" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "fortune selhal" -#: ../IkiWiki/Plugin/git.pm:617 ../IkiWiki/Plugin/git.pm:635 +#: ../IkiWiki/Plugin/git.pm:618 ../IkiWiki/Plugin/git.pm:636 #: ../IkiWiki/Receive.pm:129 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:657 +#: ../IkiWiki/Plugin/git.pm:658 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:661 +#: ../IkiWiki/Plugin/git.pm:662 msgid "you are not allowed to change file modes" msgstr "" @@ -674,18 +683,18 @@ msgstr "" msgid "search" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:27 +#: ../IkiWiki/Plugin/shortcut.pm:28 msgid "shortcut plugin will not work without a shortcuts.mdwn" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:36 +#: ../IkiWiki/Plugin/shortcut.pm:38 msgid "missing name or url parameter" msgstr "chybí parametr jméno nebo url" #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:45 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, perl-format msgid "shortcut %s points to %s" msgstr "zkratka %s odkazuje na %s" @@ -951,11 +960,11 @@ msgstr "" msgid "generating wrappers.." msgstr "generuji obaly..." -#: ../ikiwiki.in:194 +#: ../ikiwiki.in:195 msgid "rebuilding wiki.." msgstr "znovu vytvářím wiki..." -#: ../ikiwiki.in:197 +#: ../ikiwiki.in:198 msgid "refreshing wiki.." msgstr "obnovuji wiki..." diff --git a/po/da.po b/po/da.po index 3d0deca8a..6c3ed3e53 100644 --- a/po/da.po +++ b/po/da.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-26 15:03-0400\n" +"POT-Creation-Date: 2008-10-31 16:37-0400\n" "PO-Revision-Date: 2008-10-22 19:13+0100\n" "Last-Translator: Jonas Smedegaard \n" "Language-Team: None\n" @@ -132,7 +132,7 @@ msgstr "opretter ny side %s" msgid "deleting bucket.." msgstr "sletter bundt.." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:205 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:206 msgid "done" msgstr "færdig" @@ -250,22 +250,31 @@ msgstr "redigeringsskabelon %s registreret for %s" msgid "failed to process" msgstr "dannelsen mislykkedes" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, fuzzy, perl-format +msgid "unsupported page format %s" +msgstr "revisionskontrolsystem %s ikke understøttet" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "spådom (fortune) fejlede" -#: ../IkiWiki/Plugin/git.pm:617 ../IkiWiki/Plugin/git.pm:635 +#: ../IkiWiki/Plugin/git.pm:618 ../IkiWiki/Plugin/git.pm:636 #: ../IkiWiki/Receive.pm:129 #, fuzzy, perl-format msgid "you are not allowed to change %s" msgstr "du er ikke logget på som en administrator" -#: ../IkiWiki/Plugin/git.pm:657 +#: ../IkiWiki/Plugin/git.pm:658 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:661 +#: ../IkiWiki/Plugin/git.pm:662 #, fuzzy msgid "you are not allowed to change file modes" msgstr "du er ikke logget på som en administrator" @@ -669,18 +678,18 @@ msgstr "behøver Digest::SHA1 til indeks %s" msgid "search" msgstr "søg" -#: ../IkiWiki/Plugin/shortcut.pm:27 +#: ../IkiWiki/Plugin/shortcut.pm:28 msgid "shortcut plugin will not work without a shortcuts.mdwn" msgstr "genvejsudvidelsen vil ikke fungere uden en shortcuts.mdwn" -#: ../IkiWiki/Plugin/shortcut.pm:36 +#: ../IkiWiki/Plugin/shortcut.pm:38 msgid "missing name or url parameter" msgstr "manglende navn eller url parameter" #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:45 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, perl-format msgid "shortcut %s points to %s" msgstr "genvej %s viser til %s" @@ -949,11 +958,11 @@ msgstr "brug: --set var=værdi" msgid "generating wrappers.." msgstr "bygger wrappers.." -#: ../ikiwiki.in:194 +#: ../ikiwiki.in:195 msgid "rebuilding wiki.." msgstr "genopbygger wiki..." -#: ../ikiwiki.in:197 +#: ../ikiwiki.in:198 msgid "refreshing wiki.." msgstr "genopfrisker wiki..." diff --git a/po/de.po b/po/de.po index bef54ad89..022fbfef1 100644 --- a/po/de.po +++ b/po/de.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 2.40\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-26 15:03-0400\n" +"POT-Creation-Date: 2008-10-31 16:37-0400\n" "PO-Revision-Date: 2008-03-03 21:22+0100\n" "Last-Translator: Kai Wasserbäch \n" "Language-Team: German \n" @@ -128,7 +128,7 @@ msgstr "erstelle neue Seite %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:205 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:206 msgid "done" msgstr "fertig" @@ -247,22 +247,31 @@ msgstr "»edittemplate« %s registriert für %s" msgid "failed to process" msgstr "Bearbeitung fehlgeschlagen" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, perl-format +msgid "unsupported page format %s" +msgstr "" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "»fortune« fehlgeschlagen" -#: ../IkiWiki/Plugin/git.pm:617 ../IkiWiki/Plugin/git.pm:635 +#: ../IkiWiki/Plugin/git.pm:618 ../IkiWiki/Plugin/git.pm:636 #: ../IkiWiki/Receive.pm:129 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:657 +#: ../IkiWiki/Plugin/git.pm:658 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:661 +#: ../IkiWiki/Plugin/git.pm:662 msgid "you are not allowed to change file modes" msgstr "" @@ -671,18 +680,18 @@ msgstr "" msgid "search" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:27 +#: ../IkiWiki/Plugin/shortcut.pm:28 msgid "shortcut plugin will not work without a shortcuts.mdwn" msgstr "das »shortcut«-Plugin funktioniert nicht ohne eine »shortcuts.mdwn«" -#: ../IkiWiki/Plugin/shortcut.pm:36 +#: ../IkiWiki/Plugin/shortcut.pm:38 msgid "missing name or url parameter" msgstr "fehlender Name oder URL-Parameter" #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:45 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, perl-format msgid "shortcut %s points to %s" msgstr "Shortcut %s zeigt auf %s" @@ -946,11 +955,11 @@ msgstr "Benutzung: --set Variable=Wert" msgid "generating wrappers.." msgstr "erzeuge Wrapper.." -#: ../ikiwiki.in:194 +#: ../ikiwiki.in:195 msgid "rebuilding wiki.." msgstr "erzeuge Wiki neu.." -#: ../ikiwiki.in:197 +#: ../ikiwiki.in:198 msgid "refreshing wiki.." msgstr "aktualisiere Wiki.." diff --git a/po/es.po b/po/es.po index 7afb45c14..8dce2940f 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: es\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-26 15:03-0400\n" +"POT-Creation-Date: 2008-10-31 16:37-0400\n" "PO-Revision-Date: 2008-10-22 13:54+0200\n" "Last-Translator: Víctor Moral \n" "Language-Team: Spanish \n" @@ -130,7 +130,7 @@ msgstr "creando nueva página %s" msgid "deleting bucket.." msgstr "borrando el directorio.." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:205 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:206 msgid "done" msgstr "completado" @@ -248,22 +248,31 @@ msgstr "plantilla de edición %s registrada para %s" msgid "failed to process" msgstr "fallo en el proceso" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, fuzzy, perl-format +msgid "unsupported page format %s" +msgstr "el sistema de control de versiones %s no está soportado" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "el programa fortune ha fallado" -#: ../IkiWiki/Plugin/git.pm:617 ../IkiWiki/Plugin/git.pm:635 +#: ../IkiWiki/Plugin/git.pm:618 ../IkiWiki/Plugin/git.pm:636 #: ../IkiWiki/Receive.pm:129 #, fuzzy, perl-format msgid "you are not allowed to change %s" msgstr "No está registrado como un administrador" -#: ../IkiWiki/Plugin/git.pm:657 +#: ../IkiWiki/Plugin/git.pm:658 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:661 +#: ../IkiWiki/Plugin/git.pm:662 #, fuzzy msgid "you are not allowed to change file modes" msgstr "No está registrado como un administrador" @@ -676,18 +685,18 @@ msgstr "se necesita la instalación de Digest::SHA1 para indexar %s" msgid "search" msgstr "buscar" -#: ../IkiWiki/Plugin/shortcut.pm:27 +#: ../IkiWiki/Plugin/shortcut.pm:28 msgid "shortcut plugin will not work without a shortcuts.mdwn" msgstr "el complemento shortcut no funciona sin una página shortcuts.mdwn" -#: ../IkiWiki/Plugin/shortcut.pm:36 +#: ../IkiWiki/Plugin/shortcut.pm:38 msgid "missing name or url parameter" msgstr "shortcut necesita el parámetro 'name' ó el parámetro 'url'" #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:45 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, perl-format msgid "shortcut %s points to %s" msgstr "El atajo %s apunta a %s" @@ -959,11 +968,11 @@ msgstr "uso: --set variable=valor" msgid "generating wrappers.." msgstr "generando programas auxiliares.." -#: ../ikiwiki.in:194 +#: ../ikiwiki.in:195 msgid "rebuilding wiki.." msgstr "reconstruyendo el wiki.." -#: ../ikiwiki.in:197 +#: ../ikiwiki.in:198 msgid "refreshing wiki.." msgstr "actualizando el wiki.." diff --git a/po/fr.po b/po/fr.po index c0c96c476..53095c5e1 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-26 15:03-0400\n" +"POT-Creation-Date: 2008-10-31 16:37-0400\n" "PO-Revision-Date: 2008-10-11 10:34+0200\n" "Last-Translator: Julien Patriarca \n" "Language-Team: French \n" @@ -133,7 +133,7 @@ msgstr "Création de la nouvelle page %s" msgid "deleting bucket.." msgstr "suppression du compartiment (« bucket »)..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:205 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:206 msgid "done" msgstr "Terminé" @@ -255,22 +255,31 @@ msgstr "edittemplate %s enregistré pour %s" msgid "failed to process" msgstr "Échec du traitement" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, fuzzy, perl-format +msgid "unsupported page format %s" +msgstr "Système de contrôle de version non reconnu" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "Échec du lancement de « fortune »" -#: ../IkiWiki/Plugin/git.pm:617 ../IkiWiki/Plugin/git.pm:635 +#: ../IkiWiki/Plugin/git.pm:618 ../IkiWiki/Plugin/git.pm:636 #: ../IkiWiki/Receive.pm:129 #, fuzzy, perl-format msgid "you are not allowed to change %s" msgstr "vous n'êtes pas authentifié comme administrateur" -#: ../IkiWiki/Plugin/git.pm:657 +#: ../IkiWiki/Plugin/git.pm:658 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:661 +#: ../IkiWiki/Plugin/git.pm:662 #, fuzzy msgid "you are not allowed to change file modes" msgstr "vous n'êtes pas authentifié comme administrateur" @@ -683,18 +692,18 @@ msgstr "Digest::SHA1 est nécessaire pour indexer %s" msgid "search" msgstr "recherche" -#: ../IkiWiki/Plugin/shortcut.pm:27 +#: ../IkiWiki/Plugin/shortcut.pm:28 msgid "shortcut plugin will not work without a shortcuts.mdwn" msgstr "Le greffon « shortcut » ne fonctionnera pas sans shortcuts.mdwn" -#: ../IkiWiki/Plugin/shortcut.pm:36 +#: ../IkiWiki/Plugin/shortcut.pm:38 msgid "missing name or url parameter" msgstr "Il manque le paramètre nom ou URL." #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:45 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, perl-format msgid "shortcut %s points to %s" msgstr "Le raccourci %s pointe vers %s" @@ -967,11 +976,11 @@ msgstr "Syntaxe : -- set var=valeur" msgid "generating wrappers.." msgstr "Création des fichiers CGI..." -#: ../ikiwiki.in:194 +#: ../ikiwiki.in:195 msgid "rebuilding wiki.." msgstr "Reconstruction du wiki..." -#: ../ikiwiki.in:197 +#: ../ikiwiki.in:198 msgid "refreshing wiki.." msgstr "Rafraîchissement du wiki..." diff --git a/po/gu.po b/po/gu.po index c48985eb5..13c68afc9 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: 2008-10-26 15:03-0400\n" +"POT-Creation-Date: 2008-10-31 16:37-0400\n" "PO-Revision-Date: 2007-01-11 16:05+0530\n" "Last-Translator: Kartik Mistry \n" "Language-Team: Gujarati \n" @@ -129,7 +129,7 @@ msgstr "નવું પાનું %s બનાવે છે" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:205 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:206 msgid "done" msgstr "સંપૂર્ણ" @@ -251,22 +251,31 @@ msgstr "" msgid "failed to process" msgstr "ક્રિયા કરવામાં નિષ્ફળ:" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, perl-format +msgid "unsupported page format %s" +msgstr "" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "ભવિષ્ય નિષ્ફળ" -#: ../IkiWiki/Plugin/git.pm:617 ../IkiWiki/Plugin/git.pm:635 +#: ../IkiWiki/Plugin/git.pm:618 ../IkiWiki/Plugin/git.pm:636 #: ../IkiWiki/Receive.pm:129 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:657 +#: ../IkiWiki/Plugin/git.pm:658 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:661 +#: ../IkiWiki/Plugin/git.pm:662 msgid "you are not allowed to change file modes" msgstr "" @@ -675,18 +684,18 @@ msgstr "" msgid "search" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:27 +#: ../IkiWiki/Plugin/shortcut.pm:28 msgid "shortcut plugin will not work without a shortcuts.mdwn" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:36 +#: ../IkiWiki/Plugin/shortcut.pm:38 msgid "missing name or url parameter" msgstr "ખોવાયેલ નામ અથવા યુઆરએલ વિકલ્પ" #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:45 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, perl-format msgid "shortcut %s points to %s" msgstr "ટુંકોરસ્તો %s એ %s નો નિર્દેશ કરે છે" @@ -951,11 +960,11 @@ msgstr "" msgid "generating wrappers.." msgstr "આવરણ બનાવે છે.." -#: ../ikiwiki.in:194 +#: ../ikiwiki.in:195 msgid "rebuilding wiki.." msgstr "વીકી ફરીથી બનાવે છે.." -#: ../ikiwiki.in:197 +#: ../ikiwiki.in:198 msgid "refreshing wiki.." msgstr "વીકીને તાજી કરે છે.." diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index ab28f956c..f3eb0eb55 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: 2008-10-29 17:42-0400\n" +"POT-Creation-Date: 2008-10-31 16:38-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -246,6 +246,15 @@ msgstr "" msgid "failed to process" msgstr "" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, perl-format +msgid "unsupported page format %s" +msgstr "" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "" @@ -671,7 +680,7 @@ msgstr "" #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:47 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, perl-format msgid "shortcut %s points to %s" msgstr "" diff --git a/po/pl.po b/po/pl.po index 6f262a2be..6f582c71f 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: 2008-10-26 15:03-0400\n" +"POT-Creation-Date: 2008-10-31 16:37-0400\n" "PO-Revision-Date: 2007-04-27 22:05+0200\n" "Last-Translator: Pawel Tecza \n" "Language-Team: Debian L10n Polish \n" @@ -133,7 +133,7 @@ msgstr "tworzenie nowej strony %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:205 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:206 msgid "done" msgstr "gotowe" @@ -255,22 +255,31 @@ msgstr "" msgid "failed to process" msgstr "awaria w trakcie przetwarzania:" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, perl-format +msgid "unsupported page format %s" +msgstr "" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "awaria fortunki" -#: ../IkiWiki/Plugin/git.pm:617 ../IkiWiki/Plugin/git.pm:635 +#: ../IkiWiki/Plugin/git.pm:618 ../IkiWiki/Plugin/git.pm:636 #: ../IkiWiki/Receive.pm:129 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:657 +#: ../IkiWiki/Plugin/git.pm:658 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:661 +#: ../IkiWiki/Plugin/git.pm:662 msgid "you are not allowed to change file modes" msgstr "" @@ -691,11 +700,11 @@ msgstr "" msgid "search" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:27 +#: ../IkiWiki/Plugin/shortcut.pm:28 msgid "shortcut plugin will not work without a shortcuts.mdwn" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:36 +#: ../IkiWiki/Plugin/shortcut.pm:38 #, fuzzy msgid "missing name or url parameter" msgstr "brakujący parametr name lub url" @@ -703,7 +712,7 @@ msgstr "brakujący parametr name lub url" #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:45 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, fuzzy, perl-format msgid "shortcut %s points to %s" msgstr "skrót %s wskazuje na adres %s" @@ -976,11 +985,11 @@ msgstr "" msgid "generating wrappers.." msgstr "tworzenie osłon..." -#: ../ikiwiki.in:194 +#: ../ikiwiki.in:195 msgid "rebuilding wiki.." msgstr "przebudowywanie wiki..." -#: ../ikiwiki.in:197 +#: ../ikiwiki.in:198 msgid "refreshing wiki.." msgstr "odświeżanie wiki..." diff --git a/po/sv.po b/po/sv.po index cc83869cf..6d3e263ee 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: 2008-10-26 15:03-0400\n" +"POT-Creation-Date: 2008-10-31 16:37-0400\n" "PO-Revision-Date: 2007-01-10 23:47+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -130,7 +130,7 @@ msgstr "skapar nya sidan %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:205 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:206 msgid "done" msgstr "klar" @@ -252,22 +252,31 @@ msgstr "" msgid "failed to process" msgstr "misslyckades med att behandla mall:" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, perl-format +msgid "unsupported page format %s" +msgstr "" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "fortune misslyckades" -#: ../IkiWiki/Plugin/git.pm:617 ../IkiWiki/Plugin/git.pm:635 +#: ../IkiWiki/Plugin/git.pm:618 ../IkiWiki/Plugin/git.pm:636 #: ../IkiWiki/Receive.pm:129 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:657 +#: ../IkiWiki/Plugin/git.pm:658 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:661 +#: ../IkiWiki/Plugin/git.pm:662 msgid "you are not allowed to change file modes" msgstr "" @@ -681,11 +690,11 @@ msgstr "" msgid "search" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:27 +#: ../IkiWiki/Plugin/shortcut.pm:28 msgid "shortcut plugin will not work without a shortcuts.mdwn" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:36 +#: ../IkiWiki/Plugin/shortcut.pm:38 #, fuzzy msgid "missing name or url parameter" msgstr "genväg saknar parameter för namn eller url" @@ -693,7 +702,7 @@ msgstr "genväg saknar parameter för namn eller url" #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:45 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, fuzzy, perl-format msgid "shortcut %s points to %s" msgstr "genvägen %s pekar på %s" @@ -965,11 +974,11 @@ msgstr "" msgid "generating wrappers.." msgstr "genererar wrappers.." -#: ../ikiwiki.in:194 +#: ../ikiwiki.in:195 msgid "rebuilding wiki.." msgstr "bygger om wiki.." -#: ../ikiwiki.in:197 +#: ../ikiwiki.in:198 msgid "refreshing wiki.." msgstr "uppdaterar wiki.." diff --git a/po/vi.po b/po/vi.po index 13d695880..4cc16e1d8 100644 --- a/po/vi.po +++ b/po/vi.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2008-10-26 15:03-0400\n" +"POT-Creation-Date: 2008-10-31 16:37-0400\n" "PO-Revision-Date: 2007-01-13 15:31+1030\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" @@ -131,7 +131,7 @@ msgstr "đang tạo trang mới %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:205 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:206 msgid "done" msgstr "xong" @@ -253,22 +253,31 @@ msgstr "" msgid "failed to process" msgstr "mẫu không xử lý được:" +#: ../IkiWiki/Plugin/format.pm:22 +msgid "must specify format and text" +msgstr "" + +#: ../IkiWiki/Plugin/format.pm:25 +#, perl-format +msgid "unsupported page format %s" +msgstr "" + #: ../IkiWiki/Plugin/fortune.pm:27 msgid "fortune failed" msgstr "fortune bị lỗi" -#: ../IkiWiki/Plugin/git.pm:617 ../IkiWiki/Plugin/git.pm:635 +#: ../IkiWiki/Plugin/git.pm:618 ../IkiWiki/Plugin/git.pm:636 #: ../IkiWiki/Receive.pm:129 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:657 +#: ../IkiWiki/Plugin/git.pm:658 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:661 +#: ../IkiWiki/Plugin/git.pm:662 msgid "you are not allowed to change file modes" msgstr "" @@ -682,11 +691,11 @@ msgstr "" msgid "search" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:27 +#: ../IkiWiki/Plugin/shortcut.pm:28 msgid "shortcut plugin will not work without a shortcuts.mdwn" msgstr "" -#: ../IkiWiki/Plugin/shortcut.pm:36 +#: ../IkiWiki/Plugin/shortcut.pm:38 #, fuzzy msgid "missing name or url parameter" msgstr "lối tắt thiếu tên hay tham số url" @@ -694,7 +703,7 @@ msgstr "lối tắt thiếu tên hay tham số url" #. translators: This is used to display what shortcuts are defined. #. translators: First parameter is the name of the shortcut, the second #. translators: is an URL. -#: ../IkiWiki/Plugin/shortcut.pm:45 +#: ../IkiWiki/Plugin/shortcut.pm:48 #, fuzzy, perl-format msgid "shortcut %s points to %s" msgstr "lối tắt %s chỉ tới %s" @@ -966,11 +975,11 @@ msgstr "" msgid "generating wrappers.." msgstr "đang tạo ra các bộ bao bọc.." -#: ../ikiwiki.in:194 +#: ../ikiwiki.in:195 msgid "rebuilding wiki.." msgstr "đang xây dựng lại wiki.." -#: ../ikiwiki.in:197 +#: ../ikiwiki.in:198 msgid "refreshing wiki.." msgstr "đang làm tươi wiki.." -- cgit v1.2.3 From efc1e4a3690a55b7b07d407ffff551e638f59151 Mon Sep 17 00:00:00 2001 From: alexander Date: Fri, 31 Oct 2008 17:52:42 -0400 Subject: --- doc/plugins/calendar/discussion.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/plugins') diff --git a/doc/plugins/calendar/discussion.mdwn b/doc/plugins/calendar/discussion.mdwn index 65c2459c6..148b83522 100644 --- a/doc/plugins/calendar/discussion.mdwn +++ b/doc/plugins/calendar/discussion.mdwn @@ -1,2 +1,4 @@ It would be nice if the "month" type calendar could collect all of the matching pages on a given date in some inline type way. --[[DavidBremner]] + +Is it possible to get the calendar to link to pages based not on their timestamp (as I understand that it does now, or have I misunderstood this?) and instead on for example their location in a directory hierarchy. That way the calendar could be used as a planning / timeline device which I think would be great. --[[Alexander]] -- cgit v1.2.3 From fd9192006b32498ab6c0badfb1806acb6ee893c8 Mon Sep 17 00:00:00 2001 From: alexander Date: Fri, 31 Oct 2008 17:53:57 -0400 Subject: --- doc/plugins/calendar/alexander.mdwn | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/plugins/calendar/alexander.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/calendar/alexander.mdwn b/doc/plugins/calendar/alexander.mdwn new file mode 100644 index 000000000..b2894a90c --- /dev/null +++ b/doc/plugins/calendar/alexander.mdwn @@ -0,0 +1 @@ +I use ikiwiki to organize information - projects, reading notes, outlines, todo lists, etc. -- cgit v1.2.3 From 8f7e6e76ace0ba0a402176518eca282fe356358b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 31 Oct 2008 18:02:03 -0400 Subject: rename --- doc/plugins/calendar/alexander.mdwn | 1 - doc/users/alexander.mdwn | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 doc/plugins/calendar/alexander.mdwn create mode 100644 doc/users/alexander.mdwn (limited to 'doc/plugins') diff --git a/doc/plugins/calendar/alexander.mdwn b/doc/plugins/calendar/alexander.mdwn deleted file mode 100644 index b2894a90c..000000000 --- a/doc/plugins/calendar/alexander.mdwn +++ /dev/null @@ -1 +0,0 @@ -I use ikiwiki to organize information - projects, reading notes, outlines, todo lists, etc. diff --git a/doc/users/alexander.mdwn b/doc/users/alexander.mdwn new file mode 100644 index 000000000..b2894a90c --- /dev/null +++ b/doc/users/alexander.mdwn @@ -0,0 +1 @@ +I use ikiwiki to organize information - projects, reading notes, outlines, todo lists, etc. -- cgit v1.2.3