From a8bcb59273fcb6b0053aac293df15ef9c746ca1a Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawkickHAzX_uVJMd_vFJjae6SLs2G38URPU" Date: Thu, 26 Jun 2014 18:38:33 -0400 Subject: [PATCH 01/75] trail plugin unexpected interdependencies --- doc/plugins/trail/discussion.mdwn | 34 +++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/doc/plugins/trail/discussion.mdwn b/doc/plugins/trail/discussion.mdwn index 6c0b790b9..6a0f55968 100644 --- a/doc/plugins/trail/discussion.mdwn +++ b/doc/plugins/trail/discussion.mdwn @@ -103,3 +103,37 @@ Some later changes to trail: --[[smcv]] > Applied --[[Joey]] + +---- + +### Trail plugin creates unexpected interdependencies? +*(ikiwiki master branch 2014-06-06 also tested with 3.20140228 release)* + +I noticed the problem when using the [[/plugins/contrib/album]] plugin but a bit of testing revealed that the [[trail]] plugin, which is used by [[/plugins/contrib/album]] may be the cause of the problem. + +On a site with the following structure where all albumN.mdwn files have the `\[[!inline pages="page(./album01/*)" trail="yes"]]` directive set. All albumN pages and imgN pages get rebuilt whenever any one of the albumN or imgN pages are changed and the command `ikiwiki --setup wiki.setup --refresh --verbose` + is issued. + + /index.mdwn Contains no links maps or inlines + |-album01.mdwn [[!inline pages="page(./album01/*)" trail="yes"]] + |-album01/ + | |-imgA.mdwn + | |-imgB.mdwn + | + |-album02.mdwn [[!inline pages="page(./album02/*)" trail="yes"]] + |-album02/ + | |-imgC.mdwn + | |-imgD.mdwn + | + |-album03.mdwn [[!inline pages="page(./album03/*)" trail="yes"]] + |-album03/ + | |-imgE.mdwn + | |-imgF.mdwn + +Changing the index.mdwn page also triggers a full rebuild of all pages with [[trail]] directives. My sites tend to look like the above but with double digit numbers of files in at each level. Changing any file then means a full rebuild of a rather complex site which takes a long time. + +My setup and test may very well have mistakes but perhaps someone using the trail plugin could check (using the --verbose flag) if all their trails get rebuild when changing only one. I also find it curious that changes to the parent index.mdwn page triggers the same behaviour. + +I have removed a similar comment from the album discussion. + + --[[kjs]] From 13c390389a6f5d76840da205d89d10355542eaf7 Mon Sep 17 00:00:00 2001 From: "https://www.google.com/accounts/o8/id?id=AItOawkickHAzX_uVJMd_vFJjae6SLs2G38URPU" Date: Thu, 26 Jun 2014 18:40:23 -0400 Subject: [PATCH 02/75] Problem was related to trail rather than album plugin --- doc/plugins/contrib/album/discussion.mdwn | 32 ----------------------- 1 file changed, 32 deletions(-) diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index 0b8c7b1a5..7174fa929 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -594,37 +594,5 @@ What would be good is if the album directive could have a "show" parameter which > although I don't know how useful it would be; if it isn't passed, the > default should be 0 (unlimited). --[[smcv]] ----- - -## bug?: all albums and pages become interdependent -*(ikiwiki master branch 2014-06-06 and smcv album4 branch)* - -On a site with the following structure where all album$n.mdwn files have the ``[[!album]]`` directive set. All albums and albumviewers get rebuilt whenever any one of the pages is touched and the command ``ikiwiki --setup debug.setup --refresh --verbose`` is issued. - - /index.mdwn - |-album01.mdwn - |-album01/ - | |-imgA.jpg - | |-imgB.jpg - | - |-album02.mdwn - |-album02/ - | |-imgC.jpg - | |-imgD.jpg - | - |-album03.mdwn - |-album03/ - | |-imgE.jpg - | |-imgF.jpg - -This happens even if the indexpage has no links and when the tree is one level deeper than above with a folder between the index and each ``album$0n`` tuple. Touching index.mdwn rebuilds for instance imgF viewer and output like for example the following as a result of changing ``album01.mdwn`` and issuing ``ikiwiki --setup debug.setup --refresh --verbose`` - - building album02/imgC, its previous or next page has changed - building album03/imgE, its previous or next page has changed - building album02.mdwn, which depends on album02/imgC - -In other words using the album plugin means all changes trigger full rebuilds (as far as I can tell). With my workflow this hasn't been much of an issue as my sites are static and updated maximum once a week but it does make comments unfeasible. - -Perhaps there is something in my setup that triggers this problem? If anyone has an ikiwiki album installation where ``--refresh`` limits the scope of the rebuild to just one album I'd be interested to hear. See for an live website that has this problem. I've tested a simpler debug site without any customization as well. --[[kjs]] From 7d6dc4ef55a983365f3c6764ae3a2f26df70f666 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Fri, 27 Jun 2014 07:49:26 -0400 Subject: [PATCH 03/75] Comment of algorithm formatting --- doc/forum/Formatting_algorithms.mdwn | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/forum/Formatting_algorithms.mdwn b/doc/forum/Formatting_algorithms.mdwn index 4fc82c94f..19153947e 100644 --- a/doc/forum/Formatting_algorithms.mdwn +++ b/doc/forum/Formatting_algorithms.mdwn @@ -44,3 +44,9 @@ I start writing many algorithms :-) > > I think it would be great if someone [[wrote a > plugin for something nicer|todo/Add_nicer_math_formatting]]. -- [[Jon]] + +>> [[plugins/teximg]] is fine for math (al least for GUI browsers, I didn't try with w3m etc.), +>> but what I'm looking for is a solution for formatting **algorithms**. If teximg can help +>> with that, great, otherwise there's the 3 workarounds I mentioned above. +>> +>> Do you have any ideas not mentioned? :-) From 42da98f368c68ce7f5fc8aa945231f22ef08bf85 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Fri, 27 Jun 2014 07:50:13 -0400 Subject: [PATCH 04/75] Add signature I forgot --- doc/forum/Formatting_algorithms.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/forum/Formatting_algorithms.mdwn b/doc/forum/Formatting_algorithms.mdwn index 19153947e..c7f4aaa76 100644 --- a/doc/forum/Formatting_algorithms.mdwn +++ b/doc/forum/Formatting_algorithms.mdwn @@ -50,3 +50,5 @@ I start writing many algorithms :-) >> with that, great, otherwise there's the 3 workarounds I mentioned above. >> >> Do you have any ideas not mentioned? :-) +>> +>> -- [[fr33domlover]] From 117a01bdcb984b0b9b2dbf1fef7f90c1113ff85c Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 27 Jun 2014 23:35:03 +0100 Subject: [PATCH 05/75] Reorder the content of the album page --- doc/plugins/contrib/album.mdwn | 90 +++++++++++++++++----------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/doc/plugins/contrib/album.mdwn b/doc/plugins/contrib/album.mdwn index 7344a158e..ce3c10184 100644 --- a/doc/plugins/contrib/album.mdwn +++ b/doc/plugins/contrib/album.mdwn @@ -11,6 +11,51 @@ This plugin automatically enables the [[filecheck]], [[img]], [[inline]], [[trail]] and [[transient]] plugins. The [[meta]] plugin is also recommended. +## Demo + +* [HTML page of thumbnails](http://ikialbum.hosted.pseudorandom.co.uk/album/) + as an entry point to the album +* Each thumbnail links to + [a "viewer" HTML page](http://ikialbum.hosted.pseudorandom.co.uk/album/img_0120/) + with a full size image, optional next/previous thumbnail links, and + optional [[plugins/comments]] + +## Installation + +[[!template id=gitbranch branch=smcv/album4 author="[[Simon_McVittie|smcv]]"]] + +Available from [[smcv]]'s git repository, in the `album4` branch. +I've called it `album` to distinguish it from +[[contrib/gallery|plugins/contrib/gallery]], although `gallery` might well be +a better name for this functionality. + +(The Summer of Code [[plugins/contrib/gallery]] plugin does the +next/previous UI in Javascript using Lightbox, which means that +individual photos can't be bookmarked in a meaningful way, and +the best it can do as a fallback for non-Javascript browsers +is to provide a direct link to the image.) + +Updated, April 2012: rebased onto the version of [[trail]] that got merged + +### Manual installation + +First, you need a version of ikiwiki with the [[trail]] plugin merged in +(version 3.20120203 or later). + +Manual installation requires these files (use the "raw" link in gitweb +to download): + +* [album.pm](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/IkiWiki/Plugin/album.pm) + in an `IkiWiki/Plugin` subdirectory of your configured `plugindir` +* [albumviewer.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumviewer.tmpl), + [albumitem.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumitem.tmpl), + [albumnext.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumnext.tmpl) and + [albumprev.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumprev.tmpl), + in your configured `templatedir`, or a `templates` subdirectory of your wiki repository +* the album-related bits from the end of the + [stylesheet](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/doc/style.css) + (put them in your local.css) + ## Changing the templates When a viewer page is generated or inlined into an album, the template can @@ -44,51 +89,6 @@ template: \[[!inline pages="..." sort="-age" template="albumitem"]] ----- - -[[!template id=gitbranch branch=smcv/album4 author="[[Simon_McVittie|smcv]]"]] - -Available from [[smcv]]'s git repository, in the `album4` branch. -I've called it `album` to distinguish it from -[[contrib/gallery|plugins/contrib/gallery]], although `gallery` might well be -a better name for this functionality. - -(The Summer of Code [[plugins/contrib/gallery]] plugin does the -next/previous UI in Javascript using Lightbox, which means that -individual photos can't be bookmarked in a meaningful way, and -the best it can do as a fallback for non-Javascript browsers -is to provide a direct link to the image.) - -Updated, April 2012: rebased onto the version of [[trail]] that got merged - -## Manual installation - -First, you need a version of ikiwiki with the [[trail]] plugin merged in -(version 3.20120203 or later). - -Manual installation requires these files (use the "raw" link in gitweb -to download): - -* [album.pm](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/IkiWiki/Plugin/album.pm) - in an `IkiWiki/Plugin` subdirectory of your configured `plugindir` -* [albumviewer.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumviewer.tmpl), - [albumitem.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumitem.tmpl), - [albumnext.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumnext.tmpl) and - [albumprev.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumprev.tmpl), - in your configured `templatedir`, or a `templates` subdirectory of your wiki repository -* the album-related bits from the end of the - [stylesheet](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/doc/style.css) - (put them in your local.css) - -## Demo - -* [HTML page of thumbnails](http://ikialbum.hosted.pseudorandom.co.uk/album/) - as an entry point to the album -* Each thumbnail links to - [a "viewer" HTML page](http://ikialbum.hosted.pseudorandom.co.uk/album/img_0120/) - with a full size image, optional next/previous thumbnail links, and - optional [[plugins/comments]] - ## Bugs * `thumbnailsize` doesn't actually work, they're always 96x96. From 8ab611c6cfb289035f5a19c247f18720e677823e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 28 Jun 2014 10:23:09 +0100 Subject: [PATCH 06/75] Update repository location --- doc/git.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/git.mdwn b/doc/git.mdwn index c6a8dee7c..e71fa57d7 100644 --- a/doc/git.mdwn +++ b/doc/git.mdwn @@ -78,7 +78,7 @@ think about merging them. This is recommended. :-) * anderbubble `git://civilfritz.net/ikiwiki.git` * frioux `git://github.com/frioux/ikiwiki` * llipavsky `git://github.com/llipavsky/ikiwiki` -* [[cbaines]] `git://github.com/cbaines/ikiwiki.git` +* [[cbaines]] `git://git.cbaines.net/ikiwiki` * [[mhameed]] `git://github.com/mhameed/ikiwiki.git` * [[spalax]] `git://github.com/paternal/ikiwiki.git` ([[browse|https://github.com/paternal/ikiwiki]]) From ccc58d9773edf4323bf6acb95425851b55687e45 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Sat, 28 Jun 2014 10:49:56 +0100 Subject: [PATCH 07/75] Add an altered album demo --- doc/plugins/contrib/album.mdwn | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/plugins/contrib/album.mdwn b/doc/plugins/contrib/album.mdwn index ce3c10184..d6e79d7c5 100644 --- a/doc/plugins/contrib/album.mdwn +++ b/doc/plugins/contrib/album.mdwn @@ -20,6 +20,15 @@ recommended. with a full size image, optional next/previous thumbnail links, and optional [[plugins/comments]] +### Altered Demo + +[[!template id=gitbranch branch=cbaines/album]] +This uses the album plugin, with some altered css, and with the css applied to +all of the themes. + +* [Simple album, rendered using mutiple themes](http://cbaines.net/projects/ikiwiki/album/dest/basic) + using the ikiwiki logo. + ## Installation [[!template id=gitbranch branch=smcv/album4 author="[[Simon_McVittie|smcv]]"]] From eff5f02e24ae055a208a279efb81aee4a66abcd0 Mon Sep 17 00:00:00 2001 From: chrysn Date: Sun, 29 Jun 2014 20:06:26 +0200 Subject: [PATCH 08/75] refreshing three pending patches --- .../linkmap_displays_underscore_escapes.mdwn | 2 ++ doc/bugs/pythonproxy-utf8_again.mdwn | 20 +++++++++++++++++++ doc/bugs/svg_and_pdf_conversion_fails.mdwn | 5 +++++ 3 files changed, 27 insertions(+) diff --git a/doc/bugs/linkmap_displays_underscore_escapes.mdwn b/doc/bugs/linkmap_displays_underscore_escapes.mdwn index 66bffc159..62cfb3471 100644 --- a/doc/bugs/linkmap_displays_underscore_escapes.mdwn +++ b/doc/bugs/linkmap_displays_underscore_escapes.mdwn @@ -19,3 +19,5 @@ the output will look much better (at least in my wikis) with the "[[bugs/pagetit the patch is stored in [[the patch.pl]] as created by git-format-patch, and can be pulled from the abovementioned branch. + +> update 2014-06-29: branch still merges cleanly and works. --[[chrysn]] diff --git a/doc/bugs/pythonproxy-utf8_again.mdwn b/doc/bugs/pythonproxy-utf8_again.mdwn index 96b060003..14d5cb98e 100644 --- a/doc/bugs/pythonproxy-utf8_again.mdwn +++ b/doc/bugs/pythonproxy-utf8_again.mdwn @@ -14,3 +14,23 @@ version, but i'm pretty sure it was already broken after the abovementioned patch. -- [[chrysn]] + +> update 2014-06-29: the problem persists, but i found it is not trivial to +> reproduce. to demonstrate, use this test plugin: +> +> #!/usr/bin/env python +> # -*- coding: utf-8 -*- +> +> from proxy import IkiWikiProcedureProxy +> +> def preprocess(self, proxy, *args): +> return repr(self.rpc('pagetype', 'schön')) +> +> proxy = IkiWikiProcedureProxy(__name__) +> proxy.hook('preprocess', preprocess, id='testdirective') +> proxy.run() +> +> note that when the 'schön' is stored in a variable, the exception changes -- +> it seems to me that the issue is related to the way exceptions are encoded. +> +> the suggested patch still applies and solves the issue. --[[chrysn]] diff --git a/doc/bugs/svg_and_pdf_conversion_fails.mdwn b/doc/bugs/svg_and_pdf_conversion_fails.mdwn index 41637c51d..da241b4bc 100644 --- a/doc/bugs/svg_and_pdf_conversion_fails.mdwn +++ b/doc/bugs/svg_and_pdf_conversion_fails.mdwn @@ -20,3 +20,8 @@ that needs special care or breaks something i don't use; this way, my patches should be safe for inclusion. --[[chrysn]] + +> update 2014-06-29: the patch still applies and fixes the issue. in the +> meantime, i noticed that the desired effect doesn't happen when no explicit +> size is set. as scalable graphics don't necessarily have a natural size +> anyway, i don't consider that a showstopper. --[[chrysn]] From 90f1f3ff0d510d288ee5275ad6d3a771ba82b213 Mon Sep 17 00:00:00 2001 From: "89.67.253.159" <89.67.253.159@web> Date: Sun, 29 Jun 2014 16:47:01 -0400 Subject: [PATCH 09/75] poll vote (Accept only OpenID for logins) --- doc/news/openid.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/news/openid.mdwn b/doc/news/openid.mdwn index 42d5a52b1..34d5bb777 100644 --- a/doc/news/openid.mdwn +++ b/doc/news/openid.mdwn @@ -10,4 +10,4 @@ log back in, try out the OpenID signup process if you don't already have an OpenID, and see how OpenID works for you. And let me know your feelings about making such a switch. --[[Joey]] -[[!poll 74 "Accept only OpenID for logins" 21 "Accept only password logins" 49 "Accept both"]] +[[!poll 75 "Accept only OpenID for logins" 21 "Accept only password logins" 49 "Accept both"]] From 3ac1a1b6373dda8846997847c9f31ca13da2fc52 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sun, 29 Jun 2014 18:03:33 -0400 Subject: [PATCH 10/75] respond to cbaines --- doc/plugins/contrib/album/discussion.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index 7174fa929..9d172a277 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -1,3 +1,5 @@ +## installation queries from brush + thanks for this plugin. it might help me in my application, which is to provide album/galleries which can be edited (ie. new images added, taken away, etc.) through web interface. > That's my goal eventually, too. Perhaps you can help to @@ -594,5 +596,23 @@ What would be good is if the album directive could have a "show" parameter which > although I don't know how useful it would be; if it isn't passed, the > default should be 0 (unlimited). --[[smcv]] +## cbaines' branch +Regarding the CSS changes: I'll try to have a look soon, work out +what actually changed (since you re-ordered the CSS, so it isn't +immediately obvious from the diff), and integrate some or all of your +changes. Since Joey shows no signs of wanting to merge it, and "out of tree" +installation is currently a pain, I might split out the CSS changes into a +separate `ikiwiki/album.css` so that the only thing that needs to be merged +into style.css and each theme (or into local.css) is an appropriate +`@import` rule. +Regarding commit `Change the default thumbnail size`: as far as I +understand it, `size => 96x96` is meant to set the image size to +be as large as possible given these constraints: width ≤ 96px, +height ≤ 96px, and the original aspect ratio is preserved. So I +would hope that 96x96 doesn't distort the thumbnails. What distortion +are you seeing, and which versions of Imagemagick and Perlmagick +are you using? + +--[[smcv]] From 7fbc154c8ad90973d3ce2c03175f3125cd17552e Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sun, 29 Jun 2014 18:08:21 -0400 Subject: [PATCH 11/75] the most common ikiwiki CSS trap --- doc/plugins/contrib/album/discussion.mdwn | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index 9d172a277..fc4fd32f4 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -604,9 +604,16 @@ immediately obvious from the diff), and integrate some or all of your changes. Since Joey shows no signs of wanting to merge it, and "out of tree" installation is currently a pain, I might split out the CSS changes into a separate `ikiwiki/album.css` so that the only thing that needs to be merged -into style.css and each theme (or into local.css) is an appropriate +into style.css (or into local.css) is an appropriate `@import` rule. +It shouldn't be necessary to add the album stuff to each individual +theme's style.css unless you actually want an actiontabs album and +a blueview album to be styled differently, because the IkiWiki Makefile +concatenates them: for instance, `/usr/share/ikiwiki/themes/actiontabs/style.css` +is the output of `cat doc/style.css themes/actiontabs/style.css`. So adding it +to `style.css` should be enough? + Regarding commit `Change the default thumbnail size`: as far as I understand it, `size => 96x96` is meant to set the image size to be as large as possible given these constraints: width ≤ 96px, From 345db2f3cf865ffd444457d7fad92f465d3fa164 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sun, 29 Jun 2014 18:08:40 -0400 Subject: [PATCH 12/75] disambiguate --- doc/plugins/contrib/album/discussion.mdwn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/plugins/contrib/album/discussion.mdwn b/doc/plugins/contrib/album/discussion.mdwn index fc4fd32f4..58c0e640f 100644 --- a/doc/plugins/contrib/album/discussion.mdwn +++ b/doc/plugins/contrib/album/discussion.mdwn @@ -612,7 +612,7 @@ theme's style.css unless you actually want an actiontabs album and a blueview album to be styled differently, because the IkiWiki Makefile concatenates them: for instance, `/usr/share/ikiwiki/themes/actiontabs/style.css` is the output of `cat doc/style.css themes/actiontabs/style.css`. So adding it -to `style.css` should be enough? +to `doc/style.css` should be enough? Regarding commit `Change the default thumbnail size`: as far as I understand it, `size => 96x96` is meant to set the image size to From b2252dafd2d6dd3eedf51bbfe2f834f2eb42966a Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Sun, 29 Jun 2014 18:19:54 -0400 Subject: [PATCH 13/75] update --- doc/plugins/contrib/album.mdwn | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/doc/plugins/contrib/album.mdwn b/doc/plugins/contrib/album.mdwn index d6e79d7c5..c2f991d5a 100644 --- a/doc/plugins/contrib/album.mdwn +++ b/doc/plugins/contrib/album.mdwn @@ -31,9 +31,9 @@ all of the themes. ## Installation -[[!template id=gitbranch branch=smcv/album4 author="[[Simon_McVittie|smcv]]"]] +[[!template id=gitbranch branch=smcv/album5 author="[[Simon_McVittie|smcv]]"]] -Available from [[smcv]]'s git repository, in the `album4` branch. +Available from [[smcv]]'s git repository, in the `album5` branch. I've called it `album` to distinguish it from [[contrib/gallery|plugins/contrib/gallery]], although `gallery` might well be a better name for this functionality. @@ -44,7 +44,8 @@ individual photos can't be bookmarked in a meaningful way, and the best it can do as a fallback for non-Javascript browsers is to provide a direct link to the image.) -Updated, April 2012: rebased onto the version of [[trail]] that got merged +Updated, June 2014: integrated changes from [[KathrynAndersen]], +Lukas Lipavsky and kjs ### Manual installation @@ -54,15 +55,15 @@ First, you need a version of ikiwiki with the [[trail]] plugin merged in Manual installation requires these files (use the "raw" link in gitweb to download): -* [album.pm](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/IkiWiki/Plugin/album.pm) +* [album.pm](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/IkiWiki/Plugin/album.pm) in an `IkiWiki/Plugin` subdirectory of your configured `plugindir` -* [albumviewer.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumviewer.tmpl), - [albumitem.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumitem.tmpl), - [albumnext.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumnext.tmpl) and - [albumprev.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/templates/albumprev.tmpl), +* [albumviewer.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumviewer.tmpl), + [albumitem.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumitem.tmpl), + [albumnext.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumnext.tmpl) and + [albumprev.tmpl](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/templates/albumprev.tmpl), in your configured `templatedir`, or a `templates` subdirectory of your wiki repository * the album-related bits from the end of the - [stylesheet](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album4:/doc/style.css) + [stylesheet](http://git.pseudorandom.co.uk/smcv/ikiwiki.git/blob/album5:/doc/style.css) (put them in your local.css) ## Changing the templates @@ -100,14 +101,6 @@ template: ## Bugs -* `thumbnailsize` doesn't actually work, they're always 96x96. - [[KathrynAndersen]] suggested a fix on the [[discussion]] page; - search for her name and look for a context diff. - -* The album index is limited to 10 images. kjs suggested a fix on - the [[discussion]] page: the plugin should pass `show => 0` - to `preprocess_inline`. - * There's currently a hard-coded list of extensions that are treated as images: `png`, `gif`, `jpg`, `jpeg` or `mov` files. More image and video types could be added in future. @@ -134,9 +127,9 @@ template: * The generated viewer page should extract as much metadata as possible from the photo's EXIF tags (creation/modification dates, author, title, caption, - copyright). [[smcv]] has a half-written implementation which runs - `scanimage` hooks, and has an `exiftool` plugin using [[!cpan Image::ExifTool]] - as a reference implementation of that hook. + copyright). [[smcv]] once had a half-written implementation which runs + `scanimage` hooks, and an `exiftool` plugin using [[!cpan Image::ExifTool]] + as a reference implementation of that hook, but has lost that code somewhere :-( * There should be an option to reduce the size of photos and write them into an underlay (perhaps just the transient underlay), for this workflow: From a4d3db605a921b6c99d1b5082450090e31911afc Mon Sep 17 00:00:00 2001 From: smcv Date: Mon, 30 Jun 2014 05:41:06 -0400 Subject: [PATCH 14/75] link to older bug; practical issues exist --- ...quiring_description_when_editing_page.mdwn | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn b/doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn index 4fe591a48..bb8524841 100644 --- a/doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn +++ b/doc/todo/allow_option_for_requiring_description_when_editing_page.mdwn @@ -1 +1,24 @@ allow option for requiring description when editing page. This is so if a commit to an rcs is used, the commit message will not be blank. + +> Duplicate of [[todo/Allow_web_edit_form_comment_field_to_be_mandatory]] where +> Joey indicated that he didn't want this in ikiwiki core, but would +> accept a plugin that did it. +> +> Expanding on what Joey said there a little, the problem I have with +> *requiring* a commit message is that solving a social problem +> by technical means rarely works. If you can't persuade users +> to obey a policy like "provide a nonempty commit message", then +> you can't persuade them to obey a policy like "provide a *useful* +> nonempty commit message" either. I used to work on a project +> whose Bugzilla had been configured or patched to require a comment +> whenever you changed a field (e.g. priority, cc, ...) and in +> practice that just led to a lot of wasted time when people tried +> to triage bugs quickly, and a lot of comments whose text was +> ".", " ", or on at least one occasion, ☃ +> (U+2603 SNOWMAN). +> +> If your chosen RCS has a technical constraint that the commit +> message must be non-empty (and will just not work otherwise), +> that's another matter; I'd say that in that situation +> it's appropriate for its plugin to replace empty commit +> messages with "." or gettext("update") or something. --smcv From c10c6c1c4db528877113ea808dbecb1cd3cd4682 Mon Sep 17 00:00:00 2001 From: smcv Date: Mon, 30 Jun 2014 05:49:44 -0400 Subject: [PATCH 15/75] review, suggest a change --- doc/bugs/pythonproxy-utf8_again.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/bugs/pythonproxy-utf8_again.mdwn b/doc/bugs/pythonproxy-utf8_again.mdwn index 14d5cb98e..b5564d6c1 100644 --- a/doc/bugs/pythonproxy-utf8_again.mdwn +++ b/doc/bugs/pythonproxy-utf8_again.mdwn @@ -34,3 +34,15 @@ patch. > it seems to me that the issue is related to the way exceptions are encoded. > > the suggested patch still applies and solves the issue. --[[chrysn]] + +>> In this patch band: +>> +>> - xml = _IkiWikiExtPluginXMLRPCHandler._read(in_fd).decode('utf8') +>> + response = _IkiWikiExtPluginXMLRPCHandler._read(in_fd) +>> + if isinstance(response, unicode): +>> + xml = response.encode('utf8') +>> +>> I think you mean `response.decode`, not `response.encode`. +>> +>> Other than that it looks good to me. I like the use of `repr` in debug +>> messages. --[[smcv]] From 358c1633766d7ed12fac60f060c234e8a8bc658a Mon Sep 17 00:00:00 2001 From: smcv Date: Mon, 30 Jun 2014 06:12:13 -0400 Subject: [PATCH 16/75] fixed elsewhere? --- ...in_fails_wirth_Could_not_determine_ID_provider_from_URL.mdwn | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/bugs/openid_login_fails_wirth_Could_not_determine_ID_provider_from_URL.mdwn b/doc/bugs/openid_login_fails_wirth_Could_not_determine_ID_provider_from_URL.mdwn index b81dd78cd..ec22f0c78 100644 --- a/doc/bugs/openid_login_fails_wirth_Could_not_determine_ID_provider_from_URL.mdwn +++ b/doc/bugs/openid_login_fails_wirth_Could_not_determine_ID_provider_from_URL.mdwn @@ -2,6 +2,8 @@ On some ikiwikis that I run, I get the following error on OpenID logins: no_identity_server: Could not determine ID provider from URL. +> Is this fixed now that [[!debbug 738493]] has been fixed? --[[smcv]] + I seem recall having that error before, and fixing it, but it always seems to come back and I forget how to fix it. So I'll just open this bug and document it if i can figure it out... -- [[users/anarcat]] The Perl module manual says: From 526d9f131b838458df054b7cf34a8d7b42288d12 Mon Sep 17 00:00:00 2001 From: smcv Date: Mon, 30 Jun 2014 06:15:39 -0400 Subject: [PATCH 17/75] escape inline directives correctly --- doc/plugins/trail/discussion.mdwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/plugins/trail/discussion.mdwn b/doc/plugins/trail/discussion.mdwn index 6a0f55968..ac07f8640 100644 --- a/doc/plugins/trail/discussion.mdwn +++ b/doc/plugins/trail/discussion.mdwn @@ -115,17 +115,17 @@ On a site with the following structure where all albumN.mdwn files have the `\[[ is issued. /index.mdwn Contains no links maps or inlines - |-album01.mdwn [[!inline pages="page(./album01/*)" trail="yes"]] + |-album01.mdwn \[[!inline pages="page(./album01/*)" trail="yes"]] |-album01/ | |-imgA.mdwn | |-imgB.mdwn | - |-album02.mdwn [[!inline pages="page(./album02/*)" trail="yes"]] + |-album02.mdwn \[[!inline pages="page(./album02/*)" trail="yes"]] |-album02/ | |-imgC.mdwn | |-imgD.mdwn | - |-album03.mdwn [[!inline pages="page(./album03/*)" trail="yes"]] + |-album03.mdwn \[[!inline pages="page(./album03/*)" trail="yes"]] |-album03/ | |-imgE.mdwn | |-imgF.mdwn From cedbb3f0af9edc401231c6d8f91d7d897b28e5c0 Mon Sep 17 00:00:00 2001 From: smcv Date: Mon, 30 Jun 2014 06:21:06 -0400 Subject: [PATCH 18/75] moreinfo? --- doc/plugins/trail/discussion.mdwn | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/plugins/trail/discussion.mdwn b/doc/plugins/trail/discussion.mdwn index ac07f8640..d37e5f7f9 100644 --- a/doc/plugins/trail/discussion.mdwn +++ b/doc/plugins/trail/discussion.mdwn @@ -137,3 +137,18 @@ My setup and test may very well have mistakes but perhaps someone using the trai I have removed a similar comment from the album discussion. --[[kjs]] + +> I would expect changing imgE.mdwn to rebuild album03.mdwn (because album03 +> inlines imgE) and vice versa (because imgE uses album03's \[[!meta title]]). +> +> I would not expect changing imgE.mdwn or album03.mdwn to affect album02 +> or imgC. +> +> I would also not expect changing index.mdwn to rebuild anything else +> unless there is a valid dependency reason to do so. +> +> Can you reproduce this problem in a wiki that does not contain anything +> private, and publish its git repo somewhere? (I realise photo galleries +> tend to be more personal/private than typical wikis, so you don't +> necessarily want to link the real thing - that's why my album demos +> tend to use dummy data). --[[smcv]] From 4e83442e6c50c212c236928b176442a7e320fab7 Mon Sep 17 00:00:00 2001 From: smcv Date: Mon, 30 Jun 2014 16:44:41 -0400 Subject: [PATCH 19/75] design-taste opinions? --- ...ical_name_for_equivalent_of_SQL_limit.mdwn | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn diff --git a/doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn b/doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn new file mode 100644 index 000000000..68d753f03 --- /dev/null +++ b/doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn @@ -0,0 +1,37 @@ +In [[todo/Option_linktext_for_pagestats_directive]] I wrote: + +> It's unfortunate that map and pagestats have different meanings for +> the show parameter. I'm tempted to propose a patch that adds something +> like limit (by analogy with SQL) or max as the canonical name for the +> "number of things to match" parameter, at which point a non-numeric show +> could mean [what [[spalax]] proposed]. + +It isn't immediately obvious whether `show` should be used like +`\[[!map show=title]]` or like `\[[!inline show=10]]`. I can't think of +any better names for the "which property to display" parameter that don't +have the problem of being a synonym for show so you can't easily tell which +is which, and I think that suggests that it might be better to rename the +"number of items to display" parameter instead. + +This would allow recycling the name `show` so that a non-numeric +value is interpreted analogous to `\[[!map show=title]]`, +for instance to solve [[todo/Option_linktext_for_pagestats_directive]]. + +If a committer (I think that just means Joey?) would review it, I'd be happy +to put together a patch that adds the chosen name to all the directives +that currently interpret `show` to mean "number of items", preferring the +new name but retaining compatibility for a numeric `show`. + +Some possibilities (using inline as my example directive here): + +* `\[[!inline limit=10]]` like SQL `select * from foo limit 10` +* `\[[!inline max-count=10]]` like `git log --max-count=10` +* `\[[!inline max=10]]` +* `\[[!inline n=10]]`, `\[[!inline num=10]]`, `\[[!inline number=10]]` + +Which of those do Joey/other contributors prefer? + +Or if keeping `show=10` is preferred, what should be the conventional name +for functionality like `\[[!map show=title]]`? + +I personally like the idea of `\[[!inline limit=10]]`. --[[smcv]] From 02bde3811e8801ae1168a653963bce084f2ea91f Mon Sep 17 00:00:00 2001 From: smcv Date: Mon, 30 Jun 2014 16:46:03 -0400 Subject: [PATCH 20/75] another possibility --- .../pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn b/doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn index 68d753f03..daa520d71 100644 --- a/doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn +++ b/doc/todo/pick_a_new_canonical_name_for_equivalent_of_SQL_limit.mdwn @@ -28,6 +28,7 @@ Some possibilities (using inline as my example directive here): * `\[[!inline max-count=10]]` like `git log --max-count=10` * `\[[!inline max=10]]` * `\[[!inline n=10]]`, `\[[!inline num=10]]`, `\[[!inline number=10]]` +* `\[[!inline count=10]]` Which of those do Joey/other contributors prefer? From 68b88d4b22317d2abd63221e2e396dd9bd243ac0 Mon Sep 17 00:00:00 2001 From: smcv Date: Tue, 1 Jul 2014 04:35:53 -0400 Subject: [PATCH 21/75] branch updated --- ...uld_support_uuid__44___date_variables.mdwn | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/doc/todo/edittemplate_should_support_uuid__44___date_variables.mdwn b/doc/todo/edittemplate_should_support_uuid__44___date_variables.mdwn index 4f83c8bf5..b85f3298b 100644 --- a/doc/todo/edittemplate_should_support_uuid__44___date_variables.mdwn +++ b/doc/todo/edittemplate_should_support_uuid__44___date_variables.mdwn @@ -46,3 +46,27 @@ Changes to the structure of `$pagestate{$registering_page}{edittemplate}{$pagesp >> v3/v5 UUIDs, please describe it and I'll try to suggest some >> better way based on that, maybe global configuration in `$config`. >> --[[smcv]] + +>>> [[!template id=gitbranch branch=smcv/ready/edittemplate + browse=http://git.pseudorandom.co.uk/smcv/ikiwiki.git/shortlog/refs/heads/ready/edittemplate + author="Jonathon Anderson, [[smcv]]"]] +>>> Here is a version of that branch that I would merge if I could. +>>> Changes since Jonathon's version: +>>> +>>> * only generate a UUID if needed +>>> * read `/proc/sys/kernel/random/uuid` instead of using [[!cpan UUID::Tiny]] +>>> if available, to avoid the dependency on at least Linux +>>> * remove v3/v5 UUID support since I don't really see the point, +>>> and if included, it would need a migration path for `$pagestate` +>>> * use RFC 3339 time format for `time` to make the timezone unambiguous +>>> * add `html_time` which is the output of `IkiWiki::displaytime`, e.g. +>>> a `