Fork me on GitHub

People highlighting

Geneaprove includes a powerful highlighting feature. By writing some rules (currently as a python datastructure, there will one day be a parser and you can modify from the web client directly), you can change the style used to display each person, based on various criterias.

For instance, you can easily highlight the persons that died at a young age, or chose a different background color for males and females. You can also provide a different highlighting for the persons that are in your own tree (so that for instance your uncles and aunts are not highlighted the same way as your parents, which makes navigation in the pedigree view much easier).

On the side is is a brief screenshot of the legend displayed in the pedigree view. The rules and styles are the ones I am using for my tests, and can be fully modified.

This feature is inspired by The Master Genealogist's accents feature, although I believe it is more powerful and flexible.

Here are some of the corresponding rules (in python), as described in the file geneaprove/views/custom_highlight.py.
 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
style_rules = [
    ("Persons that are alive",
     RULE_ATTR,
     [("ALIVE", RULE_IS, "Y")],
     {"font-weight":"bold"}),

    ("Born or dead in La Baussaine before 1862",
     RULE_EVENT,
     [("type",  RULE_IN,         (models.Event_Type.birth,
                                 models.Event_Type.death)),
      ("place.name", RULE_CONTAINS_INSENSITIVE, "baussaine"),
      ("role",  RULE_IS,         models.Event_Type_Role.principal),
      ("date",  RULE_BEFORE,     "1862")],
     {"color":"red"}),

    ("Died younger than 60",
     RULE_EVENT,
     [("type", RULE_IS, models.Event_Type.death),
      ("role", RULE_IS, models.Event_Type_Role.principal),
      ("age",  RULE_SMALLER_EQUAL, 60)],
     {"color":"blue"}),

    ("Person's age today is more than 80, and is alive",
     RULE_ATTR,
     [("age",   RULE_GREATER, 80),
      ("ALIVE", RULE_IS,      "Y")],
     {"color":"orange"}),

    ("Foreign people in different color",
     RULE_EVENT,
     [("type", RULE_IS, models.Event_Type.birth),
      ("role", RULE_IS, models.Event_Type_Role.principal),
      ("place.country", RULE_IS_NOT, ""),
      ("place.country", RULE_CONTAINS_NOT_INSENSITIVE, "france")],
     {"fill":"#AAAAAA"}),

    ("Person's with more than one marriage",
     RULE_EVENT,
     [("type",  RULE_IS, models.Event_Type.marriage),
      ("role",  RULE_IS, models.Event_Type_Role.principal),
      ("count", RULE_GREATER, 1)],
     {"fill":"#AA0000"}),

    ("PROBLEM: Persons too young at birth of child",
     RULE_EVENT,
     [("type", RULE_IS, models.Event_Type.birth),
      ("role", RULE_IN, (models.Event_Type_Role.birth__father,
                         models.Event_Type_Role.birth__mother)),
      ("age",  RULE_SMALLER, 17)],
     {"fill":"red"}),

    ("PROBLEM: Persons too old at death",
     RULE_EVENT,
     [("type", RULE_IS, models.Event_Type.death),
      ("role", RULE_IS, models.Event_Type_Role.principal),
      ("age",  RULE_GREATER, 110)],
     {"fill":"red"}),

    ("If the person appears multiple time in the current tree",
     RULE_ATTR,
     [("IMPLEX", RULE_GREATER, 1)],
     {"fill":"yellow"}),

    ("All male ancestors of person id=1",
     RULE_ATTR,
     [("ancestor", RULE_IS, 1), ("SEX", RULE_IS, "M")],
     {"fill":"#D6E0EA", "stroke":"#9CA3D4"}),

    ("All female ancestors of person id=1",
     RULE_ATTR,
     [("ancestor", RULE_IS, 1), ("SEX", RULE_IS, "F")],
     {"fill":"#E9DAF1", "stroke":"#fF2080"}),

    ("All male descendants of person id=1",
     RULE_ATTR,
     [("descendant", RULE_IS, 1), ("SEX", RULE_IS, "M")],
     {"fill":"#D6E0EA", "stroke":"#9CA3D4"}),

    ("All female descendants of person id=1",
     RULE_ATTR,
     [("descendant", RULE_IS, 1), ("SEX", RULE_IS, "F")],
     {"fill":"#E9DAF1", "stroke":"#fF2080"}),

    ("Unknown father",
     RULE_ATTR,
     [("UNKNOWN_FATHER", RULE_IS, "Y")],
     {"color":"violet"}),

    ("Unknown mother",
     RULE_ATTR,
     [("UNKNOWN_MOTHER", RULE_IS, "Y")],
     {"color":"violet"}),

    ("Person's name is Delamote (case insensitive)",
     RULE_ATTR,
     [("surname", RULE_IS_INSENSITIVE, "delamotte")],
     {"color":"green"}),
]