From cf064d9410a9349ca594f89f23e95a969fdf19e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 22 Sep 2012 22:04:08 +0200 Subject: [PATCH] convert_editlog: take page as input --- moin2doku.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/moin2doku.py b/moin2doku.py index d4e6c39..c53e5cd 100755 --- a/moin2doku.py +++ b/moin2doku.py @@ -94,14 +94,12 @@ def print_help(): def wikiname(filename): return wikiutil.unquoteWikiname(basename(filename)) -def convert_editlog(pagedir, output = None, overwrite = False): - pagedir = os.path.abspath(pagedir) - print "pagedir: %s" % pagedir +def convert_editlog(page, output = None, overwrite = False): + pagedir = page.getPagePath() pagename = wikiname(pagedir) if not output: output = pagename - pagelog = os.path.join(pagedir, 'edit-log') - edit_log = editlog.EditLog(request, filename = pagelog) + edit_log = editlog.EditLog(request, page.getPagePath('edit-log')) changes = {} for log in edit_log: @@ -209,7 +207,7 @@ def convertfile(page, output = None, overwrite = False): copy_attachments(pagedir, ns) # convert edit-log, it's always present even if current page is not - convert_editlog(pagedir, output = output, overwrite = overwrite) + convert_editlog(page, output = output, overwrite = overwrite) # add to redirect.conf if filenames differ # and page must exist (no redirect for deleted pages)