From 02aab1da905f7a922a221b0d096cea995a7a55b1 Mon Sep 17 00:00:00 2001 From: chrysn Date: Thu, 15 Mar 2012 21:31:51 -0400 Subject: [PATCH] 2/3 solution to map plugin sorting --- .../sort_parameter_for_map_plugin_and_directive.mdwn | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn b/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn index 3b4ec73ea..0ef8be97f 100644 --- a/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn +++ b/doc/todo/sort_parameter_for_map_plugin_and_directive.mdwn @@ -38,4 +38,16 @@ I may hack one in from `inline` if it seem within my skill level. > > --[[chrysn]] +------ + +> i now do have two thirds of the solution: +> +> * i've patched the map plugin to accept a sort parameter (as usual in pagespec directives) and a strategy parameter, which is used to choose how the tree should be sorted. it turned out that the changes required were minimal; even precautions for having to display a node's parents although they are not supposed to be shown by themselves are present (they're decorated with the mapparent css class). +> * i've implemented algorithms for the described strategies, but in python -- i tried in perl, but i'm not versed well enough in perl for such things. the "force" strategy works in perl but i'm afraid it depends on more than the perl sort algorithm to be just stable. +> * if someone could port the three strategies implemented in python to perl, we'd have a complete patch for this. +> +> when comparing the implementation to my notes above, you'll see that there is a minor difference in the "force" algorithm -- my code doesn't generate the "parent" entries (**c** (c/1) a b c **a** (a/1) **c** (c/2) in the example), but they're generated by the already existing output code. +> +> the code can be found at [[incomplete_patch]] and [[python_algorithms]]. --[[chrysn]] + [[!tag wishlist]] -- 2.26.2