Merge pull request #913 from prculley:bug11316

This commit is contained in:
Nick Hall 2019-10-03 19:58:49 +01:00
commit 48dfca57e2
8 changed files with 574 additions and 816 deletions

View File

@ -9,6 +9,12 @@ beg
- h Hans_Peter.8 17/4/1904 #bp Rønne,_Bornholm,_Denmark 29/1/1977 #dp San_Francisco,_San_Francisco_Co.,_CA
end
notes Hansdotter Anna.1
beg
******************************************************************890123456789
******************************************************************89 123456789
end notes
notes Smith Hjalmar.5
beg
BIOGRAPHY
@ -61,7 +67,7 @@ Some Bold Unicode Characters: ࣶǼЀج⿄㑝&#15691
Some Italic Unicode Characters: ࣶǼЀج⿄㑝㵋圛墉幵聟聦𐅉🚶🛈
end notes
fam Smith Gus.6 +~1920 Michaels Evelyn.25 ~1897
fam Smith Gus.6 +~1920 Michaels Evelyn.25 ~1897 0
fam Smith Hjalmar.5 +31/10/1927 #mp Reno,_Washoe_Co.,_NV Ohman Marjorie.26 3/6/1903 #bp Denver,_Denver_Co.,_CO,_Denver_Co.,_Colorado,_USA 22/6/1980 #dp Reno,_Washoe_Co.,_NV
beg
@ -98,13 +104,18 @@ beg
- h Martin.17 1794..1796 #bp Tommarp,_Kristianstad_Län,_Sweden #dp Sweden
end
fam Willard Edwin.42 ~1886 +~1910 Smith Kirsti_Marie.2
fam Willard Edwin.42 ~1886 0 +~1910 Smith Kirsti_Marie.2
fam Smith Magnes.38 +24/8/1884 #mp Rønne,_Bornholm,_Denmark Streiffert Anna.43 23/9/1860 #bp Hoya/Jona/Hoia,_Sweden 2/2/1927 #dp Rønne,_Bornholm,_Denmark
fam Tester The.14 + Tester Mrs.44 0
beg
- h Tom.45 0
- h Tom.45 Von_Tester_y_tested 0
- Fake.46 von_Person 1954 #bp Fremont,_Alameda_Co.,_CA
- f Mary.47 0
- f Martha.48 0
- h John.49 0
- h Mark.50 0
end
notes Tester Mrs.44

File diff suppressed because it is too large Load Diff

View File

