From 256b3aeba8a1a9e41c2e89d9030a1a55be060540 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 6 Nov 2008 12:34:47 +0100 Subject: po: response Signed-off-by: intrigeri --- doc/plugins/contrib/po.mdwn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index af215a493..d8edbc704 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -80,3 +80,7 @@ Any thoughts on this? >> 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. Please note my +>>> repository location has changed a few days ago, see my user page +>>> for the new one. --[[intrigeri]] -- cgit v1.2.3 From 81846ef42e61315082d23db281fef65ad6788001 Mon Sep 17 00:00:00 2001 From: "http://mjr.towers.org.uk/" Date: Thu, 6 Nov 2008 09:27:47 -0500 Subject: New bug report --- doc/bugs/login_page_should_note_cookie_requirement.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/bugs/login_page_should_note_cookie_requirement.mdwn 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 index 000000000..b87928da1 --- /dev/null +++ b/doc/bugs/login_page_should_note_cookie_requirement.mdwn @@ -0,0 +1,5 @@ +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. + +Even better would be to only display the cookie note as a warning if the login page doesn't receive a session cookie. + +Best of all would be to use URL-based or hidden-field-based session tokens if cookies are not permitted. -- cgit v1.2.3 From 98ffa6e15552852d15191db39a65fea345509d50 Mon Sep 17 00:00:00 2001 From: "http://alcopop.org/me/openid/" Date: Thu, 6 Nov 2008 10:17:18 -0500 Subject: --- ...sewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn 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 index 000000000..a90227b7a --- /dev/null +++ b/doc/bugs/basewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn @@ -0,0 +1,3 @@ +[[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. -- cgit v1.2.3 From 725dae735334c5762f7f500a20d0ca65788cf137 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 6 Nov 2008 16:10:33 +0100 Subject: po: misc responses to Joey Signed-off-by: intrigeri --- doc/plugins/contrib/po.mdwn | 44 +++++++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index d8edbc704..c2e2b60f7 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -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,14 +75,42 @@ 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 thing 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]] + >> 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. Please note my ->>> repository location has changed a few days ago, see my user page ->>> for the new one. --[[intrigeri]] +>>> 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]] -- cgit v1.2.3 From 56fd048210d3606c98f69b72f978fbd06f5520ab Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 13:51:01 -0500 Subject: response --- doc/plugins/contrib/po.mdwn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/plugins/contrib/po.mdwn b/doc/plugins/contrib/po.mdwn index c2e2b60f7..cc19c53b3 100644 --- a/doc/plugins/contrib/po.mdwn +++ b/doc/plugins/contrib/po.mdwn @@ -101,6 +101,11 @@ Any thoughts on this? >>> 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? >> 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 @@ -113,4 +118,6 @@ Any thoughts on this? >>> 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]] +>>> newbie) --[[intrigeri]]a +>>>> +>>>> Just a matter of editing .git/config, thanks for the heads up. -- cgit v1.2.3 From 3689d28f3aedf011b957025c280f9c9a9a2a296c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 13:56:41 -0500 Subject: response --- doc/bugs/login_page_should_note_cookie_requirement.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/bugs/login_page_should_note_cookie_requirement.mdwn b/doc/bugs/login_page_should_note_cookie_requirement.mdwn index b87928da1..e2d5a352b 100644 --- a/doc/bugs/login_page_should_note_cookie_requirement.mdwn +++ b/doc/bugs/login_page_should_note_cookie_requirement.mdwn @@ -1,5 +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. -- cgit v1.2.3 From dc8929e2f0e53216619340b29bd0d9d6d1f83827 Mon Sep 17 00:00:00 2001 From: "http://josephturian.blogspot.com/" Date: Thu, 6 Nov 2008 15:52:27 -0500 Subject: --- doc/bugs/messed_up_repository.mdwn | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/bugs/messed_up_repository.mdwn diff --git a/doc/bugs/messed_up_repository.mdwn b/doc/bugs/messed_up_repository.mdwn new file mode 100644 index 000000000..10bf5c35d --- /dev/null +++ b/doc/bugs/messed_up_repository.mdwn @@ -0,0 +1,5 @@ +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? -- cgit v1.2.3 From ecf2399f4fd2a515f4f5d6f0040024097a284343 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 16:05:10 -0500 Subject: 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. --- IkiWiki/Plugin/aggregate.pm | 12 +++++++----- debian/changelog | 9 +++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 2e4c86f24..c9c2880c5 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -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}) diff --git a/debian/changelog b/debian/changelog index d04e5ee25..cd8ecba7c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +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. + + -- Joey Hess 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 -- cgit v1.2.3 From db5ea4d4f01d7706c5397101ec860f8a471c1c55 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 16:08:11 -0500 Subject: meta: Plugin is now enabled by default since the basewiki uses it. --- IkiWiki.pm | 2 +- IkiWiki/Plugin/goodstuff.pm | 1 - debian/changelog | 1 + ...asewiki_uses_meta_directives_but_meta_is_not_enabled_by_default.mdwn | 2 ++ doc/plugins/goodstuff.mdwn | 1 - doc/plugins/meta.mdwn | 2 +- 6 files changed, 5 insertions(+), 4 deletions(-) diff --git a/IkiWiki.pm b/IkiWiki.pm index bab7b707a..91d2e6082 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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", diff --git a/IkiWiki/Plugin/goodstuff.pm b/IkiWiki/Plugin/goodstuff.pm index ed1f4ddfc..a18e626d4 100644 --- a/IkiWiki/Plugin/goodstuff.pm +++ b/IkiWiki/Plugin/goodstuff.pm @@ -10,7 +10,6 @@ my @bundle=qw{ brokenlinks img map - meta more orphans pagecount diff --git a/debian/changelog b/debian/changelog index cd8ecba7c..a197369cc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,7 @@ ikiwiki (2.69) UNRELEASED; urgency=low 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. -- Joey Hess Thu, 06 Nov 2008 16:01:00 -0500 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 index a90227b7a..62931d8bc 100644 --- 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 @@ -1,3 +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/plugins/goodstuff.mdwn b/doc/plugins/goodstuff.mdwn index 83b60f4fa..ed57c0f01 100644 --- a/doc/plugins/goodstuff.mdwn +++ b/doc/plugins/goodstuff.mdwn @@ -12,7 +12,6 @@ Currently included: * [[brokenlinks]] * [[img]] * [[map]] -* [[meta]] * [[more]] * [[orphans]] * [[pagecount]] diff --git a/doc/plugins/meta.mdwn b/doc/plugins/meta.mdwn index afd554993..e49bdcc50 100644 --- a/doc/plugins/meta.mdwn +++ b/doc/plugins/meta.mdwn @@ -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]], -- cgit v1.2.3 From 96d52b82edffae197ae182f7073d4b7a8d88880b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 16:12:16 -0500 Subject: response --- doc/bugs/messed_up_repository.mdwn | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/bugs/messed_up_repository.mdwn b/doc/bugs/messed_up_repository.mdwn index 10bf5c35d..cb8aa875a 100644 --- a/doc/bugs/messed_up_repository.mdwn +++ b/doc/bugs/messed_up_repository.mdwn @@ -3,3 +3,17 @@ 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]] + +[[!tag done]] -- cgit v1.2.3 From 11d377af816b30eba336fae2993a79362443c293 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 20:49:18 -0500 Subject: txt: Do not encode quotes when filtering the txt, as that broke later parsing of any directives on the page. --- IkiWiki/Plugin/txt.pm | 2 +- debian/changelog | 2 ++ doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn | 2 ++ docwiki.setup | 2 +- po/ikiwiki.pot | 4 ++-- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/IkiWiki/Plugin/txt.pm b/IkiWiki/Plugin/txt.pm index e4c9e5d6a..e157bf07e 100644 --- a/IkiWiki/Plugin/txt.pm +++ b/IkiWiki/Plugin/txt.pm @@ -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) = @_; diff --git a/debian/changelog b/debian/changelog index a197369cc..424c99ac4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ ikiwiki (2.69) UNRELEASED; urgency=low 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. -- Joey Hess Thu, 06 Nov 2008 16:01:00 -0500 diff --git a/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn b/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn index d2d5a46ed..22224483e 100644 --- a/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn +++ b/doc/bugs/txt_plugin_having_problems_with_meta_directives.mdwn @@ -15,3 +15,5 @@ Here is the header: [[GNU_Free_Documentation_License|/fdl]]."]]"""]] --[[tschwinge]] + +> [[done]], made it less zealous about encoding html entities. --[[Joey]] diff --git a/docwiki.setup b/docwiki.setup index 6d732fd6b..bb9616d04 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -15,5 +15,5 @@ use IkiWiki::Setup::Standard { userdir => "users", usedirs => 0, prefix_directives => 1, - add_plugins => [qw{goodstuff version haiku polygen fortune}], + add_plugins => [qw{goodstuff version haiku polygen fortune txt}], } diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index 5db0c51af..6894dd2f6 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-11-03 16:31-0500\n" +"POT-Creation-Date: 2008-11-06 20:47-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -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 "" -- cgit v1.2.3 From bc705245ca4d3751bb21db8e9a1e1e5f3bbc92f8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 6 Nov 2008 20:49:52 -0500 Subject: oops --- docwiki.setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docwiki.setup b/docwiki.setup index bb9616d04..6d732fd6b 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -15,5 +15,5 @@ use IkiWiki::Setup::Standard { userdir => "users", usedirs => 0, prefix_directives => 1, - add_plugins => [qw{goodstuff version haiku polygen fortune txt}], + add_plugins => [qw{goodstuff version haiku polygen fortune}], } -- cgit v1.2.3 From 32b86c5f5b8eef0fdeb2229159787cc3d9206a74 Mon Sep 17 00:00:00 2001 From: "http://josephturian.blogspot.com/" Date: Fri, 7 Nov 2008 11:21:04 -0500 Subject: --- doc/bugs/messed_up_repository.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/bugs/messed_up_repository.mdwn b/doc/bugs/messed_up_repository.mdwn index cb8aa875a..e245b84a8 100644 --- a/doc/bugs/messed_up_repository.mdwn +++ b/doc/bugs/messed_up_repository.mdwn @@ -16,4 +16,6 @@ How can I create a new version of this clone? > can just make a new clone and move .ikiwiki into it before running > ikiwiki. --[[Joey]] +> > Great, that worked. Thanks Joey! + [[!tag done]] -- cgit v1.2.3