1.1 --- a/moinconvert Tue Oct 26 01:32:32 2021 +0200
1.2 +++ b/moinconvert Fri Jun 03 18:42:46 2022 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Moin wiki format converter.
1.6
1.7 -Copyright (C) 2018, 2019 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2018, 2019, 2021 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -96,6 +96,7 @@
1.13 mappings = []
1.14 output_dirs = []
1.15 output_encodings = []
1.16 + output_page_seps = []
1.17 pagenames = []
1.18 root_pagenames = []
1.19 theme_names = []
1.20 @@ -215,6 +216,12 @@
1.21 l = output_encodings
1.22 continue
1.23
1.24 + # Switch to collecting output page hierarchy separators.
1.25 +
1.26 + elif arg == "--output-page-sep":
1.27 + l = output_page_seps
1.28 + continue
1.29 +
1.30 # Switch to collecting page names.
1.31
1.32 elif arg == "--pagename":
1.33 @@ -271,6 +278,7 @@
1.34 "output_encoding" : getvalue(output_encodings),
1.35 "output_format" : format,
1.36 "output_filename" : output_dir,
1.37 + "output_separator" : getvalue(output_page_seps),
1.38 "root_pagename" : getvalue(root_pagenames, "FrontPage"),
1.39 "theme_name" : not fragment and \
1.40 "%s.%s" % (getvalue(theme_names, "default"), format) or None,
1.41 @@ -407,6 +415,8 @@
1.42 files
1.43 --output-encoding Indicate the character encoding used in serialised document
1.44 files
1.45 +--output-page-sep Indicate the separator used in filenames to encode
1.46 + hierarchical relationships (subpages and descendant pages)
1.47 --theme Indicate a theme for serialised documents, typically
1.48 requiring an output directory to be useful
1.49 --tree Produce a document tree representation on standard output