@ -1,47 +1,52 @@
Anna Hansdotter;;;;;2/10/1864-29/9/1945
Keith Lloyd Smith;Lloyd Smith;Janis Green;;;11/8/1966
Hans Peter Smith;Gustaf Smith;Anna Hansdotter;;;17/4/1904-29/1/1977
Hanna Smith;Martin Smith0;Elna Jefferson;;;29/1/1821
Herman Julius Nielsen;;;;;31/8/1889-1945
Evelyn Michaels;;;;;1897
Marjorie Lee Smith;Hjalmar Smith0;Marjorie Ohman;;;4/11/1934
Gus Smith;Gustaf Smith;Anna Hansdotter;;;11/9/1897-21/10/1963
Jennifer Anderson;;;;;5/11/1907-29/5/1985
Lillie Harriet Jones;;;;;2/5/1910-26/6/1990
John Hjalmar Smith;Hjalmar Smith0;Marjorie Ohman;;;30/1/1932
Eric Lloyd Smith;Lloyd Smith;Janis Green;;;28/8/1963
Amber Marie Smith;Edwin Smith;Janice Adams;;;12/4/1998
Carl Emil Smith;Gustaf Smith;Anna Hansdotter;;;20/12/1899-28/1/1959
Hjalmar Smith;Gustaf Smith;Anna Hansdotter;;;31/1/1893-25/9/1894
Martin Smith;Martin Smith0;Elna Jefferson;;;19/11/1830-1899
Astrid Shermanna Augusta Smith;Gustaf Smith;Anna Hansdotter;;;31/1/1889-21/12/1963
Gustaf Smith, Sr.;Martin Smith;Kerstina Hansdotter;;;28/11/1862-23/7/1930
Marta Ericsdotter;;;;;1775
Kirsti Marie Smith;Gustaf Smith;Anna Hansdotter;;;15/12/1886-18/7/1966
Ingeman Smith;;;;;1770
Anna Streiffert;;;;;23/9/1860-2/2/1927
Craig Peter Smith;Lloyd Smith;Janis Green;;;1966
Magnes Smith;Martin Smith;Kerstina Hansdotter;;;6/10/1858-20/2/1910
Janice Ann Adams;;;;;26/8/1965
Marjorie Ohman;;;;;3/6/1903-22/6/1980
Darcy Horne;;;;;2/7/1966
Alice Paula Perkins;;;;;22/11/1933
Lars Peter Smith;Eric Smith;Darcy Horne;;;16/9/1991
Ingeman Smith0;Martin Smith0;Elna Jefferson;;;29/1/1826
Lloyd Smith;Hans Smith;Lillie Jones;;;13/3/1935
Elna Jefferson;;;;;14/9/1800-
Edwin Michael Smith;John Smith;Alice Perkins;;;24/5/1961
Kerstina Hansdotter;;;;;29/11/1832-1908
Martin Smith0;Ingeman Smith;Marta Ericsdotter;;;1794-
Marjorie Alice Smith0;John Smith;Alice Perkins;;;5/2/1960
Janis Elaine Green;;;;;2/12/1935
Mason Michael Smith;Edwin Smith;Janice Adams;;;26/6/1996
Edwin Willard;;;;;1886
Ingar Smith;Martin Smith0;Elna Jefferson;;;1823
Hjalmar Smith0;Gustaf Smith;Anna Hansdotter;;;7/4/1895-26/6/1975
Emil Smith;Martin Smith;Kerstina Hansdotter;;;27/9/1860
雪 Ke 柯;Herman Nielsen;Astrid Smith;;;
The Tester;Lloyd Smith;Janis Green;;;29/12/1954
Mrs Tester;;;;;
ピーター リチミシキスイミ;;;;;
Tom Tester;The Tester;Mrs Tester;;;
Anna Hansdotter;;;;;2/10/1864-29/9/1945
Keith Lloyd Smith;Lloyd Smith;Janis Green;;;11/8/1966
Hans Peter Smith;Gustaf Smith;Anna Hansdotter;;;17/4/1904-29/1/1977
Hanna Smith;Martin Smith0;Elna Jefferson;;;29/1/1821
Herman Julius Nielsen;;;;;31/8/1889-1945
Evelyn Michaels;;;;;1897
Marjorie Lee Smith;Hjalmar Smith0;Marjorie Ohman;;;4/11/1934
Gus Smith;Gustaf Smith;Anna Hansdotter;;;11/9/1897-21/10/1963
Jennifer Anderson;;;;;5/11/1907-29/5/1985
Lillie Harriet Jones;;;;;2/5/1910-26/6/1990
John Hjalmar Smith;Hjalmar Smith0;Marjorie Ohman;;;30/1/1932
Eric Lloyd Smith;Lloyd Smith;Janis Green;;;28/8/1963
Amber Marie Smith;Edwin Smith;Janice Adams;;;12/4/1998
Carl Emil Smith;Gustaf Smith;Anna Hansdotter;;;20/12/1899-28/1/1959
Hjalmar Smith;Gustaf Smith;Anna Hansdotter;;;31/1/1893-25/9/1894
Martin Smith;Martin Smith0;Elna Jefferson;;;19/11/1830-1899
Astrid Shermanna Augusta Smith;Gustaf Smith;Anna Hansdotter;;;31/1/1889-21/12/1963
Gustaf Smith, Sr.;Martin Smith;Kerstina Hansdotter;;;28/11/1862-23/7/1930
Marta Ericsdotter;;;;;1775
Kirsti Marie Smith;Gustaf Smith;Anna Hansdotter;;;15/12/1886-18/7/1966
Ingeman Smith;;;;;1770
Anna Streiffert;;;;;23/9/1860-2/2/1927
Craig Peter Smith;Lloyd Smith;Janis Green;;;1966
Magnes Smith;Martin Smith;Kerstina Hansdotter;;;6/10/1858-20/2/1910
Janice Ann Adams;;;;;26/8/1965
Marjorie Ohman;;;;;3/6/1903-22/6/1980
Darcy Horne;;;;;2/7/1966
Lloyd Smith;Hans Smith;Lillie Jones;;;13/3/1935
Alice Paula Perkins;;;;;22/11/1933
Lars Peter Smith;Eric Smith;Darcy Horne;;;16/9/1991
Elna Jefferson;;;;;14/9/1800-
Edwin Michael Smith;John Smith;Alice Perkins;;;24/5/1961
Kerstina Hansdotter;;;;;29/11/1832-1908
Martin Smith0;Ingeman Smith;Marta Ericsdotter;;;1794-
Ingeman Smith0;Martin Smith0;Elna Jefferson;;;29/1/1826
Marjorie Alice Smith0;John Smith;Alice Perkins;;;5/2/1960
Janis Elaine Green;;;;;2/12/1935
Mason Michael Smith;Edwin Smith;Janice Adams;;;26/6/1996
Edwin Willard;;;;;1886
Ingar Smith;Martin Smith0;Elna Jefferson;;;1823
Hjalmar Smith0;Gustaf Smith;Anna Hansdotter;;;7/4/1895-26/6/1975
Emil Smith;Martin Smith;Kerstina Hansdotter;;;27/9/1860
雪 Ke 柯;Herman Nielsen;Astrid Smith;;;
ピーター リチミシキスイミ;;;;;
The Tester;Lloyd Smith;Janis Green;;;29/12/1954
Mrs Tester;;;;;
Tom Von Tester y tested;The Tester;Mrs Tester;;;
Fake von Person, I;The Tester;Mrs Tester;;;1954-
Mary Tester;The Tester;Mrs Tester;;;
Martha Tester;The Tester;Mrs Tester;;;
John Tester;The Tester;Mrs Tester;;;
Mark Tester;The Tester;Mrs Tester;;;

