Repository navigation
Expand file tree
/
Copy pathsettings.example.py
More file actions
65 lines (48 loc) · 1.65 KB
/
Copy pathsettings.example.py
File metadata and controls
65 lines (48 loc) · 1.65 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import logging
import os
from conversion_check import check_ands_rif_cs, check_iso_mcp
# Use `file-parent.ext` for converted files.
ADD_FOLDER_TO_FILE_NAME = True
ANDS_XML_START = """
<registryObjects xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ands.org.au/standards/rif-cs/registryObjects"
xsi:schemaLocation="http://ands.org.au/standards/rif-cs/registryObjects http://services.ands.org.au/documentation/rifcs/schema/registryObjects.xsd">
"""
ANDS_XML_STOP = '</registryObjects>'
# XSL types and where the output files should go.
# Both are relative to the base paths above.
CONVERSIONS = (
('ANDS_RIF-CS.xsl', 'ands_rif-cs', check_ands_rif_cs),
('DIF-ISO-3.3.xsl', 'iso', None),
('DIF-ISO-ANDS-3.3.xsl', 'iso-ands', None),
('DIF-ISO-ANZLIC-3.3.xsl', 'iso-anzlic', None),
('DIF-ISO-MCP-3.3.xsl', 'iso-mcp', check_iso_mcp),
)
#- file: %(pathname)s
# function: %(funcName)s
LOGGING_FORMAT = '''
- level: %(levelname)s
line: %(lineno)s
logger: %(name)s
message: |
%(message)s
time: %(asctime)s
'''.strip()
LOGGING_KWARGS = dict(
fromat=LOGGING_FORMAT,
level=logging.DEBUG
)
#
# File paths
#
BASE_PATH = os.getcwd()
#BASE_PATH = os.path.normpath(BASE_PATH)
ANDS_XML_FILE_NAME = os.path.join(BASE_PATH, 'AAD_RegistryObjects.xml')
ANDS_XML_FOLDER_PATH = os.path.join(BASE_PATH, 'output', 'ands_rif-cs')
# Where the DIF XML files can be found.
INPUT_PATH = os.path.join(BASE_PATH, 'input')
# Base path of where the converted XML should go.
OUTPUT_PATH = os.path.join(BASE_PATH, 'output')
# Base path of where the XML conversion files can be found.
XSL_PATH = os.path.join(BASE_PATH, 'xsl')