]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/todo/missingparents.pm.mdwn
fix tag
[ikiwiki.git] / doc / todo / missingparents.pm.mdwn
index 152c82402f8f4a3fcd372a93ac8c15c0195e7f1c..0cc7137ba46b31d0978ca96cc0ad68cc997cef68 100644 (file)
@@ -4,9 +4,9 @@ has a child). Basically, you give it a page called missingparents.mdwn,
 something like this:
 
 <pre>
-[[missingparents pages="posts/* and !posts/*/*" generate="""[[template id=year text="$page"]]"""]]
-[[missingparents pages="posts/*/* and !posts/*/*/*" generate="""[[template id=month text="$page"]]"""]]
-[[missingparents pages="posts/*/*/* and !posts/*/*/*/*" generate="""[[template id=day text="$page"]]"""]]
+[[!missingparents pages="posts/* and !posts/*/*" generate="""[[!template id=year text="$page"]]"""]]
+[[!missingparents pages="posts/*/* and !posts/*/*/*" generate="""[[!template id=month text="$page"]]"""]]
+[[!missingparents pages="posts/*/*/* and !posts/*/*/*/*" generate="""[[!template id=day text="$page"]]"""]]
 </pre>
 
 And it scans the whole wiki for pages that match the pagespecs but are missing
@@ -69,7 +69,7 @@ Index: IkiWiki/Plugin/missingparents.pm
 ===================================================================
 --- IkiWiki/Plugin/missingparents.pm   (revision 0)
 +++ IkiWiki/Plugin/missingparents.pm   (revision 0)
-@@ -0,0 +1,136 @@
+@@ -0,0 +1,142 @@
 +#!/usr/bin/perl
 +# missingparents plugin: detect missing parents of pages and create them
 +package IkiWiki::Plugin::missingparents;
@@ -105,7 +105,7 @@ Index: IkiWiki/Plugin/missingparents.pm
 +      my %params=@_;
 +
 +      if (! defined $params{pages} || ! defined $params{generate}) {
-+              return "[[missingparents ".gettext("missing pages or generate parameter")."]]";
++              return "[[!missingparents ".gettext("missing pages or generate parameter")."]]";
 +      }
 +
 +      push @pagespecs, \%params;
@@ -190,6 +190,12 @@ Index: IkiWiki/Plugin/missingparents.pm
 +      my @new;
 +
 +      foreach my $file (@{$files}) {
++              if ($ownfiles{$file}) {
++                      # someone edited our file, making it the
++                      # user's problem
++                      delete $ownfiles{$file};
++                      next;
++              }
 +              my $page = pagename $file;
 +              my $newfile = "";
 +              foreach my $parent (split '/', $page) {
@@ -206,19 +212,6 @@ Index: IkiWiki/Plugin/missingparents.pm
 +} #}}}
 +
 +1
-Index: IkiWiki/Plugin/rst.pm
-===================================================================
---- IkiWiki/Plugin/rst.pm      (revision 3926)
-+++ IkiWiki/Plugin/rst.pm      (working copy)
-@@ -25,7 +25,7 @@
- html = publish_string(stdin.read(), writer_name='html', 
-        settings_overrides = { 'halt_level': 6, 
-                               'file_insertion_enabled': 0,
--                              'raw_enabled': 0 }
-+                              'raw_enabled': 1 }
- );
- print html[html.find('<body>')+6:html.find('</body>')].strip();
- ";
 Index: IkiWiki.pm
 ===================================================================
 --- IkiWiki.pm (revision 3926)
@@ -263,4 +256,6 @@ Index: IkiWiki.pm
  my %cleared;
  sub will_render ($$;$) { #{{{
        my $page=shift;
-</pre>
\ No newline at end of file
+</pre>
+
+[[!tag patch]]