-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.py
More file actions
29 lines (25 loc) · 1.22 KB
/
index.py
File metadata and controls
29 lines (25 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Licensed under the MIT license: https://github.com/codeclou/advanced-codeblocks-cloud-migration-helper/blob/main/LICENSE
from argparse import ArgumentParser
from lib.macro_storage_format_parser import MacroStorageFormatParser
print("======================================")
print(" ADVANCED CODEBLOCKS MIGRATION HELPER")
print("======================================")
print(" ")
#
# COMMANDLINE ARGUMENTS
#
parser = ArgumentParser()
parser.add_argument("-if", "--inputfile", dest="inputfile",
help="the inputfile, a confluence page in storage format XML", metavar="INPUTFILE", required=True)
parser.add_argument("-of", "--outputfile", dest="outputfile",
help="the outputfile, a confluence page in storage format XML", metavar="OUTPUTFILE", required=True)
parser.add_argument("-ek", "--extension-key", dest="extensionkey",
help="the extension key, is unique to your installation, see the online documentation for more info", metavar="EXTENSIONKEY", required=True)
args = parser.parse_args()
#
# RUN TRANSFORMER
#
print("extension key part: " + args.extensionkey)
print(" ")
parser = MacroStorageFormatParser(args.inputfile, args.outputfile, args.extensionkey, False)
parser.transform();