View File

@ -30,66 +30,65 @@
[P0014],"Denver, Denver Co., CO","Denver, Denver Co., CO",City,39.7392,104.9903 W,,[P0024],
Person,Surname,Given,Call,Suffix,Prefix,Title,Gender,Birth date,Birth place,Birth source,Baptism date,Baptism place,Baptism source,Death date,Death place,Death source,Burial date,Burial place,Burial source,Note
[I0030],Adams,Janice Ann,,,,,female,26 Aug 1965,"Fremont, Alameda Co., CA",,,,,,,,,,,
[I0016],Anderson,Jennifer,,,,,female,5 Nov 1907,"Rønne, Bornholm, Denmark",,,,,29 May 1985,"San Francisco, San Francisco Co., CA",,,,,
[I0025],Ericsdotter,Marta,,,,,female,about 1775,Sweden,,,,,,,,,,,
[I0041],Green,Janis Elaine,,,,,female,2 Dec 1935,,,,,,,,,,,,
[I0000],Hansdotter,Anna,,,,,female,2 Oct 1864,"Löderup, Malmöhus Län, Sweden",,,,,29 Sep 1945,"Sparks, Washoe Co., NV",,,,,
[I0038],Hansdotter,Kerstina,,,,,female,29 Nov 1832,"Smestorp, Kristianstad Län, Sweden",,,,,before 1908,Sweden,,,,,
[I0032],Horne,Darcy,,,,,female,2 Jul 1966,"Sacramento, Sacramento Co., CA",,,,,,,,,,,
[I0036],Jefferson,Elna,,,,,female,14 Sep 1800,"Gladsax, Kristianstad Län, Sweden",,,,,,Sweden,,,,,
[I0017],Jones,Lillie Harriet,,,,,female,2 May 1910,"Rønne, Bornholm, Denmark",,,,,26 Jun 1990,,,,,,
[I0030],Adams,Janice Ann,,,,,female,1965-08-26,[P0013],,,,,,,,,,,
[I0016],Anderson,Jennifer,,,,,female,1907-11-05,[P0003],,,,,1985-05-29,[P0002],,,,,
[I0025],Ericsdotter,Marta,,,,,female,about 1775,[P0008],,,,,,,,,,,
[I0041],Green,Janis Elaine,,,,,female,1935-12-02,,,,,,,,,,,,
[I0000],Hansdotter,Anna,,,,,female,1864-10-02,[P0000],,,,,1945-09-29,[P0001],,,,,
[I0038],Hansdotter,Kerstina,,,,,female,1832-11-29,[P0019],,,,,before 1908,[P0008],,,,,
[I0032],Horne,Darcy,,,,,female,1966-07-02,[P0015],,,,,,,,,,,
[I0036],Jefferson,Elna,,,,,female,1800-09-14,[P0004],,,,,,[P0008],,,,,
[I0017],Jones,Lillie Harriet,,,,,female,1910-05-02,[P0003],,,,,1990-06-26,,,,,,
[I0042],Ke 柯,雪,,,,,male,,,,,,,,,,,,,
[I0013],Michaels,Evelyn,,,,,female,about 1897,,,,,,,,,,,,
[I0012],Nielsen,Herman Julius,,,,,male,31 Aug 1889,"Rønne, Bornholm, Denmark",,,,,1945,,,,,,
[I0031],Ohman,Marjorie,,,,,female,3 Jun 1903,"Denver, Denver Co., CO, Denver Co., Colorado, USA",,,,,22 Jun 1980,"Reno, Washoe Co., NV",,,,,
[I0034],Perkins,Alice Paula,,,,,female,22 Nov 1933,"Sparks, Washoe Co., NV",,,,,,,,,,,
[I0002],Smith,Amber Marie,,,,,female,12 Apr 1998,"Hayward, Alameda Co., CA",,,,,,,,,,,
[I0023],Smith,Astrid Shermanna Augusta,,,,,female,31 Jan 1889,"Rønne, Bornholm, Denmark",,,,,21 Dec 1963,"San Francisco, San Francisco Co., CA",,,,,
[I0020],Smith,Carl Emil,,,,,male,20 Dec 1899,"Rønne, Bornholm, Denmark",,,,,28 Jan 1959,"Reno, Washoe Co., NV",,,,,
[I0029],Smith,Craig Peter,,,,,male,after 1966,"San Francisco, San Francisco Co., CA",,,,,,,,,,,
[I0037],Smith,Edwin Michael,,,,,male,24 May 1961,"San Jose, Santa Clara Co., CA","Birth, Death and Marriage Records",,,,,,,,,,
[I0009],Smith,Emil,,,,,male,27 Sep 1860,"Simrishamn, Kristianstad Län, Sweden",,,,,,,,,,,
[I0019],Smith,Eric Lloyd,,,,Dr.,male,28 Aug 1963,"San Francisco, San Francisco Co., CA",,,,,,,,,,,
[I0015],Smith,Gus,,,,,male,11 Sep 1897,"Rønne, Bornholm, Denmark",,,,,21 Oct 1963,"San Francisco, San Francisco Co., CA",,,,,
[I0024],Smith,Gustaf,,Sr.,,,male,28 Nov 1862,"Grostorp, Kristianstad Län, Sweden",,,,,before 23 Jul 1930,"Sparks, Washoe Co., NV",,,,,
[I0011],Smith,Hanna,,,,,female,29 Jan 1821,"Gladsax, Kristianstad Län, Sweden",,,,,,,,,,,
[I0010],Smith,Hans Peter,,,,,male,17 Apr 1904,"Rønne, Bornholm, Denmark",Birth Records,,,,29 Jan 1977,"San Francisco, San Francisco Co., CA",,5 Feb 1977,"San Francisco, San Francisco Co., CA",findagrave.com,
[I0021],Smith,Hjalmar,,,,,male,31 Jan 1893,"Rønne, Bornholm, Denmark",,,,,25 Sep 1894,"Rønne, Bornholm, Denmark",,,,,
[I0008],Smith,Hjalmar,,,,,male,7 Apr 1895,"Rønne, Bornholm, Denmark",,3 Jun 1895,"Rønne Bornholm, Denmark",,26 Jun 1975,"Reno, Washoe Co., NV",,,,,
[I0007],Smith,Ingar,,,,,female,after 1823,"Gladsax, Kristianstad Län, Sweden",,,,,,,,,,,
[I0027],Smith,Ingeman,,,,,male,about 1770,Sweden,,,,,,,,,,,
[I0004],Smith,Ingeman,,,,,male,29 Jan 1826,"Gladsax, Kristianstad Län, Sweden",,,,,,,,,,,
[I0018],Smith,John Hjalmar,,,,,male,30 Jan 1932,"San Francisco, San Francisco Co., CA",,,,,,,,,,,
[I0001],Smith,Keith Lloyd,,,,,male,11 Aug 1966,"San Francisco, San Francisco Co., CA",,,,,,,,,,,
[I0026],Smith,Kirsti Marie,,,,,female,15 Dec 1886,"Rønne, Bornholm, Denmark",,,,,18 Jul 1966,"San Francisco, San Francisco Co., CA",,,,,
[I0035],Smith,Lars Peter,,,,,male,16 Sep 1991,"Santa Rosa, Sonoma Co., CA",,,,,,,,,,,
[I0033],Smith,Lloyd,,,,,male,13 Mar 1935,"San Francisco, San Francisco Co., CA",,,,,,,,,,,
[I0003],Smith,Magnes,,,,,male,6 Oct 1858,"Simrishamn, Kristianstad Län, Sweden",,,,,20 Feb 1910,"Rønne, Bornholm, Denmark",,,,,
[I0040],Smith,Marjorie Alice,,,,,female,5 Feb 1960,"San Jose, Santa Clara Co., CA",,,,,,,,,,,
[I0014],Smith,Marjorie Lee,,,,,female,4 Nov 1934,"Reno, Washoe Co., NV",,,,,,,,,,,
[I0022],Smith,Martin,,,,,male,19 Nov 1830,"Gladsax, Kristianstad Län, Sweden",,23 Nov 1830,"Gladsax, Kristianstad Län, Sweden",,between 1899 and 1905,Sweden,,,,,
[I0039],Smith,Martin,,,,,male,between 1794 and 1796,"Tommarp, Kristianstad Län, Sweden",,,,,,Sweden,,,,,
[I0005],Smith,Mason Michael,,,,,male,26 Jun 1996,"Hayward, Alameda Co., CA",,,,,,,,,,,
[I0028],Streiffert,Anna,,,,,female,23 Sep 1860,"Hoya/Jona/Hoia, Sweden",,,,,2 Feb 1927,"Rønne, Bornholm, Denmark",,,,,
[I0012],Nielsen,Herman Julius,,,,,male,1889-08-31,[P0003],,,,,1945,,,,,,
[I0031],Ohman,Marjorie,,,,,female,1903-06-03,[P0014],,,,,1980-06-22,[P0005],,,,,
[I0034],Perkins,Alice Paula,,,,,female,1933-11-22,[P0001],,,,,,,,,,,
[I0002],Smith,Amber Marie,,,,,female,1998-04-12,[P0006],,,,,,,,,,,
[I0023],Smith,Astrid Shermanna Augusta,,,,,female,1889-01-31,[P0003],,,,,1963-12-21,[P0002],,,,,
[I0020],Smith,Carl Emil,,,,,male,1899-12-20,[P0003],,,,,1959-01-28,[P0005],,,,,
[I0029],Smith,Craig Peter,,,,,male,after 1966,[P0002],,,,,,,,,,,
[I0037],Smith,Edwin Michael,,,,,male,1961-05-24,[P0017],"Birth, Death and Marriage Records",,,,,,,,,,
[I0009],Smith,Emil,,,,,male,1860-09-27,[P0012],,,,,,,,,,,
[I0019],Smith,Eric Lloyd,,,,Dr.,male,1963-08-28,[P0002],,,,,,,,,,,
[I0015],Smith,Gus,,,,,male,1897-09-11,[P0003],,,,,1963-10-21,[P0002],,,,,
[I0024],Smith,Gustaf,,Sr.,,,male,1862-11-28,[P0009],,,,,before 1930-07-23,[P0001],,,,,
[I0011],Smith,Hanna,,,,,female,1821-01-29,[P0004],,,,,,,,,,,
[I0010],Smith,Hans Peter,,,,,male,1904-04-17,[P0003],Birth Records,,,,1977-01-29,[P0002],,1977-02-05,[P0002],findagrave.com,
[I0021],Smith,Hjalmar,,,,,male,1893-01-31,[P0003],,,,,1894-09-25,[P0003],,,,,
[I0008],Smith,Hjalmar,,,,,male,1895-04-07,[P0003],,1895-06-03,[P0021],,1975-06-26,[P0005],,,,,
[I0007],Smith,Ingar,,,,,female,after 1823,[P0004],,,,,,,,,,,
[I0027],Smith,Ingeman,,,,,male,about 1770,[P0008],,,,,,,,,,,
[I0004],Smith,Ingeman,,,,,male,1826-01-29,[P0004],,,,,,,,,,,
[I0018],Smith,John Hjalmar,,,,,male,1932-01-30,[P0002],,,,,,,,,,,
[I0001],Smith,Keith Lloyd,,,,,male,1966-08-11,[P0002],,,,,,,,,,,
[I0026],Smith,Kirsti Marie,,,,,female,1886-12-15,[P0003],,,,,1966-07-18,[P0002],,,,,
[I0035],Smith,Lars Peter,,,,,male,1991-09-16,[P0016],,,,,,,,,,,
[I0033],Smith,Lloyd,,,,,male,1935-03-13,[P0002],,,,,,,,,,,
[I0003],Smith,Magnes,,,,,male,1858-10-06,[P0012],,,,,1910-02-20,[P0003],,,,,
[I0040],Smith,Marjorie Alice,,,,,female,1960-02-05,[P0017],,,,,,,,,,,
[I0014],Smith,Marjorie Lee,,,,,female,1934-11-04,[P0005],,,,,,,,,,,
[I0022],Smith,Martin,,,,,male,1830-11-19,[P0004],,1830-11-23,[P0004],,between 1899 and 1905,[P0008],,,,,
[I0039],Smith,Martin,,,,,male,between 1794 and 1796,[P0020],,,,,,[P0008],,,,,
[I0005],Smith,Mason Michael,,,,,male,1996-06-26,[P0006],,,,,,,,,,,
[I0028],Streiffert,Anna,,,,,female,1860-09-23,[P0011],,,,,1927-02-02,[P0003],,,,,
[I0006],Willard,Edwin,,,,,male,about 1886,,,,,,,,,,,,
[I0043],リチミシキスイミ,ピーター,,,,,male,,,,,,,,,,,,,
Marriage,Husband,Wife,Date,Place,Source,Note
[F0000],[I0039],[I0036],about 1816,"Gladsax, Kristianstad Län, Sweden",,
[F0001],[I0027],[I0025],about 1790,Sweden,,
[F0000],[I0039],[I0036],about 1816,[P0004],,
[F0001],[I0027],[I0025],about 1790,[P0008],,
[F0002],[I0022],[I0038],about 1856,,,
[F0003],[I0024],[I0000],27 Nov 1885,"Rønne, Bornholm, Denmark",,
[F0003],[I0024],[I0000],1885-11-27,[P0003],,
[F0004],[I0006],[I0026],about 1910,,,
[F0005],[I0012],[I0023],30 Nov 1912,"Rønne, Bornholm, Denmark",,
[F0006],[I0008],[I0031],31 Oct 1927,"Reno, Washoe Co., NV",,
[F0005],[I0012],[I0023],1912-11-30,[P0003],,
[F0006],[I0008],[I0031],1927-10-31,[P0005],,
[F0007],[I0015],[I0013],about 1920,,,
[F0008],[I0033],[I0041],10 Aug 1958,"San Francisco, San Francisco Co., CA",,
[F0008],[I0033],[I0041],1958-08-10,[P0002],,
[F0009],[I0010],[I0017],,,,
[F0010],[I0019],[I0032],12 Jul 1986,"Woodland, Yolo Co., CA",,
[F0011],[I0003],[I0028],24 Aug 1884,"Rønne, Bornholm, Denmark",,
[F0012],[I0018],[I0034],4 Jun 1954,"Sparks, Washoe Co., NV",Marriage Certificae,
[F0013],[I0037],[I0030],27 May 1995,"San Ramon, Conta Costa Co., CA",,
[F0010],[I0019],[I0032],1986-07-12,[P0022],,
[F0011],[I0003],[I0028],1884-08-24,[P0003],,
[F0012],[I0018],[I0034],1954-06-04,[P0001],Marriage Certificae,
[F0013],[I0037],[I0030],1995-05-27,[P0023],,
[F0014],[I0010],[I0016],,,,
Family,Child

