insert front page into process list
This commit is contained in:
parent
7b772407b0
commit
eac9c21d8b
1 changed files with 9 additions and 8 deletions
17
moin2doku.py
17
moin2doku.py
|
@ -268,16 +268,17 @@ if input_file != None:
|
||||||
else:
|
else:
|
||||||
converted = 0
|
converted = 0
|
||||||
|
|
||||||
# special: process frontpage so that MoinMoin frontpage gets saved as DokuWiki frontpage
|
|
||||||
page = wikiutil.getFrontPage(request)
|
|
||||||
res = convertfile(page.getPagePath(), output = dw.getId(), overwrite = overwrite)
|
|
||||||
if res != None:
|
|
||||||
converted += 1
|
|
||||||
|
|
||||||
# get list of all pages in wiki
|
# get list of all pages in wiki
|
||||||
pages = request.rootpage.getPageDict(user = '', exists = not convert_attic)
|
pages = request.rootpage.getPageDict(user = '', exists = not convert_attic)
|
||||||
for page in pages.values():
|
|
||||||
res = convertfile(page.getPagePath(), overwrite = overwrite)
|
# insert frontpage,
|
||||||
|
# so that MoinMoin frontpage gets saved as DokuWiki frontpage based on their configs
|
||||||
|
frontpage = wikiutil.getFrontPage(request)
|
||||||
|
del pages[frontpage.page_name]
|
||||||
|
pages[dw.getId()] = frontpage
|
||||||
|
|
||||||
|
for pagename, page in pages.items():
|
||||||
|
res = convertfile(page.getPagePath(), output = pagename, overwrite = overwrite)
|
||||||
if res != None:
|
if res != None:
|
||||||
converted += 1
|
converted += 1
|
||||||
print "Processed %d files, converted %d" % (len(pages) + 1, converted)
|
print "Processed %d files, converted %d" % (len(pages) + 1, converted)
|
||||||
|
|
Loading…
Reference in a new issue