| 1 |
/* |
| 2 |
* @progname rllgen.ll |
| 3 |
* @version 1.0 |
| 4 |
* @author Eggert |
| 5 |
* @category |
| 6 |
* @output RLL format |
| 7 |
* @description |
| 8 |
|
| 9 |
A LifeLines report program to aid in the generation of |
| 10 |
Roots Location List (RLL) submissions. |
| 11 |
Given a person, this generates a RLL-like submission for that person and |
| 12 |
his/her ancestors. The output will likely need considerable hand editing, |
| 13 |
but that is how it is. If you need to know what the RLL is, I have enclosed |
| 14 |
a description at the end of this file. |
| 15 |
|
| 16 |
|
| 17 |
Version 1, 18 November 1994, by Jim Eggert, [email protected] |
| 18 |
Requires LifeLines 3.0.1 or higher |
| 19 |
|
| 20 |
This program will work better if you follow strict placename |
| 21 |
conventions. You should probably run the places report program first |
| 22 |
to see if your placenames are in good shape. |
| 23 |
|
| 24 |
Here's what you will need to do by hand (you can consider this a list |
| 25 |
of desired features for future versions of this report program): |
| 26 |
|
| 27 |
BEFORE YOU RUN THE PROGRAM: |
| 28 |
|
| 29 |
Change the routine write_rll_header() to use your submitter tag, name, |
| 30 |
and address. You may also want to change the personset calculation in |
| 31 |
the beginning of the main routine. |
| 32 |
|
| 33 |
AFTER YOU RUN THE PROGRAM: |
| 34 |
|
| 35 |
Sort the location portion of the output file. |
| 36 |
Eliminate empty or useless location lines. |
| 37 |
Use RLL-standard abbreviations for placenames. |
| 38 |
- get FAMILY ABBREV as per instructions at end of this file. |
| 39 |
Combine duplicate location lines where appropriate. |
| 40 |
Check check check. |
| 41 |
Send the final product to the RLL maintainer. |
| 42 |
- see the end of this file. |
| 43 |
|
| 44 |
*/ |
| 45 |
|
| 46 |
global(placefirst) |
| 47 |
global(placelast) |
| 48 |
global(placelist) |
| 49 |
global(submitter_tag) |
| 50 |
|
| 51 |
/* write_rll_header sets the submitter tag and |
| 52 |
writes a little header for the RLL list maintainer |
| 53 |
*/ |
| 54 |
|
| 55 |
proc write_rll_header() { |
| 56 |
set(submitter_tag,"jqpublic") |
| 57 |
|
| 58 |
"Roots Location List (RLL) submission of " date(gettoday()) |
| 59 |
" by John Q. Public\n\n" |
| 60 |
submitter_tag |
| 61 |
col(12) "John Q. Public, [email protected]\n" |
| 62 |
col(12) "1234 North Maple, Homesville, OX 12345-6789, USA\n\n" |
| 63 |
} |
| 64 |
|
| 65 |
|
| 66 |
proc addplace(node) { |
| 67 |
set(placename,save(value(node))) |
| 68 |
set(pyear,atoi(year(parent(node)))) |
| 69 |
if (not(pyear)) { set(pyear,neg(1)) } |
| 70 |
set(firstyear,lookup(placefirst,placename)) |
| 71 |
if (and(gt(firstyear,0),gt(pyear,0))) { |
| 72 |
set(lastyear,lookup(placelast,placename)) |
| 73 |
if (lt(pyear,firstyear)) { insert(placefirst,placename,pyear) } |
| 74 |
elsif (gt(pyear,lastyear)) { insert(placelast,placename,pyear) } |
| 75 |
} |
| 76 |
if (and(lt(firstyear,0),gt(pyear,0))) { |
| 77 |
insert(placefirst,placename,pyear) |
| 78 |
insert(placelast,placename,pyear) |
| 79 |
} |
| 80 |
if (eq(firstyear,0)) { |
| 81 |
insert(placefirst,placename,pyear) |
| 82 |
insert(placelast,placename,pyear) |
| 83 |
enqueue(placelist,placename) |
| 84 |
} |
| 85 |
} |
| 86 |
|
| 87 |
/* write_rll_entry writes one line in the rll submission */ |
| 88 |
|
| 89 |
proc write_rll_entry(placename) { |
| 90 |
list(tokenlist) |
| 91 |
set(firstyear,lookup(placefirst,placename)) |
| 92 |
set(lastyear,lookup(placelast,placename)) |
| 93 |
extracttokens(placename,tokenlist,ntokens,",") |
| 94 |
set(comma,0) |
| 95 |
while(token,pop(tokenlist)) { |
| 96 |
if(comma) { "," } |
| 97 |
token |
| 98 |
set(comma,1) |
| 99 |
} |
| 100 |
" " |
| 101 |
if (gt(firstyear,0)) { |
| 102 |
d(firstyear) |
| 103 |
if (gt(lastyear,firstyear)) { "-" d(lastyear) } |
| 104 |
" " |
| 105 |
} |
| 106 |
submitter_tag "\n" |
| 107 |
} |
| 108 |
|
| 109 |
|
| 110 |
proc main() { |
| 111 |
table(placefirst) |
| 112 |
table(placelast) |
| 113 |
indiset(personset) |
| 114 |
list(placelist) |
| 115 |
|
| 116 |
getindi(person) |
| 117 |
print("Forming set...") |
| 118 |
addtoset(personset,person,0) |
| 119 |
set(personset,ancestorset(personset)) |
| 120 |
addtoset(personset,person,0) |
| 121 |
print("done\nComputing places...") |
| 122 |
set(nextpnum,0) |
| 123 |
|
| 124 |
forindiset (personset, person, pval, pnum) { |
| 125 |
if (ge(pnum,nextpnum)) { |
| 126 |
print(" ",d(pnum)) |
| 127 |
set(nextpnum,add(nextpnum,100)) |
| 128 |
} |
| 129 |
traverse (inode(person), node, level) { |
| 130 |
|
| 131 |
if (eq(strcmp(tag(node), "PLAC"), 0)) { call addplace(node) } |
| 132 |
} |
| 133 |
|
| 134 |
families (person, fam, sp, fnum) { |
| 135 |
if (or(not(husband(fam)), eq(person, husband(fam)))) { |
| 136 |
|
| 137 |
traverse (fnode(fam), node, level) { |
| 138 |
|
| 139 |
if (eq(strcmp(tag(node), "PLAC"), 0)) { |
| 140 |
call addplace(node) |
| 141 |
} |
| 142 |
} |
| 143 |
} |
| 144 |
} |
| 145 |
} |
| 146 |
print(" done\nWriting places...") |
| 147 |
call write_rll_header() |
| 148 |
set(nextpnum,0) |
| 149 |
forlist(placelist,placename,pnum) { |
| 150 |
if (ge(pnum,nextpnum)) { |
| 151 |
print(" ",d(pnum)) |
| 152 |
set(nextpnum,add(nextpnum,100)) |
| 153 |
} |
| 154 |
call write_rll_entry(placename) |
| 155 |
} |
| 156 |
} |
| 157 |
|
| 158 |
/* |
| 159 |
To: ROOTS-L Genealogy List |
| 160 |
Subject: ROOTS LOCATION LIST, September, 1994 |
| 161 |
|
| 162 |
Next location list on 3rd Sunday in November. (Deadlines for |
| 163 |
submissions are generally the preceding Friday.) |
| 164 |
|
| 165 |
## WHAT IS THE ROOTS LOCATION LIST?## |
| 166 |
|
| 167 |
- The Roots Location List is compiled from locations e-mailed to me |
| 168 |
by network people doing genealogical research in a particular |
| 169 |
location and who are willing to exchange information. The idea is |
| 170 |
that, if you had ancestors living in the same place in the same |
| 171 |
period, it might be beneficial to compare notes -- maybe you and |
| 172 |
the submitter are kinfolk or maybe you can help each other track |
| 173 |
down unique sources dealing with the area. |
| 174 |
|
| 175 |
|
| 176 |
-This list should not be confused with the ROOTS SURNAME LIST that |
| 177 |
is maintained by Karen Isaacson in other files. If you are |
| 178 |
confused, send a message to: [email protected] In the body |
| 179 |
of your message put: GET FAMILY INDEX. This will show you all of |
| 180 |
the files in this part of the genealogy files. |
| 181 |
|
| 182 |
## HOW CAN I PARTICIPATE IN THE ROOTS LOCATION LIST? ## |
| 183 |
|
| 184 |
- Send additions or corrections to me at [email protected]. Write |
| 185 |
to me if you have general questions about the list. I will |
| 186 |
acknowledge (or attempt to acknowledge) all submissions. |
| 187 |
|
| 188 |
Entries are formatted as follows: |
| 189 |
|
| 190 |
Location/Date1-Date2/nametag |
| 191 |
Date1 is the earliest date for which the submitter has information. |
| 192 |
Date2 is the most recent date. |
| 193 |
|
| 194 |
## HOW DO I CONTACT SOMEONE ON THE LIST? ## |
| 195 |
|
| 196 |
- Write directly to the submitter if you would like to exchange |
| 197 |
information. |
| 198 |
|
| 199 |
-To contact the submitter of the information, use the nametag to |
| 200 |
find the address of the submitter in the address list - FAMILY |
| 201 |
LOCADDR. The addresses of the submitters are in a separate file on |
| 202 |
the listserver. To obtain them, send a one line message: GET |
| 203 |
FAMILY LOCADDR |
| 204 |
|
| 205 |
A list of the abbreviations used is available directly from the |
| 206 |
listserver: send e-mail to [email protected] or |
| 207 |
LISTSERV@NDSUVM1, with a one-line message that states: |
| 208 |
|
| 209 |
GET FAMILY ABBREV |
| 210 |
|
| 211 |
Include no other text, and leave the subject line blank. The |
| 212 |
listserver will return by e-mail the list of abbreviations. Or |
| 213 |
you can use anonymous FTP to vm1.nodak.edu |
| 214 |
|
| 215 |
*/ |