| 1 |
/* |
| 2 |
* @progname places.ll |
| 3 |
* @version 5.0 |
| 4 |
* @author Olsen, Eggert |
| 5 |
* @category |
| 6 |
* @output Text |
| 7 |
* @description |
| 8 |
* |
| 9 |
* Prints out the value of all the lines in your database with the PLAC tag, |
| 10 |
* along with enough information so you can find the line easily. The purpose |
| 11 |
* of this report is so you can find all the places that seem wrong |
| 12 |
* (misspelled, ambiguous, incomplete [left out the county name], etc), and |
| 13 |
* double-check them or correct them. |
| 14 |
|
| 15 |
places |
| 16 |
|
| 17 |
Version 1, 25 Nov 1992 by David Olsen ([email protected]) |
| 18 |
Version 2, 3 Dec 1992 by Jim Eggert ([email protected]) |
| 19 |
(Changed numbers to real key values.) |
| 20 |
Version 3, 5 Feb 1993 by David Olsen ([email protected]) |
| 21 |
(Prints place names in reverse order. Runs faster.) |
| 22 |
Version 4, 13 Feb 1993 by Jim Eggert ([email protected]) |
| 23 |
(Prints place names in regular or reverse order.) |
| 24 |
Version 5, 1 Sep 1993 by Jim Eggert ([email protected]) |
| 25 |
(Fixes a bug involving families with no parents) |
| 26 |
|
| 27 |
Report program for LifeLines v. 2.3.3. |
| 28 |
|
| 29 |
Prints out the value of all the lines in your database with the PLAC |
| 30 |
tag, along with enough information so you can find the line easily. |
| 31 |
The places are printed either exactly as they appear in the database |
| 32 |
(e.g. Madison, Dane, Wisconsin) or in reverse order (e.g. Wisconsin, |
| 33 |
Dane, Madison). The purpose of this report is so you can find all the |
| 34 |
places that seem wrong (mispelled, ambiguous, incomplete, etc.), and |
| 35 |
double-check them or correct them. |
| 36 |
|
| 37 |
The places are printed out in the order that they appear in the |
| 38 |
database, so the report is not very useful in its native form. To |
| 39 |
make it more useful, run the output file through the program 'sort', |
| 40 |
making it much easier to spot incorrect names. For example, if you |
| 41 |
have 100 entries within Middlesex County, Massachusetts, but in one of |
| 42 |
them you mispelled Middlesex as Middlesx, it will be very easy to spot |
| 43 |
this in the sorted output. |
| 44 |
|
| 45 |
If the place name is part of an individual record, it is followed by |
| 46 |
the key and name of the individual and by the hierarchy of tags |
| 47 |
between the INDI tag and the PLAC tag (usually just a single tag, such |
| 48 |
as BIRT or DEAT). If the place name is part of a family record, it is |
| 49 |
followed by the family key, the key and name of the husband (or wife |
| 50 |
if there is no husband, or first child if there is no parent), the |
| 51 |
relationship in the family of that person, and the hierarchy of tags |
| 52 |
between the FAM tag and the PLAC tag (usually just the single tag |
| 53 |
MARR). |
| 54 |
|
| 55 |
Some sample output (in reverse order) that has already been sorted: |
| 56 |
|
| 57 |
California, Los Angeles, Long Beach | I130 Newel Knight YOUNG | DEAT |
| 58 |
California, Los Angeles, Los Angeles | I6811 Gunella CHRISTIANSEN | DEAT |
| 59 |
California, Los Angeles, Newhall | I836 Cena Elizabeth HAWKINS | DEAT |
| 60 |
California, Los Angeles, San Fernando | I836 Cena Elizabeth HAWKINS | BURI |
| 61 |
California, Napa, Napa | I1439 Cora Anna BEAL | DEAT |
| 62 |
California, Riverside, Riverside | F328 (I1370 Benjamin BERRY, husb) | MARR |
| 63 |
California, San Bernadino, | I6843 Emily LUDVIGSEN | BURI |
| 64 |
California, San Bernadino, San Bernadino | I1364 Francis LYTLE | DEAT |
| 65 |
California, San Bernadino, San Bernadino | I1365 Sophronia Jane MILLETT | DEAT |
| 66 |
California, San Bernadino, San Bernadino | I1367 Nancy Ellen LYTLE | BIRT |
| 67 |
California, San Bernadino, San Bernadino | I1369 Hulda Lorene LYTLE | BIRT |
| 68 |
California, San Bernadino, San Bernadino | I694 Mary Ann HENRY | BIRT |
| 69 |
California, Shasta, Redding | I1378 Eliza Lemira MILLETT | DEAT |
| 70 |
California, Whittier, Rose Hills | I2318 Zetta Fern MORTENSEN | BURI |
| 71 |
Canada, Nova Scotia, Cape Breton | F184 (I749 Ezra KING, husb) | MARR |
| 72 |
Canada, Nova Scotia, Cape Breton | I749 Ezra KING | DEAT |
| 73 |
|
| 74 |
|
| 75 |
*/ |
| 76 |
|
| 77 |
proc main() |
| 78 |
{ |
| 79 |
list(tag_stack) |
| 80 |
list(place_names) |
| 81 |
|
| 82 |
set(reverse,0) |
| 83 |
getstrmsg(yesno,"Reverse place name components? (y/n)") |
| 84 |
if (strlen(yesno)) { |
| 85 |
if (not(strcmp(upper(trim(yesno,1)),"Y"))) { set(reverse,1) } |
| 86 |
} |
| 87 |
print("Printing all places.\n") |
| 88 |
print("Be patient. This may take a while.\n") |
| 89 |
|
| 90 |
forindi (person, id) { |
| 91 |
|
| 92 |
traverse (inode(person), node, level) { |
| 93 |
|
| 94 |
setel(tag_stack, add(level, 1), tag(node)) |
| 95 |
|
| 96 |
if (eq(strcmp(tag(node), "PLAC"), 0)) { |
| 97 |
extractplaces(node, place_names, num_places) |
| 98 |
if (reverse) { |
| 99 |
pop(place_names) |
| 100 |
while (p, pop(place_names)) { ", " p } |
| 101 |
} |
| 102 |
else { |
| 103 |
dequeue(place_names) |
| 104 |
while (p, dequeue(place_names)) { ", " p } |
| 105 |
} |
| 106 |
" | " key(person) " " name(person) " |" |
| 107 |
forlist (tag_stack, tag, tag_number) { |
| 108 |
if (and(gt(tag_number, 1), le(tag_number, level))) { " " tag } |
| 109 |
} |
| 110 |
"\n" |
| 111 |
} |
| 112 |
} |
| 113 |
} |
| 114 |
|
| 115 |
forfam (fam, fnum) { |
| 116 |
|
| 117 |
traverse (fnode(fam), node, level) { |
| 118 |
setel(tag_stack, add(level, 1), tag(node)) |
| 119 |
|
| 120 |
if (eq(strcmp(tag(node), "PLAC"), 0)) { |
| 121 |
extractplaces(node, place_names, num_places) |
| 122 |
if (reverse) { |
| 123 |
pop(place_names) |
| 124 |
while (p, pop(place_names)) { ", " p } |
| 125 |
} |
| 126 |
else { |
| 127 |
dequeue(place_names) |
| 128 |
while (p, dequeue(place_names)) { ", " p } |
| 129 |
} |
| 130 |
" | " key(fam) |
| 131 |
" (" |
| 132 |
if (person,husband(fam)) { set(relation,", husb") } |
| 133 |
elsif (person,wife(fam)) { set(relation,", wife") } |
| 134 |
else { |
| 135 |
children(fam,child,cnum) { |
| 136 |
if (eq(cnum,1)) { |
| 137 |
set(person,child) |
| 138 |
set(relation,", chil") |
| 139 |
} |
| 140 |
} |
| 141 |
} |
| 142 |
if (person) { |
| 143 |
key(person) " " name(person) relation |
| 144 |
} |
| 145 |
") |" |
| 146 |
forlist (tag_stack, tag, tag_number) { |
| 147 |
if (and(gt(tag_number, 1), le(tag_number, level))) { " " tag } |
| 148 |
} |
| 149 |
"\n" |
| 150 |
} |
| 151 |
} |
| 152 |
} |
| 153 |
} |