File: PageList.py

package info (click to toggle)
moin 1.9.8-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 75,060 kB
  • ctags: 43,795
  • sloc: python: 118,348; java: 10,704; php: 2,374; perl: 1,572; xml: 371; makefile: 213; sh: 79; sed: 5
file content (25 lines) | stat: -rw-r--r-- 758 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - PageList

    print a list of pages whose title matches the search term

    @copyright: @copyright: 2001-2003 Juergen Hermann <jh@web.de>,
                2003-2008 MoinMoin:ThomasWaldmann
                2008 MoinMoin:ReimarBauer
    @license: GNU GPL, see COPYING for details.
"""

Dependencies = ["namespace"]
from MoinMoin import search, wikiutil
from MoinMoin.macro.FullSearch import execute as fs_execute

def execute(macro, args):
    _ = macro._
    case = 0

    # If called with empty or no argument, default to regex search for .+, the full page list.
    needle = wikiutil.get_unicode(macro.request, args, 'needle', u'regex:.+')

    return fs_execute(macro, needle, titlesearch=True, case=case)