-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsampleConfig.yaml
76 lines (60 loc) · 2.28 KB
/
sampleConfig.yaml
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
66
67
68
69
70
71
72
73
74
# Copyright 2014 Douglas J. Norment for SourceApprentice
# http://www.sourceapprentice.com
Declarations:
LogLevels:
- &CRITICAL 50
- &ERROR 40
- &WARNING 30
- &INFO 20
- &DEBUG 10
- &NOTSET 0
Control:
ReportCollectorClass: SampleDataCollectorModule.SampleDataCollector
DumpDataStructures: True
LogLevel: *DEBUG
InputPath: InputReports
WorkPath: WorkPath
ColumnStructures:
ReportName1: # Multiple reports allowed in order to merge reports into completed XLS file
dataGroup1:
columnName1: [0,1] # ( newDataColumnNumber, reportColumnNumber, start, length )
# reportColumnNumber according to whitespace parsing; '-' if column can't be parsed by whitespace
# start and length are optional; if start is given and length is not, then from start until first whitespace
columnName2: [1,-,15]
dataGroup2:
columnName3: [0,2]
ReportName2:
dataGroup3:
columnName1: [0,1]
Regex:
# regexName1: '%'
# Instructions to process batch of files, processed from top to bottom
ProcessBatch:
# All data will go into Data[ dataElement ]
processFile:
report_name1:
exclude_targets: [target1,target2,]
exclude_regexes: [regex_name,]
directives:
- [ Directive, dataGroupName, ... ] # Runs directive on all lines in file
- [ matchTarget, dataGroup1, target, ]
- [ matchRegEx, dataGroup2, regex_name, ]
processFile:
report_name2:
exclude_targets: [target1,target2, ]
exclude_regexes: [regex_name, ]
directives:
- [ Directive, dataGroupName, ... ] # Runs directive on all lines in file
GetLookupTable: [ fileName: commissionTable.csv, lookup_name: thisLookupName ]
processData:
dataElementName1:
directives:
- [ addLookupMatchedToColumn, dataGroup1, newColumnName1, columnName1 ]
# Now this will be the trick … can I add a new line with a split commission?
- [ addSplitLookupMatchedToColumns, dataGroup2, matchOnColumnName, lookupTableName, newColumnName ]
WriteBatch:
- [ newWorkbook, newWorkbook.xlsx ]
- [ newTab, tabName ]
- [ writeDataGroup, dataGroup1 ]
- [ exec, writeDataGroup1, dataGroup1 ]
- [ exec, formatTab, tabName ]