1.1 --- a/convert.py Thu Dec 20 00:49:03 2012 +0100
1.2 +++ b/convert.py Sun Feb 17 20:33:21 2013 +0100
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Confluence XML dump conversion to a MoinMoin-compatible representation.
1.6
1.7 -Copyright (C) 2012 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2012, 2013 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This software is free software; you can redistribute it and/or
1.11 modify it under the terms of the GNU General Public License as
1.12 @@ -270,7 +270,7 @@
1.13
1.14 write(join(pages_dir, commentid, "pagetitle"), "%s/%04d" % (title, position))
1.15
1.16 -def sort_manifest(pages_dir, pageid, output=None):
1.17 +def sort_manifest(pages_dir, pageid, output=None, no_translate=False):
1.18
1.19 """
1.20 Using the given 'pageid', locate the manifest for the page and any page
1.21 @@ -327,7 +327,7 @@
1.22
1.23 # Add child page information to the content.
1.24
1.25 - if exists(children):
1.26 + if exists(children) and not no_translate:
1.27 child_pages = []
1.28 child_page_names = [x for x in read(children).split("\n") if x]
1.29 child_page_names.sort()
1.30 @@ -339,7 +339,7 @@
1.31
1.32 # Add comments to the content.
1.33
1.34 - if exists(comments) and title:
1.35 + if exists(comments) and title and not no_translate:
1.36 append(filename, comment_section % title)
1.37
1.38 finally:
1.39 @@ -436,7 +436,7 @@
1.40 append(output_manifest, "MoinMoinPackage|1\n")
1.41
1.42 for pageid in listdir(pages_dir):
1.43 - sort_manifest(pages_dir, pageid, output_manifest)
1.44 + sort_manifest(pages_dir, pageid, output_manifest, no_translate)
1.45
1.46 # Write the page package.
1.47