1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342
|
/*
* @progname timeline1.ll
* @version 1.0
* @author Jones
* @category
* @output Text, 80/132 cols
* @description
*
* This report creates
* Ascii timeline showing birth, marriage, and death events of
* selected individuals; shows which individuals were contemporaies.
*
* timeline1
*
* version one: 4 Sept 1993
*
* Code by James P. Jones, jjones@nas.nasa.gov
*
* Contains code from:
* "famrep4" - By yours truely, jjones@nas.nasa.gov
* "tree1" - By yours truely, jjones@nas.nasa.gov
*
* This report works only with the LifeLines Genealogy program
*
* This report creates one of the following timeline charts:
*
* 1. Ascii timeline showing birth, marriage, and death events of
* selected individuals; shows which individuals were contemporaies.
*
* 2. IN PROGRESS
*
* User selects individual to base the chart on; then selects from
* the following sets:
*
* parents,
* children,
* spouses,
* ancestors,
* descendents,
* everyone
*
* User selects start date (e.g. 1852) and end date for graph; as well as
* graph size (80 or 132 col).
*
* Note: If an indi is "alive" for more than 100 years, this is flagged as
* "uncertain", with a question mark in the graph after 100 years from birth.
* One should check these individuals to determine where they are really
* that old, or if one can determine an approxmate date of death, etc.
*
* Additional functionality will be added as soon as LL version 2.3.5
* is released.
*
* Sample output follows (start=1800; end=2000; 80 columns):
Name 1800 1820 1840 1860 1880 1900 1920 1940 1960 1980 2000
________________________|____|____|____|____|____|____|____|____|____|____|
AUSTIN, George W B****M************D
AUSTIN, Velma Cleo B***M*M**M**M***M*
BLAKE, Nancy Elizabeth B****M***********D
HEFLIN, Wyatt ***************D
HUNTER, Rebecca A. B****M************D
JONES, Arvel Fred Jr. B******M******
JONES, Arvel Fred Sr. B****M*************D
JONES, Charles Columbus B*******************D
JONES, George
JONES, Sarah Frances B*****D
JONES, Wesley B************************???????????
JORDAN, Mary Cardine B****D
PHIPPEN, Rose Marie B****M***M**
WILDE, Charles B************************?????????????????
____, Sarah A *********************????????????????????????????
Scale: 1 point = 4 years
Key: B=birthdate, M=marriage, D=deathdate, *=living, ?=uncertainity
*/
global(startdate)
global(enddate)
global(curyear)
global(linnum)
global(linpos)
global(offset)
global(years)
global(scale)
global(count)
proc main ()
{
set(startdate, 0)
set(enddate, 0)
set(linnum, 1)
set(linpos, 1)
list(plist)
pagemode(1, 200)
getindi(indi)
while (eq(indi, NULL)) {
getindi(indi)
}
set(valid,0)
while (eq(valid,0)) {
print("Graph (1) parents, (2) children, (3) spouses")
print(nl())
print(" (4) ancestors, (5) descendents, (6) everyone")
print(nl())
getintmsg(ltype,"Choose subset of individuals: ")
if (and(ge(ltype,1), le(ltype,6))) {
set (valid, 1)
}
}
while (le(startdate,0)) {
getintmsg(startdate, "Enter start date for graph, e.g. 1852: ")
}
while (le(enddate,0)) {
getintmsg(enddate, "Enter end date for graph, e.g. 1852: ")
}
while (and(ne(size,1), ne(size,2))) {
getintmsg(size,"Select graph size (1) 80 col, (2) 132 col: ")
}
if (eq(size, 1)) {
set(offset, sub(80, 26))
}
else {
set(offset, sub(130, 26))
}
set(years, sub(enddate, startdate))
set(scale, div(years, offset))
if (gt(mod(years, offset), 0)) {
set(scale, add(scale, 1))
}
if (le(scale, 0)) {
set(scale, 1)
}
/* put at bottom, + key*/
print("Scale: 1 point = ")
print(d(scale))
print(" years")
call datelin()
pageout()
call header()
pageout()
indiset(idx)
if (eq(ltype, 1)) {
addtoset(idx,indi,n)
set(idx, parentset(idx))
}
if (eq(ltype, 2)) {
addtoset(idx,indi,n)
set(idx, childset(idx))
}
if (eq(ltype, 3)) {
addtoset(idx,indi,n)
set(idx, spouseset(idx))
}
/*if (eq(ltype, 4)) {
addtoset(idx,indi,n)
set(idx, siblingset(idx))
}*/
if (eq(ltype, 4)) {
addtoset(idx,indi,n)
set(idx, ancestorset(idx))
}
if (eq(ltype, 5)) {
addtoset(idx,indi,n)
set(idx, descendentset(idx))
}
if (eq(ltype, 6)) {
forindi(indiv,n) {
addtoset(idx,indiv,n)
}
}
/* lengthset() is not in this version of LL; wait until Ver. 2.3.5
if (eq(lengthset(idx), 0)) {
print("This set contains no individuals, please try again.")
print(" ")
}
else {
*/
namesort(idx)
forindiset(idx,indiv,v,n) {
call graph(indiv) /* outputs a 1 line "page" for each */
pageout() /* entry on graph */
}
linemode()
call printkey()
/*}*/
}
proc datelin()
{
set(linpos, 10)
pos(linnum, linpos)
"Name"
set(linpos, 25)
set(count, mul(scale, 5))
set(curyear, sub(startdate, mod(startdate, count)))
while (le(curyear, enddate)) {
pos(linnum, linpos)
d(curyear)
set(curyear, add(curyear,count))
set(linpos, add(linpos, 5))
}
set(curyear, sub(curyear,count))
}
proc header()
{
set(tmpyear, sub(startdate, mod(startdate, count)))
pos(linnum, 1)
"________________________"
set(linpos, 25)
set(i, 25)
while (le(tmpyear, curyear)) {
set(j, 0)
while (lt(j, count)) {
pos(linnum, linpos)
if (or(eq(i, 25), eq(mod(i, 5),0))) { "|" }
else {
if (lt(tmpyear, curyear)) { "_" }
}
set(j, add(j,scale))
set(linpos, add(linpos, 1))
set(i, add(i,scale))
}
set(tmpyear, add(tmpyear,count))
}
}
proc graph(indi)
{
set(linnum, 1)
set(linpos, 1)
pos(linnum, linpos)
fullname(indi, 1, 0, 24)
set(linpos, 25)
print(".")
/* birth event */
set(start, strtoint(year(birth(indi))))
if (eq(start, 0)) {
set(start, strtoint(year(baptism(indi))))
}
if (eq(start, 0)) {
set(unknown, 1)
}
/* marriage event(s) */
list(mlist)
spouses(indi, svar, fvar, no) {
set(tdate, strtoint(year(marriage(fvar))))
if (ne(tdate,0)) {
enqueue(mlist, tdate)
}
}
set(myear, dequeue(mlist))
/* death event */
set(end, strtoint(year(death(indi))))
if (eq(end, 0)) {
set(end, strtoint(year(burial(indi))))
}
if (eq(end, 0)) {
if (not(unknown)) {
set(end, add(enddate, 1)) /* assume he is alive */
/*set(start, sub()*/
}
}
set(year, startdate)
set(loop, 1)
set(thisyear, strtoint(year(gettoday())))
if (le(thisyear, enddate)) {
set(stopdate, thisyear)
}
else { set(stopdate, enddate) }
set(last, 0)
while (le(year, stopdate)) {
pos(linnum, linpos)
if (lt(year, start)) {
if (eq(last,0)) { " " }
}
if (gt(year, end)) {
if (eq(last,0)) { " " }
}
if (eq(year, start)) {
"B"
set(last, 1)
}
if (eq(year, end)) {
"D"
set(last, 1)
}
if (and(gt(year, start), le(year, end))) {
if (eq(year, myear)) {
"M"
set(last, 1)
set(myear, dequeue(mlist))
}
}
if (and(gt(year, start), lt(year, end))) {
if (eq(last,0)) {
if (ge(sub(end, start), 100)) {
if (le(end,stopdate)) { "*" }
else {
if (ge(year,add(start,100))) { "?" }
else { "*" }
}
}
else { "*" }
}
}
set(year, add(year, 1))
if (eq(loop, scale)) {
set(loop, 1)
set(last, 0)
set(linpos, add(linpos, 1))
}
else {
set(loop, add(loop, 1))
}
}
}
proc printkey()
{
nl()
"Scale: 1 point = " d(scale)
if (eq(scale,1)) { " year" }
else { " years" }
nl()
"Key: B=birthdate, M=marriage, D=deathdate, *=living, ?=uncertainity"
nl()
}
|