Skip to content

Commit 177e2f2

Browse files
chang-zhaokynan
andauthored
Add options to pagelist (#12)
So that limiting search depth, hash calculation and skipping ACL can be requested. Co-authored-by: Florian Rathgeber <[email protected]>
1 parent 90e915d commit 177e2f2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

dokuwikixmlrpc.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,16 @@ def append_page(self, page_id, text, summary='', minor=False):
247247
self._xmlrpc.dokuwiki.appendPage(page_id, text, params)
248248

249249
@checkerr
250-
def pagelist(self, namespace):
251-
"""Lists all pages within a given namespace."""
252-
return self._xmlrpc.dokuwiki.getPagelist(namespace, {})
250+
def pagelist(self, namespace, opts = {'depth': 0, 'hash': False, 'skipacl': False}):
251+
"""Lists all pages within a given namespace.
252+
253+
:param str namespace: The namespace to list pages for
254+
:param dict opts: Options (optional)
255+
* :depth: recursion level, default to 0, for all
256+
* :hash: if True, do the md5 sum of the content, defaults to False
257+
* :skipacl: if True, list everything regardless of ACL, defaults to False
258+
"""
259+
return self._xmlrpc.dokuwiki.getPagelist(namespace, opts)
253260

254261
@checkerr
255262
def all_pages(self):

0 commit comments

Comments
 (0)