From: joey Date: Mon, 12 Feb 2007 15:59:42 +0000 (+0000) Subject: web commit by http://ethan.betacantrips.com/: new meta patch X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/commitdiff_plain/bc0ac8d5ec37f7d756f40bf9b711f59ed36e74e0?ds=sidebyside web commit by http://ethan.betacantrips.com/: new meta patch --- diff --git a/doc/patchqueue/meta_param_to_set_ctime.mdwn b/doc/patchqueue/meta_param_to_set_ctime.mdwn new file mode 100644 index 000000000..5fc498862 --- /dev/null +++ b/doc/patchqueue/meta_param_to_set_ctime.mdwn @@ -0,0 +1,29 @@ +It would be nice to backdate some posts, so they can be sorted easier "by +hand" when the ctime of the actual file is not what you want. + +The patch is [here](http://ikidev.betacantrips.com/patches/meta-date.patch). + +You can see it in use [here](http://ikidev.betacantrips.com/metadate/). + + diff -urX ignorepats ikiclean/IkiWiki/Plugin/meta.pm ikidev/IkiWiki/Plugin/meta.pm + --- ikiclean/IkiWiki/Plugin/meta.pm 2007-02-11 21:40:32.002000000 -0800 + +++ ikidev/IkiWiki/Plugin/meta.pm 2007-02-12 07:44:11.182418000 -0800 + @@ -5,6 +5,7 @@ + use warnings; + use strict; + use IkiWiki; + +use Date::Parse; + + my %meta; + my %title; + @@ -61,6 +62,10 @@ + $permalink{$page}=$value; + $meta{$page}.="\n"; + } + + elsif ($key eq 'date') { + + my $time = str2time($value); + + $IkiWiki::pagectime{$page}=$time; + + } + else { + $meta{$page}.="\n";