-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathproc
141 lines (89 loc) · 4.06 KB
/
proc
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
My current process...this is specifically for processing September 2013
cd ~/morsulus/2013/1309
cp ~/morsulus/bnew_sql.db oanda1309.db.bak
cd 13-09-pp2-XML
cp ../oanda1309.db.bak .
xml2actions 13-09.xml > 1309.act
#process-actions -i 1309.act -o 1309.db -err -d 201309
cp oanda1309.db.bak oanda1309.db
apply_actions -db oanda1309.db -date 201309 -i 1309.act
all done
dump_db -db oanda1309.db -armonly -regdate 201309 > 1309arm.db
DISPLAY=/tmp/launch-TrOZdp/org.macosforge.xquartz:0 nohup index 1309arm.db
cd ~/morsulus/2013/1309
xlate.pl -d 1309arm.db
oldcheck.pl 201309 1309arm.db
merge_descs -db oanda1309.db -i 1309arm.db
mkdir checks
(cd checks;new_run_checks ../oanda1309.db 201309)
(cd ~/morsulus/checks; new_run_checks ../bnew_sql.db 201308)
bbedit checks ~/morsulus/checks
dump_db -db oanda1309.db | sortdescs.pl | sortnotes.pl | sortdbf.pl > sorted.db
(cd ~/aux/dbhistory; bzip2 < ../oanda_sql.db > 201308sql.db.bz2)
cp sorted.db ~/aux/oanda.db
cp oanda1309.db ~/aux/oanda_sql.db
...the old process...
The process, given the XML file yy-mm.xml and hard copy of the LoAR:
0. Use xmlcat.pl to merge XML files -- not necessary with xml2actions...
1. Extract the actions from the XML file.
xml2act yy-mm.xml > yymm.act
Address errors and messages. This may require modifying tables in the script.
xml2actions should be tried first as it uses an XML parser and gets more
fiddly bits. Command usage is identical.
1a. Examine the .act file for all disposition items. Rewrite actions as appropriate.
2. Convert actions to DB format.
act2db.pl yymm yymm.act | sortdb3f.pl > yymm.db
Address errors and messages. This may require modifying the script to deal
with new formats of input data, or regularizing the input file.
process-actions -d yymm -i yymm.act -o yymm.db is the new version
If funny quotes show up, run .act file through ascii_quote.pl.
Then try check_blazons (in ~/morsulus/trunk) to verify and fillin descs
3. Mark up the LoAR hard copy to highlight any items of interest. These
will mostly be items that affect existing registrations, including:
transfers
reblazons
releases
changes
redesignations
conversions
etc.
Also note items with non-ASCII characters as well as holding names.
4. Compare yymm.db with the LoAR line by line.
enclose branch designators in angle brackets <>
change branch name types to BN
check that accents and apostrophes converted correctly
check that kingdom IDs are correct
ensure that holding names are noted (Holding Name)
ensure that Important Non_SCA foo is so noted
5. Index yymm.db, either using the indextb tool (command line only) or
cat_tool (Tk GUI).
index yymm.db (after starting X)
indexer -i yymm.db
6. Check the level of detail in the indexing.
xlate.pl -d yymm.db -e aux/old_new.desc -c aux/mike.cat > err.db
Examine err.db. Either modify err.db and merge in the changes or use cat_tool
to update the indexing.
Update: make that
check_indexing -i yymm.db -o err.db
7. Run the date through gpna.pl to abbreviate features (automatic in cat_tool).
8. Edit check.pl to accept the new date then run it over the data. Fix any
problems noted.
check.pl yymm.db -- using
oldcheck.pl yyyymm yymm.db
until I get the strict one working
9. If there is an errata letter, directly edit the master database to
incorporate corrections.
10. Run nc.pl to incorporate name changes/corrections into the database.
nc.pl yymm.db aux/oanda.db > updated.db
make that nc2...
For each name change or correction, there will be a line indicating the number
of existing entries modified. If the number is zero, then the old name was
probably mistyped in the LoAR. Investigate, (probably) fix yymm.db, and rerun.
11. Resort the database.
sortdescs.pl updated.db | sortnotes.pl | sortdbf.pl > sorted.db
12. Clean up armory changes, retained names, and such in sorted.db (see items
highlighted in step 3).
13. Update the copyright notice in 'aux/notice.' - fixnotice generates the
stuff that changes. ...except the year in the copyright notice...
14. Run various checks and compare with last month's output
run_checks sorted.db yyyymm