Mercurial > wikked
comparison manage.py @ 123:ac6166453d77
Added ability to get page revisions from the command-line.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 23 Nov 2013 13:31:35 -0800 |
parents | 7c7f7eca51ae |
children | ace48040b01d |
comparison
equal
deleted
inserted
replaced
122:17188020e87e | 123:ac6166453d77 |
---|---|
55 for url in wiki.db.getPageUrls(): | 55 for url in wiki.db.getPageUrls(): |
56 print url | 56 print url |
57 | 57 |
58 | 58 |
59 @manager.command | 59 @manager.command |
60 def get(url, resolve=False): | 60 def get(url, force_resolve=False, rev=None): |
61 """ Gets a page that matches the given URL. | 61 """ Gets a page that matches the given URL. |
62 """ | 62 """ |
63 page = wiki.getPage(url) | 63 page = wiki.getPage(url) |
64 if resolve: | 64 if force_resolve: |
65 page._force_resolve = True | 65 page._force_resolve = True |
66 if rev is not None: | |
67 print page.getRevision(rev) | |
68 return | |
66 print page.text | 69 print page.text |
67 | 70 |
68 | 71 |
69 @manager.command | 72 @manager.command |
70 def linksfrom(url): | 73 def linksfrom(url): |