From eac9c21d8b949fb77ab041a5feb91307eb5f0f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 22 Sep 2012 19:58:24 +0200 Subject: [PATCH] insert front page into process list --- moin2doku.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/moin2doku.py b/moin2doku.py index 7016311..a40a7ec 100755 --- a/moin2doku.py +++ b/moin2doku.py @@ -268,16 +268,17 @@ if input_file != None: else: 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 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: converted += 1 print "Processed %d files, converted %d" % (len(pages) + 1, converted)