Debian Codegraph @

reports/gendex.ll

raw
1 /*
2 * @progname gendex.ll
3 * @version 1.2
4 * @author Scott McGee ([email protected])
5 * @category
6 * @output HTML
7 * @description
8
9 This report program converts a LifeLines database into html gendex document.
10 You will need to change the contents of proc html_address() and to
11 set the value of HREF appropriately to your server.
12
13 @(#)gendex.ll 1.2 10/14/95
14 */
15
16 global(INDEX)
17 global(HREF)
18
19 proc main()
20 {
21 indiset(INDEX)
22 set(HREF, "/INDEX=")
23 print("processing database\n")
24 set(count, 0)
25 set(name_count, 0)
26 forindi(me,num)
27 {
28 if(eq(count, 100)){
29 set(count, 0)
30 print(".")
31 }else{
32 incr(count)
33 incr(name_count)
34 }
35 addtoset(INDEX,me,1)
36 }
37 print("\nwriting file\n")
38 call create_gendex_file()
39 print("\n", d(name_count), " individuals\n")
40 }
41
42
43 proc create_gendex_file() {
44 set(fn, save("GENDEX.txt"))
45 newfile(fn, 0)
46 forindiset(INDEX, me, v, n)
47 {
48 set(path, concat(HREF, save(key(me)), "/?LookupInternal"))
49 path
50 "|"
51 surname(me)
52 "|"
53 givens(me) " /"
54 surname(me) "/"
55 "|"
56 if (evt, birth(me)) {
57 date(evt)
58 }
59 "|"
60 if (evt, birth(me)) {
61 place(evt)
62 }
63 "|"
64 if (evt, death(me)) {
65 date(evt)
66 }
67 "|"
68 if (evt, death(me)) {
69 place(evt)
70 }
71 "|\n"
72 }
73 }