Debian Codegraph @

reports/burial_index.ll

raw
1 /*
2 * @progname burial_index.ll
3 * @version 1.0
4 * @author Nicklaus
5 * @category
6 * @output Text
7 * @description
8
9 Write an (unsorted) list of every person in the database
10 whose burial place contains a requested string
11 (which is the "town" that this report asks for).
12 It matches for the town anywhere in the place field.
13 so town can also be a state or county.
14 Personally, many of my relatives are from Iowa, so I like to make
15 a file of everyone buried in Iowa by entering Iowa to the prompt.
16
17
18 For MY typical record, which looks like
19 1 NAME First /Last/
20 1 BIRT
21 2 DATE 31 Dec 1900
22 1 DEAT
23 2 DATE 1 Jan 2000
24 1 BURI
25 2 PLAC town,county,state
26 3 ADDR cemeteryname (technically should be 2 ADDR acc. to new GEDCOM std.)
27
28 burial_index produces a line which looks like:
29
30 town,cemeteryname : Last, First (1900-2000)
31
32 If your database looks like:
33 1 BURI
34 2 PLAC cemeteryname,town,county,state
35 Then you'll probably want to change this report around a bit. Where
36 I do: "getel(parts,1)", you'll want: "getel(parts,2) getel(parts,1)".
37
38 For married women, it attempts to make their name what it may
39 be on their tombstone, that is, the surname of their first
40 husband, but includes a "nee" (= "born", but without the accent mark)
41 and the maiden name. This generally works great for the standard
42 once-married person. If a woman was married multiple times,
43 it puts all the husbands' surnames on there, starting with the first
44 husband, ending with the maiden surname. So my ancestor, Ruth,
45 maiden surname Matthews, who first married E. Scott, 2nd J. Alkire,
46 and 3rd married N. Bates, gets an entry like this:
47 Scott, a.k.a. Alkire, a.k.a. Bates, nee Matthews, Ruth (1831-1917)
48 where a.k.a. stands for "also known as". In doing all this,
49 it'll (possibly wrongly) assume both that a woman was married and took
50 on the father's surname for any family she was a parent in.
51 It's pretty tough to cover every case automatically, so you just
52 have to examine and edit the output when it's done if you care.
53
54 It is probably useful to run the output of this through Unix sort.
55 There is also a companion program, bury.c, which reformats the sorted
56 output to make it prettier.
57
58 An example is at: http://www.geocities.com/grandmashannon/iowa_burials.txt
59
60 Written 1999, Dennis Nicklaus, [email protected]
61
62 */
63
64 proc main ()
65 {
66 list(parts)
67 getstrmsg(town, "Enter town for burial index")
68 set (town,save(town))
69
70 print("Looking for ") print(town)
71
72 " Burials in " town "\n"
73 forindi(person, number) {
74 set(e,burial(person))
75
76 if (and(e,place(e))) {
77 if (index(place(e),town,1)) {
78 extractplaces(e,parts,np)
79 getel(parts,1)
80 call doSite(e) " : "
81 if (female(person)) {
82 /* print out married surnames of women */
83 set(nffam,nfamilies(person))
84 families(person,fam,sp,spi) {
85 surname(sp)
86 if (eq(spi,nffam)) {
87 /* the next IF is designed to catch a
88 case where a woman
89 had one child where the father wasn't
90 known and she didn't otherwise marry.
91 In that case, just her maiden
92 surname will appear, no "nee".
93 Odd cases will still circumvent this,
94 and make things look odd, such as
95 multiple kids by different unknown
96 fathers, ... I don't care. */
97
98 if (or(sp,gt(nffam,1))) {
99 ", nee "
100 }
101 }
102 else {
103 /* cover the case where the father's
104 name isn't known at all. Don't
105 print an extra "a.k.a".
106 odd cases will still look bad,
107 such as married, then mother with
108 unknown father. */
109 if (sp) {
110 ", a.k.a. "
111 }
112 }
113 }
114 }
115 fullname(person,0,0,80)
116 " (" year(birth(person)) "-" year(death(person)) ")"
117 "\n"
118 }
119 }
120 }
121 }
122 proc doSite(event)
123 {
124 fornodes(event, subnode) {
125 if (eq(0,strcmp("PLAC", tag(subnode)))) {
126 fornodes(subnode, subnode2) {
127 if (eq(0,strcmp("ADDR", tag(subnode2)))) {
128 ", " value(subnode2)
129 }}}}
130 }
131
132
133
134 /* bury.c.
135 Written 1999, Dennis Nicklaus, [email protected]
136 This program is used as a filter to help format the output of the
137 Lifelines report called "burial_index".
138 This program makes it so each cemetery name only appears once, with
139 the list of people buried in that cemetery listed below it.
140 You can compile this simply with:
141 cc -o bury bury.c
142 To use this, first run the burial index program, then run the
143 output of that through Unix's sort (just default arguments to sort),
144 then run it through this program. Suppose your output from burial
145 index is called "iowa.txt".
146 What I typically do is:
147 sort iowa.txt | bury > iowa.sort
148
149 How it works: It just compares each "cemetery name" with the previous one
150 in the file. If the cemetery name is different, it begins a new heading
151 for that cemetery, and lists under it each name that follows with the
152 same cemetery name. That's why it's important to run through sort, first.
153 For MY typical record, which looks like
154 1 NAME First /Last/
155 1 BIRT
156 2 DATE 31 Dec 1900
157 1 DEAT
158 2 DATE 1 Jan 2000
159 1 BURI
160 2 PLAC town,county,state
161 3 ADDR cemeteryname
162 The lifelines report burial_index produces a line which looks like:
163
164 town,cemetery : Last, First (1900-2000)
165
166 Since I generally make a index for a town, county, or state, running
167 sort with default (no) parameters works for me.
168 These sorted lines are the input to this program.
169 */
170 /* Start C code.
171 #include <stdio.h>
172 char getline (char *line)
173 {
174 char c;
175 int in=0;
176 c=getchar();
177 while ((c != '\n') && (c != EOF)){
178 line[in++] = c;
179 c=getchar();
180 }
181 line[in]=0;
182 return c;
183 }
184 main()
185 {
186 char line[200],last[200],*name;
187 int colon,in,maxcompare;
188 while(getline(line) != EOF){
189 colon = strcspn(line,":");
190 maxcompare = strlen(last);
191 if (colon > maxcompare) maxcompare = colon;
192 if (strncmp(line,last,maxcompare)){
193 strncpy(last,line,colon);
194 last[colon] = '\0';
195 printf("\n\t\t\t%s\n",last);
196 }
197 name = line+colon+1;
198 printf("%s\n",name);
199 }
200 }
201 end of C code */
202 /* Sample output after going through bury.c:
203 Carlisle, Carlisle Cemetery
204 Morgan, Chester Howell (1889-1900)
205 Morgan, Elmer Eugene (1861-1931)
206 Morgan, nee Dressler, Mary Alice (1861-1950)
207
208 Carroll
209 Walden, nee Lucey, Kathleen J. ``Kay'' (1918-1996)
210
211 Carroll, Mt. Olivet Cemetery
212 Foley, George (1878-1948)
213 Foley, nee Cuddy, Mary Cornelia (1885-1972)
214 Hamill, Robert J. (1872-1953)
215 Hamill, nee Lucey, Jennie Frances (1874-1940)
216 Lucey, Edward J. (1849-1922)
217 Lucey, George Raymond (1884-1971)
218 Lucey, Rosemary (1920-1951)
219 Lucey, nee Kemp, Clara Catherine (1887-1969)
220 Lucey, Jeremiah ``Jerry'' (1886-1914)
221 Lucey, John (1883-1914)
222 Lucey, Julia (-1914)
223 Lucey, Margaret (-1914)
224 Lucey, nee Grace, Mary Elizabeth (1856-1914)
225
226 */