2003-06-14 06:46:30 +05:30
|
|
|
#
|
|
|
|
# Gramps - a GTK+/GNOME based genealogy program
|
|
|
|
#
|
|
|
|
# Copyright (C) 2003 Donald N. Allingham
|
|
|
|
# Copyright (C) 2003 Tim Waugh
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
|
|
|
|
# $Id$
|
|
|
|
|
2003-06-27 16:48:58 +05:30
|
|
|
import gtk
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# gramps modules
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
import Report
|
|
|
|
import TextDoc
|
|
|
|
import RelLib
|
|
|
|
import Errors
|
|
|
|
from QuestionDialog import ErrorDialog
|
|
|
|
from intl import gettext as _
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
2003-07-17 15:30:53 +05:30
|
|
|
# ComprehensiveAncestorsReport
|
2003-06-14 06:46:30 +05:30
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
2003-07-17 15:30:53 +05:30
|
|
|
class ComprehensiveAncestorsReport (Report.Report):
|
2003-06-14 06:46:30 +05:30
|
|
|
|
2003-06-27 16:48:58 +05:30
|
|
|
def __init__(self,database,person,max,pgbrk,cite,doc,output,newpage=0):
|
2003-06-14 06:46:30 +05:30
|
|
|
self.map = {}
|
|
|
|
self.database = database
|
|
|
|
self.start = person
|
|
|
|
self.max_generations = max
|
|
|
|
self.pgbrk = pgbrk
|
2003-06-27 16:48:58 +05:30
|
|
|
self.opt_cite = cite
|
2003-06-14 06:46:30 +05:30
|
|
|
self.doc = doc
|
2003-06-27 03:43:58 +05:30
|
|
|
self.sources = []
|
2003-06-27 16:48:58 +05:30
|
|
|
self.sourcerefs = []
|
2003-07-06 04:40:43 +05:30
|
|
|
self.newpage = newpage
|
2003-06-14 06:46:30 +05:30
|
|
|
|
|
|
|
table = TextDoc.TableStyle ()
|
|
|
|
table.set_column_widths ([15, 85])
|
|
|
|
table.set_width (100)
|
|
|
|
doc.add_table_style ("PersonNoSpouse", table)
|
|
|
|
|
|
|
|
table = TextDoc.TableStyle ()
|
|
|
|
table.set_column_widths ([10, 15, 75])
|
|
|
|
table.set_width (100)
|
|
|
|
doc.add_table_style ("ChildNoSpouse", table)
|
|
|
|
|
2003-06-26 19:43:05 +05:30
|
|
|
for nspouse in range (1, 3):
|
|
|
|
table = TextDoc.TableStyle ()
|
|
|
|
table.set_width (100)
|
|
|
|
widths = [15, 100 - 15 * (nspouse + 1)]
|
|
|
|
widths.extend ([15] * nspouse)
|
|
|
|
table.set_column_widths (widths)
|
|
|
|
doc.add_table_style ("PersonWithSpouse%d" % nspouse, table)
|
|
|
|
|
|
|
|
table = TextDoc.TableStyle ()
|
|
|
|
table.set_width (100)
|
|
|
|
widths = [10, 15, 90 - 15 * (nspouse + 1)]
|
|
|
|
widths.extend ([15] * nspouse)
|
|
|
|
table.set_column_widths (widths)
|
|
|
|
doc.add_table_style ("ChildWithSpouse%d"% nspouse, table)
|
2003-06-14 06:46:30 +05:30
|
|
|
|
|
|
|
cell = TextDoc.TableCellStyle ()
|
|
|
|
cell.set_padding (1) # each side makes 2cm, the size of the photo
|
|
|
|
doc.add_cell_style ("PaddedCell", cell)
|
|
|
|
|
2003-06-21 14:27:35 +05:30
|
|
|
cell = TextDoc.TableCellStyle ()
|
2003-07-05 03:46:32 +05:30
|
|
|
cell.set_padding (0.1)
|
2003-06-21 14:27:35 +05:30
|
|
|
cell.set_left_border (1)
|
|
|
|
cell.set_top_border (1)
|
|
|
|
cell.set_right_border (1)
|
|
|
|
cell.set_bottom_border (1)
|
|
|
|
doc.add_cell_style ("NoPhoto", cell)
|
|
|
|
|
2003-06-14 19:28:24 +05:30
|
|
|
cell = TextDoc.TableCellStyle ()
|
2003-06-27 16:48:58 +05:30
|
|
|
cell.set_padding (0.1)
|
2003-06-14 19:28:24 +05:30
|
|
|
doc.add_cell_style ("Photo", cell)
|
|
|
|
|
|
|
|
cell = TextDoc.TableCellStyle ()
|
2003-06-27 16:48:58 +05:30
|
|
|
cell.set_padding (0.1)
|
2003-06-14 19:28:24 +05:30
|
|
|
doc.add_cell_style ("Entry", cell)
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
if output:
|
|
|
|
self.standalone = 1
|
|
|
|
self.doc.open(output)
|
|
|
|
else:
|
|
|
|
self.standalone = 0
|
2003-07-06 04:40:43 +05:30
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
def write_report(self):
|
2003-07-06 04:40:43 +05:30
|
|
|
if self.newpage:
|
|
|
|
self.doc.page_break()
|
|
|
|
|
2003-06-27 03:43:58 +05:30
|
|
|
self.sources = []
|
2003-06-14 06:46:30 +05:30
|
|
|
name = self.person_name (self.start)
|
|
|
|
self.doc.start_paragraph("Title")
|
|
|
|
title = _("Ancestors of %s") % name
|
|
|
|
self.doc.write_text(title)
|
|
|
|
self.doc.end_paragraph()
|
|
|
|
|
2003-06-27 03:43:58 +05:30
|
|
|
self.doc.start_paragraph ("Heading")
|
2003-06-14 06:46:30 +05:30
|
|
|
self.doc.write_text ("Generation 1")
|
|
|
|
self.doc.end_paragraph ()
|
|
|
|
|
|
|
|
self.write_paragraphs (self.person (self.start, suppress_children = 1,
|
|
|
|
needs_name = 1))
|
|
|
|
families = [self.start.getMainParents ()]
|
|
|
|
if len (families) > 0:
|
|
|
|
self.generation (self.max_generations, families, [self.start])
|
|
|
|
|
2003-06-27 03:43:58 +05:30
|
|
|
if len (self.sources) > 0:
|
|
|
|
self.doc.start_paragraph ("Heading")
|
|
|
|
self.doc.write_text ("Sources")
|
|
|
|
self.doc.end_paragraph ()
|
|
|
|
|
|
|
|
self.doc.start_paragraph ("Entry")
|
|
|
|
i = 1
|
|
|
|
for source in self.sources:
|
|
|
|
self.doc.write_text ("[%d] %s\n" % (i, source.getTitle ()))
|
|
|
|
i += 1
|
|
|
|
|
|
|
|
self.doc.end_paragraph ()
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
if self.standalone:
|
|
|
|
self.doc.close()
|
|
|
|
return
|
|
|
|
|
|
|
|
def write_paragraphs (self, paragraphs):
|
|
|
|
for (fn, params) in paragraphs:
|
|
|
|
if len (params) == 0:
|
|
|
|
fn ()
|
|
|
|
elif len (params) == 1:
|
|
|
|
fn (params[0])
|
|
|
|
elif len (params) == 2:
|
|
|
|
fn (params[0], params[1])
|
|
|
|
elif len (params) == 3:
|
|
|
|
fn (params[0], params[1], params[2])
|
|
|
|
elif len (params) == 4:
|
|
|
|
fn (params[0], params[1], params[2], params[3])
|
|
|
|
else:
|
|
|
|
self.doc.write_text ("Call to %s with params %s" %
|
|
|
|
(str (fn), str (params)))
|
|
|
|
|
|
|
|
def family (self, family, already_described):
|
|
|
|
ret = []
|
2003-07-06 04:40:43 +05:30
|
|
|
if not family:
|
|
|
|
return ret
|
2003-06-14 06:46:30 +05:30
|
|
|
father = family.getFather ()
|
|
|
|
mother = family.getMother ()
|
|
|
|
if father:
|
|
|
|
ret.extend (self.person (father,
|
|
|
|
short_form = father in already_described,
|
|
|
|
already_described = already_described,
|
|
|
|
needs_name = not mother,
|
|
|
|
from_family = family))
|
|
|
|
|
|
|
|
if mother:
|
|
|
|
ret.extend (self.person (mother,
|
|
|
|
short_form = mother in already_described,
|
|
|
|
already_described = already_described,
|
|
|
|
needs_name = not father,
|
|
|
|
from_family = family))
|
|
|
|
|
|
|
|
children = family.getChildList ()
|
|
|
|
if len (children):
|
|
|
|
ret.append ((self.doc.start_paragraph, ['ChildTitle']))
|
|
|
|
ret.append ((self.doc.write_text, ['Their children:']))
|
|
|
|
ret.append ((self.doc.end_paragraph, []))
|
|
|
|
|
|
|
|
for child in children:
|
|
|
|
ret.extend (self.person (child, suppress_children = 1,
|
|
|
|
short_form=child in already_described,
|
|
|
|
already_described = already_described,
|
|
|
|
needs_name = 1,
|
|
|
|
from_family = family))
|
|
|
|
|
|
|
|
return ret
|
|
|
|
|
|
|
|
def generation (self, generations, families, already_described,
|
|
|
|
thisgen = 2):
|
2003-06-30 20:26:32 +05:30
|
|
|
if generations > 1 and len (families):
|
2003-06-14 06:46:30 +05:30
|
|
|
people = []
|
|
|
|
for family in families:
|
|
|
|
people.extend (self.family (family, already_described))
|
|
|
|
|
|
|
|
if len (people):
|
2003-06-25 16:36:42 +05:30
|
|
|
if self.pgbrk:
|
|
|
|
self.doc.page_break()
|
2003-06-27 03:43:58 +05:30
|
|
|
self.doc.start_paragraph ("Heading")
|
2003-07-17 15:30:53 +05:30
|
|
|
if thisgen > 4:
|
|
|
|
n = thisgen - 3
|
|
|
|
if n % 10 == 1 and n != 11:
|
|
|
|
nth = 'st'
|
|
|
|
elif n % 10 == 2 and n != 12:
|
|
|
|
nth = 'nd'
|
|
|
|
elif n % 10 == 3 and n != 13:
|
|
|
|
nth = 'rd'
|
|
|
|
else:
|
|
|
|
nth = 'th'
|
|
|
|
heading = '%d%s great grandparents' % (n, nth)
|
|
|
|
elif thisgen == 4:
|
|
|
|
heading = 'Great grandparents'
|
|
|
|
elif thisgen == 3:
|
|
|
|
heading = 'Grandparents'
|
|
|
|
elif thisgen == 2:
|
|
|
|
heading = 'Parents'
|
|
|
|
else:
|
|
|
|
heading = 'Generation %d' % thisgen
|
|
|
|
self.doc.write_text (heading)
|
2003-06-14 06:46:30 +05:30
|
|
|
self.doc.end_paragraph ()
|
|
|
|
self.write_paragraphs (people)
|
|
|
|
|
|
|
|
next_families = []
|
|
|
|
for family in families:
|
|
|
|
father = family.getFather ()
|
|
|
|
if father:
|
|
|
|
already_described.append (father)
|
|
|
|
father_family = father.getMainParents ()
|
|
|
|
if father_family:
|
|
|
|
next_families.append (father_family)
|
|
|
|
|
|
|
|
mother = family.getMother ()
|
|
|
|
if mother:
|
|
|
|
already_described.append (mother)
|
|
|
|
mother_family = mother.getMainParents ()
|
|
|
|
if mother_family:
|
|
|
|
next_families.append (mother_family)
|
|
|
|
|
|
|
|
self.generation (generations - 1, next_families,
|
|
|
|
already_described, thisgen + 1)
|
|
|
|
|
|
|
|
def person (self, person,
|
|
|
|
suppress_children = 0,
|
|
|
|
short_form = 0,
|
|
|
|
already_described = [],
|
|
|
|
needs_name = 0,
|
|
|
|
from_family = None):
|
|
|
|
ret = []
|
|
|
|
name = self.person_name (person)
|
|
|
|
if name:
|
|
|
|
photos = person.getPhotoList ()
|
|
|
|
|
|
|
|
bits = ''
|
|
|
|
bits += self.short_occupation (person)
|
|
|
|
bits += self.long_born_died (person)
|
|
|
|
if not suppress_children:
|
|
|
|
bits += self.parents_of (person)
|
|
|
|
else:
|
|
|
|
bits += '.'
|
2003-06-26 19:43:05 +05:30
|
|
|
bits += self.married_whom (person, from_family, suppress_children)
|
2003-06-14 06:46:30 +05:30
|
|
|
bits += self.inline_notes (person)
|
|
|
|
|
|
|
|
longnotes = self.long_notes (person, suppress_children,
|
|
|
|
already_described)
|
|
|
|
|
|
|
|
if (bits != '.' or longnotes or photos or
|
|
|
|
suppress_children or needs_name):
|
|
|
|
# We have something to say about this person.
|
|
|
|
|
|
|
|
spouse = []
|
|
|
|
if from_family:
|
|
|
|
from_family_father = from_family.getFather ()
|
|
|
|
from_family_mother = from_family.getMother ()
|
|
|
|
else:
|
|
|
|
from_family_father = from_family_mother = None
|
|
|
|
|
|
|
|
for family in person.getFamilyList ():
|
|
|
|
for partner in [family.getFather (),
|
|
|
|
family.getMother ()]:
|
|
|
|
if partner == person or not partner:
|
|
|
|
continue
|
|
|
|
|
|
|
|
if (suppress_children or
|
|
|
|
(partner != from_family_father and
|
|
|
|
partner != from_family_mother)):
|
|
|
|
for photo in partner.getPhotoList ()[:1]:
|
|
|
|
spouse.append ((self.doc.add_photo,
|
|
|
|
[photo.ref.getPath (),
|
|
|
|
'right', 2, 2]))
|
|
|
|
|
|
|
|
if suppress_children and len (already_described):
|
|
|
|
style = "Child"
|
|
|
|
else:
|
|
|
|
style = "Person"
|
|
|
|
if len (spouse):
|
2003-06-26 19:43:05 +05:30
|
|
|
style += "WithSpouse%d" % len (spouse)
|
2003-06-14 06:46:30 +05:30
|
|
|
else:
|
|
|
|
style += "NoSpouse"
|
|
|
|
|
|
|
|
ret.append ((self.doc.start_table, [style, style]))
|
|
|
|
ret.append ((self.doc.start_row, []))
|
|
|
|
|
|
|
|
if suppress_children and len (already_described):
|
|
|
|
# Can't do proper formatting with TextDoc, so cheat.
|
|
|
|
ret.append ((self.doc.start_cell, ["PaddedCell"]))
|
|
|
|
ret.append ((self.doc.end_cell, []))
|
|
|
|
|
|
|
|
if len (photos) == 0:
|
2003-06-21 14:27:35 +05:30
|
|
|
ret.append ((self.doc.start_cell, ["NoPhoto"]))
|
2003-06-30 20:26:32 +05:30
|
|
|
ret.append ((self.doc.start_paragraph, ["NoPhotoText"]))
|
2003-06-27 16:48:58 +05:30
|
|
|
ret.append ((self.doc.write_text, ["(no photo)"]))
|
2003-06-30 20:26:32 +05:30
|
|
|
ret.append ((self.doc.end_paragraph, []))
|
2003-06-14 06:46:30 +05:30
|
|
|
ret.append ((self.doc.end_cell, []))
|
|
|
|
else:
|
|
|
|
ret.append ((self.doc.start_cell, ["Photo"]))
|
|
|
|
for photo in photos[:1]:
|
|
|
|
ret.append ((self.doc.add_photo,
|
|
|
|
[photo.ref.getPath (), 'left', 2, 2]))
|
|
|
|
ret.append ((self.doc.end_cell, []))
|
|
|
|
|
|
|
|
ret.append ((self.doc.start_cell, ["Entry"]))
|
|
|
|
ret.append ((self.doc.start_paragraph, ["Entry"]))
|
|
|
|
ret.append ((self.doc.write_text, [name]))
|
|
|
|
if short_form:
|
|
|
|
ret.append ((self.doc.write_text, [" (mentioned above)."]))
|
|
|
|
else:
|
|
|
|
ret.append ((self.doc.write_text, [bits]))
|
|
|
|
|
|
|
|
ret.append ((self.doc.end_paragraph, []))
|
|
|
|
ret.append ((self.doc.end_cell, []))
|
|
|
|
|
2003-06-26 19:43:05 +05:30
|
|
|
for s in spouse:
|
2003-06-14 06:46:30 +05:30
|
|
|
ret.append ((self.doc.start_cell, ["Photo"]))
|
2003-06-26 19:43:05 +05:30
|
|
|
ret.append (s)
|
2003-06-14 06:46:30 +05:30
|
|
|
ret.append ((self.doc.end_cell, []))
|
|
|
|
|
|
|
|
ret.append ((self.doc.end_row, []))
|
|
|
|
ret.append ((self.doc.end_table, []))
|
|
|
|
|
|
|
|
if not short_form:
|
|
|
|
ret.extend (longnotes)
|
|
|
|
|
|
|
|
return ret
|
|
|
|
|
|
|
|
def short_occupation (self, person):
|
|
|
|
occupation = ''
|
|
|
|
for event in person.getEventList ():
|
|
|
|
if event.getName () == 'Occupation':
|
|
|
|
if occupation:
|
|
|
|
return ''
|
|
|
|
|
|
|
|
occupation = event.getDescription ()
|
|
|
|
|
|
|
|
if occupation:
|
|
|
|
return ' (%s)' % occupation
|
|
|
|
|
|
|
|
return ''
|
|
|
|
|
|
|
|
def event_info (self, event):
|
|
|
|
info = ''
|
|
|
|
name = event.getName ()
|
2003-07-17 16:24:41 +05:30
|
|
|
description = event.getDescription ()
|
2003-06-14 06:46:30 +05:30
|
|
|
if name != 'Birth' and name != 'Death' and name != 'Marriage':
|
|
|
|
info += name
|
|
|
|
if description:
|
|
|
|
info += ': ' + description
|
2003-07-17 16:24:41 +05:30
|
|
|
description = None
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
dateobj = event.getDateObj ()
|
|
|
|
if dateobj:
|
|
|
|
text = dateobj.getText ()
|
|
|
|
if text:
|
2003-06-21 14:21:23 +05:30
|
|
|
info += ' ' + text[0].lower() + text[1:]
|
2003-06-14 06:46:30 +05:30
|
|
|
elif dateobj.getValid ():
|
2003-06-25 16:36:42 +05:30
|
|
|
if dateobj.isRange ():
|
|
|
|
info += ' '
|
|
|
|
elif (dateobj.getDayValid () and
|
2003-06-14 06:46:30 +05:30
|
|
|
dateobj.getMonthValid () and
|
|
|
|
dateobj.getYearValid ()):
|
|
|
|
info += ' on '
|
|
|
|
else:
|
|
|
|
info += ' in '
|
|
|
|
|
|
|
|
info += dateobj.getDate ()
|
|
|
|
placename = event.getPlaceName ()
|
|
|
|
if placename:
|
|
|
|
info += ' in ' + placename
|
|
|
|
note = event.getNote ()
|
2003-07-17 16:24:41 +05:30
|
|
|
if note or description:
|
|
|
|
info += ' ('
|
|
|
|
if description:
|
|
|
|
info += description
|
|
|
|
if note:
|
|
|
|
if description:
|
|
|
|
info += '; '
|
|
|
|
info += note
|
|
|
|
info += ')'
|
2003-06-14 06:46:30 +05:30
|
|
|
|
2003-06-27 03:43:58 +05:30
|
|
|
info += self.cite_sources (event.getSourceRefList ())
|
2003-06-14 06:46:30 +05:30
|
|
|
return info
|
|
|
|
|
2003-07-17 15:30:53 +05:30
|
|
|
def address_info (self, address):
|
|
|
|
info = 'Address: %s %s %s %s' % (address.getStreet (),
|
|
|
|
address.getCity (),
|
|
|
|
address.getState (),
|
|
|
|
address.getCountry ())
|
|
|
|
|
|
|
|
info = info.rstrip ()
|
|
|
|
date = address.getDate ()
|
|
|
|
if date:
|
|
|
|
info += ', ' + date
|
|
|
|
|
|
|
|
info += self.cite_sources (address.getSourceRefList ())
|
|
|
|
return info
|
|
|
|
|
2003-07-17 16:36:50 +05:30
|
|
|
def abbrev_born_died (self, person):
|
|
|
|
ret = ''
|
|
|
|
birth = person.getBirth ()
|
|
|
|
date = birth.getDate ()
|
|
|
|
if date:
|
|
|
|
ret += " b. " + date
|
|
|
|
ret += self.cite_sources (birth.getSourceRefList ())
|
|
|
|
|
|
|
|
death = person.getDeath ()
|
|
|
|
date = death.getDate ()
|
|
|
|
if date:
|
|
|
|
ret += " d. " + date
|
|
|
|
ret += self.cite_sources (death.getSourceRefList ())
|
|
|
|
|
|
|
|
return ret
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
def long_born_died (self, person):
|
|
|
|
ret = ''
|
|
|
|
born_info = self.event_info (person.getBirth ())
|
|
|
|
if born_info:
|
|
|
|
ret = ", born" + born_info
|
|
|
|
|
|
|
|
died_info = self.event_info (person.getDeath ())
|
|
|
|
if died_info:
|
|
|
|
if born_info:
|
|
|
|
ret += '; '
|
|
|
|
else:
|
|
|
|
ret += ', '
|
|
|
|
|
|
|
|
ret += 'died' + died_info
|
|
|
|
|
|
|
|
return ret
|
|
|
|
|
|
|
|
def Pronoun (self, person):
|
|
|
|
if person.getGender () == RelLib.Person.female:
|
|
|
|
return 'She'
|
|
|
|
else:
|
|
|
|
return 'He'
|
|
|
|
|
|
|
|
def son_or_daughter (self, person):
|
|
|
|
if person.getGender () == RelLib.Person.female:
|
|
|
|
return 'daughter'
|
|
|
|
else:
|
|
|
|
return 'son'
|
|
|
|
|
|
|
|
def parents_of (self, person):
|
|
|
|
childof = ('. ' + self.Pronoun (person) + ' is the ' +
|
|
|
|
self.son_or_daughter (person) + ' of ')
|
|
|
|
family = person.getMainParents ()
|
|
|
|
ret = ''
|
|
|
|
if family:
|
|
|
|
fathername = mothername = None
|
|
|
|
father = family.getFather ()
|
|
|
|
if father:
|
|
|
|
fathername = self.person_name (father)
|
|
|
|
mother = family.getMother ()
|
|
|
|
if mother:
|
|
|
|
mothername = self.person_name (mother)
|
|
|
|
|
|
|
|
if not mother and not father:
|
|
|
|
pass
|
|
|
|
elif not father:
|
|
|
|
ret = childof + mothername
|
|
|
|
elif not mother:
|
|
|
|
ret = childof + fathername
|
|
|
|
else:
|
|
|
|
ret = childof + fathername + ' and ' + mothername
|
|
|
|
|
|
|
|
return ret + '.'
|
|
|
|
|
|
|
|
def first_name_or_nick (self, person):
|
|
|
|
nickname = person.getNickName ()
|
|
|
|
if nickname:
|
|
|
|
return nickname
|
|
|
|
|
|
|
|
name = person.getPrimaryName ().getFirstName ()
|
|
|
|
return name.split (' ')[0]
|
|
|
|
|
|
|
|
def title (self, person):
|
|
|
|
name = person.getPrimaryName ()
|
|
|
|
t = name.getTitle ()
|
|
|
|
if t:
|
|
|
|
return t
|
|
|
|
if person.getGender () == RelLib.Person.female:
|
|
|
|
if name.getType () == 'Married Name':
|
|
|
|
return 'Mrs.'
|
|
|
|
|
|
|
|
return 'Miss'
|
|
|
|
|
|
|
|
return 'Mr.'
|
|
|
|
|
2003-06-27 03:43:58 +05:30
|
|
|
def cite_sources (self, sourcereflist):
|
|
|
|
citation = ""
|
2003-06-27 16:48:58 +05:30
|
|
|
if self.opt_cite:
|
|
|
|
for ref in sourcereflist:
|
|
|
|
if ref in self.sourcerefs:
|
|
|
|
continue
|
|
|
|
|
|
|
|
self.sourcerefs.append (ref)
|
|
|
|
source = ref.getBase ()
|
|
|
|
if source in self.sources:
|
|
|
|
ind = self.sources.index (source) + 1
|
|
|
|
else:
|
|
|
|
self.sources.append (source)
|
|
|
|
ind = len (self.sources)
|
2003-06-27 03:43:58 +05:30
|
|
|
|
2003-06-27 16:48:58 +05:30
|
|
|
citation += "[%d" % ind
|
|
|
|
comments = ref.getComments ()
|
|
|
|
if comments and comments.find ('\n') == -1:
|
|
|
|
citation += " - %s" % comments.rstrip ('.')
|
|
|
|
|
|
|
|
citation += "]"
|
2003-06-27 03:43:58 +05:30
|
|
|
|
|
|
|
return citation
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
def person_name (self, person):
|
|
|
|
primary = person.getPrimaryName ()
|
2003-06-21 14:13:48 +05:30
|
|
|
|
|
|
|
name = primary.getTitle ()
|
|
|
|
if name:
|
|
|
|
name += ' '
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
first = primary.getFirstName ()
|
|
|
|
last = primary.getSurname ()
|
|
|
|
first_replaced = first.replace ('?', '')
|
|
|
|
if first_replaced == '':
|
|
|
|
name += self.title (person)
|
|
|
|
else:
|
|
|
|
name += first
|
|
|
|
|
2003-07-17 15:30:53 +05:30
|
|
|
nick = person.getNickName ()
|
|
|
|
if nick:
|
|
|
|
nick.strip ('"')
|
|
|
|
name += ' ("%s")' % nick
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
if last.replace ('?', '') == '':
|
|
|
|
if first_replaced == '':
|
|
|
|
name += ' (unknown)'
|
|
|
|
else:
|
|
|
|
name += ' ' + last
|
|
|
|
|
2003-06-21 14:13:48 +05:30
|
|
|
suffix = primary.getSuffix ()
|
|
|
|
if suffix:
|
|
|
|
name += ', ' + suffix
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
type = primary.getType ()
|
|
|
|
if type != 'Birth Name':
|
|
|
|
name += ' (%s)' % type
|
|
|
|
|
2003-06-27 03:43:58 +05:30
|
|
|
name += self.cite_sources (primary.getSourceRefList ())
|
2003-06-14 06:46:30 +05:30
|
|
|
return name
|
|
|
|
|
2003-06-26 19:43:05 +05:30
|
|
|
def married_whom (self, person, from_family, listing_children = 0):
|
2003-06-14 06:46:30 +05:30
|
|
|
pronoun = ' ' + self.Pronoun (person)
|
|
|
|
first_marriage = 1
|
|
|
|
ret = ''
|
|
|
|
for family in person.getFamilyList ():
|
|
|
|
mother = family.getMother ()
|
|
|
|
for spouse in [family.getFather (), mother]:
|
|
|
|
if spouse == person or not spouse:
|
|
|
|
continue
|
|
|
|
|
|
|
|
children = ''
|
|
|
|
childlist = family.getChildList ()
|
|
|
|
child_count = len (childlist)
|
2003-06-26 19:43:05 +05:30
|
|
|
if ((listing_children or family != from_family) and
|
|
|
|
child_count > 0):
|
2003-06-14 06:46:30 +05:30
|
|
|
children = ', and they had '
|
|
|
|
if child_count == 1:
|
|
|
|
children += 'a child named '
|
|
|
|
else:
|
|
|
|
children += str (child_count) + ' children: '
|
|
|
|
|
|
|
|
count = 1
|
|
|
|
for child in childlist:
|
|
|
|
children += self.first_name_or_nick (child)
|
2003-06-27 03:43:58 +05:30
|
|
|
children += self.cite_sources (child.getPrimaryName ().
|
|
|
|
getSourceRefList ())
|
2003-07-17 16:36:50 +05:30
|
|
|
children += self.abbrev_born_died (child)
|
2003-06-14 06:46:30 +05:30
|
|
|
if child_count - count > 1:
|
|
|
|
children += ', '
|
|
|
|
elif child_count - count == 1:
|
|
|
|
children += ' and '
|
|
|
|
|
|
|
|
count += 1
|
|
|
|
|
|
|
|
marriage = family.getMarriage ()
|
|
|
|
if not first_marriage:
|
|
|
|
ret += pronoun + ' later married '
|
|
|
|
ret += self.person_name (spouse)
|
|
|
|
if marriage:
|
|
|
|
ret += self.event_info (marriage)
|
|
|
|
ret += children + '.'
|
2003-06-26 19:43:05 +05:30
|
|
|
elif (listing_children or
|
|
|
|
spouse == mother or
|
|
|
|
family != from_family):
|
2003-06-14 06:46:30 +05:30
|
|
|
ret += pronoun + ' married '
|
|
|
|
ret += self.person_name (spouse)
|
|
|
|
if marriage:
|
|
|
|
ret += self.event_info (marriage)
|
|
|
|
ret += children + '.'
|
|
|
|
|
|
|
|
first_marriage = 0
|
|
|
|
|
|
|
|
return ret
|
|
|
|
|
|
|
|
def inline_notes (self, person):
|
2003-06-26 20:00:27 +05:30
|
|
|
name_note = person.getPrimaryName ().getNote ()
|
|
|
|
if not (name_note == '' or name_note.find ('\n') != -1):
|
|
|
|
return ' Note about their name: ' + name_note
|
2003-06-14 06:46:30 +05:30
|
|
|
note = person.getNote ()
|
|
|
|
if not (note == '' or note.find ('\n') != -1):
|
|
|
|
return ' ' + note
|
|
|
|
|
|
|
|
return ''
|
|
|
|
|
|
|
|
def long_details (self, note, paras):
|
|
|
|
para_end = note.find ('\n')
|
|
|
|
if para_end != -1:
|
|
|
|
paras = self.long_details (note[note.find ('\n') + 1:], paras)
|
|
|
|
else:
|
|
|
|
para_end = len (note)
|
|
|
|
|
|
|
|
paras.insert (0, (self.doc.end_paragraph, []))
|
|
|
|
paras.insert (0, (self.doc.write_text, [note[:para_end]]))
|
|
|
|
paras.insert (0, (self.doc.start_paragraph, ['Details']))
|
|
|
|
return paras
|
|
|
|
|
|
|
|
def long_notes (self, person, suppress_children = 0,
|
|
|
|
already_described = []):
|
|
|
|
note = person.getNote ()
|
|
|
|
if note != '' and note.find ('\n') != -1:
|
|
|
|
paras = self.long_details (note, [])
|
|
|
|
else:
|
|
|
|
paras = []
|
|
|
|
|
2003-07-17 16:24:41 +05:30
|
|
|
names = person.getAlternateNames ()
|
2003-06-14 06:46:30 +05:30
|
|
|
events = person.getEventList ()
|
2003-07-17 15:30:53 +05:30
|
|
|
addresses = person.getAddressList ()
|
2003-07-17 16:24:41 +05:30
|
|
|
if (len (events) + len (addresses) + len (names)) > 0:
|
2003-06-14 06:46:30 +05:30
|
|
|
paras.append ((self.doc.start_paragraph, ['SubEntry']))
|
|
|
|
paras.append ((self.doc.write_text,
|
|
|
|
["More about " +
|
|
|
|
self.first_name_or_nick (person) +
|
|
|
|
":"]))
|
|
|
|
paras.append ((self.doc.end_paragraph, []))
|
|
|
|
|
2003-07-17 16:24:41 +05:30
|
|
|
for name in names:
|
|
|
|
paras.append ((self.doc.start_paragraph, ['Details']))
|
|
|
|
paras.append ((self.doc.write_text, [name.getType () + ': ' +
|
|
|
|
name.getRegularName ()]))
|
|
|
|
paras.append ((self.doc.end_paragraph, []))
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
for event in events:
|
|
|
|
paras.append ((self.doc.start_paragraph, ['Details']))
|
|
|
|
paras.append ((self.doc.write_text, [self.event_info (event)]))
|
|
|
|
paras.append ((self.doc.end_paragraph, []))
|
|
|
|
|
2003-07-17 15:30:53 +05:30
|
|
|
for address in addresses:
|
|
|
|
paras.append ((self.doc.start_paragraph, ['Details']))
|
|
|
|
paras.append ((self.doc.write_text, [self.address_info (address)]))
|
|
|
|
paras.append ((self.doc.end_paragraph, []))
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
return paras
|
|
|
|
|
2003-07-06 04:40:43 +05:30
|
|
|
def _make_default_style(default_style):
|
2003-07-17 15:30:53 +05:30
|
|
|
"""Make the default output style for the Comprehensive Ancestors report."""
|
2003-06-14 06:46:30 +05:30
|
|
|
font = TextDoc.FontStyle()
|
|
|
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=16,bold=1,italic=1)
|
|
|
|
para = TextDoc.ParagraphStyle()
|
|
|
|
para.set_font(font)
|
|
|
|
para.set_header_level(1)
|
|
|
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
|
|
|
para.set(pad=0.5)
|
|
|
|
para.set_description(_('The style used for the title of the page.'))
|
2003-07-06 04:40:43 +05:30
|
|
|
default_style.add_style("Title",para)
|
2003-06-14 06:46:30 +05:30
|
|
|
|
|
|
|
font = TextDoc.FontStyle()
|
|
|
|
font.set(face=TextDoc.FONT_SANS_SERIF,size=14,italic=1)
|
|
|
|
para = TextDoc.ParagraphStyle()
|
|
|
|
para.set_font(font)
|
|
|
|
para.set_header_level(2)
|
|
|
|
para.set(pad=0.5)
|
|
|
|
para.set_alignment(TextDoc.PARA_ALIGN_CENTER)
|
|
|
|
para.set_description(_('The style used for the generation header.'))
|
2003-07-06 04:40:43 +05:30
|
|
|
default_style.add_style("Heading",para)
|
2003-06-14 06:46:30 +05:30
|
|
|
|
|
|
|
para = TextDoc.ParagraphStyle()
|
|
|
|
para.set(lmargin=1.0,pad=0.25)
|
|
|
|
para.set_description(_('The basic style used for the text display.'))
|
2003-07-06 04:40:43 +05:30
|
|
|
default_style.add_style("Entry",para)
|
2003-06-14 06:46:30 +05:30
|
|
|
|
2003-06-30 20:26:32 +05:30
|
|
|
para = TextDoc.ParagraphStyle ()
|
|
|
|
para.set_description(_('Text style for missing photo.'))
|
2003-07-06 04:40:43 +05:30
|
|
|
default_style.add_style("NoPhotoText", para)
|
2003-06-30 20:26:32 +05:30
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
details_font = TextDoc.FontStyle()
|
|
|
|
details_font.set(face=TextDoc.FONT_SANS_SERIF,size=8,italic=1)
|
|
|
|
para = TextDoc.ParagraphStyle()
|
|
|
|
para.set(lmargin=1.5,pad=0,font = details_font)
|
|
|
|
para.set_description(_('Style for details about a person.'))
|
2003-07-06 04:40:43 +05:30
|
|
|
default_style.add_style("Details",para)
|
2003-06-14 06:46:30 +05:30
|
|
|
|
|
|
|
para = TextDoc.ParagraphStyle()
|
|
|
|
para.set(lmargin=1.0,pad=0.25)
|
|
|
|
para.set_description(_('The basic style used for the text display.'))
|
2003-07-06 04:40:43 +05:30
|
|
|
default_style.add_style("SubEntry",para)
|
2003-06-14 06:46:30 +05:30
|
|
|
|
|
|
|
para = TextDoc.ParagraphStyle()
|
|
|
|
para.set(pad=0.05)
|
|
|
|
para.set_description(_('The basic style used for the text display.'))
|
2003-07-06 04:40:43 +05:30
|
|
|
default_style.add_style("Endnotes",para)
|
2003-06-14 06:46:30 +05:30
|
|
|
|
|
|
|
para = TextDoc.ParagraphStyle()
|
|
|
|
para.set(lmargin=2.5,pad=0.05)
|
|
|
|
para.set_description(_('Introduction to the children.'))
|
2003-07-06 04:40:43 +05:30
|
|
|
default_style.add_style("ChildTitle",para)
|
2003-06-14 06:46:30 +05:30
|
|
|
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
2003-07-17 15:30:53 +05:30
|
|
|
class ComprehensiveAncestorsReportDialog(Report.TextReportDialog):
|
2003-06-14 06:46:30 +05:30
|
|
|
def __init__(self,database,person):
|
|
|
|
Report.TextReportDialog.__init__(self,database,person)
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Customization hooks
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
def doc_uses_tables (self):
|
|
|
|
return 1
|
|
|
|
|
|
|
|
def get_title(self):
|
|
|
|
"""The window title for this dialog"""
|
2003-07-17 15:30:53 +05:30
|
|
|
return "%s - %s - GRAMPS" % (_("Comprehensive Ancestors Report"),
|
|
|
|
_("Text Reports"))
|
2003-06-14 06:46:30 +05:30
|
|
|
|
|
|
|
def get_header(self, name):
|
|
|
|
"""The header line at the top of the dialog contents"""
|
|
|
|
return _("Ancestors for %s") % name
|
|
|
|
|
|
|
|
def get_target_browser_title(self):
|
|
|
|
"""The title of the window created when the 'browse' button is
|
|
|
|
clicked in the 'Save As' frame."""
|
|
|
|
return _("Save Ancestor Report")
|
|
|
|
|
|
|
|
def get_stylesheet_savefile(self):
|
|
|
|
"""Where to save styles for this report."""
|
|
|
|
return "ancestors_report.xml"
|
|
|
|
|
|
|
|
def make_default_style(self):
|
2003-07-06 04:40:43 +05:30
|
|
|
_make_default_style(self.default_style)
|
2003-06-14 06:46:30 +05:30
|
|
|
|
2003-06-27 16:48:58 +05:30
|
|
|
def add_user_options (self):
|
|
|
|
self.cb_cite = gtk.CheckButton (_("Cite sources"))
|
|
|
|
self.cb_cite.set_active (gtk.TRUE)
|
|
|
|
self.add_option ('', self.cb_cite)
|
|
|
|
|
|
|
|
def parse_report_options_frame (self):
|
|
|
|
# Call base class
|
|
|
|
Report.ReportDialog.parse_report_options_frame (self)
|
|
|
|
self.opt_cite = self.cb_cite.get_active ()
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
def make_report(self):
|
2003-07-17 15:30:53 +05:30
|
|
|
|
|
|
|
"""Create the object that will produce the Comprehensive
|
|
|
|
Ancestors Report. All user dialog has already been handled
|
|
|
|
and the output file opened."""
|
2003-06-14 06:46:30 +05:30
|
|
|
try:
|
2003-07-17 15:30:53 +05:30
|
|
|
MyReport = ComprehensiveAncestorsReport(self.db, self.person,
|
|
|
|
self.max_gen, self.pg_brk,
|
|
|
|
self.opt_cite, self.doc,
|
|
|
|
self.target_path)
|
2003-06-14 06:46:30 +05:30
|
|
|
MyReport.write_report()
|
|
|
|
except Errors.ReportError, msg:
|
|
|
|
(m1,m2) = msg.messages()
|
|
|
|
ErrorDialog(m1,m2)
|
|
|
|
except Errors.FilterError, msg:
|
|
|
|
(m1,m2) = msg.messages()
|
|
|
|
ErrorDialog(m1,m2)
|
|
|
|
except:
|
|
|
|
import DisplayTrace
|
|
|
|
DisplayTrace.DisplayTrace()
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Standalone report function
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
def report(database,person):
|
2003-07-17 15:30:53 +05:30
|
|
|
ComprehensiveAncestorsReportDialog(database,person)
|
2003-06-14 06:46:30 +05:30
|
|
|
|
2003-07-06 04:40:43 +05:30
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Set up sane defaults for the book_item
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
_style_file = "ancestors_report.xml"
|
|
|
|
_style_name = "default"
|
|
|
|
|
|
|
|
_person_id = ""
|
|
|
|
_max_gen = 10
|
|
|
|
_pg_brk = 0
|
|
|
|
_opt_cite = gtk.TRUE
|
|
|
|
|
2003-07-07 01:25:45 +05:30
|
|
|
_options = ( _person_id, _max_gen, _pg_brk, _opt_cite )
|
2003-07-06 04:40:43 +05:30
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Book Item Options dialog
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
2003-07-17 15:30:53 +05:30
|
|
|
class ComprehensiveAncestorsBareReportDialog(Report.BareReportDialog):
|
2003-07-06 04:40:43 +05:30
|
|
|
|
|
|
|
def __init__(self,database,person,opt,stl):
|
|
|
|
|
|
|
|
self.options = opt
|
|
|
|
self.db = database
|
|
|
|
if self.options[0]:
|
|
|
|
self.person = self.db.getPerson(self.options[0])
|
|
|
|
else:
|
|
|
|
self.person = person
|
2003-07-11 08:59:33 +05:30
|
|
|
self.style_name = stl
|
|
|
|
|
2003-07-06 04:40:43 +05:30
|
|
|
Report.BareReportDialog.__init__(self,database,self.person)
|
|
|
|
|
|
|
|
self.max_gen = int(self.options[1])
|
|
|
|
self.pg_brk = int(self.options[2])
|
|
|
|
self.opt_cite = int(self.options[3])
|
|
|
|
self.new_person = None
|
|
|
|
|
|
|
|
self.generations_spinbox.set_value(self.max_gen)
|
|
|
|
self.pagebreak_checkbox.set_active(self.pg_brk)
|
|
|
|
self.cb_cite.set_active(self.opt_cite)
|
|
|
|
|
|
|
|
self.window.run()
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Customization hooks
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
2003-07-07 22:27:27 +05:30
|
|
|
def make_default_style(self):
|
|
|
|
_make_default_style(self.default_style)
|
|
|
|
|
2003-07-06 04:40:43 +05:30
|
|
|
def get_title(self):
|
|
|
|
"""The window title for this dialog"""
|
2003-07-17 15:30:53 +05:30
|
|
|
return "%s - GRAMPS Book" % (_("Comprehensive Ancestors Report"))
|
2003-07-06 04:40:43 +05:30
|
|
|
|
|
|
|
def get_header(self, name):
|
|
|
|
"""The header line at the top of the dialog contents"""
|
2003-07-17 15:30:53 +05:30
|
|
|
return _("Comprehensive Ancestors Report for GRAMPS Book")
|
2003-07-06 04:40:43 +05:30
|
|
|
|
|
|
|
def get_stylesheet_savefile(self):
|
|
|
|
"""Where to save styles for this report."""
|
|
|
|
return _style_file
|
|
|
|
|
|
|
|
def add_user_options (self):
|
|
|
|
self.cb_cite = gtk.CheckButton (_("Cite sources"))
|
|
|
|
self.add_option ('', self.cb_cite)
|
|
|
|
|
|
|
|
def parse_report_options_frame (self):
|
|
|
|
# Call base class
|
|
|
|
Report.BareReportDialog.parse_report_options_frame (self)
|
|
|
|
self.opt_cite = self.cb_cite.get_active ()
|
|
|
|
|
|
|
|
def on_cancel(self, obj):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def on_ok_clicked(self, obj):
|
|
|
|
"""The user is satisfied with the dialog choices. Parse all options
|
|
|
|
and close the window."""
|
|
|
|
|
|
|
|
# Preparation
|
|
|
|
self.parse_style_frame()
|
|
|
|
self.parse_report_options_frame()
|
|
|
|
|
|
|
|
if self.new_person:
|
|
|
|
self.person = self.new_person
|
2003-07-07 22:27:27 +05:30
|
|
|
self.options = ( self.person.getId(), self.max_gen, self.pg_brk, self.opt_cite )
|
2003-07-06 04:40:43 +05:30
|
|
|
self.style_name = self.selected_style.get_name()
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
# Function to write Book Item
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
def write_book_item(database,person,doc,options,newpage=0):
|
2003-07-17 15:30:53 +05:30
|
|
|
"""Write the Comprehensive Ancestors Report using options set.
|
2003-07-06 04:40:43 +05:30
|
|
|
All user dialog has already been handled and the output file opened."""
|
|
|
|
try:
|
|
|
|
if options[0]:
|
|
|
|
person = database.getPerson(options[0])
|
|
|
|
max_gen = int(options[1])
|
|
|
|
pg_brk = int(options[2])
|
|
|
|
opt_cite = int(options[3])
|
2003-07-17 15:30:53 +05:30
|
|
|
return ComprehensiveAncestorsReport(database, person,
|
2003-07-06 04:40:43 +05:30
|
|
|
max_gen, pg_brk, opt_cite, doc, None, newpage)
|
|
|
|
except Errors.ReportError, msg:
|
|
|
|
(m1,m2) = msg.messages()
|
|
|
|
ErrorDialog(m1,m2)
|
|
|
|
except Errors.FilterError, msg:
|
|
|
|
(m1,m2) = msg.messages()
|
|
|
|
ErrorDialog(m1,m2)
|
|
|
|
except:
|
|
|
|
import DisplayTrace
|
|
|
|
DisplayTrace.DisplayTrace()
|
|
|
|
|
2003-06-14 06:46:30 +05:30
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
def get_xpm_image():
|
|
|
|
return [
|
|
|
|
"48 48 33 1",
|
|
|
|
" c None",
|
|
|
|
". c #1A1A1A",
|
|
|
|
"+ c #847B6E",
|
|
|
|
"@ c #B7AC9C",
|
|
|
|
"# c #D1D1D0",
|
|
|
|
"$ c #EEE2D0",
|
|
|
|
"% c #6A655C",
|
|
|
|
"& c #868686",
|
|
|
|
"* c #F1EADF",
|
|
|
|
"= c #5C5854",
|
|
|
|
"- c #B89C73",
|
|
|
|
"; c #E2C8A1",
|
|
|
|
"> c #55524C",
|
|
|
|
", c #F5EEE6",
|
|
|
|
"' c #4F4E4C",
|
|
|
|
") c #A19C95",
|
|
|
|
"! c #B3966E",
|
|
|
|
"~ c #CDC8BF",
|
|
|
|
"{ c #F6F2ED",
|
|
|
|
"] c #A6A5A4",
|
|
|
|
"^ c #413F3F",
|
|
|
|
"/ c #D8D1C5",
|
|
|
|
"( c #968977",
|
|
|
|
"_ c #BAB9B6",
|
|
|
|
": c #FAFAF9",
|
|
|
|
"< c #BEA27B",
|
|
|
|
"[ c #E9DAC2",
|
|
|
|
"} c #9D9385",
|
|
|
|
"| c #E4E3E3",
|
|
|
|
"1 c #7A7062",
|
|
|
|
"2 c #E6D3B4",
|
|
|
|
"3 c #BAA488",
|
|
|
|
"4 c #322E2B",
|
|
|
|
" ",
|
|
|
|
" ",
|
|
|
|
" (+(+++++111%1%%%%===%1 ",
|
|
|
|
" +______________@_@)&==1 ",
|
|
|
|
" +_::::::::::::::*|#_&&}> ",
|
|
|
|
" &_:::::::::::::::{|#]1~}^ ",
|
|
|
|
" +_::::::::::::::::{|#=|~&4 ",
|
|
|
|
" +_::::]]]]]]]]:::::|{':|~&4 ",
|
|
|
|
" +_::::::::::::::::::{'::|~&4 ",
|
|
|
|
" +_:::::::::::::::::::'*::|~&^ ",
|
|
|
|
" +_:::::::::::::::::::'|*::|~}> ",
|
|
|
|
" 1_::::]]]]]]]]]]]]:::'~|{::|_}% ",
|
|
|
|
" 1_:::::::::::::::::::'..4^'=1+%1 ",
|
|
|
|
" +_::::]]]]]]]]]]]]:::|__])&+%=^% ",
|
|
|
|
" 1_::::::::::::::::::::|#__)&&+'^ ",
|
|
|
|
" 1_::::]]]]]]]]]::::::::|#~_])&%^ ",
|
|
|
|
" 1_::::::::::::::::::::{||#~_])14 ",
|
|
|
|
" 1_::::]]]]]]]]]]]]]]]]]]&}#~_]+4 ",
|
|
|
|
" 1_::::::::::::::::::{{{{||#~~@&4 ",
|
|
|
|
" %_::::]]]]]]]]]]]]]]]])))}(~~~&4 ",
|
|
|
|
" %_:::::::::::::::::{{{{{*|#/~_(4 ",
|
|
|
|
" %_::::]]]]]]]]]]]]]]])))))}2;/}4 ",
|
|
|
|
" %_:::::::::::::::{{{{{***||[#~}4 ",
|
|
|
|
" %_::::]]]]]]]]]])]))))))))}2/;)4 ",
|
|
|
|
" %_::::::::::::::{{{{{**|$$[/2~!4 ",
|
|
|
|
" %_::::]]]]]]]]){{{{******$$[2/}4 ",
|
|
|
|
" %_::::::::::::{{{{****$$$$$[2/!4 ",
|
|
|
|
" =_::::]]]]]]])]))))))))})}}[2/!4 ",
|
|
|
|
" %_:::::::::{{{{{{**|$$$$$$[[2;)4 ",
|
|
|
|
" =_::::]]]])]]))))))))))}}}}[22!4 ",
|
|
|
|
" %_::::::::{{{{{|**|$$[$[[[[[22}4 ",
|
|
|
|
" =_::::]]])])))))))))}}}}}}}222-4 ",
|
|
|
|
" =_:::::{{{{{|{*|$$$$$[[[[22222!4 ",
|
|
|
|
" =_::::)]])))))))))}}}}}}(}(2;2-4 ",
|
|
|
|
" =_:::{{{{{{***|$$$$$[[[[22222;-4 ",
|
|
|
|
" =_:::{])))))))))}}}}}}}(}((2;;<4 ",
|
|
|
|
" >_:{{{{{{**|$$$$$[[[[22222;2;;-4 ",
|
|
|
|
" >_{{{{)))))))}}}}}}}(!(((((;;;-4 ",
|
|
|
|
" >_{{{{|**|*$$$$$[[[[22222;;;;;!4 ",
|
|
|
|
" '_{{{{****$$$$$2[[222222;2;;;;-4 ",
|
|
|
|
" '@{{****$$$$$[[[2[222;;2;;;;;;!4 ",
|
|
|
|
" >]{******$$$[$[2[[2222;;;;;;;;!4 ",
|
|
|
|
" '_****$$$$[$[[[[2222;2;;;;;;;;!4 ",
|
|
|
|
" '@__@@@@@@@33<3<<<<<<-<-!!!!!!!4 ",
|
|
|
|
" 44444444444444444444444444444444 ",
|
|
|
|
" ",
|
|
|
|
" ",
|
|
|
|
" "]
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------
|
2003-07-06 04:40:43 +05:30
|
|
|
from Plugins import register_report, register_book_item
|
2003-06-14 06:46:30 +05:30
|
|
|
|
|
|
|
register_report(
|
|
|
|
report,
|
2003-07-17 15:30:53 +05:30
|
|
|
_("Comprehensive Ancestors Report"),
|
2003-06-14 06:46:30 +05:30
|
|
|
category=_("Text Reports"),
|
|
|
|
status=(_("Beta")),
|
|
|
|
description= _("Produces a detailed ancestral report."),
|
|
|
|
xpm=get_xpm_image(),
|
|
|
|
author_name="Tim Waugh",
|
|
|
|
author_email="twaugh@redhat.com"
|
|
|
|
)
|
2003-07-06 04:40:43 +05:30
|
|
|
|
|
|
|
# (name,category,options_dialog,write_book_item,options,style_name,style_file,make_default_style)
|
|
|
|
register_book_item(
|
2003-07-17 15:30:53 +05:30
|
|
|
_("Comprehensive Ancestors Report"),
|
2003-07-06 04:40:43 +05:30
|
|
|
_("Text"),
|
2003-07-17 15:30:53 +05:30
|
|
|
ComprehensiveAncestorsBareReportDialog,
|
2003-07-06 04:40:43 +05:30
|
|
|
write_book_item,
|
|
|
|
_options,
|
|
|
|
_style_name,
|
|
|
|
_style_file,
|
|
|
|
_make_default_style
|
|
|
|
)
|