PageDicts

Description

Deprecated in favor of MacroMarket/DictColumns

Download & Release Notes

Download

Release Version

Moin Version

Release Notes

PageDicts-0.6.py

0.6

1.9.3

fixed migration from 1.8 to 1.9

PageDicts-0.5.py

0.5

1.8 rc1

changed the DataBrowserWidget  return tmp.toHTML()  to  return tmp.render() 

PageDicts-0.4.py

0.4

1.6.3 / 1.7.0

only fix for first reported bug

PageDicts-0.3.py

0.3

1.5

PageDicts-0.2.py

0.2

PageDicts.py

Usage

Example

[[PageDicts(Bug, Description, Status, Status ~= open)]] This will show all pages which have a title like Bug, with dict keys Description and Status and which have a Status matching Open.

MichaelCohen

License

Bugs

  1. Line 85 in version 0.2 and 0.3 does 'conditions.append(c)'. This should be 'conditions.append(condition)'. This bug will cause the macro to crash
    • fixed with version 0.4
  2. If you add a status/key that is not exist in one of the filtered/searched subpages, the macro generates a KeyError. It should be more fault tolerant and not parse the specific subpage (see traceback.html ).

  3. With MoinMoin Version 1.8.2 there is an attribute error. check out this traceback. Solution is to use the new Macro/CollectLists Macro from ReimarBauer witch has similar functions. Download: CollectLists.py

Discussion

I'm using this macro for something like generating a table overview about many articels/projcets (every articel is a single wikipage with some dicts and additional text; see http://lotek.heavy.ch/PageDictsExample) .

I would need the following add-ons:

thx -- MarcelHäfner 2008-06-24 08:11:47

(!) It looks to me to be a good idea to use the argument parser for that macro.

Hi

I have added a similiar tool CollectLists.py which supports the column filter of the databrowser widget. (It is work in progress)

cheers Reimar


Hi,

I've changed a bit in your script to suit my needs:

   1     results = request.rootpage.getPageList(filter=re.compile(needle).search)
   2     results.sort()

became

   1     from MoinMoin import search # place this somewhere more appropriate 
   2     results = [p.page_name for p in search.searchPages(request, needle, sort='page_name').hits]

. This way i use the XapianIntegration engine in the background (which saves me quite a lot). I can now use the PageDicts macro like this:

<<PageDicts(CategoryServer,naam,ip,doel,naam!~=PAGE)>>

or even use any regular expression to match page content.

On a wiki with over 10.000 pages this still takes roughly ... well... it appears instantly.

RemcoBoerma

MoinMoin: MacroMarket/PageDicts (last edited 2011-07-19 12:00:26 by RemcoBoerma)