Lifelines was written by Tom Wetmore in the early 1990's and is now available under an MIT-style license. The two most important features of Lifelines (in my opinion) are that it is based on the GEDCOM standard and it is scriptable. These are also two things Lifelines has in common with GEDitCOM II. Although Lifelines is still available, it is a Unix command line tool and has not developed much since the 1990's. Wouldn't it be nice to have all the reports written for Lifelines work in a more modern user interface? This documentation explains how to use a Lifelines emulator to run Lifelines scripts in GEDitCOM II.
Lifelines scripts are written using its internal scripting language. In contrast, GEDitCOM II scripts use different scripting languages. In other words, the Lifelines emulations is not a full emulation. Instead, you have to first convert any script written for Lifelines to a python script that can run in GEDitCOM II. The core of this emulator is a lifelines.py
python module that allows many Lifelines commands to work the same way in converted python scripts, but you will need to make additional changes as well, such as those involving differences in syntax between python and the internal Lifelines language.
The Lifelines emulator was written to minimize the number of changes required to convert a Lifelines script to a GEDitCOM II script. It was not written to maximize efficiency. Once a Lifelines program is converted and running, it will commonly be possible to speed it up by factors of 10 or more by revising the script for efficiency. This process will sometimes be possible just by changing the logic of the script. For other scripts, it may be better to completely rewrite it in the GEDitCOM II scripting language rather than rely on Lifelines emulation..
The first step in using Lifelines emulation is to install the files downloaded in this package into their proper places in the GEDitCOM II application support folder. Details on this process are given in the included ReadMe.txt
file and in an on-line tutorial. Once installed, you can run converted Lifelines script by selecting them from the new Lifelines
submenu in the Extensions
menu. The scripts you can run immediately will be in two submenus to the new Lifelines
menu. Those two menus are:
Emulation
- scripts converted to run in GEDitCOM II with code as close as possible to the original Lifelines script. These conversions retain the name of the Lifelines script but change the extension to .py
for python codeGEDitCOM II Native
- scripts converted to run in GEDitCOM II but that also make use of native GEDitCOM II features to either run more efficiently or to improve appearance of the output. These conversions insert _gc_tt
or _gc
after the Lifelines name and use extension .py
, where _gc_tt
versions uses fixed-width font (like Lifelines scripts) and _gc
versions use more flexible fonts that resemble other GEDitCOM II reports and extensions.The remainder of this document gives details on converting (or writing) Lifelines scripts to python scripts that can run in GEDitCOM II using the lifelines.py
python module.
The documentation sections are:
For ideas on scripts to convert, you can refer to the original Lifelines scripts provided with this package. The scripts in the Reports Converted
folder have already be converted and the corresponding scripts found in the Emulations
folder give examples of the conversion process. The scripts in the Reports Unconverted
folder can be used as ideas for creating new scripts for GEDitCOM II. Finally, an on-line tutorial gives a specific example of converting a Lifelines script to the GEDitCOM II python script.
The following is an outline of the process for converting a Lifelines script into an emulated GEDitCOM II script:
.py
and open in the GEDitCOM Editor. The script must start by loading the lifelines
modules.proc
and func
methods to python def
methods:
proc name ( params ) { statements } |
or | func name ( params ) { statements return result } |
to | def name ( params ) : statements return result |
call name (args) |
to | name (args) |
main
method, remove the proc main
, remove its brackets ({}
), move it to the end, and indent all lines for python needs starting with zero indent. In addition, the main method must begin with a preamble to set up the emulator and end with a finish()
line to output the final report.global(VAR)
to VAR = None
or give it an initial value. They can be declared in the beginning of the script and/or in the main method. If any globals are used in methods, that method has to declare them as globals using a python global VAR
declaration./* a comment ... */
) to python comments (# a comment ...
).set(VAR,VALUE)
to VAR = VALUE
. Other common ones that need changing are list(LISV_VAR)
and table(TABLE_VAR)
, which are changed to LIST_VAR = list()
and TABLE_VAR = table()
. These changes are needed becase python cannot change the value of a variables passed as a parameter.if ([varb,] expr) { statements } elsif ([varb], expr) { statements } else { statements } |
to | if expr : statements elif expr : statements else : statements |
[varb,]
above will need to assign that variable before the conditional.while ([varb,] expr) { statements } |
to | while expr : statements |
[varb,]
above will need to initialize that variable before the loop, provide an appropriate test in the while
line, and increment the variable someplace within the loop. Lifelines also provides many functions for looping (such as forindi()
). Each of these will need a special conversion as documented below for each of those methods.With luck, the conversion will be complete. Try running in GEDitCOM II and see what happens. The most likely errors are python syntax errors (such as forgetting those ":
" needed in many places or not indenting correctly). Once the python problems are fixed, it will start. The next class of errors will be if the script uses methods not yet implemented in the emulator or if their use requires modification. You will then have to revise the code as needed by the emulator, revise the code to use a different method (or use internal GEDitCOM II scripting methods), modify the emulator to support an unimplemented method, or decide this script will be too hard to convert.
Any Lifelines script converted to GEDitCOM II using the above methods should have sections found in the following template:
#!/usr/bin/python # Import emulator modules from lifelines load * from operator import add,sub,mul,mod,neg,eq,ne,lt,gt,le,ge # Globals # Subroutines (python def methods) # Preamble linemode() gdoc = ll_init("script title") # Converted code from main method out("Hello World!) # Final Output finish()
The first section imports methods from python modules. The lifelines.py
module contains all the methods that implement the Lifelines emulation. The operator
module has methods to support several Lifelines methods as listed above. If you need any of these methods, you need this import statement as well. You can omit ones not needed. Notice that the operator
line does not import the div
function. This omission is caused by changes in python 3.x (see below for more details). If you want to use native GEDitCOM II scripting methods within the translated script, you may need to import three more modules using:
from Foundation import * from ScriptingBridge import * from GEDitCOMII load *
The next two (optional) sections define global variables and procedures or functions used by the script.
The "Preamble" section selects the output mode and initializes the emulator. The ll_init()
method verifies the script can run (which means the user has GEDitCOM II 1.6, build 2 or newer and that a document is open). It returns a reference to the current front document. If the script cannot run, a message will be printed and the script will quit. The one argument is the name of the script.
Note that unlike Lifelines, which can only have one data base open at a time, GEDitCOM II can have any number of open documents. As a consequence, a few emulated methods let you specify which document to use. When no document is specified, these methods all default to using the current front document.
The converted main method section contains the translation of the Lifelines main method, except that output mode settings are moved to the preamble.
Finally, call the finish()
method, which outputs the results using the script's output mode (if you forget this command, a properly converted script will not show its output).
The following sections list all methods from the Lifelines manual (which is available in pdf form or in a on-line translation). This reference does not define the behavior of the Lifelines functions (you should refer to the Lifelines documentation for that information). Instead, this reference lists all Lifelines methods, whether or not they are implemented, and whether or not they are identical or require some modification. Fully supported methods are in black
; methods needing modification are in green
, and methods not implemented are in red
. The subsections are:
Convert these to python syntax as explain above.
Convert these to python syntax as explain above.
Conditionals, while loops, and procedure calls must all be converted to python syntax as explained above. Some additional statements also require minor changes:
include(string) | Replace with python import methods |
global(varb) | Replace with varb = None |
set(varb, expr) | Replace with varb = expr |
continue() | Use python continue command |
break() | Use python break command |
return([expr]) | Any python method can return a value with return expr |
All expression should be converted to python expressions, which are very similar to most programming languages. Most Lifelines functions used in expressions are supported for convenience.
The include(string)
statement is not supported in this translation. It can easily be replaced by putting the other script into a python module and then importing it with
import string from string import *
Python will look for such modules in the same directory as the source script or in various other locations. When running in GEDitCOM II, python will look for modules in the "Modules" directory of the GEDitCOM II libraries in either the user or the system level "Application Support" folders.
The follow sections list translations for Lifelines functions.
Many types are built-in python types. A few special types are implemented using python classes. Besides these types, you can extend the script with any other python types (e.g., longs (for unlimited integer precision) or floats).
INT | Python integer |
BOOL | Python True or False |
STRING | Python string |
LIST | Python list |
TABLE | Python dictionary |
INDI | GEDitCOM II individual record |
FAM | GEDitCOM II family record |
SET | Python custom SET class (defined in the lifelines module) |
NODE | GEDitCOM II structure |
EVENT | Python custom EVENT class (defined in the lifelines module) |
These Lifelines methods are mostly supported, but you can also convert to standard, simpler, and more powerful python expressions. The translations are:
INT add(x, y) | Same or change to x + y |
INT sub(x, y) | Same or change to x - y |
INT mul(x, y) | Same or change to x * y |
INT div(x, y) | Use div in the lifelines.py module or change to x / y |
INT mod(x, y) | Same or change to x % y |
INT exp(x, y) | Same or change to x ** y |
INT neg(x) | Same or change to -x |
VOID incr(x) | Replace with x += 1 |
VOID decr(x) | Replace with x -= 1 |
BOOL and(x, y) | Replace with x and y because and is a protected keyword in python |
BOOL or(x, y) | change to x or y because or is a protected keyword in python |
BOOL not(x) | Same - a standard python function |
BOOL eq(x, y) | Same or change to x == y |
BOOL ne(x, y) | Same or change to x != y |
BOOL lt(x, y) | Same or change to x < y |
BOOL gt(x, y) | Same or change to x > y |
BOOL le(x, y) | Same or change to x <= y |
BOOL ge(x, y) | Same or change to x >= y |
To support the Lifelines style, you need to import them from the operator
module at the beginning of the script using:
from operator import add,sub,mul,mod,neg,eq,ne,lt,gt,le,ge
Note the Lifelines is all integer calculations. In python you can enforce integer calculations or use floating point or longs (which have unlimited precision) as well.
Also notice that you should not import the python operator for div
. The problem is that div
was deleted in python 3.x. Thus, if you import it in a script, you will limited to using python 2.7. Furthermore, the results might vary depending on type of numbers passed to the operator function (i.e., integer or floating point numbers). Instead of importing div
, you can use the div()
function defined in the lifelines.py
module. This module version always returns an integer division regardless of the variable types passed as arguments. To get floating-point divisions, use standard python divide expressions (e.g., x/y
) instead of the div()
function.
The following functions retrieve information about an individual. When the function needs an INDI, you pass a reference to a GEDitCOM II individual record.
STRING name(INDI [,BOOL]) | Same, but passing FALSE in optional parameter (which is not the default behavior) is faster. |
STRING fullname(INDI,BOOL,BOOL,INT) | Same |
STRING surname(INDI) | Same or use indi.surname() |
STRING givens(INDI) | Same |
STRING trimname(INDI,INT) | Same |
EVENT birth(INDI) | Same |
EVENT death(INDI) | Same |
EVENT baptism(INDI) | Same |
EVENT burial(INDI) | Same |
EVENT father(INDI) | Same |
EVENT mother(INDI) | Same |
EVENT nextsib(INDI) | Not implemented |
EVENT prevsib(ni) | Not implemented |
STRING sex(INDI) | Same |
BOOL male(INDI) | Same |
BOOL female(INDI) | Same |
STRING pn(INDI) | Same |
INT nspouses(INDI) | Same |
INT nfamilies(INDI) | Same |
FAM parents(INDI) | Same |
STRING title(INDI) | Same |
STRING key(INDI|FAM[,BOOL]) | Similar. It returns the GEDCOM ID for the record without the @ signs. The second parameter can be used, but it is ignored. |
STRING soundex(INDI) | Same or use indi.surnameSoundex() |
NODE inode(INDI) | Not needed - pass the individual directly to functions needing the root node. |
NODE root(INDI) | Not needed - pass the individual directly to functions needing the root node. |
INDI indi(STRING) | Same. You can also use indi(key,doc) where doc is reference to a document if you want to get a record in a document other than the front document. The key can be provided with or without the @ signs. |
INDI firstindi() | Same. Can pass document reference to find first individual in document other than front document. |
INDI nextindi(INDI) | Not implemented - use forindi() |
INDI previndi(INDI) | Not implemented - use forindi() |
spouses(indi,sp,fam,num) { statements } | Change to following loop:(sp,fam,num,iter) = spouses(indi) while sp : statements (sp,fam,num) = spouses(iter)The iter is defined in the initialization that calls spouses() with indi . The call at the end of the loop uses iter instead of indi .
|
families(indi,fam,sp,num) { statements } | Change to following loop:(fam,sp,num,iter) = families(indi) while fam : statements (fam,sp,num) = families(iter)The iter is defined in the initialization that calls families() with indi . The call at the end of the loop uses iter instead of indi .
|
forindi(indi,num) { statements } | Change to following loop:for (num0,indi) in forindi() : num = num0+1 statementsNotice that order is switched to (num0,indi) because of way python enumerates lists. Also, python uses zero-based lists which means num0 will be one less than the corresponding num in the Lifelines script. You can also optionally use forindi(doc) if you want to enumerate individuals in a document other than the front document.
|
The following functions retrieve information about a family. When the function needs an FAM, you pass a reference to a GEDitCOM II family record.
EVENT marriage(FAM) | Same |
INDI husband(FAM) | Same |
INDI wife(FAM) | Same |
INT nchildren(FAM) | Same |
INDI firstchild(FAM) | Same |
INDI lastchild(FAM) | Same |
STRING key(INDI|FAM[,BOOL]) | Similar. It returns the GEDCOM ID for the record without the @ signs. The second parameter can be used, but it is ignored. |
NODE fnode(INDI) | Not needed - pass the family directly to functions needing the root node. |
NODE root(INDI) | Not needed - pass the family directly to functions needing the root node. |
FAM fam(STRING) | Same. You can also use fam(key,doc) where doc is reference to a document if you want to get a record in a document other than the front document. The key can be provided with or without the @ signs |
INDI firstfam() | Same. Can pass document reference to find first family in document other than front document. |
INDI nextfam(FAM) | Not implemented - use forfam() |
INDI prevfam(FAM) | Not implemented - use forfam() |
children(fam,chil,num) { statements } | Change to following loop:for (num0,chil) in children(fam) : num = num0+1 statementsNotice that order is switched to (num0,chil) because of way python enumerates lists. Also, python uses zero-based lists which means num0 will be one less than the corresponding num in the Lifelines script. |
forfam(fam,num) { statements } | Change to following loop:for (num0,fam) in forfam() : num = num0+1 statementsNotice that order is switched to (num0,fam) because of way python enumerates lists. Also, python uses zero-based lists which means num0 will be one less than the corresponding num in the Lifelines script. You can also optionally use forfam(doc) if you want to enumerate families in a document other than the front document. |
Lists are handled by standard python lists, which means you can make use of all the python list methods as well. The Lifelines methods are implemented as follows (some just for convenience):
VOID list(LIST_V) | Replace with LIST_V = list() or LIST_V = [] . The list() function is a built-in python method. You can optionally pass another list as an argument, LIST_V = list(OTHER) , and LIST_V will be a new list with a copy of OTHER . |
BOOL empty(LIST) | Same or use len(LIST) == 0 |
INT length(LIST) | Same or use len(LIST) |
VOID enqueue(LIST,ANY) | Same |
ANY dequeue(LIST) | Same |
VOID requeue(LIST,ANY) | Same |
VOID push(LIST,ANY) | Same |
ANY pop(LIST) | Same |
VOID setel(LIST,INT,ANY) | Same |
ANY getel(LIST,INT) | Same |
forlist(alist,val,num) { statements } | Change to following loop:
for (num0,val) in forlist() : num = num0+1 statementsNotice that order is switched to (num0,val) because of way python enumerates lists. Also, python uses zero-based lists which means num0 will be one less than the corresponding num in the Lifelines script.
|
Tables are handled by standard python dictionaries, which means you can make use of all the python dictionary methods. The Lifelines methods are implemented as follows (some just for convenience):
VOID table(TABLE_V) | Replace with TABLE_V = table() or TABLE_V = {} . |
VOID insert(TABLE,STRING,ANY) | Same |
ANY lookup(TABLE,STRING) | Same |
Lifelines nodes are equivalent to GEDitCOM II structures. In addition, GEDitCOM II record objects can be used wherever a NODE is expected and it will be treated as the root or level 0 node for that record (a record's tag is its record type and its value is its record ID with the @ signs).
STRING xref(NODE) | Not implemented |
STRING tag(NODE) | Same or use NODE.name() |
STRING value(NODE) | Same or use NODE.contents() |
NODE parent(NODE) | Same |
NODE child(NODE) | Same |
NODE sibling(NODE) | Same |
NODE savenode(NODE) | Not implemented |
fornodes(node,nodev) { statements } | Change to following loop:
for (num0,nodev) in fornodes(node) : statementsThe num0 is the zero-based count of nodes and can be ignored in conversions. |
traverse(node,nodev,lev) { statements } | Change to following loop:
(nodev,lev,iter) = traverse(node) while nodev : statements (nodev,lev) = traverse(iter)The iter is defined in the initialization that calls traverse() with node . The call at the end of the loop uses iter instead of node .
|
Note that traversing over all nodes can be slow in large files in both Lifelines and in GEDitCOM II. Scripts that use this method can often be made much faster by alternate methods. For example, you can grab the entire GEDCOM text of record or structure in a single GEDitCOM II record or structure property (e.g., indi.gedcom()
). Once you have the GEDCOM string, you an step through the lines using python's built-in and powerful text tools.
A custom EVENT
class handles the Lifelines style events.
STRING date(EVENT) | Same |
STRING place(EVENT) | Same |
STRING year(EVENT) | Same. Year as string or empty string if no valid year in the date. |
STRING long(EVENT) | Same |
STRING short(EVENT) | Same, but it is identical to long(EVENT) |
EVENT gettoday() | Same |
VOID dayformat(EVENT) | Same, except 0 is same as 2 |
VOID monthformat(EVENT) | Same, except 0 is same as 2, 5 is same as 3, and 6 is same as 4 |
VOID dateformat(EVENT) | Same |
STRING stddate(EVENT) | Same |
VOID extractdate(NODE,INV_V,INV_V,INV_V) | Replace with (day,month,year) = extractdate(NODE) . The returned result will be (0,0,0) for an invalid or missing date. |
VOID extractnames(NODE,LIST_V,INV_V,INV_V) | Replace with (LIST_V,INT_V,INT_V) = extractnames(NODE) |
VOID extractplaces(NODE,LIST_V,INV_V) | Replace with (LIST_V,INT_V) = extractplaces(NODE) |
VOID extracttokens(STRING,LIST_V,INV_V,STRING) | Replace with (LIST_V,INT_V) = extracttokens(STRING,STRING) |
VOID getindi(INDI_V[,STRING]) | Revise to INDI_V = getindi() . Also STRING is not supported but can pass document object to get individual not in the front document. |
VOID getindimsg(INDI_V,STRING) | Same as getindi() |
VOID getindiset(SEV_V[,STRING]) | (not implemented) |
VOID getfam(FAM_V[,STRING]) | Revise to FAM_V = getfam() . Also STRING is not support but can pass document object to get family not in the front document. |
VOID getint(INT_V [,STRING]) | Replace with INT_V = getint([String]) |
VOID getstr(STRING_V[,STRING]) | Replace with STRING_V = getstr([STRING,STRING]) where first string is initial text to display to user and second string is the prompt. |
VOID getstrmsg(STRING_V,STRING) | Same as getstr() |
INDI choosechild(INDI|FAM) | Same. Can pass document reference in a second parameter if the individual or family is not in the front document. |
FAM choosefam(INDI) | Same. Can pass document reference in a second parameter if the individual is not in the front document. |
INDI chooseindi(SET) | Same. Can pass document reference in a second parameter if the individuals are not in the front document. |
INDI choosespouse(INDI) | Same. Can pass document reference in a second parameter if the individual in not in the front document. |
SET choosesubset(SET) | Not implemented |
INT menuchoose(LIST [,STRING]) | Same |
Strings are handled by standard python strings, which means you can make use of all the python string methods as well. The Lifelines methods are implemented as follows (some just for convenience):
STRING lower(STRING) | Same |
STRING upper(STRING) | Same |
STRING capitalize(STRING) | Same |
STRING trim(STRING, INT) | Same |
STRING rjustify(STRING, INT) | Same |
STRING save(STRING) | Same |
STRING strsave(STRING) | Same |
STRING concat(STRING [,STRING]+) | Same, can have any number of arguments. |
STRING strconcat(STRING [,STRING]+) | Same, can have any number of arguments. |
INT strlen(STRING) | Same |
STRING substring(STRING, INT, INT) | Same |
INT index(STRING, STRING, INT) | Same |
STRING d(INT) | Same |
STRING card(INT) | Same, except works only for 0 to 10. |
STRING ord(INT) | Same, except output is 1st, 2nd, etc. |
STRING alpha(INT) | Same |
STRING roman(INT) | Same |
STRING strsoundex(STRING) | Same |
INT strtoint(STRING) | Same |
INT atoi(STRING) | Same |
INT strcmp(STRING, STRING) | Same |
BOOL eqstr(STRING, STRING) | Same |
BOOL nestr(STRING, STRING) | Same |
In Lifelines scripts, elements that are not function calls are sent to the output. This method has to be modified in this emulator. The functions are listed here; the details as below the table.
VOID linemode() | Same, except move before ll_init() |
VOID pagemode(INT, INT) | Same, except move before ll_init() |
VOID col(INT) | Same in page mode, not allowed in line mode |
VOID row(INT) | Same |
VOID pos(INT, INT) | Same |
VOID pageout() | Same |
STRING nl() | Outputs the new line (in method that depends on mode), but does not return a string. It must be moved to a separate line. |
STRING sp() | Same |
STRING qt() | Same |
VOID newfile(STRING,BOOL) | Not implemented - but easy to support in python file methods (or add to the module if needed) |
STRING outfile() | Move this to before ll_init() and the report will be diverted to a file, which the user will select from standard Mac file dialog window. It can be used after ll_init() to retrieve the file name (full POSIX style path). |
VOID copyfile(STRING) | Not implemented - but easy to support in python file methods (or add to the module if needed) |
VOID print(STRING[,STRING]*) | Although python has a print command, the command works differently in python 2.7 then in 3.0. Furthermore, because of the way prints are handled for a python script running in a thread, calls to print will not appear in the GEDitCOM II message window when desired. The solution is to convert print() calls to message() calls. The only drawback is that a message() call always prints a full line to the message window. Some Lifelines scripts use print commands to indicate progress (such as printing dots to a line). When using message() calls instead, each dot will be on a new line. |
The line mode is the default mode. In this mode strings are just appended to the output. Sections of Lifelines scripts that output content, however, must combine the content into strings and then pass the string to the out()
command provided in this emulator to handle output. For example, a line such as:
"ANCESTORS OF -- " upper(name(i)) " (" key(i) ") " nl() nl()
should be converted to
out("ANCESTORS OF -- "+upper(name(i))+" ("+key(i)+") ") nl() nl()
which combines the strings (with +
's), sends the result to out()
, and moves the nl()
commands to their own lines. Alternatively, the nl()
can be replaced with new line characters:
out("ANCESTORS OF -- "+upper(name(i))+" ("+key(i)+") \n\n")
The line mode does not support the col()
command. As a convenience, this emulator provides a cols()
function to help rewrite Lifelines output in line mode that uses col()
. For example, Linelines output such as:
col(1) name(i) col(38) key(i) col(49) stddate(birth(i)) col(64) stddate(death(i)) nl()
can be converted to
cols(name(i),38,key(),49,stddate(birth(i)),64,stddate(death(i))) nl()
If the output is spread into separate statements, each call to cols()
restarts at column 1 and you have to adjust the subsequent the column numbers. The above example could be converted to two statements using:
cols(name(i),38,key(),49) cols(stddate(birth(i)),15,stddate(death(i))) nl()
If the first item does not start in column 1, you can indent with:
cols("",5,name(i))
Finally, any column number can be negative of the desired column to right justify the preceding text in that output field.
Output in page mode is closer to Lifelines output except that all row()
, col()
, and pos()
have to move to their own lines and all strings have to be sent to out()
. For example, the Lifelines output:
pos(4,10) " FULL NAME: " name(i) col(46) "(" key(i) ")" nl() nl()
can converted to
pos(4,10) out(" FULL NAME: "+name(i)) col(46) out("("+key(i)+")") nl() nl()
Furthermore, you should use nl()
to advance to next row in page mode and not simply output the character "\n"
.
By default, the output is sent to a GEDitCOM II report with fixed-space font. To direct to a file instead of a report, use an outfile()
command before the ll_init()
command.
These functions are implemented with a custom SET class.
VOID indiset(SET_V) | Replace with SET_V = indiset() |
SET addtoset(SET,INDI,ANY) | Same |
SET deletefromset(SET,INDI,BOOL) | Same |
INT lengthset(SET) | Same |
SET union(SET, SET) | Same |
SET intersect(SET, SET) | Same |
SET difference(SET, SET) | Sme |
SET parentset(SET) | Same |
SET childset(SET) | Same |
SET spouseset(SET) | Same |
SET siblingset(SET) | Same |
SET ancestorset(SET) | Same except can optionally add document in a second parameter if not for front document |
SET descendentset(SET) | Same except can optionally add document in a second parameter if not for front document |
SET descendantset(SET) | Same except can optionally add document in a second parameter if not for front document |
SET uniqueset(SET) | Same |
VOID namesort(SET) | Same |
VOID keysort(SET) | Same |
VOID valuesort(SET) | Same |
VOID genindiset(STRING,SET) | Not implemented |
VOID gengedcom(SET) | Not implemented |
forindiset(b,i,v,n) | Change the loop to
(i,v,n,iter) = forindiset(b) while i : statements (i,v,n) = forindiset(iter)The iter is defined in the initialization that calls forindiset() with the set. The call at the end of the loop uses iter instead of the set.
|
This Lifelines emulation does not support editing of the data. You can however, use other GEDitCOM II script-editing methods to make changes to the data in a script.
NODE createnode(STRING, STRING) | Not implemented |
VOID addnode(NODE, NODE, NODE) | Not implemented |
VOID deletenode(NODE) | Not implemented |
BOOLEAN reference(STRING) | Same |
NODE dereference(STRING) | Same |
NODE getrecord(STRING) | Same |
VOID lock(INDI|FAM) | Not implemented |
VOID unlock(INDI|FAM) | Not implemented |
STRING database() | Same, except name of GEDitCOM II document |
STRING version() | Same, except GEDitCOM II version number |
VOID system(STRING) | Same |
These methods were added as needed in various scripts and were used to keep the Lifelines emulation separate from all other GEDitCOM II modules.