Description
The command line moin .... export dump ... copies all the underlay pages into the output directory.
The MoinDump page in this wiki and the newly created HelpOnMoinExportDump in the 1.7 master wiki say underlay pages are not copied. Including the underlay pages is rarely/never useful so the program should be fixed to operate per the docs.
Steps to reproduce
Run the moin ... export dump ... command without using the --page parameter to limit pages.
- Check the content of the output directory for underlay pages.
Example
As above.
Component selection
- /script/export/dump.py
Details
MoinMoin Version |
1.7rc3 |
OS and Version |
W/Vista |
Python Version |
2.5 |
Server Setup |
apache2 |
Server Details |
wsgi |
Language you are using the wiki in (set in the browser/UserPreferences) |
en |
Workaround
The following is based on the patch David Linke added to the MoinDump page in this wiki some time ago. A small enhancement adds the TitleIndex and WordIndex underlay pages to the output directory so the hardcoded dump theme works.
This patch is for moin 1.7rc3.
@@ -167,7 +167,15 @@ pages = [self.options.page] except: pages = [self.options.page] + else: + #remove underlay pages from list + pages = [pagename for pagename in pages if Page.Page(request, pagename).isStandardPage() ] + # add 2 underlay pages included in hardcoded theme + for pagename in ['TitleIndex', 'WordIndex']: + if pagename not in pages: + pages.append(pagename) + wikiutil.quoteWikinameURL = lambda pagename, qfn=wikiutil.quoteWikinameFS: (qfn(pagename) + HTML_SUFFIX) AttachFile.getAttachUrl = lambda pagename, filename, request, **kw: _attachment(request, pagename, filename, outputdir, **kw)
Note that edited underlay pages will be included.
If excluding edited underlay pages is desired, use this check and add FrontPage to the list of included underlay pages:
+ # Remove underlay and system pages from list, including edited underlay pages + pages = [pagename for pagename in pages if not Page.Page(request, pagename).isUnderlayPage()]
Discussion
Plan
- Priority:
- Assigned to:
- Status: