2
* @progname timeline2.ll
6
* @output Text, 80/132 cols
9
* This report creates one of the following timeline charts:
10
* 1. Ascii timeline graph showing birth, marriage, and death events of
11
* selected individuals; shows which individuals were contemporaies.
12
* 2. Ascii timeline chart data with the above information for use with
13
* the my timeline generation program or the today program.
15
* timeline2 - create a timeline of select individuals
17
* version one: 4 Sept 1993
18
* version two: 9 Sept 1993
20
* Code by James P. Jones, jjones@nas.nasa.gov
23
* "famrep4" - By yours truly, jjones@nas.nasa.gov
24
* "tree1" - By yours truly, jjones@nas.nasa.gov
26
* This report works only with the LifeLines Genealogy program.
28
* This report creates one of the following timeline charts:
30
* 1. Ascii timeline graph showing birth, marriage, and death events of
31
* selected individuals; shows which individuals were contemporaies.
33
* 2. Ascii timeline chart data with the above information for use with
34
* the my timeline generation program or the today program.
36
* 3. IN PROGRESS (postscript version of #1 above)
38
* User selects individual to base the chart on; then selects from
48
* User selects start date (e.g. 1852) and end date for graph; graph size
49
* (80 or 132 col); and various options regarding who to display.
51
* Note: If an indi is "alive" for more than MAXAGE years, this is flagged as
52
* "uncertain" with a question mark in graph after MAXAGE years from birth.
53
* One should check these individuals to determine where they are really
54
* that old, or if one can determine an approxmate date of death, etc.
56
* Additional functionality will be added as soon as LL version 2.3.5
57
* is released. See comments below for details.
59
* Sample output (#1 above) follows (start=1800; end=2000; 80 col; sort by
60
* name; show people with dates only):
62
Name 1800 1820 1840 1860 1880 1900 1920 1940 1960 1980 2000
63
________________________|____|____|____|____|____|____|____|____|____|____|
64
AUSTIN, George W | B****M************D
65
AUSTIN, Velma Cleo | B***M*M**M**M***M*
66
BLAKE, Nancy Elizabeth | B****M***********D
67
HEFLIN, Wyatt |**************D
68
HUNTER, Rebecca A. | B****M************D
69
JONES, Arvel Fred Jr. | B******M******
70
JONES, Arvel Fred Sr. | B****M*************D
71
JONES, Charles Columbus | B*******************D
72
JONES, Sarah Frances | B*****D
73
JONES, Wesley | B************************?
74
JORDAN, Mary Cardine | B****D
75
PHIPPEN, Rose Marie | B****M***M**
76
WILDE, Charles | B************************?
77
____, Sarah A |********************?
79
Scale: 1 point = 4 years
80
Key: B=birthdate, M=marriage, D=deathdate, *=living, ?=uncertainity
83
* Output from #1 can be sorted using the sort(1) command, for example, the
84
* following command will sort the above output by birthdate:
86
* sort -t\| +1 filename
88
* where FILENAME is a file contain the above sample data, would produce:
90
PHIPPEN, Rose Marie | B****M***M**
91
JONES, Arvel Fred Jr. | B******M******
92
AUSTIN, Velma Cleo | B***M*M**M**M***M*
93
JONES, Arvel Fred Sr. | B****M*************D
94
AUSTIN, George W | B****M************D
95
JONES, Charles Columbus | B*******************D
96
JONES, Sarah Frances | B*****D
97
BLAKE, Nancy Elizabeth | B****M***********D
98
JORDAN, Mary Cardine | B****D
99
JONES, Wesley | B************************?
100
WILDE, Charles | B************************?
101
HUNTER, Rebecca A. | B****M************D
102
____, Sarah A |********************?
103
HEFLIN, Wyatt |**************D
129
set(MAXYEAR, 2020) /* the distant future */
130
set(MAXAGE, 90) /* if birth/death dates unknown, guess age */
137
while (eq(indi, NULL)) {
140
while (and(ne(gra,1), ne(gra,2))) {
141
getintmsg(gra,"Select timeline (1) graph, (2) chart:")
144
while (eq(valid,0)) {
145
print("Graph (1) parents, (2) children, (3) spouses")
147
print(" (4) ancestors, (5) descendents, (6) everyone")
149
getintmsg(ltype,"Choose subset of individuals: ")
150
if (and(ge(ltype,1), le(ltype,6))) {
154
while (and(ne(showall,1), ne(showall,2))) {
155
getintmsg(showall,"Include people without dates (1) no, (2) yes: ")
161
while(le(enddate, startdate)) {
164
while (or(le(startdate,0),gt(startdate,MAXYEAR))) {
165
getintmsg(startdate,"Enter start date for graph, e.g. 1800: ")
167
while (or(le(enddate,0),gt(startdate,MAXYEAR))) {
168
getintmsg(enddate, "Enter end date for graph, e.g. 1950: ")
170
if (le(enddate, startdate)) {
171
print("End date exceeds start date. Re-enter dates.")
175
while (and(ne(size,1), ne(size,2))) {
176
getintmsg(size,"Select graph size (1) 80 col, (2) 132 col: ")
178
while (and(ne(order,1), ne(order,2))) {
179
getintmsg(order,"Order by (1) family group, (2) last name: ")
182
set(offset, sub(80, 26))
185
set(offset, sub(130, 26))
187
set(years, sub(enddate, startdate))
189
set(scale, div(years, offset))
190
if (gt(mod(years, offset), 0)) {
191
set(scale, add(scale, 1))
197
print("Scale: 1 point = ")
212
set(idx, parentset(idx))
216
set(idx, childset(idx))
220
set(idx, spouseset(idx))
223
/* this will work in LL version 2.3.5 ...
225
set(idx, siblingset(idx))
229
set(idx, ancestorset(idx))
233
set(idx, descendentset(idx))
238
addtoset(idx,indiv,n)
242
/* this will work in LL version 2.3.5 ...
243
if (eq(lengthset(idx), 0)) {
244
print("This set contains no individuals, please try again.")
252
forindiset(idx,indiv,v,n) {
253
set(indnum, add(indnum,1))
254
call graph(indiv) /* outputs a 1 line "page" for each */
263
forindiset(idx,indiv,v,n) {
275
set(count, mul(scale, 5))
276
set(curyear, sub(startdate, mod(startdate, count)))
277
while (le(curyear, enddate)) {
280
set(curyear, add(curyear,count))
281
set(linpos, add(linpos, 5))
283
set(curyear, sub(curyear,count))
288
set(tmpyear, sub(startdate, mod(startdate, count)))
290
"________________________"
293
while (le(tmpyear, curyear)) {
295
while (lt(j, count)) {
297
if (or(eq(i, 25), eq(mod(i, 5),0))) { "|" }
299
if (lt(tmpyear, curyear)) { "_" }
302
set(linpos, add(linpos, 1))
305
set(tmpyear, add(tmpyear,count))
317
if (eq(mod(indnum,10),0)) { print(".") }
320
set(start, strtoint(year(birth(indi))))
322
set(start, strtoint(year(baptism(indi))))
325
/* marriage event(s) */
327
spouses(indi, svar, fvar, no) {
328
set(tdate, strtoint(year(marriage(fvar))))
330
enqueue(mlist, tdate)
333
set(myear, dequeue(mlist))
336
set(end, strtoint(year(death(indi))))
338
set(end, strtoint(year(burial(indi))))
342
/* do we have enough info to continue? */
345
if (and(eq(start, 0),eq(end, 0))) { set(NOINFO,1) }
348
set(start,sub(end, MAXAGE))
352
set(end, add(start, MAXAGE))
357
if (or(eq(showall,2),eq(NOINFO,0))) {
358
fullname(indi, 1, 0, 24)
365
set(thisyear, strtoint(year(gettoday())))
366
if (le(thisyear, enddate)) {
367
set(stopdate, thisyear)
369
else { set(stopdate, enddate) }
371
while (le(year, stopdate)) {
373
if (lt(year, start)) {
374
if (eq(last,0)) { " " }
377
if (eq(last,0)) { " " }
379
if (eq(year, start)) {
380
if (eq(Bunknown,1)) { "?" }
385
if (eq(Dunknown,1)) { "?" }
389
if (and(gt(year, start), le(year, end))) {
390
if (eq(year, myear)) {
393
set(myear, dequeue(mlist))
396
if (and(gt(year, start), lt(year, end))) {
397
if (eq(last,0)) { "*" }
400
set(year, add(year, 1))
401
if (eq(loop, scale)) {
404
set(linpos, add(linpos, 1))
407
set(loop, add(loop, 1))
412
if (or(eq(showall,2),eq(showit,1))) {
423
"Scale: 1 point = " d(scale)
424
if (eq(scale,1)) { " year" }
427
"Key: B=birthdate, M=marriage, D=deathdate, *=living, ?=uncertainity"
438
set(tdate, date(birth(indi)))
439
if (strcmp(tdate,NULL)) {
440
"B" stddate(birth(indi)) " " name(indi) nl()
442
set(tdate, date(baptism(indi)))
443
if (strcmp(tdate,NULL)) {
444
"C" stddate(baptism(indi)) " " name(indi) nl()
448
spouses(indi, svar, fvar, no) {
449
set(tdate, date(marriage(fvar)))
450
if (strcmp(tdate,NULL)) {
451
"M" stddate(marriage(fvar)) " "
452
if (eq(strcmp(sex(indi), "M"),0)) {
453
name(indi) " to " name(svar) nl()
456
name(svar) " to " name(indi) nl()
461
set(tdate, date(death(indi)))
462
if (strcmp(tdate,NULL)) {
463
"D" stddate(death(indi)) " " name(indi) nl()
465
set(tdate, date(burial(indi)))
466
if (strcmp(tdate,NULL)) {
467
"F" stddate(burial(indi)) " " name(indi) nl()