Can't render this file because it has a wrong number of fields in line 32.

View File

@ -82,7 +82,8 @@ class FtreeWriter:
self.option_box.parse_options()
self.db = option_box.get_filtered_database(self.db)
self.plist = [x for x in self.db.iter_person_handles()]
self.plist = self.db.get_person_handles()
self.plist.sort()
# the following are used to update the progress meter
self.total = 2 * len(self.plist)
self.count = 0

View File

@ -91,7 +91,8 @@ class GeneWebWriter:
self.dirname = os.path.dirname (self.filename)
try:
with open(self.filename, "wb") as self.g:
self.flist = [x for x in self.db.iter_family_handles()]
self.flist = self.db.get_family_handles()
self.flist.sort()
if len(self.flist) < 1:
self.user.notify_error(_("No families matched by selected filter"))
return False

View File

@ -30,7 +30,7 @@
#-------------------------------------------------------------------------
import os
import sys
from time import localtime
import time
#------------------------------------------------------------------------
#
@ -51,10 +51,10 @@ _ = glocale.translation.gettext
from gramps.gui.plug.export import WriterOptionBox
from gramps.gen.utils.db import family_name
from gramps.gen.lib import Date, EventType
from gramps.gui.glade import Glade
from gramps.gen.display.name import displayer as name_displayer
from gramps.gen.display.place import displayer as _pd
class CalendarWriter:
def __init__(self, database, filename, user, option_box=None):
self.db = database
@ -95,24 +95,27 @@ class CalendarWriter:
def export_data(self, filename):
self.dirname = os.path.dirname (filename)
self.dirname = os.path.dirname(filename)
try:
with open(filename,"w") as self.g:
with open(filename, "w", encoding='utf8',
newline='\r\n') as self.g:
self.writeln("BEGIN:VCALENDAR")
self.writeln("PRODID:-//GNU//Gramps//EN")
self.writeln("VERSION:1.0")
self.writeln("VERSION:2.0")
self.total = (len([x for x in self.db.iter_person_handles()]) +
len([x for x in self.db.iter_family_handles()]))
for key in self.db.iter_person_handles():
p_hndls = self.db.get_person_handles()
p_hndls.sort()
f_hndls = self.db.get_family_handles()
f_hndls.sort()
self.total = len(p_hndls) + len(f_hndls)
for key in p_hndls:
self.write_person(key)
self.update()
for key in self.db.iter_family_handles():
for key in f_hndls:
self.write_family(key)
self.update()
self.writeln("")
self.writeln("END:VCALENDAR")
return True
@ -129,16 +132,11 @@ class CalendarWriter:
if family:
for event_ref in family.get_event_ref_list():
event = self.db.get_event_from_handle(event_ref.ref)
if event.get_type() == EventType.MARRIAGE:
m_date = event.get_date_object()
place_handle = event.get_place_handle()
if event and event.get_type() == EventType.MARRIAGE:
# feature requests 2356, 1657: avoid genitive form
text = "%s - %s" % (family_name(family, self.db), _("Marriage"))
if place_handle:
place_title = _pd.display_event(self.db, event)
self.write_vevent( text, m_date, place_title)
else:
self.write_vevent( text, m_date)
text = "%s - %s" % (family_name(family, self.db),
_("Marriage"))
self.write_vevent(text, event)
def write_person(self, person_handle):
person = self.db.get_person_from_handle(person_handle)
@ -147,45 +145,26 @@ class CalendarWriter:
if birth_ref:
birth = self.db.get_event_from_handle(birth_ref.ref)
if birth:
b_date = birth.get_date_object()
place_handle = birth.get_place_handle()
if place_handle:
# feature requests 2356, 1657: avoid genitive form
place_title = _pd.display_event(self.db, birth)
self.write_vevent("%s - %s" %
(name_displayer.display(person), _("Birth")),
b_date, place_title)
else:
# feature requests 2356, 1657: avoid genitive form
self.write_vevent("%s - %s" %
(name_displayer.display(person), _("Birth")),
b_date)
# feature requests 2356, 1657: avoid genitive form
self.write_vevent("%s - %s" %
(name_displayer.display(person),
_("Birth")), birth)
death_ref = person.get_death_ref()
if death_ref:
death = self.db.get_event_from_handle(death_ref.ref)
if death:
d_date = death.get_date_object()
place_handle = death.get_place_handle()
if place_handle:
# feature requests 2356, 1657: avoid genitive form
place_title = _pd.display_event(self.db, death)
self.write_vevent("%s - %s" %
(name_displayer.display(person), _("Death")),
d_date, place_title)
else:
# feature requests 2356, 1657: avoid genitive form
self.write_vevent("%s - %s" %
(name_displayer.display(person), _("Death")),
d_date)
# feature requests 2356, 1657: avoid genitive form
self.write_vevent("%s - %s" %
(name_displayer.display(person),
_("Death")), death)
def format_single_date(self, subdate, thisyear, cal):
retval = ""
(day, month, year, sl) = subdate
if thisyear:
year = localtime().tm_year
year = time.localtime().tm_year
if not cal == Date.CAL_GREGORIAN:
return ""
@ -196,7 +175,6 @@ class CalendarWriter:
retval = "%s%02d%02d" % (year, month, day)
return retval
def format_date(self, date, thisyear=0):
retval = ""
if date.get_modifier() == Date.MOD_TEXTONLY:
@ -220,23 +198,43 @@ class CalendarWriter:
start)
return retval
def write_vevent(self, event_text, date, location=""):
def write_vevent(self, event_text, event):
date = event.get_date_object()
place_handle = event.get_place_handle()
date_string = self.format_date(date, 1)
if date_string is not "":
self.writeln("")
# self.writeln("")
self.writeln("BEGIN:VEVENT")
self.writeln("SUMMARY:%s %s" % (date.get_year(), event_text))
if location:
self.writeln("LOCATION:%s" % location)
time_s = time.gmtime(event.change)
self.writeln("DTSTAMP:%04d%02d%02dT%02d%02d%02dZ" % time_s[0:6])
self.writeln("UID:%s@gramps.com" % event.handle)
self.writeln(fold("SUMMARY:%s %s" % (date.get_year(), event_text)))
if place_handle:
location = _pd.display_event(self.db, event)
if location:
self.writeln("LOCATION:%s" % location)
self.writeln("RRULE:FREQ=YEARLY")
self.writeln(date_string)
self.writeln("END:VEVENT")
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
# -------------------------------------------------------------------------
def fold(txt):
""" Limit line length to 75 octets (per RFC 5545) """
l_len = 0
text = ''
for char in txt:
c_len = len(char.encode('utf8'))
if c_len + l_len > 75:
l_len = 1
text += '\n ' + char
else:
l_len += c_len
text += char
return text
def exportData(database, filename, user, option_box=None):
cw = CalendarWriter(database, filename, user, option_box)
return cw.export_data(filename)

