comparison manage.py @ 129:ace48040b01d

Added CLI option to list pages from the file-system.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 27 Nov 2013 23:28:46 -0800
parents ac6166453d77
children 9d22cf4d2412
comparison
equal deleted inserted replaced
128:cfa92a67a31f 129:ace48040b01d
47 """ 47 """
48 wiki.update(url, cache_ext_data=cache) 48 wiki.update(url, cache_ext_data=cache)
49 49
50 50
51 @manager.command 51 @manager.command
52 def list(): 52 def list(fs=False):
53 """ Lists page names in the wiki. 53 """ Lists page names in the wiki.
54 """ 54 """
55 for url in wiki.db.getPageUrls(): 55 if fs:
56 print url 56 for pi in wiki.fs.getPageInfos():
57 print pi.url
58 else:
59 for url in wiki.db.getPageUrls():
60 print url
57 61
58 62
59 @manager.command 63 @manager.command
60 def get(url, force_resolve=False, rev=None): 64 def get(url, force_resolve=False, rev=None):
61 """ Gets a page that matches the given URL. 65 """ Gets a page that matches the given URL.