1/*
2 * @progname       rslgen.ll
3 * @version        1.1
4 * @author         Eggert
5 * @category
6 * @output         RSL format
7 * @description    Generate a Roots Surname List (RSL) submission
8
9rslgen - a LifeLines report program to aid in the generation of
10Roots Surname List (RSL) submissions.
11
12Given a person, this generates a RSL-like submission for that person and
13his/her ancestors.  The output will likely need considerable hand editing,
14but that is how it is.  If you need to know what the RSL is, I have enclosed
15a description at the end of this file.
16
17Here's what you will need to do by hand (you can consider this a list
18of desired features for future versions of this report program):
19
20BEFORE YOU RUN THE PROGRAM:
21
22Change the routine write_rsl_header() to use your submitter tag, name,
23and address.
24
25AFTER YOU RUN THE PROGRAM:
26
27Sort the surname portion of the output file.
28Eliminate empty or useless surname lines.
29Use RSL-standard abbreviations for placenames.
30  - get FAMILY ABBREV as per instructions at end of this file.
31Combine duplicate surname lines where appropriate.
32Check check check.
33Send the final product to the RSL maintainer.
34  - see the end of this file.
35
36Version 1, 14 July 1994, by Jim Eggert, eggertj@ll.mit.edu
37
38*/
39
40global(year_min)
41global(year_max)
42global(submitter_tag)
43global(location)
44global(last_location)
45global(location_list)
46global(location_table)
47global(see_surname_table)
48global(rsl_entry_count)
49
50/* write_rsl_header sets the submitter tag and
51   writes a little header for the RSL list maintainer
52 */
53
54proc write_rsl_header(person) {
55    set(submitter_tag,"dummy_tag")
56
57    "Roots Surname List (RSL) submission of " date(gettoday())
58    " submitted by John Q. Public\n\n"
59    submitter_tag
60    col(12) "John Q. Public noname@nowhere.nohow\n"
61    col(12) "1234 56th Street, Anytown AM 54321\n\n"
62}
63
64
65proc main() {
66    list(ilist)
67    table(see_surname_table)
68
69    getindi(person)
70
71    call write_rsl_header(person)
72    set(rsl_entry_count,0)
73
74    enqueue(ilist,person)
75    while (person,dequeue(ilist)) {
76        table(location_table)
77        list(location_list)
78
79        set(year_min,9999) set(year_max,0)
80        call locations_and_years(person)
81        set(final_key,save(key(person)))
82        set(final_surname,save(surname(person)))
83
84        if (m,mother(person)) { enqueue(ilist,m) }
85
86        while (person,father(person)) {
87            if (m,mother(person)) { enqueue(ilist,m) }
88            call locations_and_years(person)
89            set(this_surname,surname(person))
90            if (strcmp(this_surname,final_surname)) {
91                set(see_name,0)
92                if (other_surname,lookup(see_surname_table,this_surname)) {
93                    if (strcmp(final_surname,other_surname)) {
94                        set(see_name,1)
95                    }
96                }
97                else {
98                    set(see_name,1)
99                    set(other_surname,final_surname)
100                }
101                if (see_name) {
102                    this_surname " - see " final_surname
103                    " (" submitter_tag ")\n"
104                    insert(see_surname_table,
105                                save(this_surname),save(other_surname))
106                }
107            }
108        }
109        call write_rsl_entry(final_key)
110    }
111    if (gt(rsl_entry_count,100)) {
112        print("Warning:  Number of lines produced (")
113        print(d(rsl_entry_count))
114        print(")\nexceeds recommended submission limit (100)\n")
115    }
116}
117
118
119/* write_rsl_entry writes one line in the rsl submission */
120
121proc write_rsl_entry(key_entry) {
122    if (key_entry) {
123        set(surname_entry,save(surname(indi(key_entry))))
124        if (strlen(surname_entry)) {
125            if (strcmp(trim(surname_entry,1),"_")) {
126    set(rsl_entry_count,add(rsl_entry_count,1))
127    set(not_first,0)
128    surname_entry col(14) d(year_min)
129    col(20) d(year_max) " "
130    while (loc,dequeue(location_list)) {
131        if (not_first) { ">" } else { set(not_first,1) }
132        loc
133    }
134                " " submitter_tag " " key_entry "\n"
135            }
136        }
137    }
138}
139
140
141/* locations_and_years figures out unique locations and min/max years
142   for a person with respect to other persons already figured.
143   Note that the events are processed in reverse chronological order,
144   because the ancestry is traced bottom up.  Oh well...
145 */
146
147proc locations_and_years(person) {
148    list(marriage_list)
149
150    call one_location_and_year(burial(person))
151    call one_location_and_year(death(person))
152    families(person,family,spouse,fnum) {
153        push(marriage_list,marriage(family))
154    }
155    while (event,pop(marriage_list)) { call one_location_and_year(event) }
156    call one_location_and_year(baptism(person))
157    call one_location_and_year(birth(person))
158}
159
160
161/* one_location_and_year appends the event location to the global
162   location list if it is new, and figures the event year into the
163   global min and max values.
164 */
165
166proc one_location_and_year(event) {
167    if (event) {
168        set(loc,place(event))
169        if (strlen(loc)) {
170            if (not(lookup(location_table,loc))) {
171                requeue(location_list,save(loc))
172                insert(location_table,save(loc),1)
173            }
174        }
175        if (yr,atoi(year(event))) {
176            if (lt(yr,year_min)) { set(year_min,yr) }
177            if (gt(yr,year_max)) { set(year_max,yr) }
178        }
179    }
180}
181
182/*
183                        ###   WHAT IS IT?   ###
184
185The Roots Surname List (RSL) helps genealogical researchers share and
186compare data.  Genealogists with Internet access are welcome to submit
187surnames that they are researching for inclusion in the Roots Surname
188List if they are willing to share their data with others who may be
189doing parallel research.  Enough information should be provided so that
190others can decide whether a link with their own lines is possible or
191probable.  The assumption is that you have SOME data to share.  You
192needn't be on the verge of writing the definitive genealogy for the
193family in question.
194
195If you see a surname listed that interests you, contact the person who
196submitted the surname.  To do that, just look up their nametag (listed
197at the end of each surname entry) in the list of submitters.  The
198FAMILY INDEX, described below, has instructions on how to obtain the
199list of submitters.  Unless the submitter happened to be me, I won't be
200of much help.
201
202The =update= to the RSL is posted to ROOTS-L (the Internet genealogy mailing
203list) and to soc.roots (the USENET genealogy newsgroup)
204on the first Sunday of the month.  At the same time, the entire
205new RSL is stored on the listserver.  See below for instructions on
206obtaining a copy from the listserver or via mail if you don't have access
207to the listserver.  The update and sometimes the full RSL also propagates
208after that to the genealogy libraries on CompuServe, GEnie, and Delphi.
209Included in the posted update is contact information for the submitters of
210the new and updated info.
211
212                 ###   OBTAINING THE ENTIRE LIST   ###
213
214
215To obtain a copy of the full Roots Surname List (RSL) from the listserver,
216the first step is to send e-mail to LISTSERV@vm1.nodak.edu or
217LISTSERV@NDSUVM1, with the one-line message (not in the subject line):
218
219        GET FAMILY INDEX
220
221You will receive by e-mail a list of the names of the various files
222comprising the current RSL.  The files named in FAMILY INDEX may change
223each month, so be sure to use a current one!  The files listed there may
224be obtained in the same manner as you obtained FAMILY INDEX. (That is, by
225sending e-mail to the LISTSERV address with the GET message.) If you have
226access to FTP, you can instead use anonymous FTP to vm1.nodak.edu
227(134.129.111.1) and do "cd ROOTS-L" then "get FAMILY.INDEX" to retrieve
228the file.  Don't FTP it in binary mode, but instead in text mode.
229
230If you are unable to retrieve the RSL via e-mail or via FTP, you can
231receive a copy by sending $5 to:
232        Brian Leverich
233        27991 Caraway Lane
234        Saugus, CA 91350
235Requests MUST include a description of the computer you use (DOS or Mac)
236and the highest capacity diskette you can read (360kb, 720kb, 1.2mb,
2371.44mb, etc.).  If you need something other than DOS or Mac, inquire
238first: if Brian can't handle your particular format, maybe someone else
239here can.
240
241                   ###   SUBMITTING NEW ENTRIES   ###
242
243Please READ THIS SECTION ***CAREFULLY*** BEFORE SUBMITTING.  I receive
244submissions and handle correspondence about the RSL over long distance
245telephone lines, and I cannot afford the time and money wasted by
246improperly formatted or otherwise inappropriate submissions.
247
248 ** BASIC GUIDELINES **
249
250Send new entries to me at one of the addresses listed at the end of this
251note.  Entries received will be included in the next list.  See below
252for format information.  PLEASE follow these guidelines:
253
254        o Send ordinary text files.  Please do not compress, zip,
255          uuencode, or MIME encode your file.
256
257        o Be sure to submit "how to reach you" information as well as
258          surnames.
259
260        o Do not submit more than 100 surnames.
261
262        o Do =not= put your surnames in CAPS.
263
264        o Follow the formatting rules below with religious fervor.
265
266        o AND NO TINY TAFELS.  They don't conform to the RSL format, and
267          they don't contain the sort of information needed for the RSL.
268          If you have a Tiny Tafel and want to put it to good use, I
269          believe Brian Mavrogeorge, will enter it in the Fidonet TMS
270          (Tafel Matching System) database if you post it to soc.roots
271          or Roots-L.  (If you don't know what a Tiny Tafel is, you're
272          probably in no danger of sending me one accidentally.)
273
274 ** FORMATTING YOUR "HOW TO REACH YOU" INFORMATION **
275
276For each submitter, I must receive one or two lines of address
277information which tell readers how they can reach the person who
278submitted the entry.  The format is fairly flexible, but must include a
279short nametag (less than eight characters, all lower case) and should
280typically include all your e-mail and postal addresses.  (If you're
281nervous about broadcasting your postal address to the universe, though,
282feel free to leave it off.)  If the nametag you select has already been
283taken, I'll conjure up a new one for you.  Or feel free to suggest
284alternates at the time of your submission.
285
286The lines for karen (me) are:
287karen    Karen Isaacson, karen@rand.org, Prodigy:  XRBV26B, GEnie:  KRENA
288         27991 Caraway Lane, Saugus, CA 91350              Delphi:  KRENA
289
290 ** FORMATTING YOUR SURNAME INFORMATION **
291
292What should the surname entries look like?  Don't worry too much about
293format -- I end up reformatting them anyhow for my sort routine.  But
294please do conform to the general guidelines below.  Also, despite all
295genealogical advice to the contrary, DO NOT put the surnames all in
296capital letters.  The RSL does not use surnames in all CAPs.  (Don't
297put them all in lower case, either, though, just do them like in the
298example below.)
299
300Each entry should be on one line, and consists of five parts:
3011. The name of the family.
3022. The earliest date for which you have information about the family.
303   (For instance, the birthdate of the founder of the family, or the year
304   he or she first showed up in the records.)
3053. The latest date for which you have information about the family.  (When
306   the last person with that surname died or skipped town, for instance.
307   Or "now" if you know people of this surname that are still around --
308   yourself, for example.  It's up to you whether a woman is considered
309   under her maiden surname, married surname, or both.)
3104. The migration of the family.  For instance, if my ancestors started out
311   in Virginia, moved to Kentucky, then on to Missouri, this would be
312   VA>KY>MO,USA.  If the surname was common, and I still had room (remember,
313   all four fields should fit on one line), then I might add some county
314   information to further distinguish them: OrangeCo,VA>KY>GentryCo,MO,USA.
315   There is a list of most of the abbreviations that are in use.  It is in
316   a file called FAMILY ABBREV, and can be obtained in the same manner as
317   FAMILY INDEX, discussed above.  Or just spell out the location, and I'll
318   put in the proper abbreviation, if any.
3195. The nametag of the submitter.  This is so you can be found in the address
320   list.  See discussion above for how to select one.
321
322The Roots Surname Index is rather oddly computerized.  There aren't any
323firm restrictions on the presentation of the data, but do try to use
324something like the format suggested above and illustrated below.
325
326Here are a few (genuine!) sample entries (my own, funny thing):
327
328 Bell         1780  1940 OrangeCo,VA>KY>GentryCo,MO,USA karen
329 Carr - see Kerr (karen)
330 Keithley    c1750  1923 DEU>PA?>RowanCo,NC>BathCo,KY>FloydCo,IN,USA karen
331 Keithley    c1750  1923 DEU>PA?>RowanCo,NC>KY>StCharlesCo,MO,USA karen
332 Kerr         1760   now HuntingdonCo,PA>VenangoCo,PA>IA,USA karen
333 Kicheli - see Keithley (karen)
334
335 ** WHEN TO SUBMIT **
336
337Try to get your additions or modifications in to me by the Thursday before
338the first Sunday of each month, when the monthly update is published.
339If you miss a deadline, not to worry: your surnames will have arrived in
340time for the next deadline and will be included in the next month's list.
341
342 ** WHERE TO SUBMIT **
343
344How can I be reached?  At one of the following addresses:
345
346        Internet:        karen@rand.org         <- preferred
347                         krena@genie.geis.com
348                         xrbv26b@prodigy.com
349                         bi254@cleveland.freenet.edu
350                         kisaacson@mcimail.com
351        GEnie or Delphi: KRENA
352        Prodigy:         XRBV26B
353        Postal:          Karen Isaacson
354                         27991 Caraway Lane
355                         Saugus, CA  91350
356
357
358*/
359