View File

@ -22,6 +22,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import unittest
import os
import difflib
from unittest.mock import patch
from time import localtime, strptime
from gramps.test.test_util import Gramps
from gramps.gen.const import TEMP_DIR, DATA_DIR
@ -33,6 +35,13 @@ TREE_NAME = "Test_exporttest"
TEST_DIR = os.path.abspath(os.path.join(DATA_DIR, "tests"))
def mock_localtime(*args):
"""
Mock up a dummy to replace the varying 'time string results'
"""
return strptime("25 Dec 1999", "%d %b %Y")
def call(*args):
""" Call Gramps to perform the action with out and err captured """
#print("call:", args)
@ -84,6 +93,8 @@ def compare(expect_file, result_file, dfilter=None):
msg += line
if dfilter:
fail += dfilter(line)
else:
fail = True
return msg if fail else ""
@ -184,6 +195,9 @@ class ExportControl(unittest.TestCase):
export dates, file names etc. that don't count as differences.
"""
def setUp(self):
config.set('behavior.date-before-range', 50)
config.set('behavior.date-after-range', 50)
config.set('behavior.date-about-range', 10)
self.tearDown() # removes it if it existed
# out, err = self.call("-C", TREE_NAME,
@ -195,6 +209,17 @@ class ExportControl(unittest.TestCase):
def test_csv(self):
""" Run a csv export test """
set_format(0) # Use ISO date for test
config.set('database.backend', 'bsddb')
src_file = 'exp_sample_csv.gramps'
tst_file = 'exp_sample_csv.csv'
msg = do_it(src_file, tst_file)
if msg:
self.fail(tst_file + ': ' + msg)
def test_csv_sq(self):
""" Run a csv export test """
set_format(0) # Use ISO date for test
config.set('database.backend', 'sqlite')
src_file = 'exp_sample_csv.gramps'
tst_file = 'exp_sample_csv.csv'
msg = do_it(src_file, tst_file)
@ -204,6 +229,17 @@ class ExportControl(unittest.TestCase):
def test_ged(self):
""" Run a Gedcom export test """
config.set('preferences.place-auto', True)
config.set('database.backend', 'bsddb')
src_file = 'exp_sample.gramps'
tst_file = 'exp_sample_ged.ged'
msg = do_it(src_file, tst_file, gedfilt)
if msg:
self.fail(tst_file + ': ' + msg)
def test_ged_sq(self):
""" Run a Gedcom export test """
config.set('preferences.place-auto', True)
config.set('database.backend', 'sqlite')
src_file = 'exp_sample.gramps'
tst_file = 'exp_sample_ged.ged'
msg = do_it(src_file, tst_file, gedfilt)
@ -213,15 +249,39 @@ class ExportControl(unittest.TestCase):
def test_vcard(self):
""" Run a vcard export test """
config.set('preferences.place-auto', True)
config.set('database.backend', 'bsddb')
src_file = 'exp_sample.gramps'
tst_file = 'exp_sample.vcf'
msg = do_it(src_file, tst_file, vcffilt)
if msg:
self.fail(tst_file + ': ' + msg)
def test_vcard_sq(self):
""" Run a vcard export test """
config.set('preferences.place-auto', True)
config.set('database.backend', 'sqlite')
src_file = 'exp_sample.gramps'
tst_file = 'exp_sample.vcf'
msg = do_it(src_file, tst_file, vcffilt)
if msg:
self.fail(tst_file + ': ' + msg)
@patch('gramps.plugins.export.exportvcalendar.time.localtime', mock_localtime)
def test_vcs(self):
""" Run a Vcalandar export test """
config.set('preferences.place-auto', True)
config.set('database.backend', 'bsddb')
src_file = 'exp_sample.gramps'
tst_file = 'exp_sample.vcs'
msg = do_it(src_file, tst_file)
if msg:
self.fail(tst_file + ': ' + msg)
@patch('gramps.plugins.export.exportvcalendar.time.localtime', mock_localtime)
def test_vcs_sq(self):
""" Run a Vcalandar export test """
config.set('preferences.place-auto', True)
config.set('database.backend', 'sqlite')
src_file = 'exp_sample.gramps'
tst_file = 'exp_sample.vcs'
msg = do_it(src_file, tst_file)
@ -231,6 +291,17 @@ class ExportControl(unittest.TestCase):
def test_gw(self):
""" Run a Geneweb export test """
config.set('preferences.place-auto', True)
config.set('database.backend', 'bsddb')
src_file = 'exp_sample.gramps'
tst_file = 'exp_sample.gw'
msg = do_it(src_file, tst_file)
if msg:
self.fail(tst_file + ': ' + msg)
def test_gw_sq(self):
""" Run a Geneweb export test """
config.set('preferences.place-auto', True)
config.set('database.backend', 'sqlite')
src_file = 'exp_sample.gramps'
tst_file = 'exp_sample.gw'
msg = do_it(src_file, tst_file)
@ -241,6 +312,18 @@ class ExportControl(unittest.TestCase):
""" Run a Web Family Tree export test """
set_format(0) # Use ISO date for test
config.set('preferences.place-auto', True)
config.set('database.backend', 'bsddb')
src_file = 'exp_sample.gramps'
tst_file = 'exp_sample.wft'
msg = do_it(src_file, tst_file)
if msg:
self.fail(tst_file + ': ' + msg)
def test_wft_sq(self):
""" Run a Web Family Tree export test """
set_format(0) # Use ISO date for test
config.set('preferences.place-auto', True)
config.set('database.backend', 'sqlite')
src_file = 'exp_sample.gramps'
tst_file = 'exp_sample.wft'
msg = do_it(src_file, tst_file)