]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Merge branch 'master' into po
authorJoey Hess <joey@kodama.kitenet.net>
Tue, 11 Nov 2008 22:52:32 +0000 (17:52 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Tue, 11 Nov 2008 22:52:32 +0000 (17:52 -0500)
32 files changed:
IkiWiki.pm
IkiWiki/Plugin/aggregate.pm
IkiWiki/Plugin/bzr.pm
IkiWiki/Plugin/goodstuff.pm
IkiWiki/Plugin/recentchanges.pm
IkiWiki/Plugin/tag.pm
IkiWiki/Plugin/txt.pm
IkiWiki/Wrapper.pm
debian/changelog
doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn [new file with mode: 0644]
doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn [new file with mode: 0644]
doc/bugs/login_page_should_note_cookie_requirement.mdwn [new file with mode: 0644]
doc/bugs/messed_up_repository.mdwn [new file with mode: 0644]
doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn
doc/ikiwiki/markdown.mdwn
doc/plugins/contrib/po.mdwn
doc/plugins/format/discussion.mdwn [new file with mode: 0644]
doc/plugins/goodstuff.mdwn
doc/plugins/meta.mdwn
doc/robots.txt [new file with mode: 0644]
doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn [new file with mode: 0644]
doc/tips/emacs_syntax_highlighting.mdwn [new file with mode: 0644]
doc/tips/untrusted_git_push/discussion.mdwn [new file with mode: 0644]
doc/tips/vim_syntax_highlighting.mdwn
doc/tips/vim_syntax_highlighting/discussion.mdwn
doc/todo/avoid_thrashing.mdwn [new file with mode: 0644]
doc/todo/syntax_highlighting.mdwn
doc/users/Edward_Betts.mdwn
doc/users/jondowland.mdwn
po/ikiwiki.pot
t/pagespec_match.t
templates/change.tmpl

index bab7b707aa6c485338fb3b863760e8019cd65e1c..d949566d834fb1cfcc053bd48ae91398f2571e80 100644 (file)
@@ -120,7 +120,7 @@ sub getsetup () { #{{{
        },
        default_plugins => {
                type => "internal",
-               default => [qw{mdwn link inline htmlscrubber passwordauth
+               default => [qw{mdwn link inline meta htmlscrubber passwordauth
                                openid signinedit lockedit conditional
                                recentchanges parentlinks editpage}],
                description => "plugins to enable by default",
@@ -403,6 +403,13 @@ sub getsetup () { #{{{
                safe => 0,
                rebuild => 0,
        },
+       wikistatedir => {
+               type => "internal",
+               default => undef,
+               description => "path to the .ikiwiki directory holding ikiwiki state",
+               safe => 0,
+               rebuild => 0,
+       },
        setupfile => {
                type => "internal",
                default => undef,
@@ -467,7 +474,7 @@ sub checkconfig () { #{{{
        }
        
        $config{wikistatedir}="$config{srcdir}/.ikiwiki"
-               unless exists $config{wikistatedir};
+               unless exists $config{wikistatedir} && defined $config{wikistatedir};
 
        if (defined $config{umask}) {
                umask(possibly_foolish_untaint($config{umask}));
@@ -1273,8 +1280,7 @@ sub indexlink () { #{{{
 
 my $wikilock;
 
-sub lockwiki (;$) { #{{{
-       my $wait=@_ ? shift : 1;
+sub lockwiki () { #{{{
        # Take an exclusive lock on the wiki to prevent multiple concurrent
        # run issues. The lock will be dropped on program exit.
        if (! -d $config{wikistatedir}) {
@@ -1282,20 +1288,8 @@ sub lockwiki (;$) { #{{{
        }
        open($wikilock, '>', "$config{wikistatedir}/lockfile") ||
                error ("cannot write to $config{wikistatedir}/lockfile: $!");
-       if (! flock($wikilock, 2 | 4)) { # LOCK_EX | LOCK_NB
-               if ($wait) {
-                       debug("wiki seems to be locked, waiting for lock");
-                       my $wait=600; # arbitrary, but don't hang forever to 
-                                     # prevent process pileup
-                       for (1..$wait) {
-                               return if flock($wikilock, 2 | 4);
-                               sleep 1;
-                       }
-                       error("wiki is locked; waited $wait seconds without lock being freed (possible stuck process or stale lock?)");
-               }
-               else {
-                       return 0;
-               }
+       if (! flock($wikilock, 2)) { # LOCK_EX
+               error("failed to get lock");
        }
        return 1;
 } #}}}
@@ -1894,6 +1888,10 @@ sub match_link ($$;@) { #{{{
                else {
                        return IkiWiki::SuccessReason->new("$page links to page $p matching $link")
                                if match_glob($p, $link, %params);
+                       $p=~s/^\///;
+                       $link=~s/^\///;
+                       return IkiWiki::SuccessReason->new("$page links to page $p matching $link")
+                               if match_glob($p, $link, %params);
                }
        }
        return IkiWiki::FailReason->new("$page does not link to $link");
index 2e4c86f242ae0673899c6faa330896544218b705..c9c2880c5737a77bea1b4d268cb468a68b7cbc44 100644 (file)
@@ -520,10 +520,10 @@ sub aggregate (@) { #{{{
                }
 
                foreach my $entry ($f->entries) {
-                       my $content=$content=$entry->content->body;
+                       my $c=$entry->content;
                        # atom feeds may have no content, only a summary
-                       if (! defined $content && ref $entry->summary) {
-                               $content=$entry->summary->body;
+                       if (! defined $c && ref $entry->summary) {
+                               $c=$entry->summary;
                        }
 
                        add_page(
@@ -531,9 +531,10 @@ sub aggregate (@) { #{{{
                                copyright => $f->copyright,
                                title => defined $entry->title ? decode_entities($entry->title) : "untitled",
                                link => $entry->link,
-                               content => defined $content ? $content : "",
+                               content => defined $c ? $c->body : "",
                                guid => defined $entry->id ? $entry->id : time."_".$feed->{name},
                                ctime => $entry->issued ? ($entry->issued->epoch || time) : time,
+                               base => (defined $c && $c->can("base")) ? $c->base : undef,
                        );
                }
        }
@@ -605,7 +606,8 @@ sub add_page (@) { #{{{
        my $template=template($feed->{template}, blind_cache => 1);
        $template->param(title => $params{title})
                if defined $params{title} && length($params{title});
-       $template->param(content => htmlescape(htmlabs($params{content}, $feed->{feedurl})));
+       $template->param(content => htmlescape(htmlabs($params{content},
+               defined $params{base} ? $params{base} : $feed->{feedurl})));
        $template->param(name => $feed->{name});
        $template->param(url => $feed->{url});
        $template->param(copyright => $params{copyright})
index 101e91b930836126f9ef4a00b6a722af42cf5c50..1054f5b3e3f0be1c39e3865fc0a8b90b80ae2b74 100644 (file)
@@ -246,7 +246,7 @@ sub rcs_recentchanges ($) { #{{{
                        rev        => $info->{"revno"},
                        user       => $user,
                        committype => "bzr",
-                       when       => time - str2time($info->{"timestamp"}),
+                       when       => str2time($info->{"timestamp"}),
                        message    => [@message],
                        pages      => [@pages],
                };
index ed1f4ddfc6cab5d88604be3fbe409ba3a573f642..a18e626d4c94b037d8a05c3c971ab9600f0f6e95 100644 (file)
@@ -10,7 +10,6 @@ my @bundle=qw{
        brokenlinks
        img
        map
-       meta
        more
        orphans
        pagecount
index a73ff37b98f9f8ced928df004c96013017b676f2..3f70664ac36990c87113721cac1daf2af42706fc 100644 (file)
@@ -131,7 +131,7 @@ sub store ($$$) { #{{{
                                                do => "recentchanges_link",
                                                page => $_->{page}
                                        ).
-                                       "\">".
+                                       "\" rel=\"nofollow\">".
                                        pagetitle($_->{page}).
                                        "</a>"
                        }
index c4a1756779126c53a265f9e40c82dcdc97c7a52c..d725ef9b3a948f3b5967f66d5ac6dde887a1f633 100644 (file)
@@ -44,6 +44,7 @@ sub tagpage ($) { #{{{
        if ($tag !~ m{^\.?/} &&
            defined $config{tagbase}) {
                $tag="/".$config{tagbase}."/".$tag;
+               $tag=~y#/#/#s; # squash dups
        }
 
        return $tag;
@@ -55,13 +56,7 @@ sub taglink ($$$;@) { #{{{
        my $tag=shift;
        my %opts=@_;
 
-       my $link=tagpage($tag);
-
-       # Force tag creation links to create the tag under /tagbase,
-       # if there is a tagbase and this tag used it.
-       $link="/".$link if $tag ne $link;
-
-       return htmllink($page, $destpage, $link, %opts);
+       return htmllink($page, $destpage, tagpage($tag), %opts);
 } #}}}
 
 sub preprocess_tag (@) { #{{{
index e4c9e5d6a086ba59d0a826c0e7378e297454d734..e157bf07e1eff1b66c93f1ddc4b018846e42cfe8 100644 (file)
@@ -39,7 +39,7 @@ sub filter (@) {
        my $content = $params{content};
 
        if (defined $pagesources{$params{page}} && $pagesources{$params{page}} =~ /\.txt$/) {
-               encode_entities($content);
+               encode_entities($content, "<>&");
                if ($findurl) {
                        my $finder = URI::Find->new(sub {
                                my ($uri, $orig_uri) = @_;
index 99237d3b5c5b46b6b5afb85436938b1cbbd329c4..7a2d4381a079aaf5af71a3a4447486a76f5e0c9b 100644 (file)
@@ -44,6 +44,7 @@ EOF
        }
 
        my $check_commit_hook="";
+       my $pre_exec="";
        if ($config{post_commit}) {
                # Optimise checking !commit_hook_enabled() , 
                # so that ikiwiki does not have to be started if the
@@ -58,7 +59,7 @@ EOF
                # the benefit of this optimisation.
                $check_commit_hook=<<"EOF";
        {
-               int fd=open("$config{wikistatedir}/commitlock", O_CREAT | O_RDWR);
+               int fd=open("$config{wikistatedir}/commitlock", O_CREAT | O_RDWR, 0666);
                if (fd != -1) {
                        if (flock(fd, LOCK_SH | LOCK_NB) != 0)
                                exit(0);
@@ -67,6 +68,19 @@ EOF
        }
 EOF
        }
+       elsif ($config{cgi}) {
+               # Avoid more than one ikiwiki cgi running at a time by
+               # taking a cgi lock. Since ikiwiki uses several MB of
+               # memory, a pile up of processes could cause thrashing
+               # otherwise.
+               $pre_exec=<<"EOF";
+       {
+               int fd=open("$config{wikistatedir}/cgilock", O_CREAT | O_RDWR, 0666);
+               if (fd != -1)
+                       flock(fd, LOCK_EX);
+       }
+EOF
+       }
 
        $Data::Dumper::Indent=0; # no newlines
        my $configstring=Data::Dumper->Dump([\%config], ['*config']);
@@ -122,6 +136,7 @@ $envsave
                exit(1);
        }
 
+$pre_exec
        execl("$this", "$this", NULL);
        perror("exec $this");
        exit(1);
index d04e5ee25308bf6c920e4682eb69aab21ed95fc3..2088b07ecf5425dce84203ea857ec9f90c39af32 100644 (file)
@@ -1,3 +1,30 @@
+ikiwiki (2.69) UNRELEASED; urgency=low
+
+  * aggregate: Try to query XML::Feed for the base url when derelevatising
+    links. Since this needs the just released XML::Feed 0.3, as well 
+    as a not yet released XML::RSS, it will fall back to the old method
+    if no xml:base info is available.
+  * meta: Plugin is now enabled by default since the basewiki uses it.
+  * txt: Do not encode quotes when filtering the txt, as that broke
+    later parsing of any directives on the page.
+  * Fix the link() pagespec to match links that are internally recorded as
+    absolute.
+  * Add rel=nofollow to recentchanges_links for the same (weak) reasons it
+    was earlier added to edit links.
+  * tag: Normalize tagbase so leading/trailing slashes in it don't break
+    things.
+  * bzr: Fix dates for recentchanges.
+  * Avoid multiple ikiwiki cgi processes piling up, eating all memory,
+    and thrashing, by making the cgi wrapper wait on a cgilock.
+    If you had to set apache's MaxClients low to avoid ikiwiki thrashing your
+    server, you can now turn it up to a high value.
+  * Stop busy-waiting in lockwiki, as this could delay ikiwiki from waking up
+    for up to one second. The bailout code is no longer needed after above
+    change.
+  * Remove support for unused optional wait parameter from lockwiki.
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 06 Nov 2008 16:01:00 -0500
+
 ikiwiki (2.68) unstable; urgency=low
 
   * Add support for checking pushes from untrusted git committers. This can be
@@ -28,8 +55,8 @@ ikiwiki (2.68) unstable; urgency=low
   * inline: Only the last feed link was put on the page, fix this to include
     all feed links. So rss will be included along with atom, and pages with
     multiple feeds will get links added for all feeds.
-  * tag: When tagpage is set, force the links created by tagging to point at
-    the toplevel tagpage, and not closer subpages. The html links already went
+  * tag: When tagbase is set, force the links created by tagging to point at
+    the toplevel tagbase, 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
diff --git a/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn
new file mode 100644 (file)
index 0000000..62931d8
--- /dev/null
@@ -0,0 +1,5 @@
+[[plugins/meta]] is not enabled by default, yet some pages in the default basewiki include [[the_meta_directive|ikiwiki/directive/meta]], notably the [[ikiwiki]] heirarchy.
+
+This means that the default output of "ikiwiki src dest", for two empty directories src and dest, result in the meta directive being displayed inline with the page text.
+
+> [[done]], meta now enabled by default.
diff --git a/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn b/doc/bugs/bzr_RecentChanges_dates_start_from_1969.mdwn
new file mode 100644 (file)
index 0000000..fa6e45b
--- /dev/null
@@ -0,0 +1,16 @@
+Using bzr, the dates for changes on the RecentChanges page all start
+slightly before the Unix epoch.
+
+Changing line 249 of bzr.pm from
+
+`                        when       => time - str2time($info->{"timestamp"}),`
+
+to
+
+`                        when       => str2time($info->{"timestamp"}),`
+
+fixed this for me.
+
+> Weird, I wonder why it was written to return an absolute time like that
+> in the first place? Can't have ever been right. Fixed, thanks. --[[Joey]]
+> [[done]]
diff --git a/doc/bugs/login_page_should_note_cookie_requirement.mdwn b/doc/bugs/login_page_should_note_cookie_requirement.mdwn
new file mode 100644 (file)
index 0000000..e2d5a35
--- /dev/null
@@ -0,0 +1,17 @@
+At the moment, you go through the login shuffle and then are told that cookies are needed, so you lose all your data and login again.  It would be much slicker to note by the edit link, or at least on the login page, that cookies are required.
+
+> Hmm, it seems to me to be fairly obvious, since the vast majority of
+> websites that have a login require cookies. Such warnings used to be
+> common, but few sites bother with them anymore. --[[Joey]]
+
+Even better would be to only display the cookie note as a warning if the login page doesn't receive a session cookie.
+
+> I considered doing this before, but it would require running the cgi once
+> to attempt to set the cookie and then redirecting to the cgi a second
+> time to check if it took, which is both complicated and probably would
+> look bad.
+
+Best of all would be to use URL-based or hidden-field-based session tokens if cookies are not permitted.
+
+> This is not very doable since most of the pages the user browses are
+> static pages in a static location.
diff --git a/doc/bugs/messed_up_repository.mdwn b/doc/bugs/messed_up_repository.mdwn
new file mode 100644 (file)
index 0000000..e245b84
--- /dev/null
@@ -0,0 +1,21 @@
+I messed up my local clone of my repository.
+
+It appears that there is a special clone, which contains .ikiwiki, local.css, recentchanges, and the like.
+
+How can I create a new version of this clone?
+
+> No, there's the srcdir, which ikiwiki populates with some of those files
+> when run. Notably the .ikiwiki directory and all its contents, and the
+> recentchanges directory and its contents. But not local.css.
+> 
+> If you've lost .ikiwiki and it contained user registration info
+> (passwords etc), you've lost that info. Everything else can be 
+> regenerated by running `ikiwiki -setup your.setup`
+> 
+> If you still have .ikiwiki, but the git clone is messed up somehow, you
+> can just make a new clone and move .ikiwiki into it before running
+> ikiwiki. --[[Joey]]
+
+> > Great, that worked. Thanks Joey!
+
+[[!tag done]]
index d2d5a46edac994b3757f8734823ae18f941de789..22224483ed501a6976b91f7bb0eeb54b9c543c60 100644 (file)
@@ -15,3 +15,5 @@ Here is the header:
     [[GNU_Free_Documentation_License|/fdl]]."]]"""]]
 
 --[[tschwinge]]
+
+> [[done]], made it less zealous about encoding html entities. --[[Joey]]
index a4190945f541b6a9d5b0f4236675c47f6877c7aa..68419192942abb3c25758e5d8b52f319bf8311f1 100644 (file)
@@ -4,9 +4,7 @@ is a minimal markup language that resembles plain text as used in
 email messages. It is the markup language used by this wiki by default.
 
 For documentation about the markdown syntax, see [[formatting]] and
-[Markdown: syntax](http://daringfireball.net/projects/markdown/syntax). A
-[markdown mode](http://jblevins.org/projects/markdown-mode/) for 
-emacs can help in editing.
+[Markdown: syntax](http://daringfireball.net/projects/markdown/syntax).
 
 Note that [[WikiLinks|WikiLink]] and [[directives|directive]] are not part
 of the markdown syntax, and are the only bit of markup that this wiki
index af215a493c20030b7a26d746d7d4f4a50d070068..3077b485848118722d2514508703346364aaa966 100644 (file)
@@ -3,9 +3,11 @@ translated with gettext, using [po4a](http://po4a.alioth.debian.org/).
 
 More information:
 
-* 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.
+* It can be found in my "po" branch:
+  `git clone git://gaffer.ptitcanardnoir.org/ikiwiki.git`
+* It is self-contained, *i.e.* it does not modify ikiwiki core at all.
+* 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.
@@ -73,10 +75,86 @@ Any thoughts on this?
 >> and could only then translate it, right? I wonder if this will be clear
 >> though to the user.
 >>
+>>> Right: a broken link points to the URL that allows to create
+>>> a page that can either be a new master page or a non-translatable
+>>> page, depending on `po_translatable_pages` value. The best
+>>> solution I can thing of is to use [[plugins/edittemplate]] to
+>>> insert something like "Warning: this is a master page, that must
+>>> be written in $MASTER_LANGUAGE" into newly created master pages,
+>>> and maybe another warning message on newly created
+>>> non-translatable pages. It seems quite doable to me, but in order
+>>> to avoid breaking existing functionality, it implies to hack a bit
+>>> [[plugins/edittemplate]] so that multiple templates can be
+>>> inserted at page creation time. [[--intrigeri]]
+>>
 >> And also, is there any way to start a translation of a page into a new
 >> lanauge using the web interface?
->> 
+>>
+>>> When a new language is added to `po_slave_languages`, a rebuild is
+>>> triggered, and all missing PO files are created and checked into
+>>> VCS. An unpriviledged wiki user can not add a new language to
+>>> `po_slave_languages`, though. One could think of adding the needed
+>>> interface to translate a page into a yet-unsupported slave
+>>> language, and this would automagically add this new language to
+>>> `po_slave_languages`. It would probably be useful in some
+>>> usecases, but I'm not comfortable with letting unpriviledged wiki
+>>> users change the wiki configuration as a side effect of their
+>>> actions; if this were to be implemented, special care would be
+>>> needed. [[--intrigeri]]
+>>>
+>>>> Actually I meant into any of the currently supported languages.
+>>>> I guess that if the template modification is made, it will list those
+>>>> languages on the page, and if a translation to a language is missing,
+>>>> the link will allow creating it?
+>>>>
+>>>>> Any translation page always exist for every supported slave
+>>>>> language, even if no string at all have been translated yet.
+>>>>> This implies the po plugin is especially friendly to people who
+>>>>> prefer reading in their native language if available, but don't
+>>>>> mind reading in English else.
+>>>>>
+>>>>> While I'm at it, there is a remaining issue that needs to be
+>>>>> sorted out: how painful it could be for non-English speakers
+>>>>> (assuming the master language is English) to be perfectly able
+>>>>> to navigate between translation pages supposed to be written in
+>>>>> their own language, when their translation level is most
+>>>>> often low.
+>>>>>
+>>>>> (It is currently easy to display this status on the translation
+>>>>> page itself, but then it's too late, and how frustrating to load
+>>>>> a page just to realize it's actually not translated enough for
+>>>>> you. The "other languages" loop also allows displaying this
+>>>>> information, but it is generally not the primary
+>>>>> navigation tool.)
+>>>>>
+>>>>> IMHO, this is actually a social problem (i.e. it's no use adding
+>>>>> a language to the supported slave ones if you don't have the
+>>>>> manpower to actually do the translations), that can't be fully
+>>>>> solved by technical solutions, but I can think of some hacks
+>>>>> that would limit the negative impact: a given translation's
+>>>>> status (currently = percent translated) could be displayed next
+>>>>> to the link that leads to it; a color code could as well be used
+>>>>> ("just" a matter of adding a CSS id or class to the links,
+>>>>> depending on this variable). As there is already work to be done
+>>>>> to have the links text generation more customizable through
+>>>>> plugins, I could do both at the same time if we consider this
+>>>>> matter to be important enough. --[[intrigeri]]
+
 >> FWIW, I'm tracking your po branch in ikiwiki master git in the po
 >> branch. One thing I'd like to try in there is setting up a translated
 >> basewiki, which seems like it should be pretty easy to do, and would be
 >> a great demo! --[[Joey]]
+>>
+>>> I've merged your changes into my own branch, and made great
+>>> progress on the various todo items. Please note my repository
+>>> location has changed a few days ago, my user page was updated
+>>> accordingly, but I forgot to update this page at the same time.
+>>> Hoping it's not too complicated to relocated an existing remote...
+>>> (never done that, I'm a Git beginner as well as a Perl
+>>> newbie) --[[intrigeri]]
+>>>>
+>>>> Just a matter of editing .git/config, thanks for the heads up.
+>>>>>
+>>>>> Joey, please have a look at my branch, your help would be really
+>>>>> welcome for the security research, as I'm almost done with what
+>>>>> I am able to do myself in this area. --[[intrigeri]]
diff --git a/doc/plugins/format/discussion.mdwn b/doc/plugins/format/discussion.mdwn
new file mode 100644 (file)
index 0000000..df8448e
--- /dev/null
@@ -0,0 +1,15 @@
+Is there any way to tell if an htmlize hook have been called from a format directive?
+
+I am currently modifying the [[contrib/highlightcode]] plugin by [[sabr]] and I wanted to have a different behavior depending on the fact that the htmlize hook is called from a format directive or not. For instance, this could disable the raw copy of the highlighted code. Since I have enabled the keepextension option, I tried to rely on the page extension to decide whenever I have to create the raw file or not but this does not seems a reliable approach.
+
+One possible solution is to add an optional parameter to the htmlize hook (and thus to htmlize function in IkiWiki.pm) which could tell if this is the format directive that called the function but I am not sure that is a good way to do this.
+
+> It's (probably) not just the format directive that has a potential problem here.
+> Imagine a syntax highlighted source code file that contains some other
+> directive, such as table or meta. Such a directive calls `htmlize` on the
+> parameters passed to it.
+> 
+> There is one way to detect this ATM. If `%IkiWiki::preprocessing` has
+> anything in it, then ikiwiki is in the middle of handling a preprocessing
+> directive. So you could check that. It's getting into internals, so not
+> ideal.. --[[Joey]]
index 83b60f4fa554f28cba4db953bb5db004c1a343cf..ed57c0f01336622eb9d53ebb339598dfca78080b 100644 (file)
@@ -12,7 +12,6 @@ Currently included:
 * [[brokenlinks]]
 * [[img]]
 * [[map]]
-* [[meta]]
 * [[more]]
 * [[orphans]]
 * [[pagecount]]
index afd55499303f42dd4284c457623bb543fd09003c..e49bdcc501bb0f3bfa91f6d18b79b0a0a2fb925b 100644 (file)
@@ -1,4 +1,4 @@
-[[!template id=plugin name=meta author="[[Joey]]"]]
+[[!template id=plugin name=meta core=1 author="[[Joey]]"]]
 [[!tag type/meta]]
 
 This plugin provides the [[ikiwiki/directive/meta]] [[ikiwiki/directive]],
diff --git a/doc/robots.txt b/doc/robots.txt
new file mode 100644 (file)
index 0000000..7be87f9
--- /dev/null
@@ -0,0 +1,2 @@
+User-Agent: *
+Disallow: /ikiwiki.cgi
diff --git a/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn b/doc/tips/convert_mediawiki_to_ikiwiki/discussion.mdwn
new file mode 100644 (file)
index 0000000..6e5f166
--- /dev/null
@@ -0,0 +1,14 @@
+The u32 page is excellent, but I wonder if documenting the procedure here
+would be worthwhile. Who knows, the remote site might disappear. But also
+there are some variations on the approach that might be useful:
+
+ * using a python script and the dom library to extract the page names from
+   Special:Allpages (such as
+   <http://www.staff.ncl.ac.uk/jon.dowland/unix/docs/get_pagenames.py>)
+ * Or, querying the mysql back-end to get the names
+ * using WWW::MediaWiki for importing/exporting pages from the wiki, instead
+   of Special::Export
+
+Also, some detail on converting mediawiki transclusion to ikiwiki inlines...
+
+-- [[JonDowland]]
diff --git a/doc/tips/emacs_syntax_highlighting.mdwn b/doc/tips/emacs_syntax_highlighting.mdwn
new file mode 100644 (file)
index 0000000..941cf54
--- /dev/null
@@ -0,0 +1,3 @@
+A [markdown mode](http://jblevins.org/projects/markdown-mode/) for 
+emacs can help in editing of ikiwiki
+[[ikiwiki/markdown]] files.
diff --git a/doc/tips/untrusted_git_push/discussion.mdwn b/doc/tips/untrusted_git_push/discussion.mdwn
new file mode 100644 (file)
index 0000000..e85625a
--- /dev/null
@@ -0,0 +1,33 @@
+I've just tried this (commit c1fa07a). Recent changes shows:
+
+<div id="change-c1fa07ad4f165b42c962ba2a310681107f38c4f7" class="metadata">
+<span class="desc"><br />Changed pages:</span>
+<span class="pagelinks">
+
+<a href="http://git.ikiwiki.info/?p=ikiwiki;a=blobdiff;h=8bfa3dd7601a09b11ecbd20026849a777dc4b1b9;hp=c6302616f52ec058de5a8f5956fc512149a2f1a3;hb=1ea66c3d3f0a33bc3f04d073457b525a70380c37;f=doc/users/jondowland.mdwn"><img src="/wikiicons/diff.png" alt="diff" /></a><a href="http://ikiwiki.info/ikiwiki.cgi?page=users%2Fjondowland&amp;do=recentchanges_link">users/jondowland</a>
+
+
+</span>
+<span class="desc"><br />Changed by:</span>
+<span class="committer">
+
+<a href="http://ikiwiki.info/ikiwiki.cgi?page=users%2Fjon&amp;do=recentchanges_link">jon</a>
+
+</span>
+<span class="desc"><br />Commit type:</span>
+<span class="committype">git</span>
+<span class="desc"><br />Date:</span>
+<span class="changedate"><span class="relativedate" title="Mon, 10 Nov 2008 18:24:22 -0500">18:24:22 11/10/08</span>
+</div>
+
+Note that the user for the commit is 'jon', and the link points at cgi to
+create users/jon. I was wondering if that is configurable for users pushing
+via git. It would be nice perhaps to specify it in some way, perhaps via a
+git-config setting (user.name?). I'm not too familiar with exactly what the
+changeset contains. -- [[JonDowland]]
+
+> All ikiwiki can do it look at who git has recorded as the author of
+> the change (and it looks at the username part of the email address).
+> You can set `user.email` in `.git/config`. --[[Joey]]
+
+> > Ah, excellent. In which case this *should* DTRT... -- [[JonDowland]]
index 453efa8d1d80568f78ec94c82f0031674bde9422..172b763c34ae96ff879742d34965a1b5a090474d 100644 (file)
@@ -1,2 +1,4 @@
-[[ikiwiki.vim]] is a vim syntax highlighting file for ikiwiki. Installation
-instructions are at the top of the file.
+[[ikiwiki.vim]] is a vim syntax highlighting file for ikiwiki
+[[ikiwiki/markdown]] files. 
+
+Installation instructions are at the top of the file.
index b1637e7584845af0a9c448b03db3b90c335d9052..038854b9fb5564b8cf28a28d5039d51619bae411 100644 (file)
@@ -1 +1,8 @@
 I'm going to look at merging this with potwiki.vim (a vim-based personal wiki) so that you can follow wiki-links and auto-create pages etc., direct from vim. (I'm writing this incase I don't get around to it) -- [[JonDowland]]
+
+----
+
+Another attempt at the same thing is here:
+<http://plasticboy.com/markdown-vim-mode/>
+
+In my tests, [[ikiwiki.vim]] works better than that one, YMMV. --[[Joey]]
diff --git a/doc/todo/avoid_thrashing.mdwn b/doc/todo/avoid_thrashing.mdwn
new file mode 100644 (file)
index 0000000..45b11d8
--- /dev/null
@@ -0,0 +1,22 @@
+Problem: Suppose a server has 256 mb ram. Each ikiwiki process needs about
+15 mb, before it's loaded the index. (And maybe 25 after, but only one such
+process runs at any time). That allows for about 16 ikiwiki processes to
+run concurrently on a server, before it starts to swap. Of course, anything
+else that runs on the server and eats memory will affect this.
+
+One could just set `MaxClients 16` in the apache config, but then it's also
+limited to 16 clients serving static pages, which is silly. Also, 16 is
+optimistic -- 8 might be a saner choice. And then, what if something on the
+server decides to eat a lot of memory? Ikiwiki can again overflow memory 
+and thrash.
+
+It occurred to me that the ikiwiki cgi wrapper could instead do locking of
+its own (say of `.ikiwiki/cgilock`). The wrapper only needs a few kb to
+run, and it starts *fast*. So hundreds could be running waiting for a lock
+with no ill effects. Crank `MaxClients` up to 256? No problem..
+
+And there's no real reason to allow more than one ikiwiki cgi to run at a
+time. Since almost all uses of the CGI lock the index, only one can really
+be doing anything at a time. --[[Joey]]
+
+[[done]]
index 97526bae6fa83300d461cea5648ee3ab99cfb27d..2bdeb62be5dc8db7af7435d1379d5ad4728fd5bd 100644 (file)
@@ -23,7 +23,7 @@ pages, as well as doing syntax highlighting as a preprocessor directive
 * [[sourcecode|todo/automatic_use_of_syntax_plugin_on_source_code_files/discussion]]
   also uses src-highlight, and operates on whole source files.
   Updated to work with the fix for [[bugs/multiple_pages_with_same_name]].  Untested with files with no extension, e.g. `Makefile`.
-* [[user/jrblevin]]'s code plugin uses src-highlight, and supports both
+* [[users/jasonblevins]]'s code plugin uses src-highlight, and supports both
   while file and directive use.
 
 ## General problems
index 0d4483fa87f05431d2d7ee38502eae9896d6b3c0..b32927a1c312b13f632506deaf3fbcd09baf5a7f 100644 (file)
@@ -3,5 +3,7 @@ My watchlist:
 [[!inline archive="yes" sort="mtime" atom="yes" pages="
 todo/allow_wiki_syntax_in_commit_messages*
 todo/shortcut_with_different_link_text*
-todo/structured_page_data* "]]
+todo/structured_page_data*
+tips/convert_mediawiki_to_ikiwiki*
+"]]
 
index c6302616f52ec058de5a8f5956fc512149a2f1a3..8bfa3dd7601a09b11ecbd20026849a777dc4b1b9 100644 (file)
@@ -1,5 +1,13 @@
-A new ikiwiki user, looking at ikiwiki both for his personal site but also as a team-documentation management system for a small-sized group of UNIX sysadmins.
+I'm looking at ikiwiki both for my personal site but also as a
+team-documentation management system for a small-sized group of UNIX
+sysadmins.
 
 * My [homepage](http://jmtd.net/) is powered by ikiwiki (replacing my [older homepage](http://alcopop.org/), which was a mess of scripts)
 
-I am giving a talk at the [UK UNIX User's Group](http://www.ukuug.org/) annual [Linux conference](http://www.ukuug.org/events/linux2008/) about organising system administrator documentation which will feature IkiWiki.
+I gave a talk at the [UK UNIX User's Group](http://www.ukuug.org/) annual
+[Linux conference](http://www.ukuug.org/events/linux2008/) about organising
+system administrator documentation. Roughly a third of this talk was
+discussing IkiWiki in some technical detail and suggesting it as a good piece
+of software for this task.
+
+ * slides at <http://www.staff.ncl.ac.uk/jon.dowland/unix/docs/>.
index 5db0c51af0d487c5a55e53b752b2040d227ec2d4..8cf3853e0b199df2c41b4cad0033eaae6a94e0a7 100644 (file)
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-11-03 16:31-0500\n"
+"POT-Creation-Date: 2008-11-11 15:36-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\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:1189
 msgid "Error"
 msgstr ""
 
@@ -120,7 +120,7 @@ msgstr ""
 msgid "feed crashed XML::Feed!"
 msgstr ""
 
-#: ../IkiWiki/Plugin/aggregate.pm:590
+#: ../IkiWiki/Plugin/aggregate.pm:591
 #, perl-format
 msgid "creating new page %s"
 msgstr ""
@@ -910,19 +910,19 @@ msgstr ""
 
 #. translators: The first parameter is a filename, and the second is
 #. translators: a (probably not translated) error message.
-#: ../IkiWiki/Wrapper.pm:79
+#: ../IkiWiki/Wrapper.pm:93
 #, perl-format
 msgid "failed to write %s: %s"
 msgstr ""
 
 #. translators: The parameter is a C filename.
-#: ../IkiWiki/Wrapper.pm:135
+#: ../IkiWiki/Wrapper.pm:150
 #, perl-format
 msgid "failed to compile %s"
 msgstr ""
 
 #. translators: The parameter is a filename.
-#: ../IkiWiki/Wrapper.pm:155
+#: ../IkiWiki/Wrapper.pm:170
 #, perl-format
 msgid "successfully generated %s"
 msgstr ""
@@ -951,25 +951,25 @@ msgstr ""
 msgid "refreshing wiki.."
 msgstr ""
 
-#: ../IkiWiki.pm:466
+#: ../IkiWiki.pm:473
 msgid "Must specify url to wiki with --url when using --cgi"
 msgstr ""
 
-#: ../IkiWiki.pm:512
+#: ../IkiWiki.pm:519
 msgid "cannot use multiple rcs plugins"
 msgstr ""
 
-#: ../IkiWiki.pm:541
+#: ../IkiWiki.pm:548
 #, perl-format
 msgid "failed to load external plugin needed for %s plugin: %s"
 msgstr ""
 
-#: ../IkiWiki.pm:1165
+#: ../IkiWiki.pm:1172
 #, perl-format
 msgid "preprocessing loop detected on %s at depth %i"
 msgstr ""
 
-#: ../IkiWiki.pm:1678
+#: ../IkiWiki.pm:1672
 msgid "yes"
 msgstr ""
 
index c61d1612285944c96f05c99ef02dded5ac1edb0a..7c0ac235b8b522391885816d76040f88a79a6406 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl
 use warnings;
 use strict;
-use Test::More tests => 56;
+use Test::More tests => 58;
 
 BEGIN { use_ok("IkiWiki"); }
 
@@ -40,6 +40,7 @@ $links{"bugs/bar"}=[qw{done}];
 $links{"done"}=[];
 $links{"examples/softwaresite/bugs/fails_to_frobnicate"}=[qw{done}];
 $links{"examples/softwaresite/bugs/done"}=[];
+$links{"ook"}=[qw{/blog/tags/foo}];
 
 ok(pagespec_match("foo", "link(bar)"), "link");
 ok(pagespec_match("foo", "link(ba?)"), "glob link");
@@ -55,6 +56,8 @@ ok(pagespec_match("bar", "backlink(foo)"), "backlink");
 ok(! pagespec_match("quux", "backlink(foo)"), "failed backlink");
 ok(! pagespec_match("bar", ""), "empty pagespec should match nothing");
 ok(! pagespec_match("bar", "           "), "blank pagespec should match nothing");
+ok(pagespec_match("ook", "link(blog/tags/foo)"), "link internal absolute success");
+ok(pagespec_match("ook", "link(/blog/tags/foo)"), "link explicit absolute success");
 
 $IkiWiki::pagectime{foo}=1154532692; # Wed Aug  2 11:26 EDT 2006
 $IkiWiki::pagectime{bar}=1154532695; # after
index 61a54fded70898811202433f7f7019786f36acd0..0aebae61ef356a2df6ffb1219d9ee9b36d1410ea 100644 (file)
@@ -19,7 +19,7 @@
 <span class="desc"><br />Changed by:</span>
 <span class="committer">
 <TMPL_IF NAME="AUTHORURL">
-<a href="<TMPL_VAR AUTHORURL>"><TMPL_VAR USER></a>
+<a href="<TMPL_VAR AUTHORURL>" rel="nofollow"><TMPL_VAR USER></a>
 <TMPL_ELSE>
 <TMPL_VAR USER>
 </TMPL_IF>