From 7a5348de8af4054b3f2afec6b56767fe65d00de1 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Sun, 17 Jun 2012 17:21:26 +0000 Subject: [PATCH 01/68] Found an untranslated word. svn: r19856 --- src/plugins/webreport/NarrativeWeb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index 07ed5fa90..a53909899 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -881,7 +881,7 @@ class BasePage(object): trow.extend( Html("th", trans, class_ =colclass, inline =True) for trans, colclass in [ - (("Event"), "ColumnEvent"), + (_("Event"), "ColumnEvent"), (_("Date"), "ColumnDate"), (_("Place"), "ColumnPlace"), (_("Notes"), "ColumnNotes"), From 3b9a696f90c690e2c43f88656ee46a711d7c5f34 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 17 Jun 2012 19:00:40 +0000 Subject: [PATCH 02/68] Cleanup svn: r19857 --- src/webapp/dbdjango.py | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/webapp/dbdjango.py b/src/webapp/dbdjango.py index e30b00041..22ec9dc43 100644 --- a/src/webapp/dbdjango.py +++ b/src/webapp/dbdjango.py @@ -639,18 +639,11 @@ class DbDjango(DbWriteBase, DbReadBase): def get_place_from_handle(self, handle): if handle in self.import_cache: return self.import_cache[handle] - # FIXME: use object cache try: - dji_obj = self.dji.Place.get(handle=handle) + place = self.dji.Place.get(handle=handle) except: - dji_obj = None - if dji_obj: - tuple_obj = self.dji.get_place(dji_obj) - if tuple_obj: - obj = gen.lib.Place() - obj.unserialize(tuple_obj) - return obj - return None + return None + return self.make_place(place) def get_citation_from_handle(self, handle): if handle in self.import_cache: From 074fef2b21ad2cc6c6930e3c0f164aa22733a9de Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Mon, 18 Jun 2012 12:27:23 +0000 Subject: [PATCH 03/68] Dictionary-based database with enough in place to import into svn: r19860 --- src/gen/db/dictionary.py | 807 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 807 insertions(+) create mode 100644 src/gen/db/dictionary.py diff --git a/src/gen/db/dictionary.py b/src/gen/db/dictionary.py new file mode 100644 index 000000000..0f989db39 --- /dev/null +++ b/src/gen/db/dictionary.py @@ -0,0 +1,807 @@ +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2012 Douglas S. Blank +# +# 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: dbdictionary.py $ +# + +""" Implements a Db interface as a Dictionary """ + +#------------------------------------------------------------------------ +# +# Gramps Modules +# +#------------------------------------------------------------------------ +import cPickle +import base64 +import time +import gen +import re +from gen.db import DbReadBase, DbWriteBase, DbTxn +from gen.db import (PERSON_KEY, + FAMILY_KEY, + CITATION_KEY, + SOURCE_KEY, + EVENT_KEY, + MEDIA_KEY, + PLACE_KEY, + REPOSITORY_KEY, + NOTE_KEY) +import Utils + +class Cursor(object): + """ + Iterates through model returning (handle, raw_data)... + """ + def __init__(self, model, func): + self.model = model + self.func = func + def __enter__(self): + return self + def __iter__(self): + return self.__next__() + def __next__(self): + for item in self.model.all(): + yield (item.handle, self.func(item.handle)) + def __exit__(self, *args, **kwargs): + pass + def iter(self): + for item in self.model.all(): + yield (item.handle, self.func(item.handle)) + yield None + +class Bookmarks: + def get(self): + return [] # handles + def append(self, handle): + pass + +class DictionaryTxn(DbTxn): + def __init__(self, message, db): + DbTxn.__init__(self, message, db) + + def get(self, key, default=None, txn=None, **kwargs): + """ + Returns the data object associated with key + """ + if txn and key in txn: + return txn[key] + else: + return None + + def put(self, handle, new_data, txn): + """ + """ + txn[handle] = new_data + +class DictionaryDb(DbWriteBase, DbReadBase): + """ + A Gramps Database Backend. This replicates the grampsdb functions. + """ + + def __init__(self, *args, **kwargs): + DbReadBase.__init__(self) + DbWriteBase.__init__(self) + # skip GEDCOM cross-ref check for now: + self.set_feature("skip-check-xref", True) + self.readonly = False + self.db_is_open = True + self.name_formats = [] + self.bookmarks = Bookmarks() + self.family_bookmarks = Bookmarks() + self.event_bookmarks = Bookmarks() + self.place_bookmarks = Bookmarks() + self.citation_bookmarks = Bookmarks() + self.source_bookmarks = Bookmarks() + self.repo_bookmarks = Bookmarks() + self.media_bookmarks = Bookmarks() + self.note_bookmarks = Bookmarks() + self.set_person_id_prefix('I%04d') + self.set_object_id_prefix('O%04d') + self.set_family_id_prefix('F%04d') + self.set_citation_id_prefix('C%04d') + self.set_source_id_prefix('S%04d') + self.set_place_id_prefix('P%04d') + self.set_event_id_prefix('E%04d') + self.set_repository_id_prefix('R%04d') + self.set_note_id_prefix('N%04d') + # ---------------------------------- + self.id_trans = DictionaryTxn("ID Transaction", self) + self.fid_trans = DictionaryTxn("FID Transaction", self) + self.pid_trans = DictionaryTxn("PID Transaction", self) + self.cid_trans = DictionaryTxn("CID Transaction", self) + self.sid_trans = DictionaryTxn("SID Transaction", self) + self.oid_trans = DictionaryTxn("OID Transaction", self) + self.rid_trans = DictionaryTxn("RID Transaction", self) + self.nid_trans = DictionaryTxn("NID Transaction", self) + self.eid_trans = DictionaryTxn("EID Transaction", self) + self.cmap_index = 0 + self.smap_index = 0 + self.emap_index = 0 + self.pmap_index = 0 + self.fmap_index = 0 + self.lmap_index = 0 + self.omap_index = 0 + self.rmap_index = 0 + self.nmap_index = 0 + self.env = None + self.person_map = {} + self.family_map = {} + self.place_map = {} + self.citation_map = {} + self.source_map = {} + self.repository_map = {} + self.note_map = {} + self.media_map = {} + self.event_map = {} + self.metadata = {} + self.name_group = {} + self.undo_callback = None + self.redo_callback = None + self.undo_history_callback = None + self.modified = 0 + self.txn = DictionaryTxn("DbDictionary Transaction", self) + self.transaction = None + + def transaction_commit(self, txn): + pass + + def enable_signals(self): + pass + + def get_undodb(self): + return None + + def transaction_abort(self, txn): + pass + + @staticmethod + def _validated_id_prefix(val, default): + if isinstance(val, basestring) and val: + try: + str_ = val % 1 + except TypeError: # missing conversion specifier + prefix_var = val + "%d" + except ValueError: # incomplete format + prefix_var = default+"%04d" + else: + prefix_var = val # OK as given + else: + prefix_var = default+"%04d" # not a string or empty string + return prefix_var + + @staticmethod + def __id2user_format(id_pattern): + """ + Return a method that accepts a Gramps ID and adjusts it to the users + format. + """ + pattern_match = re.match(r"(.*)%[0 ](\d+)[diu]$", id_pattern) + if pattern_match: + str_prefix = pattern_match.group(1) + nr_width = pattern_match.group(2) + def closure_func(gramps_id): + if gramps_id and gramps_id.startswith(str_prefix): + id_number = gramps_id[len(str_prefix):] + if id_number.isdigit(): + id_value = int(id_number, 10) + if len(str(id_value)) > nr_width: + # The ID to be imported is too large to fit in the + # users format. For now just create a new ID, + # because that is also what happens with IDs that + # are identical to IDs already in the database. If + # the problem of colliding import and already + # present IDs is solved the code here also needs + # some solution. + gramps_id = id_pattern % 1 + else: + gramps_id = id_pattern % id_value + return gramps_id + else: + def closure_func(gramps_id): + return gramps_id + return closure_func + + def set_person_id_prefix(self, val): + """ + Set the naming template for GRAMPS Person ID values. + + The string is expected to be in the form of a simple text string, or + in a format that contains a C/Python style format string using %d, + such as I%d or I%04d. + """ + self.person_prefix = self._validated_id_prefix(val, "I") + self.id2user_format = self.__id2user_format(self.person_prefix) + + def set_citation_id_prefix(self, val): + """ + Set the naming template for GRAMPS Citation ID values. + + The string is expected to be in the form of a simple text string, or + in a format that contains a C/Python style format string using %d, + such as C%d or C%04d. + """ + self.citation_prefix = self._validated_id_prefix(val, "C") + self.cid2user_format = self.__id2user_format(self.citation_prefix) + + def set_source_id_prefix(self, val): + """ + Set the naming template for GRAMPS Source ID values. + + The string is expected to be in the form of a simple text string, or + in a format that contains a C/Python style format string using %d, + such as S%d or S%04d. + """ + self.source_prefix = self._validated_id_prefix(val, "S") + self.sid2user_format = self.__id2user_format(self.source_prefix) + + def set_object_id_prefix(self, val): + """ + Set the naming template for GRAMPS MediaObject ID values. + + The string is expected to be in the form of a simple text string, or + in a format that contains a C/Python style format string using %d, + such as O%d or O%04d. + """ + self.mediaobject_prefix = self._validated_id_prefix(val, "O") + self.oid2user_format = self.__id2user_format(self.mediaobject_prefix) + + def set_place_id_prefix(self, val): + """ + Set the naming template for GRAMPS Place ID values. + + The string is expected to be in the form of a simple text string, or + in a format that contains a C/Python style format string using %d, + such as P%d or P%04d. + """ + self.place_prefix = self._validated_id_prefix(val, "P") + self.pid2user_format = self.__id2user_format(self.place_prefix) + + def set_family_id_prefix(self, val): + """ + Set the naming template for GRAMPS Family ID values. The string is + expected to be in the form of a simple text string, or in a format + that contains a C/Python style format string using %d, such as F%d + or F%04d. + """ + self.family_prefix = self._validated_id_prefix(val, "F") + self.fid2user_format = self.__id2user_format(self.family_prefix) + + def set_event_id_prefix(self, val): + """ + Set the naming template for GRAMPS Event ID values. + + The string is expected to be in the form of a simple text string, or + in a format that contains a C/Python style format string using %d, + such as E%d or E%04d. + """ + self.event_prefix = self._validated_id_prefix(val, "E") + self.eid2user_format = self.__id2user_format(self.event_prefix) + + def set_repository_id_prefix(self, val): + """ + Set the naming template for GRAMPS Repository ID values. + + The string is expected to be in the form of a simple text string, or + in a format that contains a C/Python style format string using %d, + such as R%d or R%04d. + """ + self.repository_prefix = self._validated_id_prefix(val, "R") + self.rid2user_format = self.__id2user_format(self.repository_prefix) + + def set_note_id_prefix(self, val): + """ + Set the naming template for GRAMPS Note ID values. + + The string is expected to be in the form of a simple text string, or + in a format that contains a C/Python style format string using %d, + such as N%d or N%04d. + """ + self.note_prefix = self._validated_id_prefix(val, "N") + self.nid2user_format = self.__id2user_format(self.note_prefix) + + def __find_next_gramps_id(self, prefix, map_index, trans): + """ + Helper function for find_next__gramps_id methods + """ + index = prefix % map_index + while trans.get(str(index), txn=self.txn) is not None: + map_index += 1 + index = prefix % map_index + map_index += 1 + return (map_index, index) + + def find_next_person_gramps_id(self): + """ + Return the next available GRAMPS' ID for a Person object based off the + person ID prefix. + """ + self.pmap_index, gid = self.__find_next_gramps_id(self.person_prefix, + self.pmap_index, self.id_trans) + return gid + + def find_next_place_gramps_id(self): + """ + Return the next available GRAMPS' ID for a Place object based off the + place ID prefix. + """ + self.lmap_index, gid = self.__find_next_gramps_id(self.place_prefix, + self.lmap_index, self.pid_trans) + return gid + + def find_next_event_gramps_id(self): + """ + Return the next available GRAMPS' ID for a Event object based off the + event ID prefix. + """ + self.emap_index, gid = self.__find_next_gramps_id(self.event_prefix, + self.emap_index, self.eid_trans) + return gid + + def find_next_object_gramps_id(self): + """ + Return the next available GRAMPS' ID for a MediaObject object based + off the media object ID prefix. + """ + self.omap_index, gid = self.__find_next_gramps_id(self.mediaobject_prefix, + self.omap_index, self.oid_trans) + return gid + + def find_next_citation_gramps_id(self): + """ + Return the next available GRAMPS' ID for a Citation object based off the + citation ID prefix. + """ + self.cmap_index, gid = self.__find_next_gramps_id(self.citation_prefix, + self.cmap_index, self.cid_trans) + return gid + + def find_next_source_gramps_id(self): + """ + Return the next available GRAMPS' ID for a Source object based off the + source ID prefix. + """ + self.smap_index, gid = self.__find_next_gramps_id(self.source_prefix, + self.smap_index, self.sid_trans) + return gid + + def find_next_family_gramps_id(self): + """ + Return the next available GRAMPS' ID for a Family object based off the + family ID prefix. + """ + self.fmap_index, gid = self.__find_next_gramps_id(self.family_prefix, + self.fmap_index, self.fid_trans) + return gid + + def find_next_repository_gramps_id(self): + """ + Return the next available GRAMPS' ID for a Respository object based + off the repository ID prefix. + """ + self.rmap_index, gid = self.__find_next_gramps_id(self.repository_prefix, + self.rmap_index, self.rid_trans) + return gid + + def find_next_note_gramps_id(self): + """ + Return the next available GRAMPS' ID for a Note object based off the + note ID prefix. + """ + self.nmap_index, gid = self.__find_next_gramps_id(self.note_prefix, + self.nmap_index, self.nid_trans) + return gid + + def get_mediapath(self): + return None + + def get_name_group_keys(self): + return [] + + def get_name_group_mapping(self, key): + return None + + def get_researcher(self): + obj = gen.lib.Researcher() + return obj + + def get_person_handles(self): + return self.person_map.keys() + + def get_family_handles(self): + return self.family_map.keys() + + def get_event_handles(self): + return self.event_map.keys() + + def get_citation_handles(self): + return self.citation_map.keys() + + def get_source_handles(self): + return self.source_map.keys() + + def get_place_handles(self): + return self.place_map.keys() + + def get_repository_handles(self): + return self.repository_map.keys() + + def get_media_object_handles(self): + return self.media_map.keys() + + def get_note_handles(self): + return self.note_map.keys() + + def get_tag_handles(self, sort_handles=False): + return [] + + def get_event_from_handle(self, handle): + return self.event_map[handle] + + def get_family_from_handle(self, handle): + return self.family_map[handle] + + def get_repository_from_handle(self, handle): + return self.repository_map[handle] + + def get_person_from_handle(self, handle): + return self.person_map[handle] + + def get_place_from_handle(self, handle): + place = self.person_map[handle] + return place + + def get_citation_from_handle(self, handle): + citation = self.citation_map[handle] + return citation + + def get_source_from_handle(self, handle): + source = self.source_map[handle] + return source + + def get_note_from_handle(self, handle): + note = self.note_map[handle] + return note + + def get_object_from_handle(self, handle): + media = self.media_map[handle] + return media + + def get_default_person(self): + return None + + def iter_people(self): + return (person for person in self.person_map.values()) + + def iter_person_handles(self): + return (handle for handle in self.person_map.keys()) + + def iter_families(self): + return (family for family in self.family_map.values()) + + def iter_family_handles(self): + return (handle for handle in self.family_map.keys()) + + def get_tag_from_name(self, name): + for tag in self.tag_map.values(): + if tag.name == name: + return tag + return None + + def get_family_from_gramps_id(self, gramps_id): + for family in self.family_map.values(): + if family.gramps_id == gramps_id: + return family + return None + + def get_person_from_gramps_id(self, gramps_id): + for person in self.person_map.values(): + if person.gramps_id == gramps_id: + return person + return person + + def get_number_of_people(self): + return len(self.person_map) + + def get_number_of_events(self): + return len(self.event_map) + + def get_number_of_places(self): + return len(self.place_map) + + def get_number_of_tags(self): + return 0 # FIXME + + def get_number_of_families(self): + return len(self.family_map) + + def get_number_of_notes(self): + return len(self.note_map) + + def get_number_of_citations(self): + return len(self.citation_map) + + def get_number_of_sources(self): + return len(self.source_map) + + def get_number_of_media_objects(self): + return len(self.media_map) + + def get_number_of_repositories(self): + return len(self.repository_map) + + def get_place_cursor(self): + return Cursor(self.place_map, self.get_raw_place_data).iter() + + def get_person_cursor(self): + return Cursor(self.person_map, self.get_raw_person_data).iter() + + def get_family_cursor(self): + return Cursor(self.family_map, self.get_raw_family_data).iter() + + def get_events_cursor(self): + return Cursor(self.event_map, self.get_raw_event_data).iter() + + def get_citation_cursor(self): + return Cursor(self.citation_map, self.get_raw_citation_data).iter() + + def get_source_cursor(self): + return Cursor(self.source_map, self.get_raw_source_data).iter() + + def has_gramps_id(self, obj_key, gramps_id): + key2table = { + PERSON_KEY: self.person_map, + FAMILY_KEY: self.family_map, + SOURCE_KEY: self.source_map, + CITATION_KEY: self.citation_map, + EVENT_KEY: self.event_map, + MEDIA_KEY: self.media_map, + PLACE_KEY: self.place_map, + REPOSITORY_KEY: self.repository_map, + NOTE_KEY: self.note_map, + } + map = key2table[obj_key] + for item in map.values(): + if item.gramps_id == gramps_id: + return True + return False + + def has_person_handle(self, handle): + return handle in self.person_map + + def has_family_handle(self, handle): + return handle in self.family_map + + def has_citation_handle(self, handle): + return handle in self.citation_map + + def has_source_handle(self, handle): + return handle in self.source_map + + def has_repository_handle(self, handle): + return handle in self.repository_map + + def has_note_handle(self, handle): + return handle in self.note_map + + def has_place_handle(self, handle): + return handle in self.place_map + + def has_event_handle(self, handle): + return handle in self.event_map + + def has_tag_handle(self, handle): + return handle in self.tag_map + + def has_object_handle(self, handle): + return handle in self.media_map + + def has_name_group_key(self, key): + # FIXME: + return False + + def set_name_group_mapping(self, key, value): + # FIXME: + pass + + def set_default_person_handle(self, handle): + pass + + def set_mediapath(self, mediapath): + pass + + def get_raw_person_data(self, handle): + if handle in self.person_map: + return self.person_map[handle].serialize() + return None + + def get_raw_family_data(self, handle): + if handle in self.family_map: + return self.family_map[handle].serialize() + return None + + def get_raw_citation_data(self, handle): + if handle in self.citation_map: + return self.citation_map[handle].serialize() + return None + + def get_raw_source_data(self, handle): + if handle in self.source_map: + return self.source_map[handle].serialize() + return None + + def get_raw_repository_data(self, handle): + if handle in self.repository_map: + return self.repository_map[handle].serialize() + return None + + def get_raw_note_data(self, handle): + if handle in self.note_map: + return self.note_map[handle].serialize() + return None + + def get_raw_place_data(self, handle): + if handle in self.place_map: + return self.place_map[handle].serialize() + return None + + def get_raw_object_data(self, handle): + if handle in self.media_map: + return self.media_map[handle].serialize() + return None + + def add_person(self, person, trans, set_gid=True): + if not person.handle: + person.handle = Utils.create_id() + if not person.gramps_id or set_gid: + person.gramps_id = self.find_next_person_gramps_id() + self.commit_person(person, trans) + return person.handle + + def add_family(self, family, trans, set_gid=True): + if not family.handle: + family.handle = Utils.create_id() + if not family.gramps_id or set_gid: + family.gramps_id = self.find_next_family_gramps_id() + self.commit_family(family, trans) + return family.handle + + def add_citation(self, citation, trans, set_gid=True): + if not citation.handle: + citation.handle = Utils.create_id() + if not citation.gramps_id or set_gid: + citation.gramps_id = self.find_next_citation_gramps_id() + self.commit_citation(citation, trans) + return citation.handle + + def add_source(self, source, trans, set_gid=True): + if not source.handle: + source.handle = Utils.create_id() + if not source.gramps_id or set_gid: + source.gramps_id = self.find_next_source_gramps_id() + self.commit_source(source, trans) + return source.handle + + def add_repository(self, repository, trans, set_gid=True): + if not repository.handle: + repository.handle = Utils.create_id() + if not repository.gramps_id or set_gid: + repository.gramps_id = self.find_next_repository_gramps_id() + self.commit_repository(repository, trans) + return repository.handle + + def add_note(self, note, trans, set_gid=True): + if not note.handle: + note.handle = Utils.create_id() + if not note.gramps_id or set_gid: + note.gramps_id = self.find_next_note_gramps_id() + self.commit_note(note, trans) + return note.handle + + def add_place(self, place, trans, set_gid=True): + if not place.handle: + place.handle = Utils.create_id() + if not place.gramps_id or set_gid: + place.gramps_id = self.find_next_place_gramps_id() + self.commit_place(place, trans) + return place.handle + + def add_event(self, event, trans, set_gid=True): + if not event.handle: + event.handle = Utils.create_id() + if not event.gramps_id or set_gid: + event.gramps_id = self.find_next_event_gramps_id() + self.commit_event(event, trans) + return event.handle + + def add_tag(self, tag, trans): + if not tag.handle: + tag.handle = Utils.create_id() + self.commit_event(tag, trans) + return tag.handle + + def add_object(self, obj, transaction, set_gid=True): + """ + Add a MediaObject to the database, assigning internal IDs if they have + not already been defined. + + If not set_gid, then gramps_id is not set. + """ + if not obj.handle: + obj.handle = Utils.create_id() + if not obj.gramps_id or set_gid: + obj.gramps_id = self.find_next_object_gramps_id() + self.commit_media_object(obj, transaction) + return obj.handle + + def commit_person(self, person, trans, change_time=None): + self.person_map[person.handle] = person + + def commit_family(self, family, trans, change_time=None): + self.family_map[family.handle] = family + + def commit_citation(self, citation, trans, change_time=None): + self.citation_map[citation.handle] = citation + + def commit_source(self, source, trans, change_time=None): + self.source_map[source.handle] = source + + def commit_repository(self, repository, trans, change_time=None): + self.repository_map[repository.handle] = repository + + def commit_note(self, note, trans, change_time=None): + self.note_map[note.handle] = note + + def commit_place(self, place, trans, change_time=None): + self.place_map[place.handle] = place + + def commit_event(self, event, trans, change_time=None): + self.event_map[event.handle] = event + + def commit_tag(self, tag, trans, change_time=None): + self.tag_map[tag.handle] = tag + + def commit_media_object(self, obj, transaction, change_time=None): + self.media_map[obj.handle] = obj + + def get_gramps_ids(self, obj_key): + key2table = { + PERSON_KEY: self.person_map, + FAMILY_KEY: self.family_map, + CITATION_KEY: self.citation_map, + SOURCE_KEY: self.source_map, + EVENT_KEY: self.event_map, + MEDIA_KEY: self.media_map, + PLACE_KEY: self.place_map, + REPOSITORY_KEY: self.repository_map, + NOTE_KEY: self.note_map, + } + table = key2table[obj_key] + return [item.gramps_id for item in table.values()] + + def transaction_begin(self, transaction): + return + + def disable_signals(self): + pass + + def set_researcher(self, owner): + pass + + def request_rebuild(self): + pass + From 1bffd5f2f03bd2a252b5b08a22b272b0e8bc1048 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Mon, 18 Jun 2012 12:29:30 +0000 Subject: [PATCH 04/68] Fixed has_gramps_id, removed dup methods svn: r19861 --- src/webapp/dbdjango.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/src/webapp/dbdjango.py b/src/webapp/dbdjango.py index 22ec9dc43..227c38c7f 100644 --- a/src/webapp/dbdjango.py +++ b/src/webapp/dbdjango.py @@ -681,12 +681,6 @@ class DbDjango(DbWriteBase, DbReadBase): return None return self.make_media(media) - def get_media_object_handles(self): - return [media.handle for media in self.dji.Media.all()] - - def get_person_handles(self, sort_handles=False): - return [person.handle for person in self.dji.Person.all()] - def get_default_person(self): return None @@ -770,8 +764,20 @@ class DbDjango(DbWriteBase, DbReadBase): def get_source_cursor(self): return Cursor(self.dji.Source, self.get_raw_source_data).iter() - def has_gramps_id(self, key, gramps_id): - return self.dji.Person.filter(gramps_id=gramps_id).count() > 0 + def has_gramps_id(self, obj_key, gramps_id): + key2table = { + PERSON_KEY: self.Person, + FAMILY_KEY: self.Family, + SOURCE_KEY: self.Source, + CITATION_KEY: self.Citation, + EVENT_KEY: self.Event, + MEDIA_KEY: self.Media, + PLACE_KEY: self.Place, + REPOSITORY_KEY: self.Repository, + NOTE_KEY: self.Note, + } + table = key2table[obj_key] + return table.objects.filter(gramps_id=gramps_id).count() > 0 def has_person_handle(self, handle): if handle in self.import_cache: From 30b0c044ced7cec787ec47ccaa660be14452a0e4 Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Mon, 18 Jun 2012 17:54:55 +0000 Subject: [PATCH 05/68] Fix for error 5851 in trunk and 3.4. '&' and '<' give Pango warnings and does not print the desired results in (most) Graphics reports. svn: r19862 --- src/plugins/drawreport/FanChart.py | 8 ++++--- src/plugins/lib/libcairodoc.py | 35 ++++++++++++++++++------------ 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/plugins/drawreport/FanChart.py b/src/plugins/drawreport/FanChart.py index 92b743d28..626811395 100644 --- a/src/plugins/drawreport/FanChart.py +++ b/src/plugins/drawreport/FanChart.py @@ -339,7 +339,8 @@ class FanChart(Report): if self.map[index]: if (generation == 0) and self.circle == FULL_CIRCLE: yc = y - self.doc.rotate_text(text_style, self.text[index], + txt = '\n'.join(self.text[index]) + self.doc.rotate_text(text_style, txt, xc, yc, text_angle) text_angle += delta @@ -368,11 +369,12 @@ class FanChart(Report): start_angle, end_angle, rad1) text_angle += delta if self.map[index]: + txt = '\n'.join(self.text[index]) if self.radial == RADIAL_UPRIGHT and (start_angle >= 90) and (start_angle < 270): - self.doc.rotate_text(text_style, self.text[index], + self.doc.rotate_text(text_style, txt, xc, yc, text_angle + 180) else: - self.doc.rotate_text(text_style, self.text[index], + self.doc.rotate_text(text_style, txt, xc, yc, text_angle) #------------------------------------------------------------------------ diff --git a/src/plugins/lib/libcairodoc.py b/src/plugins/lib/libcairodoc.py index 28c6fae19..3e3b7529e 100644 --- a/src/plugins/lib/libcairodoc.py +++ b/src/plugins/lib/libcairodoc.py @@ -7,6 +7,7 @@ # Copyright (C) 2010 Peter Landgren # Copyright (C) 2010 Jakim Friant # Copyright (C) 2011 Paul Franklin +# Copyright (C) 2012 Craig Anderson # # 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 @@ -1431,6 +1432,14 @@ class CairoDoc(BaseDoc, TextDoc, DrawDoc): newlines.append(' '.join(singleline.split())) self.__write_text('\n'.join(newlines), markup=True, links=links) self.end_paragraph() + + def __markup(self, text, markup=None): + if not markup: + # We need to escape the text here for later pango.Layout.set_markup + # calls. This way we save the markup created by the report + # The markup in the note editor is not in the text so is not + # considered. It must be added by pango too + return self._backend.ESCAPE_FUNC()(text) def __write_text(self, text, mark=None, markup=False, links=False): """ @@ -1457,12 +1466,7 @@ links (like ODF) and write PDF from that format. """ % cairo.version self._links_error = True - if not markup: - # We need to escape the text here for later pango.Layout.set_markup - # calls. This way we save the markup created by the report - # The markup in the note editor is not in the text so is not - # considered. It must be added by pango too - text = self._backend.ESCAPE_FUNC()(text) + text = self.__markup(text, markup) if mark: self._active_element.add_mark(mark) @@ -1569,12 +1573,12 @@ links (like ODF) and write PDF from that format. # horizontal position of the text is not included in the style, # we assume that it is the size of the shadow, or 0.2mm - if style.get_shadow(): - x_offset = style.get_shadow_space() - else: + x_offset = style.get_shadow_space() + if x_offset == 0: x_offset = 0.2 - new_text = GtkDocText(paragraph_style, 'center', text, + new_text = GtkDocText(paragraph_style, 'center', + self.__markup(text), x + x_offset , y + h / 2, angle=0) self._active_element.add_child(new_text) @@ -1585,7 +1589,8 @@ links (like ODF) and write PDF from that format. paragraph_style = style_sheet.get_paragraph_style(paragraph_style_name) paragraph_style.set_alignment(PARA_ALIGN_LEFT) - new_text = GtkDocText(paragraph_style, 'top', text, x, y, angle=0) + new_text = GtkDocText(paragraph_style, 'top', + self.__markup(text), x, y, angle=0) self._active_element.add_child(new_text) def center_text(self, style_name, text, x, y): @@ -1595,7 +1600,8 @@ links (like ODF) and write PDF from that format. paragraph_style = style_sheet.get_paragraph_style(paragraph_style_name) paragraph_style.set_alignment(PARA_ALIGN_CENTER) - new_text = GtkDocText(paragraph_style, 'top', text, x, y, angle=0) + new_text = GtkDocText(paragraph_style, 'top', + self.__markup(text), x, y, angle=0) self._active_element.add_child(new_text) def rotate_text(self, style_name, text, x, y, angle): @@ -1605,8 +1611,8 @@ links (like ODF) and write PDF from that format. paragraph_style = style_sheet.get_paragraph_style(paragraph_style_name) paragraph_style.set_alignment(PARA_ALIGN_CENTER) - new_text = GtkDocText(paragraph_style, 'center', '\n'.join(text), - x, y, angle) + new_text = GtkDocText(paragraph_style, 'center', + self.__markup([text]), x, y, angle) self._active_element.add_child(new_text) # paginating and drawing interface @@ -1678,3 +1684,4 @@ links (like ODF) and write PDF from that format. cr.stroke() self._pages[page_nr].draw(cr, layout, width, dpi_x, dpi_y) + From a0d592a6fc7cffd57afdbb646a5af73d159558f6 Mon Sep 17 00:00:00 2001 From: Peter Landgren Date: Mon, 18 Jun 2012 18:23:06 +0000 Subject: [PATCH 06/68] Found a new untranslated word. svn: r19866 --- src/plugins/webreport/NarrativeWeb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/NarrativeWeb.py index a53909899..5a94547aa 100644 --- a/src/plugins/webreport/NarrativeWeb.py +++ b/src/plugins/webreport/NarrativeWeb.py @@ -5606,7 +5606,7 @@ class IndividualPage(BasePage): body += mapdetail # add page title - mapdetail += Html("h3", html_escape("Tracking %s" % + mapdetail += Html("h3", html_escape(_("Tracking %s") % self.get_name(person)), inline=True) # page description From 9841fb79efd2e2d8125bec72fe8088bcb34cdf7d Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Mon, 18 Jun 2012 20:35:05 +0000 Subject: [PATCH 07/68] Error 5851 (part 2) svn: r19868 --- src/plugins/lib/libcairodoc.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/lib/libcairodoc.py b/src/plugins/lib/libcairodoc.py index 3e3b7529e..6abe6700f 100644 --- a/src/plugins/lib/libcairodoc.py +++ b/src/plugins/lib/libcairodoc.py @@ -1573,9 +1573,10 @@ links (like ODF) and write PDF from that format. # horizontal position of the text is not included in the style, # we assume that it is the size of the shadow, or 0.2mm - x_offset = style.get_shadow_space() - if x_offset == 0: - x_offset = 0.2 + if style.get_shadow(): + x_offset = style.get_shadow_space() + else: + x_offset = 0.2 new_text = GtkDocText(paragraph_style, 'center', self.__markup(text), From daa01defab95116cdd0f30b8141a3250df009b29 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Mon, 18 Jun 2012 22:32:22 +0000 Subject: [PATCH 08/68] Added media viewing and editing; gets media from config and creates a /thumbnail/ folder there svn: r19869 --- src/data/templates/view_media_detail.html | 1 + src/webapp/grampsdb/forms.py | 9 ++++++- src/webapp/grampsdb/view/media.py | 31 ++++++++++++++++++++++- src/webapp/utils.py | 7 +++++ 4 files changed, 46 insertions(+), 2 deletions(-) diff --git a/src/data/templates/view_media_detail.html b/src/data/templates/view_media_detail.html index 68c868933..2e7eadfc1 100644 --- a/src/data/templates/view_media_detail.html +++ b/src/data/templates/view_media_detail.html @@ -31,6 +31,7 @@ {{mediaform.desc.label}}: {% render mediaform.desc user action %} +{% media_link media.handle user action %} {{mediaform.gramps_id.label}}: diff --git a/src/webapp/grampsdb/forms.py b/src/webapp/grampsdb/forms.py index bf2c53bc4..2b134d06f 100644 --- a/src/webapp/grampsdb/forms.py +++ b/src/webapp/grampsdb/forms.py @@ -23,11 +23,17 @@ # forms.py forms for Django web project +# Django Modules: from django import forms -from webapp.grampsdb.models import * from django.forms.models import inlineformset_factory from django.forms.models import BaseModelFormSet from django.forms.widgets import TextInput + +# Gramps Modules: +from webapp.grampsdb.models import * +import gen.mime + +# Python Modules: import datetime class PersonForm(forms.ModelForm): @@ -197,6 +203,7 @@ class MediaForm(forms.ModelForm): from webapp.libdjango import DjangoInterface dji = DjangoInterface() model = super(MediaForm, self).save(commit=False) + model.mime = gen.mime.get_type(model.path) dobj = dp(self.cleaned_data['text']) dji.add_date(model, dobj.serialize()) if commit: diff --git a/src/webapp/grampsdb/view/media.py b/src/webapp/grampsdb/view/media.py index 99b420fb3..07afcdaf6 100644 --- a/src/webapp/grampsdb/view/media.py +++ b/src/webapp/grampsdb/view/media.py @@ -26,10 +26,16 @@ from webapp.utils import _, boolean, update_last_changed from webapp.grampsdb.models import Media from webapp.grampsdb.forms import * from webapp.libdjango import DjangoInterface +from gen.config import config ## Django Modules from django.shortcuts import get_object_or_404, render_to_response, redirect from django.template import Context, RequestContext +from django.http import HttpResponse + +## Other Python Modules +from PIL import Image +import os ## Globals dji = DjangoInterface() @@ -49,7 +55,30 @@ def process_media(request, context, handle, action, add_to=None): # view, edit, action = request.POST.get("action") # Handle: edit, view, add, create, save, delete - if action == "add": + if action == "full": + # FIXME: path should come from config + media = Media.objects.get(handle=handle) + media_type, media_ext = media.mime.split("/", 1) + folder = config.get('behavior.addmedia-image-dir') + image = Image.open("%s/%s" % (folder, media.path)) + response = HttpResponse(mimetype=media.mime) + image.save(response, media_ext.upper()) + return response + elif action == "thumbnail": + media = Media.objects.get(handle=handle) + media_type, media_ext = media.mime.split("/", 1) + folder = config.get('behavior.addmedia-image-dir') + if os.path.exists("%s/thumbnail/%s" % (folder, media.path)): + image = Image.open("%s/thumbnail/%s" % (folder, media.path)) + else: + image = Image.open("%s/%s" % (folder, media.path)) + image.thumbnail((300,300), Image.ANTIALIAS) + os.makedirs("%s/thumbnail" % folder) + image.save("%s/thumbnail/%s" % (folder, media.path)) + response = HttpResponse(mimetype=media.mime) + image.save(response, media_ext.upper()) + return response + elif action == "add": media = Media(gramps_id=dji.get_next_id(Media, "M")) mediaform = MediaForm(instance=media) mediaform.model = media diff --git a/src/webapp/utils.py b/src/webapp/utils.py index 5a09c1521..e8fd38db7 100644 --- a/src/webapp/utils.py +++ b/src/webapp/utils.py @@ -76,6 +76,7 @@ util_filters = [ util_tags = [ 'render', + 'media_link', 'render_name', "get_person_from_handle", "event_table", @@ -884,6 +885,12 @@ def display_date(obj): else: return "" +def media_link(handle, user, action): + retval = """""" % ( + "/media/%s/full" % handle, + "/media/%s/thumbnail" % handle) + return retval + def render(formfield, user, action, id=None, url=None, *args): if not user.is_authenticated(): action = "view" From 7b4271e6a3aeb604e854aaa5e62b9a7192c80e0c Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Mon, 18 Jun 2012 22:52:16 +0000 Subject: [PATCH 09/68] config.config errors, perhaps due to reorg svn: r19870 --- src/cli/argparser.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli/argparser.py b/src/cli/argparser.py index c084133ed..f55bb6e69 100644 --- a/src/cli/argparser.py +++ b/src/cli/argparser.py @@ -291,12 +291,12 @@ class ArgParser(object): self.list_more = True elif option in ('-s','--show'): print "Gramps config settings from %s:" % \ - config.config.filename.encode(sys.getfilesystemencoding()) - for section in config.config.data: - for setting in config.config.data[section]: + config.filename.encode(sys.getfilesystemencoding()) + for section in config.data: + for setting in config.data[section]: print "%s.%s=%s" % ( section, setting, - repr(config.config.data[section][setting])) + repr(config.data[section][setting])) print sys.exit(0) elif option in ('-c', '--config'): From 9404e6c1b4d56cd687e4af89247c05ae8b187a9d Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 19 Jun 2012 01:59:37 +0000 Subject: [PATCH 10/68] Copy all config default settings to Config; images should use relative path; behavior.addmedia-image-dir should be absolute svn: r19872 --- src/webapp/empty.sql | 100 +- src/webapp/example.sql | 2335 +++++++++++++++-------------- src/webapp/grampsdb/models.py | 6 +- src/webapp/grampsdb/view/media.py | 14 +- src/webapp/init.py | 18 + 5 files changed, 1285 insertions(+), 1188 deletions(-) diff --git a/src/webapp/empty.sql b/src/webapp/empty.sql index f3ca69de3..120d385a1 100644 --- a/src/webapp/empty.sql +++ b/src/webapp/empty.sql @@ -157,33 +157,36 @@ INSERT INTO "auth_permission" VALUES(147,'Can delete url',49,'delete_url'); INSERT INTO "auth_permission" VALUES(148,'Can add attribute',50,'add_attribute'); INSERT INTO "auth_permission" VALUES(149,'Can change attribute',50,'change_attribute'); INSERT INTO "auth_permission" VALUES(150,'Can delete attribute',50,'delete_attribute'); -INSERT INTO "auth_permission" VALUES(151,'Can add note ref',51,'add_noteref'); -INSERT INTO "auth_permission" VALUES(152,'Can change note ref',51,'change_noteref'); -INSERT INTO "auth_permission" VALUES(153,'Can delete note ref',51,'delete_noteref'); -INSERT INTO "auth_permission" VALUES(154,'Can add event ref',52,'add_eventref'); -INSERT INTO "auth_permission" VALUES(155,'Can change event ref',52,'change_eventref'); -INSERT INTO "auth_permission" VALUES(156,'Can delete event ref',52,'delete_eventref'); -INSERT INTO "auth_permission" VALUES(157,'Can add repository ref',53,'add_repositoryref'); -INSERT INTO "auth_permission" VALUES(158,'Can change repository ref',53,'change_repositoryref'); -INSERT INTO "auth_permission" VALUES(159,'Can delete repository ref',53,'delete_repositoryref'); -INSERT INTO "auth_permission" VALUES(160,'Can add person ref',54,'add_personref'); -INSERT INTO "auth_permission" VALUES(161,'Can change person ref',54,'change_personref'); -INSERT INTO "auth_permission" VALUES(162,'Can delete person ref',54,'delete_personref'); -INSERT INTO "auth_permission" VALUES(163,'Can add citation ref',55,'add_citationref'); -INSERT INTO "auth_permission" VALUES(164,'Can change citation ref',55,'change_citationref'); -INSERT INTO "auth_permission" VALUES(165,'Can delete citation ref',55,'delete_citationref'); -INSERT INTO "auth_permission" VALUES(166,'Can add child ref',56,'add_childref'); -INSERT INTO "auth_permission" VALUES(167,'Can change child ref',56,'change_childref'); -INSERT INTO "auth_permission" VALUES(168,'Can delete child ref',56,'delete_childref'); -INSERT INTO "auth_permission" VALUES(169,'Can add media ref',57,'add_mediaref'); -INSERT INTO "auth_permission" VALUES(170,'Can change media ref',57,'change_mediaref'); -INSERT INTO "auth_permission" VALUES(171,'Can delete media ref',57,'delete_mediaref'); -INSERT INTO "auth_permission" VALUES(172,'Can add report',58,'add_report'); -INSERT INTO "auth_permission" VALUES(173,'Can change report',58,'change_report'); -INSERT INTO "auth_permission" VALUES(174,'Can delete report',58,'delete_report'); -INSERT INTO "auth_permission" VALUES(175,'Can add result',59,'add_result'); -INSERT INTO "auth_permission" VALUES(176,'Can change result',59,'change_result'); -INSERT INTO "auth_permission" VALUES(177,'Can delete result',59,'delete_result'); +INSERT INTO "auth_permission" VALUES(151,'Can add log',51,'add_log'); +INSERT INTO "auth_permission" VALUES(152,'Can change log',51,'change_log'); +INSERT INTO "auth_permission" VALUES(153,'Can delete log',51,'delete_log'); +INSERT INTO "auth_permission" VALUES(154,'Can add note ref',52,'add_noteref'); +INSERT INTO "auth_permission" VALUES(155,'Can change note ref',52,'change_noteref'); +INSERT INTO "auth_permission" VALUES(156,'Can delete note ref',52,'delete_noteref'); +INSERT INTO "auth_permission" VALUES(157,'Can add event ref',53,'add_eventref'); +INSERT INTO "auth_permission" VALUES(158,'Can change event ref',53,'change_eventref'); +INSERT INTO "auth_permission" VALUES(159,'Can delete event ref',53,'delete_eventref'); +INSERT INTO "auth_permission" VALUES(160,'Can add repository ref',54,'add_repositoryref'); +INSERT INTO "auth_permission" VALUES(161,'Can change repository ref',54,'change_repositoryref'); +INSERT INTO "auth_permission" VALUES(162,'Can delete repository ref',54,'delete_repositoryref'); +INSERT INTO "auth_permission" VALUES(163,'Can add person ref',55,'add_personref'); +INSERT INTO "auth_permission" VALUES(164,'Can change person ref',55,'change_personref'); +INSERT INTO "auth_permission" VALUES(165,'Can delete person ref',55,'delete_personref'); +INSERT INTO "auth_permission" VALUES(166,'Can add citation ref',56,'add_citationref'); +INSERT INTO "auth_permission" VALUES(167,'Can change citation ref',56,'change_citationref'); +INSERT INTO "auth_permission" VALUES(168,'Can delete citation ref',56,'delete_citationref'); +INSERT INTO "auth_permission" VALUES(169,'Can add child ref',57,'add_childref'); +INSERT INTO "auth_permission" VALUES(170,'Can change child ref',57,'change_childref'); +INSERT INTO "auth_permission" VALUES(171,'Can delete child ref',57,'delete_childref'); +INSERT INTO "auth_permission" VALUES(172,'Can add media ref',58,'add_mediaref'); +INSERT INTO "auth_permission" VALUES(173,'Can change media ref',58,'change_mediaref'); +INSERT INTO "auth_permission" VALUES(174,'Can delete media ref',58,'delete_mediaref'); +INSERT INTO "auth_permission" VALUES(175,'Can add report',59,'add_report'); +INSERT INTO "auth_permission" VALUES(176,'Can change report',59,'change_report'); +INSERT INTO "auth_permission" VALUES(177,'Can delete report',59,'delete_report'); +INSERT INTO "auth_permission" VALUES(178,'Can add result',60,'add_result'); +INSERT INTO "auth_permission" VALUES(179,'Can change result',60,'change_result'); +INSERT INTO "auth_permission" VALUES(180,'Can delete result',60,'delete_result'); CREATE TABLE "auth_group_permissions" ( "id" integer NOT NULL PRIMARY KEY, "group_id" integer NOT NULL, @@ -219,8 +222,8 @@ CREATE TABLE "auth_user" ( "last_login" datetime NOT NULL, "date_joined" datetime NOT NULL ); -INSERT INTO "auth_user" VALUES(1,'admin','','','bugs@gramps-project.org','sha1$f79e3$2485263f7c464c61901f7efe56f9cfa3d02893fe',1,1,1,'2012-06-11 17:00:52.089846','2012-06-11 17:00:52.089846'); -INSERT INTO "auth_user" VALUES(2,'admin1','','','bugs@gramps-project.org','sha1$03b37$160aa6551fee676cd79c56eead3a3f5db2bef631',1,1,1,'2012-06-11 17:00:56.693844','2012-06-11 17:00:56.693844'); +INSERT INTO "auth_user" VALUES(1,'admin','','','bugs@gramps-project.org','sha1$7f568$508734ae545aeeb0897ee9eb842353f473efd9af',1,1,1,'2012-06-18 21:25:23.952110','2012-06-18 21:25:23.952110'); +INSERT INTO "auth_user" VALUES(2,'admin1','','','bugs@gramps-project.org','sha1$d0f39$4a5d0323022eaf3cf511fd3ada65444328a37452',1,1,1,'2012-06-18 21:25:29.831944','2012-06-18 21:25:29.831944'); CREATE TABLE "auth_message" ( "id" integer NOT NULL PRIMARY KEY, "user_id" integer NOT NULL REFERENCES "auth_user" ("id"), @@ -283,15 +286,16 @@ INSERT INTO "django_content_type" VALUES(47,'address','grampsdb','address'); INSERT INTO "django_content_type" VALUES(48,'location','grampsdb','location'); INSERT INTO "django_content_type" VALUES(49,'url','grampsdb','url'); INSERT INTO "django_content_type" VALUES(50,'attribute','grampsdb','attribute'); -INSERT INTO "django_content_type" VALUES(51,'note ref','grampsdb','noteref'); -INSERT INTO "django_content_type" VALUES(52,'event ref','grampsdb','eventref'); -INSERT INTO "django_content_type" VALUES(53,'repository ref','grampsdb','repositoryref'); -INSERT INTO "django_content_type" VALUES(54,'person ref','grampsdb','personref'); -INSERT INTO "django_content_type" VALUES(55,'citation ref','grampsdb','citationref'); -INSERT INTO "django_content_type" VALUES(56,'child ref','grampsdb','childref'); -INSERT INTO "django_content_type" VALUES(57,'media ref','grampsdb','mediaref'); -INSERT INTO "django_content_type" VALUES(58,'report','grampsdb','report'); -INSERT INTO "django_content_type" VALUES(59,'result','grampsdb','result'); +INSERT INTO "django_content_type" VALUES(51,'log','grampsdb','log'); +INSERT INTO "django_content_type" VALUES(52,'note ref','grampsdb','noteref'); +INSERT INTO "django_content_type" VALUES(53,'event ref','grampsdb','eventref'); +INSERT INTO "django_content_type" VALUES(54,'repository ref','grampsdb','repositoryref'); +INSERT INTO "django_content_type" VALUES(55,'person ref','grampsdb','personref'); +INSERT INTO "django_content_type" VALUES(56,'citation ref','grampsdb','citationref'); +INSERT INTO "django_content_type" VALUES(57,'child ref','grampsdb','childref'); +INSERT INTO "django_content_type" VALUES(58,'media ref','grampsdb','mediaref'); +INSERT INTO "django_content_type" VALUES(59,'report','grampsdb','report'); +INSERT INTO "django_content_type" VALUES(60,'result','grampsdb','result'); CREATE TABLE "django_session" ( "session_key" varchar(40) NOT NULL PRIMARY KEY, "session_data" text NOT NULL, @@ -636,7 +640,8 @@ CREATE TABLE "grampsdb_config" ( ); INSERT INTO "grampsdb_config" VALUES(1,'sitename','site name of family tree','str','Gramps-Connect'); INSERT INTO "grampsdb_config" VALUES(2,'db_version','database scheme version','str','0.6.1'); -INSERT INTO "grampsdb_config" VALUES(3,'db_created','database creation date/time','str','2012-06-11 17:00'); +INSERT INTO "grampsdb_config" VALUES(3,'db_created','database creation date/time','str','2012-06-18 21:24'); +INSERT INTO "grampsdb_config" VALUES(4,'geography.center-lat','','','40.3621673584'); CREATE TABLE "grampsdb_tag" ( "id" integer NOT NULL PRIMARY KEY, "handle" varchar(19) NOT NULL UNIQUE, @@ -997,6 +1002,19 @@ CREATE TABLE "grampsdb_attribute" ( "object_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"), "object_id" integer unsigned NOT NULL ); +CREATE TABLE "grampsdb_log" ( + "id" integer NOT NULL PRIMARY KEY, + "object_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"), + "object_id" integer unsigned NOT NULL, + "order" integer unsigned NOT NULL, + "last_saved" datetime NOT NULL, + "last_changed" datetime, + "last_changed_by" text, + "private" bool NOT NULL, + "log_type" varchar(10) NOT NULL, + "reason" text NOT NULL, + "cache" text +); CREATE TABLE "grampsdb_noteref" ( "id" integer NOT NULL PRIMARY KEY, "object_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"), @@ -1043,7 +1061,7 @@ CREATE TABLE "grampsdb_personref" ( "last_changed_by" text, "private" bool NOT NULL, "ref_object_id" integer NOT NULL REFERENCES "grampsdb_person" ("id"), - "description" varchar(50) NOT NULL + "description" varchar(50) ); CREATE TABLE "grampsdb_citationref" ( "id" integer NOT NULL PRIMARY KEY, @@ -1133,6 +1151,7 @@ CREATE INDEX "auth_user_user_permissions_1e014c8f" ON "auth_user_user_permission CREATE INDEX "auth_user_groups_403f60f" ON "auth_user_groups" ("user_id"); CREATE INDEX "auth_user_groups_425ae3c4" ON "auth_user_groups" ("group_id"); CREATE INDEX "auth_message_403f60f" ON "auth_message" ("user_id"); +CREATE INDEX "django_session_3da3d3d8" ON "django_session" ("expire_date"); CREATE INDEX "django_admin_log_403f60f" ON "django_admin_log" ("user_id"); CREATE INDEX "django_admin_log_1bb8f392" ON "django_admin_log" ("content_type_id"); CREATE INDEX "grampsdb_profile_71d2bf68" ON "grampsdb_profile" ("theme_type_id"); @@ -1185,6 +1204,7 @@ CREATE INDEX "grampsdb_url_3bc6e294" ON "grampsdb_url" ("place_id"); CREATE INDEX "grampsdb_url_6a730446" ON "grampsdb_url" ("repository_id"); CREATE INDEX "grampsdb_attribute_13db1433" ON "grampsdb_attribute" ("attribute_type_id"); CREATE INDEX "grampsdb_attribute_518e5aa5" ON "grampsdb_attribute" ("object_type_id"); +CREATE INDEX "grampsdb_log_518e5aa5" ON "grampsdb_log" ("object_type_id"); CREATE INDEX "grampsdb_noteref_518e5aa5" ON "grampsdb_noteref" ("object_type_id"); CREATE INDEX "grampsdb_noteref_27acd269" ON "grampsdb_noteref" ("ref_object_id"); CREATE INDEX "grampsdb_eventref_518e5aa5" ON "grampsdb_eventref" ("object_type_id"); diff --git a/src/webapp/example.sql b/src/webapp/example.sql index c8faf0df0..223ce9c77 100644 --- a/src/webapp/example.sql +++ b/src/webapp/example.sql @@ -157,103 +157,46 @@ INSERT INTO "auth_permission" VALUES(147,'Can delete url',49,'delete_url'); INSERT INTO "auth_permission" VALUES(148,'Can add attribute',50,'add_attribute'); INSERT INTO "auth_permission" VALUES(149,'Can change attribute',50,'change_attribute'); INSERT INTO "auth_permission" VALUES(150,'Can delete attribute',50,'delete_attribute'); -INSERT INTO "auth_permission" VALUES(151,'Can add note ref',51,'add_noteref'); -INSERT INTO "auth_permission" VALUES(152,'Can change note ref',51,'change_noteref'); -INSERT INTO "auth_permission" VALUES(153,'Can delete note ref',51,'delete_noteref'); -INSERT INTO "auth_permission" VALUES(154,'Can add event ref',52,'add_eventref'); -INSERT INTO "auth_permission" VALUES(155,'Can change event ref',52,'change_eventref'); -INSERT INTO "auth_permission" VALUES(156,'Can delete event ref',52,'delete_eventref'); -INSERT INTO "auth_permission" VALUES(157,'Can add repository ref',53,'add_repositoryref'); -INSERT INTO "auth_permission" VALUES(158,'Can change repository ref',53,'change_repositoryref'); -INSERT INTO "auth_permission" VALUES(159,'Can delete repository ref',53,'delete_repositoryref'); -INSERT INTO "auth_permission" VALUES(160,'Can add person ref',54,'add_personref'); -INSERT INTO "auth_permission" VALUES(161,'Can change person ref',54,'change_personref'); -INSERT INTO "auth_permission" VALUES(162,'Can delete person ref',54,'delete_personref'); -INSERT INTO "auth_permission" VALUES(163,'Can add citation ref',55,'add_citationref'); -INSERT INTO "auth_permission" VALUES(164,'Can change citation ref',55,'change_citationref'); -INSERT INTO "auth_permission" VALUES(165,'Can delete citation ref',55,'delete_citationref'); -INSERT INTO "auth_permission" VALUES(166,'Can add child ref',56,'add_childref'); -INSERT INTO "auth_permission" VALUES(167,'Can change child ref',56,'change_childref'); -INSERT INTO "auth_permission" VALUES(168,'Can delete child ref',56,'delete_childref'); -INSERT INTO "auth_permission" VALUES(169,'Can add media ref',57,'add_mediaref'); -INSERT INTO "auth_permission" VALUES(170,'Can change media ref',57,'change_mediaref'); -INSERT INTO "auth_permission" VALUES(171,'Can delete media ref',57,'delete_mediaref'); -INSERT INTO "auth_permission" VALUES(172,'Can add report',58,'add_report'); -INSERT INTO "auth_permission" VALUES(173,'Can change report',58,'change_report'); -INSERT INTO "auth_permission" VALUES(174,'Can delete report',58,'delete_report'); -INSERT INTO "auth_permission" VALUES(175,'Can add result',59,'add_result'); -INSERT INTO "auth_permission" VALUES(176,'Can change result',59,'change_result'); -INSERT INTO "auth_permission" VALUES(177,'Can delete result',59,'delete_result'); +INSERT INTO "auth_permission" VALUES(151,'Can add log',51,'add_log'); +INSERT INTO "auth_permission" VALUES(152,'Can change log',51,'change_log'); +INSERT INTO "auth_permission" VALUES(153,'Can delete log',51,'delete_log'); +INSERT INTO "auth_permission" VALUES(154,'Can add note ref',52,'add_noteref'); +INSERT INTO "auth_permission" VALUES(155,'Can change note ref',52,'change_noteref'); +INSERT INTO "auth_permission" VALUES(156,'Can delete note ref',52,'delete_noteref'); +INSERT INTO "auth_permission" VALUES(157,'Can add event ref',53,'add_eventref'); +INSERT INTO "auth_permission" VALUES(158,'Can change event ref',53,'change_eventref'); +INSERT INTO "auth_permission" VALUES(159,'Can delete event ref',53,'delete_eventref'); +INSERT INTO "auth_permission" VALUES(160,'Can add repository ref',54,'add_repositoryref'); +INSERT INTO "auth_permission" VALUES(161,'Can change repository ref',54,'change_repositoryref'); +INSERT INTO "auth_permission" VALUES(162,'Can delete repository ref',54,'delete_repositoryref'); +INSERT INTO "auth_permission" VALUES(163,'Can add person ref',55,'add_personref'); +INSERT INTO "auth_permission" VALUES(164,'Can change person ref',55,'change_personref'); +INSERT INTO "auth_permission" VALUES(165,'Can delete person ref',55,'delete_personref'); +INSERT INTO "auth_permission" VALUES(166,'Can add citation ref',56,'add_citationref'); +INSERT INTO "auth_permission" VALUES(167,'Can change citation ref',56,'change_citationref'); +INSERT INTO "auth_permission" VALUES(168,'Can delete citation ref',56,'delete_citationref'); +INSERT INTO "auth_permission" VALUES(169,'Can add child ref',57,'add_childref'); +INSERT INTO "auth_permission" VALUES(170,'Can change child ref',57,'change_childref'); +INSERT INTO "auth_permission" VALUES(171,'Can delete child ref',57,'delete_childref'); +INSERT INTO "auth_permission" VALUES(172,'Can add media ref',58,'add_mediaref'); +INSERT INTO "auth_permission" VALUES(173,'Can change media ref',58,'change_mediaref'); +INSERT INTO "auth_permission" VALUES(174,'Can delete media ref',58,'delete_mediaref'); +INSERT INTO "auth_permission" VALUES(175,'Can add report',59,'add_report'); +INSERT INTO "auth_permission" VALUES(176,'Can change report',59,'change_report'); +INSERT INTO "auth_permission" VALUES(177,'Can delete report',59,'delete_report'); +INSERT INTO "auth_permission" VALUES(178,'Can add result',60,'add_result'); +INSERT INTO "auth_permission" VALUES(179,'Can change result',60,'change_result'); +INSERT INTO "auth_permission" VALUES(180,'Can delete result',60,'delete_result'); CREATE TABLE "auth_group_permissions" ( "id" integer NOT NULL PRIMARY KEY, "group_id" integer NOT NULL, "permission_id" integer NOT NULL REFERENCES "auth_permission" ("id"), UNIQUE ("group_id", "permission_id") ); -INSERT INTO "auth_group_permissions" VALUES(1,1,128); -INSERT INTO "auth_group_permissions" VALUES(2,1,2); -INSERT INTO "auth_group_permissions" VALUES(3,1,131); -INSERT INTO "auth_group_permissions" VALUES(4,1,5); -INSERT INTO "auth_group_permissions" VALUES(5,1,134); -INSERT INTO "auth_group_permissions" VALUES(6,1,8); -INSERT INTO "auth_group_permissions" VALUES(7,1,137); -INSERT INTO "auth_group_permissions" VALUES(8,1,11); -INSERT INTO "auth_group_permissions" VALUES(9,1,140); -INSERT INTO "auth_group_permissions" VALUES(10,1,14); -INSERT INTO "auth_group_permissions" VALUES(11,1,143); -INSERT INTO "auth_group_permissions" VALUES(12,1,17); -INSERT INTO "auth_group_permissions" VALUES(13,1,146); -INSERT INTO "auth_group_permissions" VALUES(14,1,20); -INSERT INTO "auth_group_permissions" VALUES(15,1,149); -INSERT INTO "auth_group_permissions" VALUES(16,1,23); -INSERT INTO "auth_group_permissions" VALUES(17,1,152); -INSERT INTO "auth_group_permissions" VALUES(18,1,26); -INSERT INTO "auth_group_permissions" VALUES(19,1,155); -INSERT INTO "auth_group_permissions" VALUES(20,1,29); -INSERT INTO "auth_group_permissions" VALUES(21,1,158); -INSERT INTO "auth_group_permissions" VALUES(22,1,32); -INSERT INTO "auth_group_permissions" VALUES(23,1,161); -INSERT INTO "auth_group_permissions" VALUES(24,1,35); -INSERT INTO "auth_group_permissions" VALUES(25,1,164); -INSERT INTO "auth_group_permissions" VALUES(26,1,38); -INSERT INTO "auth_group_permissions" VALUES(27,1,167); -INSERT INTO "auth_group_permissions" VALUES(28,1,41); -INSERT INTO "auth_group_permissions" VALUES(29,1,170); -INSERT INTO "auth_group_permissions" VALUES(30,1,44); -INSERT INTO "auth_group_permissions" VALUES(31,1,173); -INSERT INTO "auth_group_permissions" VALUES(32,1,47); -INSERT INTO "auth_group_permissions" VALUES(33,1,176); -INSERT INTO "auth_group_permissions" VALUES(34,1,50); -INSERT INTO "auth_group_permissions" VALUES(35,1,53); -INSERT INTO "auth_group_permissions" VALUES(36,1,56); -INSERT INTO "auth_group_permissions" VALUES(37,1,59); -INSERT INTO "auth_group_permissions" VALUES(38,1,62); -INSERT INTO "auth_group_permissions" VALUES(39,1,65); -INSERT INTO "auth_group_permissions" VALUES(40,1,68); -INSERT INTO "auth_group_permissions" VALUES(41,1,71); -INSERT INTO "auth_group_permissions" VALUES(42,1,74); -INSERT INTO "auth_group_permissions" VALUES(43,1,77); -INSERT INTO "auth_group_permissions" VALUES(44,1,80); -INSERT INTO "auth_group_permissions" VALUES(45,1,83); -INSERT INTO "auth_group_permissions" VALUES(46,1,86); -INSERT INTO "auth_group_permissions" VALUES(47,1,89); -INSERT INTO "auth_group_permissions" VALUES(48,1,92); -INSERT INTO "auth_group_permissions" VALUES(49,1,95); -INSERT INTO "auth_group_permissions" VALUES(50,1,98); -INSERT INTO "auth_group_permissions" VALUES(51,1,101); -INSERT INTO "auth_group_permissions" VALUES(52,1,104); -INSERT INTO "auth_group_permissions" VALUES(53,1,107); -INSERT INTO "auth_group_permissions" VALUES(54,1,110); -INSERT INTO "auth_group_permissions" VALUES(55,1,113); -INSERT INTO "auth_group_permissions" VALUES(56,1,116); -INSERT INTO "auth_group_permissions" VALUES(57,1,119); -INSERT INTO "auth_group_permissions" VALUES(58,1,122); -INSERT INTO "auth_group_permissions" VALUES(59,1,125); CREATE TABLE "auth_group" ( "id" integer NOT NULL PRIMARY KEY, "name" varchar(80) NOT NULL UNIQUE ); -INSERT INTO "auth_group" VALUES(1,'Editor'); CREATE TABLE "auth_user_user_permissions" ( "id" integer NOT NULL PRIMARY KEY, "user_id" integer NOT NULL, @@ -266,7 +209,6 @@ CREATE TABLE "auth_user_groups" ( "group_id" integer NOT NULL REFERENCES "auth_group" ("id"), UNIQUE ("user_id", "group_id") ); -INSERT INTO "auth_user_groups" VALUES(1,1,1); CREATE TABLE "auth_user" ( "id" integer NOT NULL PRIMARY KEY, "username" varchar(30) NOT NULL UNIQUE, @@ -280,8 +222,8 @@ CREATE TABLE "auth_user" ( "last_login" datetime NOT NULL, "date_joined" datetime NOT NULL ); -INSERT INTO "auth_user" VALUES(1,'admin','','','bugs@gramps-project.org','sha1$a4c03$de6d2ce8c551e0b682f11ab92170f6afb4bede0b',1,1,1,'2012-06-10 22:23:53','2012-06-10 22:23:34'); -INSERT INTO "auth_user" VALUES(2,'admin1','','','bugs@gramps-project.org','sha1$b3283$5306be6909a7ff60692513e406b40de8c84007ee',1,1,1,'2012-06-10 22:23:40.249002','2012-06-10 22:23:40.249002'); +INSERT INTO "auth_user" VALUES(1,'admin','','','bugs@gramps-project.org','sha1$c0530$7b8073dafe9c593d9fc0eeb4f66fd29ecaa34fc9',1,1,1,'2012-06-18 21:41:58.429589','2012-06-18 21:41:28.784226'); +INSERT INTO "auth_user" VALUES(2,'admin1','','','bugs@gramps-project.org','sha1$10aef$4b8e70520ce6df429f449c36e0f732a5110b8a8d',0,1,0,'2012-06-18 21:45:47.430118','2012-06-18 21:41:33'); CREATE TABLE "auth_message" ( "id" integer NOT NULL PRIMARY KEY, "user_id" integer NOT NULL REFERENCES "auth_user" ("id"), @@ -344,24 +286,23 @@ INSERT INTO "django_content_type" VALUES(47,'address','grampsdb','address'); INSERT INTO "django_content_type" VALUES(48,'location','grampsdb','location'); INSERT INTO "django_content_type" VALUES(49,'url','grampsdb','url'); INSERT INTO "django_content_type" VALUES(50,'attribute','grampsdb','attribute'); -INSERT INTO "django_content_type" VALUES(51,'note ref','grampsdb','noteref'); -INSERT INTO "django_content_type" VALUES(52,'event ref','grampsdb','eventref'); -INSERT INTO "django_content_type" VALUES(53,'repository ref','grampsdb','repositoryref'); -INSERT INTO "django_content_type" VALUES(54,'person ref','grampsdb','personref'); -INSERT INTO "django_content_type" VALUES(55,'citation ref','grampsdb','citationref'); -INSERT INTO "django_content_type" VALUES(56,'child ref','grampsdb','childref'); -INSERT INTO "django_content_type" VALUES(57,'media ref','grampsdb','mediaref'); -INSERT INTO "django_content_type" VALUES(58,'report','grampsdb','report'); -INSERT INTO "django_content_type" VALUES(59,'result','grampsdb','result'); +INSERT INTO "django_content_type" VALUES(51,'log','grampsdb','log'); +INSERT INTO "django_content_type" VALUES(52,'note ref','grampsdb','noteref'); +INSERT INTO "django_content_type" VALUES(53,'event ref','grampsdb','eventref'); +INSERT INTO "django_content_type" VALUES(54,'repository ref','grampsdb','repositoryref'); +INSERT INTO "django_content_type" VALUES(55,'person ref','grampsdb','personref'); +INSERT INTO "django_content_type" VALUES(56,'citation ref','grampsdb','citationref'); +INSERT INTO "django_content_type" VALUES(57,'child ref','grampsdb','childref'); +INSERT INTO "django_content_type" VALUES(58,'media ref','grampsdb','mediaref'); +INSERT INTO "django_content_type" VALUES(59,'report','grampsdb','report'); +INSERT INTO "django_content_type" VALUES(60,'result','grampsdb','result'); CREATE TABLE "django_session" ( "session_key" varchar(40) NOT NULL PRIMARY KEY, "session_data" text NOT NULL, "expire_date" datetime NOT NULL ); -INSERT INTO "django_session" VALUES('3c99ce6c280d2f7957446d227beb3365','MmU1MjliMDM2NzcyODdjNmJlOTgzMGFiYzc2MjFkMmViYWFiOTIzMjqAAn1xAShVEl9hdXRoX3Vz -ZXJfYmFja2VuZHECVSlkamFuZ28uY29udHJpYi5hdXRoLmJhY2tlbmRzLk1vZGVsQmFja2VuZHED -VQ1fYXV0aF91c2VyX2lkcQRLAXUu -','2012-06-24 22:23:53.981505'); +INSERT INTO "django_session" VALUES('37aec6a13380b1a305f86c1265f832cf','YTJkY2YzOGM0MzQ0MzY4YjExZDZhODZjOTdhZjAxMDkxNWU5MTM0NjqAAn1xAS4= +','2012-07-02 21:46:10.607056'); CREATE TABLE "django_site" ( "id" integer NOT NULL PRIMARY KEY, "domain" varchar(100) NOT NULL, @@ -378,12 +319,7 @@ CREATE TABLE "django_admin_log" ( "action_flag" smallint unsigned NOT NULL, "change_message" text NOT NULL ); -INSERT INTO "django_admin_log" VALUES(1,'2012-06-10 22:24:32.318268',1,9,'1','admin',2,'Changed theme_type.'); -INSERT INTO "django_admin_log" VALUES(2,'2012-06-10 22:24:45.300529',1,9,'1','admin',2,'Changed theme_type.'); -INSERT INTO "django_admin_log" VALUES(3,'2012-06-11 06:55:51.555028',1,9,'1','admin',2,'Changed theme_type.'); -INSERT INTO "django_admin_log" VALUES(4,'2012-06-11 07:01:37.331748',1,2,'1','Editor',1,''); -INSERT INTO "django_admin_log" VALUES(5,'2012-06-11 07:01:50.823018',1,3,'1','admin',2,'Changed groups.'); -INSERT INTO "django_admin_log" VALUES(6,'2012-06-11 21:25:15.748466',1,9,'1','admin',2,'No fields changed.'); +INSERT INTO "django_admin_log" VALUES(1,'2012-06-18 21:43:45.466702',1,3,'2','admin1',2,'Changed is_staff and is_superuser.'); CREATE TABLE "grampsdb_profile" ( "id" integer NOT NULL PRIMARY KEY, "user_id" integer NOT NULL UNIQUE REFERENCES "auth_user" ("id"), @@ -709,7 +645,184 @@ CREATE TABLE "grampsdb_config" ( ); INSERT INTO "grampsdb_config" VALUES(1,'sitename','site name of family tree','str','Gramps-Connect'); INSERT INTO "grampsdb_config" VALUES(2,'db_version','database scheme version','str','0.6.1'); -INSERT INTO "grampsdb_config" VALUES(3,'db_created','database creation date/time','str','2012-06-10 22:21'); +INSERT INTO "grampsdb_config" VALUES(3,'db_created','database creation date/time','str','2012-06-18 21:40'); +INSERT INTO "grampsdb_config" VALUES(4,'htmlview.url-handler','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(5,'htmlview.start-url','','str','http://gramps-project.org'); +INSERT INTO "grampsdb_config" VALUES(6,'paths.recent-export-dir','','str',''); +INSERT INTO "grampsdb_config" VALUES(7,'paths.report-directory','','unicode','/home/dblank'); +INSERT INTO "grampsdb_config" VALUES(8,'paths.quick-backup-filename','','str','%(filename)s_%(year)d-%(month)02d-%(day)02d.%(extension)s'); +INSERT INTO "grampsdb_config" VALUES(9,'paths.recent-import-dir','','str',''); +INSERT INTO "grampsdb_config" VALUES(10,'paths.quick-backup-directory','','unicode','/home/dblank'); +INSERT INTO "grampsdb_config" VALUES(11,'paths.recent-file','','str',''); +INSERT INTO "grampsdb_config" VALUES(12,'paths.website-directory','','unicode','/home/dblank'); +INSERT INTO "grampsdb_config" VALUES(13,'preferences.family-warn','','bool','True'); +INSERT INTO "grampsdb_config" VALUES(14,'preferences.no-surname-text','','unicode','[Missing Surname]'); +INSERT INTO "grampsdb_config" VALUES(15,'preferences.family-relation-type','','int','3'); +INSERT INTO "grampsdb_config" VALUES(16,'preferences.private-surname-text','','unicode','[Living]'); +INSERT INTO "grampsdb_config" VALUES(17,'preferences.fprefix','','str','F%04d'); +INSERT INTO "grampsdb_config" VALUES(18,'preferences.default-source','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(19,'preferences.calendar-format-report','','int','0'); +INSERT INTO "grampsdb_config" VALUES(20,'preferences.oprefix','','str','O%04d'); +INSERT INTO "grampsdb_config" VALUES(21,'preferences.nprefix','','str','N%04d'); +INSERT INTO "grampsdb_config" VALUES(22,'preferences.use-last-view','','bool','True'); +INSERT INTO "grampsdb_config" VALUES(23,'preferences.paper-preference','','str','Letter'); +INSERT INTO "grampsdb_config" VALUES(24,'preferences.use-bsddb3','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(25,'preferences.hide-ep-msg','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(26,'preferences.iprefix','','str','I%04d'); +INSERT INTO "grampsdb_config" VALUES(27,'preferences.rprefix','','str','R%04d'); +INSERT INTO "grampsdb_config" VALUES(28,'preferences.sprefix','','str','S%04d'); +INSERT INTO "grampsdb_config" VALUES(29,'preferences.no-given-text','','unicode','[Missing Given Name]'); +INSERT INTO "grampsdb_config" VALUES(30,'preferences.paper-metric','','int','0'); +INSERT INTO "grampsdb_config" VALUES(31,'preferences.age-display-precision','','int','1'); +INSERT INTO "grampsdb_config" VALUES(32,'preferences.cprefix','','str','C%04d'); +INSERT INTO "grampsdb_config" VALUES(33,'preferences.invalid-date-format','','str','%s'); +INSERT INTO "grampsdb_config" VALUES(34,'preferences.last-views','','list','[]'); +INSERT INTO "grampsdb_config" VALUES(35,'preferences.pprefix','','str','P%04d'); +INSERT INTO "grampsdb_config" VALUES(36,'preferences.eprefix','','str','E%04d'); +INSERT INTO "grampsdb_config" VALUES(37,'preferences.name-format','','int','1'); +INSERT INTO "grampsdb_config" VALUES(38,'preferences.private-record-text','','unicode','[Private Record]'); +INSERT INTO "grampsdb_config" VALUES(39,'preferences.online-maps','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(40,'preferences.no-record-text','','unicode','[Missing Record]'); +INSERT INTO "grampsdb_config" VALUES(41,'preferences.date-format','','int','0'); +INSERT INTO "grampsdb_config" VALUES(42,'preferences.last-view','','str',''); +INSERT INTO "grampsdb_config" VALUES(43,'preferences.patronimic-surname','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(44,'preferences.private-given-text','','unicode','[Living]'); +INSERT INTO "grampsdb_config" VALUES(45,'plugin.hiddenplugins','','list','[''htmlview'']'); +INSERT INTO "grampsdb_config" VALUES(46,'plugin.addonplugins','','list','[]'); +INSERT INTO "grampsdb_config" VALUES(47,'researcher.researcher-locality','','str',''); +INSERT INTO "grampsdb_config" VALUES(48,'researcher.researcher-country','','str',''); +INSERT INTO "grampsdb_config" VALUES(49,'researcher.researcher-name','','str',''); +INSERT INTO "grampsdb_config" VALUES(50,'researcher.researcher-phone','','str',''); +INSERT INTO "grampsdb_config" VALUES(51,'researcher.researcher-email','','str',''); +INSERT INTO "grampsdb_config" VALUES(52,'researcher.researcher-state','','str',''); +INSERT INTO "grampsdb_config" VALUES(53,'researcher.researcher-postal','','str',''); +INSERT INTO "grampsdb_config" VALUES(54,'researcher.researcher-city','','str',''); +INSERT INTO "grampsdb_config" VALUES(55,'researcher.researcher-addr','','str',''); +INSERT INTO "grampsdb_config" VALUES(56,'export.proxy-order','','list','[[''privacy'', 0], [''living'', 0], [''person'', 0], [''note'', 0], [''reference'', 0]]'); +INSERT INTO "grampsdb_config" VALUES(57,'behavior.use-tips','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(58,'behavior.generation-depth','','int','15'); +INSERT INTO "grampsdb_config" VALUES(59,'behavior.last-check-for-updates','','str','1970/01/01'); +INSERT INTO "grampsdb_config" VALUES(60,'behavior.startup','','int','0'); +INSERT INTO "grampsdb_config" VALUES(61,'behavior.autoload','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(62,'behavior.pop-plugin-status','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(63,'behavior.do-not-show-previously-seen-updates','','bool','True'); +INSERT INTO "grampsdb_config" VALUES(64,'behavior.check-for-updates','','int','0'); +INSERT INTO "grampsdb_config" VALUES(65,'behavior.recent-export-type','','int','1'); +INSERT INTO "grampsdb_config" VALUES(66,'behavior.addmedia-image-dir','','str',''); +INSERT INTO "grampsdb_config" VALUES(67,'behavior.date-about-range','','int','50'); +INSERT INTO "grampsdb_config" VALUES(68,'behavior.date-after-range','','int','50'); +INSERT INTO "grampsdb_config" VALUES(69,'behavior.owner-warn','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(70,'behavior.date-before-range','','int','50'); +INSERT INTO "grampsdb_config" VALUES(71,'behavior.min-generation-years','','int','13'); +INSERT INTO "grampsdb_config" VALUES(72,'behavior.welcome','','int','100'); +INSERT INTO "grampsdb_config" VALUES(73,'behavior.max-sib-age-diff','','int','20'); +INSERT INTO "grampsdb_config" VALUES(74,'behavior.previously-seen-updates','','list','[]'); +INSERT INTO "grampsdb_config" VALUES(75,'behavior.addmedia-relative-path','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(76,'behavior.spellcheck','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(77,'behavior.surname-guessing','','int','0'); +INSERT INTO "grampsdb_config" VALUES(78,'behavior.check-for-update-types','','list','[''new'']'); +INSERT INTO "grampsdb_config" VALUES(79,'behavior.avg-generation-gap','','int','20'); +INSERT INTO "grampsdb_config" VALUES(80,'behavior.database-path','','unicode','/home/dblank/.gramps/grampsdb'); +INSERT INTO "grampsdb_config" VALUES(81,'behavior.betawarn','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(82,'behavior.max-age-prob-alive','','int','110'); +INSERT INTO "grampsdb_config" VALUES(83,'behavior.web-search-url','','str','http://google.com/#&q=%(text)s'); +INSERT INTO "grampsdb_config" VALUES(84,'interface.family-height','','int','500'); +INSERT INTO "grampsdb_config" VALUES(85,'interface.sidebar-text','','bool','True'); +INSERT INTO "grampsdb_config" VALUES(86,'interface.source-ref-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(87,'interface.address-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(88,'interface.mapservice','','str','OpenStreetMap'); +INSERT INTO "grampsdb_config" VALUES(89,'interface.pedview-layout','','int','0'); +INSERT INTO "grampsdb_config" VALUES(90,'interface.family-width','','int','700'); +INSERT INTO "grampsdb_config" VALUES(91,'interface.toolbar-on','','bool','True'); +INSERT INTO "grampsdb_config" VALUES(92,'interface.citation-sel-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(93,'interface.location-height','','int','250'); +INSERT INTO "grampsdb_config" VALUES(94,'interface.person-ref-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(95,'interface.address-width','','int','650'); +INSERT INTO "grampsdb_config" VALUES(96,'interface.edit-rule-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(97,'interface.filter-editor-width','','int','400'); +INSERT INTO "grampsdb_config" VALUES(98,'interface.child-ref-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(99,'interface.person-sel-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(100,'interface.repo-width','','int','650'); +INSERT INTO "grampsdb_config" VALUES(101,'interface.pedview-tree-size','','int','5'); +INSERT INTO "grampsdb_config" VALUES(102,'interface.citation-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(103,'interface.edit-rule-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(104,'interface.place-width','','int','650'); +INSERT INTO "grampsdb_config" VALUES(105,'interface.place-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(106,'interface.source-ref-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(107,'interface.repo-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(108,'interface.source-sel-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(109,'interface.clipboard-height','','int','300'); +INSERT INTO "grampsdb_config" VALUES(110,'interface.fullscreen','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(111,'interface.attribute-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(112,'interface.lds-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(113,'interface.edit-filter-width','','int','500'); +INSERT INTO "grampsdb_config" VALUES(114,'interface.clipboard-width','','int','300'); +INSERT INTO "grampsdb_config" VALUES(115,'interface.media-sel-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(116,'interface.person-ref-height','','int','350'); +INSERT INTO "grampsdb_config" VALUES(117,'interface.citation-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(118,'interface.person-width','','int','750'); +INSERT INTO "grampsdb_config" VALUES(119,'interface.lds-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(120,'interface.name-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(121,'interface.event-sel-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(122,'interface.child-ref-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(123,'interface.filter','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(124,'interface.view','','bool','True'); +INSERT INTO "grampsdb_config" VALUES(125,'interface.media-ref-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(126,'interface.family-sel-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(127,'interface.pedview-show-marriage','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(128,'interface.height','','int','500'); +INSERT INTO "grampsdb_config" VALUES(129,'interface.media-width','','int','650'); +INSERT INTO "grampsdb_config" VALUES(130,'interface.event-ref-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(131,'interface.repo-sel-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(132,'interface.media-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(133,'interface.width','','int','775'); +INSERT INTO "grampsdb_config" VALUES(134,'interface.size-checked','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(135,'interface.media-sel-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(136,'interface.source-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(137,'interface.surname-box-height','','int','150'); +INSERT INTO "grampsdb_config" VALUES(138,'interface.repo-ref-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(139,'interface.name-height','','int','350'); +INSERT INTO "grampsdb_config" VALUES(140,'interface.event-sel-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(141,'interface.note-width','','int','700'); +INSERT INTO "grampsdb_config" VALUES(142,'interface.statusbar','','int','1'); +INSERT INTO "grampsdb_config" VALUES(143,'interface.person-sel-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(144,'interface.note-sel-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(145,'interface.view-categories','','list','[''Gramplets'', ''People'', ''Relationships'', ''Families'', ''Ancestry'', ''Events'', ''Places'', ''Geography'', ''Sources'', ''Citations'', ''Repositories'', ''Media'', ''Notes'']'); +INSERT INTO "grampsdb_config" VALUES(146,'interface.repo-ref-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(147,'interface.event-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(148,'interface.note-sel-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(149,'interface.person-height','','int','550'); +INSERT INTO "grampsdb_config" VALUES(150,'interface.repo-sel-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(151,'interface.attribute-height','','int','350'); +INSERT INTO "grampsdb_config" VALUES(152,'interface.event-ref-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(153,'interface.source-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(154,'interface.edit-filter-height','','int','420'); +INSERT INTO "grampsdb_config" VALUES(155,'interface.pedview-tree-direction','','int','2'); +INSERT INTO "grampsdb_config" VALUES(156,'interface.family-sel-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(157,'interface.source-sel-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(158,'interface.url-height','','int','150'); +INSERT INTO "grampsdb_config" VALUES(159,'interface.filter-editor-height','','int','350'); +INSERT INTO "grampsdb_config" VALUES(160,'interface.media-ref-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(161,'interface.pedview-show-unknown-people','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(162,'interface.location-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(163,'interface.place-sel-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(164,'interface.citation-sel-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(165,'interface.pedview-show-images','','bool','True'); +INSERT INTO "grampsdb_config" VALUES(166,'interface.url-width','','int','600'); +INSERT INTO "grampsdb_config" VALUES(167,'interface.event-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(168,'interface.note-height','','int','500'); +INSERT INTO "grampsdb_config" VALUES(169,'interface.open-with-default-viewer','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(170,'interface.place-sel-height','','int','450'); +INSERT INTO "grampsdb_config" VALUES(171,'interface.dont-ask','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(172,'geography.map','','str','person'); +INSERT INTO "grampsdb_config" VALUES(173,'geography.zoom_when_center','','int','12'); +INSERT INTO "grampsdb_config" VALUES(174,'geography.center-lon','','float','0.0'); +INSERT INTO "grampsdb_config" VALUES(175,'geography.show_cross','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(176,'geography.zoom','','int','0'); +INSERT INTO "grampsdb_config" VALUES(177,'geography.map_service','','int','1'); +INSERT INTO "grampsdb_config" VALUES(178,'geography.lock','','bool','False'); +INSERT INTO "grampsdb_config" VALUES(179,'geography.path','','str',''); +INSERT INTO "grampsdb_config" VALUES(180,'geography.center-lat','','float','0.0'); CREATE TABLE "grampsdb_tag" ( "id" integer NOT NULL PRIMARY KEY, "handle" varchar(19) NOT NULL UNIQUE, @@ -727,42 +840,44 @@ CREATE TABLE "grampsdb_person_families" ( "family_id" integer NOT NULL, UNIQUE ("person_id", "family_id") ); -INSERT INTO "grampsdb_person_families" VALUES(1,1,18); -INSERT INTO "grampsdb_person_families" VALUES(2,3,12); -INSERT INTO "grampsdb_person_families" VALUES(3,4,14); -INSERT INTO "grampsdb_person_families" VALUES(4,6,12); -INSERT INTO "grampsdb_person_families" VALUES(5,7,8); -INSERT INTO "grampsdb_person_families" VALUES(6,11,19); -INSERT INTO "grampsdb_person_families" VALUES(7,12,13); -INSERT INTO "grampsdb_person_families" VALUES(8,14,15); -INSERT INTO "grampsdb_person_families" VALUES(9,16,16); -INSERT INTO "grampsdb_person_families" VALUES(10,18,6); -INSERT INTO "grampsdb_person_families" VALUES(11,19,3); -INSERT INTO "grampsdb_person_families" VALUES(12,20,6); -INSERT INTO "grampsdb_person_families" VALUES(13,21,16); -INSERT INTO "grampsdb_person_families" VALUES(14,23,10); -INSERT INTO "grampsdb_person_families" VALUES(15,25,18); -INSERT INTO "grampsdb_person_families" VALUES(16,25,5); -INSERT INTO "grampsdb_person_families" VALUES(17,27,14); -INSERT INTO "grampsdb_person_families" VALUES(18,28,2); -INSERT INTO "grampsdb_person_families" VALUES(19,29,5); -INSERT INTO "grampsdb_person_families" VALUES(20,31,3); -INSERT INTO "grampsdb_person_families" VALUES(21,33,10); -INSERT INTO "grampsdb_person_families" VALUES(22,34,8); -INSERT INTO "grampsdb_person_families" VALUES(23,40,9); -INSERT INTO "grampsdb_person_families" VALUES(24,42,4); -INSERT INTO "grampsdb_person_families" VALUES(25,43,1); -INSERT INTO "grampsdb_person_families" VALUES(26,46,4); -INSERT INTO "grampsdb_person_families" VALUES(27,48,1); -INSERT INTO "grampsdb_person_families" VALUES(28,49,2); -INSERT INTO "grampsdb_person_families" VALUES(29,50,9); -INSERT INTO "grampsdb_person_families" VALUES(30,51,17); -INSERT INTO "grampsdb_person_families" VALUES(31,56,13); -INSERT INTO "grampsdb_person_families" VALUES(32,57,11); -INSERT INTO "grampsdb_person_families" VALUES(33,58,19); -INSERT INTO "grampsdb_person_families" VALUES(34,63,7); -INSERT INTO "grampsdb_person_families" VALUES(35,64,11); -INSERT INTO "grampsdb_person_families" VALUES(36,67,15); +INSERT INTO "grampsdb_person_families" VALUES(1,1,14); +INSERT INTO "grampsdb_person_families" VALUES(2,2,15); +INSERT INTO "grampsdb_person_families" VALUES(3,3,13); +INSERT INTO "grampsdb_person_families" VALUES(4,4,10); +INSERT INTO "grampsdb_person_families" VALUES(5,5,2); +INSERT INTO "grampsdb_person_families" VALUES(6,8,18); +INSERT INTO "grampsdb_person_families" VALUES(7,15,17); +INSERT INTO "grampsdb_person_families" VALUES(8,20,11); +INSERT INTO "grampsdb_person_families" VALUES(9,21,19); +INSERT INTO "grampsdb_person_families" VALUES(10,24,17); +INSERT INTO "grampsdb_person_families" VALUES(11,25,6); +INSERT INTO "grampsdb_person_families" VALUES(12,27,7); +INSERT INTO "grampsdb_person_families" VALUES(13,29,1); +INSERT INTO "grampsdb_person_families" VALUES(14,30,7); +INSERT INTO "grampsdb_person_families" VALUES(15,31,16); +INSERT INTO "grampsdb_person_families" VALUES(16,32,8); +INSERT INTO "grampsdb_person_families" VALUES(17,37,14); +INSERT INTO "grampsdb_person_families" VALUES(18,38,4); +INSERT INTO "grampsdb_person_families" VALUES(19,39,3); +INSERT INTO "grampsdb_person_families" VALUES(20,40,8); +INSERT INTO "grampsdb_person_families" VALUES(21,42,10); +INSERT INTO "grampsdb_person_families" VALUES(22,46,5); +INSERT INTO "grampsdb_person_families" VALUES(23,47,19); +INSERT INTO "grampsdb_person_families" VALUES(24,48,11); +INSERT INTO "grampsdb_person_families" VALUES(25,50,5); +INSERT INTO "grampsdb_person_families" VALUES(26,52,16); +INSERT INTO "grampsdb_person_families" VALUES(27,53,18); +INSERT INTO "grampsdb_person_families" VALUES(28,53,13); +INSERT INTO "grampsdb_person_families" VALUES(29,54,15); +INSERT INTO "grampsdb_person_families" VALUES(30,57,9); +INSERT INTO "grampsdb_person_families" VALUES(31,58,4); +INSERT INTO "grampsdb_person_families" VALUES(32,59,2); +INSERT INTO "grampsdb_person_families" VALUES(33,60,9); +INSERT INTO "grampsdb_person_families" VALUES(34,60,6); +INSERT INTO "grampsdb_person_families" VALUES(35,63,3); +INSERT INTO "grampsdb_person_families" VALUES(36,65,12); +INSERT INTO "grampsdb_person_families" VALUES(37,68,1); +INSERT INTO "grampsdb_person_families" VALUES(38,69,12); CREATE TABLE "grampsdb_person_tags" ( "id" integer NOT NULL PRIMARY KEY, "person_id" integer NOT NULL, @@ -775,54 +890,55 @@ CREATE TABLE "grampsdb_person_parent_families" ( "family_id" integer NOT NULL, UNIQUE ("person_id", "family_id") ); -INSERT INTO "grampsdb_person_parent_families" VALUES(1,2,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(2,5,18); -INSERT INTO "grampsdb_person_parent_families" VALUES(3,6,8); -INSERT INTO "grampsdb_person_parent_families" VALUES(4,8,13); -INSERT INTO "grampsdb_person_parent_families" VALUES(5,9,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(6,10,4); -INSERT INTO "grampsdb_person_parent_families" VALUES(7,13,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(8,15,11); -INSERT INTO "grampsdb_person_parent_families" VALUES(9,17,4); -INSERT INTO "grampsdb_person_parent_families" VALUES(10,18,8); -INSERT INTO "grampsdb_person_parent_families" VALUES(11,19,8); -INSERT INTO "grampsdb_person_parent_families" VALUES(12,21,10); -INSERT INTO "grampsdb_person_parent_families" VALUES(13,22,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(14,23,1); -INSERT INTO "grampsdb_person_parent_families" VALUES(15,24,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(16,26,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(17,27,10); -INSERT INTO "grampsdb_person_parent_families" VALUES(18,30,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(19,32,14); -INSERT INTO "grampsdb_person_parent_families" VALUES(20,33,2); -INSERT INTO "grampsdb_person_parent_families" VALUES(21,35,10); -INSERT INTO "grampsdb_person_parent_families" VALUES(22,36,11); -INSERT INTO "grampsdb_person_parent_families" VALUES(23,37,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(24,38,13); -INSERT INTO "grampsdb_person_parent_families" VALUES(25,39,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(26,41,4); -INSERT INTO "grampsdb_person_parent_families" VALUES(27,42,10); -INSERT INTO "grampsdb_person_parent_families" VALUES(28,44,11); -INSERT INTO "grampsdb_person_parent_families" VALUES(29,45,14); -INSERT INTO "grampsdb_person_parent_families" VALUES(30,47,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(31,48,8); -INSERT INTO "grampsdb_person_parent_families" VALUES(32,50,1); -INSERT INTO "grampsdb_person_parent_families" VALUES(33,51,10); -INSERT INTO "grampsdb_person_parent_families" VALUES(34,52,1); -INSERT INTO "grampsdb_person_parent_families" VALUES(35,53,13); -INSERT INTO "grampsdb_person_parent_families" VALUES(36,54,16); -INSERT INTO "grampsdb_person_parent_families" VALUES(37,55,14); -INSERT INTO "grampsdb_person_parent_families" VALUES(38,56,10); -INSERT INTO "grampsdb_person_parent_families" VALUES(39,58,13); -INSERT INTO "grampsdb_person_parent_families" VALUES(40,59,17); -INSERT INTO "grampsdb_person_parent_families" VALUES(41,60,8); -INSERT INTO "grampsdb_person_parent_families" VALUES(42,61,17); -INSERT INTO "grampsdb_person_parent_families" VALUES(43,62,17); -INSERT INTO "grampsdb_person_parent_families" VALUES(44,64,10); -INSERT INTO "grampsdb_person_parent_families" VALUES(45,65,13); -INSERT INTO "grampsdb_person_parent_families" VALUES(46,66,11); -INSERT INTO "grampsdb_person_parent_families" VALUES(47,67,10); -INSERT INTO "grampsdb_person_parent_families" VALUES(48,68,10); +INSERT INTO "grampsdb_person_parent_families" VALUES(1,2,7); +INSERT INTO "grampsdb_person_parent_families" VALUES(2,3,7); +INSERT INTO "grampsdb_person_parent_families" VALUES(3,4,8); +INSERT INTO "grampsdb_person_parent_families" VALUES(4,6,12); +INSERT INTO "grampsdb_person_parent_families" VALUES(5,7,7); +INSERT INTO "grampsdb_person_parent_families" VALUES(6,9,17); +INSERT INTO "grampsdb_person_parent_families" VALUES(7,10,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(8,11,15); +INSERT INTO "grampsdb_person_parent_families" VALUES(9,12,8); +INSERT INTO "grampsdb_person_parent_families" VALUES(10,13,15); +INSERT INTO "grampsdb_person_parent_families" VALUES(11,14,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(12,16,9); +INSERT INTO "grampsdb_person_parent_families" VALUES(13,17,7); +INSERT INTO "grampsdb_person_parent_families" VALUES(14,18,17); +INSERT INTO "grampsdb_person_parent_families" VALUES(15,19,13); +INSERT INTO "grampsdb_person_parent_families" VALUES(16,21,7); +INSERT INTO "grampsdb_person_parent_families" VALUES(17,22,5); +INSERT INTO "grampsdb_person_parent_families" VALUES(18,23,15); +INSERT INTO "grampsdb_person_parent_families" VALUES(19,24,7); +INSERT INTO "grampsdb_person_parent_families" VALUES(20,26,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(21,27,14); +INSERT INTO "grampsdb_person_parent_families" VALUES(22,28,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(23,30,3); +INSERT INTO "grampsdb_person_parent_families" VALUES(24,31,7); +INSERT INTO "grampsdb_person_parent_families" VALUES(25,33,13); +INSERT INTO "grampsdb_person_parent_families" VALUES(26,34,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(27,35,12); +INSERT INTO "grampsdb_person_parent_families" VALUES(28,36,12); +INSERT INTO "grampsdb_person_parent_families" VALUES(29,38,12); +INSERT INTO "grampsdb_person_parent_families" VALUES(30,39,8); +INSERT INTO "grampsdb_person_parent_families" VALUES(31,41,5); +INSERT INTO "grampsdb_person_parent_families" VALUES(32,43,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(33,44,3); +INSERT INTO "grampsdb_person_parent_families" VALUES(34,45,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(35,48,8); +INSERT INTO "grampsdb_person_parent_families" VALUES(36,49,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(37,50,7); +INSERT INTO "grampsdb_person_parent_families" VALUES(38,51,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(39,53,9); +INSERT INTO "grampsdb_person_parent_families" VALUES(40,55,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(41,56,12); +INSERT INTO "grampsdb_person_parent_families" VALUES(42,59,3); +INSERT INTO "grampsdb_person_parent_families" VALUES(43,61,19); +INSERT INTO "grampsdb_person_parent_families" VALUES(44,62,17); +INSERT INTO "grampsdb_person_parent_families" VALUES(45,64,5); +INSERT INTO "grampsdb_person_parent_families" VALUES(46,66,13); +INSERT INTO "grampsdb_person_parent_families" VALUES(47,67,15); +INSERT INTO "grampsdb_person_parent_families" VALUES(48,68,8); +INSERT INTO "grampsdb_person_parent_families" VALUES(49,69,7); CREATE TABLE "grampsdb_person" ( "id" integer NOT NULL PRIMARY KEY, "handle" varchar(19) NOT NULL UNIQUE, @@ -839,98 +955,75 @@ CREATE TABLE "grampsdb_person" ( "birth_ref_index" integer NOT NULL, "death_ref_index" integer NOT NULL ); -INSERT INTO "grampsdb_person" VALUES(1,'c2e7d98180317b0250c3e61c833','I0048','2012-06-10 22:25:19.088130','1994-06-30 00:00:00',NULL,0,NULL,2,0,NULL,48,-1,1); -INSERT INTO "grampsdb_person" VALUES(2,'c2e7d98160c371b9f5dc06bb5ac','I0032','2012-06-10 22:25:19.347376','1969-12-31 19:00:00',NULL,0,NULL,2,1,15,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(3,'c2e7d981a291a4ef72ad67ebc95','I0065','2012-06-10 22:25:19.599091','1994-05-27 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(4,'c2e7d9816f0250098c8802aa12','I0040','2012-06-10 22:25:19.859161','1994-05-29 00:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(5,'c2e7d981a6b3c11a2714001973d','I0068','2012-06-10 22:25:20.102957','1994-05-27 00:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(6,'c2e7d9819f9615264e6af2f3847','I0063','2012-06-10 22:25:20.347375','1994-05-27 00:00:00',NULL,0,NULL,3,1,133,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(7,'c2e7d9817aa3b4eb6d9dcf39715','I0046','2012-06-10 22:25:20.594972','1994-10-16 00:00:00',NULL,0,NULL,2,0,91,23,0,1); -INSERT INTO "grampsdb_person" VALUES(8,'c2e7d9814435c2765fa451583b7','I0014','2012-06-10 22:25:20.869616','1969-12-31 19:00:00',NULL,0,NULL,2,1,78,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(9,'c2e7d9815a2123b668d30ce53b4','I0028','2012-06-10 22:25:21.270993','1969-12-31 19:00:00',NULL,0,NULL,2,1,37,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(10,'c2e7d98168076135eccccb2259e','I0036','2012-06-10 22:25:21.653877','1969-12-31 19:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(11,'c2e7d9813e88a9520c9f3a51b2','I0010','2012-06-10 22:25:21.914043','1994-10-16 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(12,'c2e7d98131a63ca16d54254bab4','I0007','2012-06-10 22:25:22.171445','1994-05-27 00:00:00',NULL,0,NULL,2,1,60,NULL,1,-1); -INSERT INTO "grampsdb_person" VALUES(13,'c2e7d9815ce36a8dddad364b594','I0030','2012-06-10 22:25:22.436897','1969-12-31 19:00:00',NULL,0,NULL,2,1,144,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(14,'c2e7d9812811cfb50d360f25799','I0005','2012-06-11 16:36:17.800423','2012-06-11 16:36:16.709320','admin',0,'KFMnYzJlN2Q5ODEyODExY2ZiNTBkMzYwZjI1Nzk5JwpWSTAwMDUKcDEKSTEKKEkwMAoobChsKEkw -CkkwCkkwCihJMApJMApJMApJMDAKTk5OTnRWCkkwCkkwCnRWV2lsbGlhbSBKb2huIFJvYmVydApw -MgoobHAzCihWQ0FWRU5ESVNIClYKSTAxCihJMQpWCnRWCnRwNAphVgpWCihJMgpWQmlydGggTmFt -ZQpwNQp0VgpJMApJMApWClYKVgp0KGxJMQpJMAoobHA2CihJMDAKKGwobFZjMmU3ZDk4MTI4NzQ0 -YjIzN2JiMDAxMWFlZTIKKEkxClZQcmltYXJ5CnR0cDcKYShJMDAKKGwobFZjMmU3ZDk4MTI4YTEx -NjRiMzk1NzY3N2UwMzkKKEkxClZQcmltYXJ5CnR0cDgKYShscDkKVmMyZTdkOTgxMjljNTdhNzg2 -OTFiN2ZlM2Y1MgpwMTAKYShsKGwobChsKGwobChsKGxJMTMzOTQ0Njk3NgoodEkwMAoobHRwMTEK -Lg== -',2,0,137,66,0,1); -INSERT INTO "grampsdb_person" VALUES(15,'c2e7d98148f3cc9f5495499075f','I0017','2012-06-10 22:25:22.965484','1969-12-31 19:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(16,'c2e7d9815204a968fbbd966d878','I0022','2012-06-10 22:25:23.220475','1969-12-31 19:00:00',NULL,0,NULL,3,1,104,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(17,'c2e7d9816931a1a78dc081ca7d3','I0037','2012-06-10 22:25:23.459173','1969-12-31 19:00:00',NULL,0,NULL,2,1,20,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(18,'c2e7d9819bd10fda2e87a1eeb82','I0061','2012-06-10 22:25:23.703662','1994-05-27 00:00:00',NULL,0,NULL,3,1,100,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(19,'c2e7d98199a346e54bb715456e1','I0060','2012-06-10 22:25:23.948082','1994-05-27 00:00:00',NULL,0,NULL,3,1,19,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(20,'c2e7d981a1b4fd787a11d506143','I0064','2012-06-10 22:25:24.191812','1994-05-27 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(21,'c2e7d9814dd2cb9db418b837d0b','I0021','2012-06-10 22:25:24.460785','1994-05-29 00:00:00',NULL,0,NULL,2,0,58,132,0,1); -INSERT INTO "grampsdb_person" VALUES(22,'c2e7d98155758bf50da8af7beb8','I0025','2012-06-10 22:25:24.716021','1969-12-31 19:00:00',NULL,0,NULL,2,1,129,NULL,1,-1); -INSERT INTO "grampsdb_person" VALUES(23,'c2e7d98022f25f84cb69b6d417d','I0001','2012-06-10 22:25:25.206198','1995-01-26 00:00:00',NULL,0,NULL,2,0,108,30,0,1); -INSERT INTO "grampsdb_person" VALUES(24,'c2e7d98156f44a942c2f37585b8','I0026','2012-06-10 22:25:25.587151','1969-12-31 19:00:00',NULL,0,NULL,2,1,80,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(25,'c2e7d98182f16ac9317fa4b42a4','I0049','2012-06-10 22:25:25.847953','1994-05-27 00:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(26,'c2e7d98152d38ca4245cae17c1b','I0023','2012-06-10 22:25:26.094513','1969-12-31 19:00:00',NULL,0,NULL,3,1,70,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(27,'c2e7d9816c563e0ba1a332b0114','I0039','2012-06-10 22:25:26.481398','1994-05-29 00:00:00',NULL,0,NULL,2,1,92,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(28,'c2e7d98183e381a938aa86c59de','I0050','2012-06-10 22:25:26.736870','1994-11-03 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(29,'c2e7d981a814d1879ec29f6f976','I0069','2012-06-10 22:25:27.002862','1994-05-27 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(30,'c2e7d9815b8276f274e3eb48c57','I0029','2012-06-10 22:25:27.347269','1969-12-31 19:00:00',NULL,0,NULL,3,1,69,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(31,'c2e7d981a364e8edd733f02f711','I0066','2012-06-10 22:25:27.692434','1994-05-27 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(32,'c2e7d98172a102e57e7d5159dda','I0043','2012-06-10 22:25:28.069623','1969-12-31 19:00:00',NULL,0,NULL,2,1,9,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(33,'c2e7d981154140d4c615c7b9c98','I0002','2012-06-10 22:25:28.338493','1995-01-26 00:00:00',NULL,0,NULL,3,0,63,26,0,1); -INSERT INTO "grampsdb_person" VALUES(34,'c2e7d9817db41b1782aa044dcb1','I0047','2012-06-10 22:25:28.617216','1994-10-16 00:00:00',NULL,0,NULL,3,0,50,77,0,1); -INSERT INTO "grampsdb_person" VALUES(35,'c2e7d9812295a70338a45cd5060','I0004','2012-06-10 22:25:28.876963','1996-01-23 00:00:00',NULL,0,NULL,3,1,6,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(36,'c2e7d9814c93ceffc927c2b3c2d','I0020','2012-06-10 22:25:29.225217','1969-12-31 19:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(37,'c2e7d981542146add10822a195c','I0024','2012-06-10 22:25:29.515121','1969-12-31 19:00:00',NULL,0,NULL,2,1,122,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(38,'c2e7d981425170dc6f7377c7537','I0013','2012-06-10 22:25:29.758385','1969-12-31 19:00:00',NULL,0,NULL,2,1,124,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(39,'c2e7d9815ef67df7d7786764a4b','I0031','2012-06-10 22:25:30.014780','1969-12-31 19:00:00',NULL,0,NULL,2,1,7,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(40,'c2e7d98198178226ed00178db13','I0058','2012-06-10 22:25:30.270412','1994-05-27 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(41,'c2e7d9816b111bf3082b0a5df1','I0038','2012-06-10 22:25:30.521706','1969-12-31 19:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(42,'c2e7d98165b64ab43c434930cf8','I0035','2012-06-10 22:25:30.780611','1994-05-29 00:00:00',NULL,0,NULL,3,1,117,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(43,'c2e7d9817995a79fbbe291b5ec7','I0045','2012-06-10 22:25:31.038554','1994-05-29 00:00:00',NULL,0,NULL,3,0,NULL,64,-1,0); -INSERT INTO "grampsdb_person" VALUES(44,'c2e7d9814a2641bd3a551b14705','I0018','2012-06-10 22:25:31.336812','1969-12-31 19:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(45,'c2e7d981713143381e3cfc8fc19','I0042','2012-06-10 22:25:31.591717','1969-12-31 19:00:00',NULL,0,NULL,2,1,83,NULL,1,-1); -INSERT INTO "grampsdb_person" VALUES(46,'c2e7d9816503462e1fbeb0e3b74','I0034','2012-06-10 22:25:31.847928','1969-12-31 19:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(47,'c2e7d98162e48c13e8fdc9e25a2','I0033','2012-06-10 22:25:32.102831','1969-12-31 19:00:00',NULL,0,NULL,3,1,68,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(48,'c2e7d9817405bf8f1ef84cd3cf4','I0044','2012-06-10 22:25:32.361431','1994-05-29 00:00:00',NULL,0,NULL,2,0,32,17,0,1); -INSERT INTO "grampsdb_person" VALUES(49,'c2e7d98184dad8966949a485df','I0051','2012-06-10 22:25:32.625765','1994-11-03 00:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(50,'c2e7d9819693b1c54e2031118b9','I0057','2012-06-10 22:25:32.888126','1994-05-27 00:00:00',NULL,0,NULL,3,1,119,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(51,'c2e7d9818599fc62ec468702a8','I0052','2012-06-10 22:25:33.205296','1995-04-29 00:00:00',NULL,0,NULL,2,0,95,115,0,1); -INSERT INTO "grampsdb_person" VALUES(52,'c2e7d981a442eaedd90f4e58dda','I0067','2012-06-10 22:25:33.632710','1994-05-27 00:00:00',NULL,0,NULL,3,1,143,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(53,'c2e7d9813d125c1e6199744bde','I0009','2012-06-10 22:25:33.980609','1969-12-31 19:00:00',NULL,0,NULL,2,1,98,NULL,1,-1); -INSERT INTO "grampsdb_person" VALUES(54,'c2e7d98158c3d15b37a444f99f','I0027','2012-06-10 22:25:34.359596','1969-12-31 19:00:00',NULL,0,NULL,3,1,127,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(55,'c2e7d9816fe126a1a7eba6d4202','I0041','2012-06-10 22:25:34.758411','1969-12-31 19:00:00',NULL,0,NULL,3,1,4,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(56,'c2e7d98137021aff46e5c5342c2','I0008','2012-06-10 22:25:35.088777','1969-12-31 19:00:00',NULL,0,NULL,3,1,101,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(57,'c2e7d9814625f49502b651ad6f3','I0015','2012-06-10 22:25:35.436775','1969-12-31 19:00:00',NULL,0,NULL,2,1,52,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(58,'c2e7d9813f753bab218cbfd05b6','I0011','2012-06-10 22:25:35.702911','1994-06-30 00:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(59,'c2e7d98191e2d4f6392700d1cad','I0055','2012-06-10 22:25:35.954732','1995-04-29 00:00:00',NULL,0,NULL,2,1,85,NULL,1,-1); -INSERT INTO "grampsdb_person" VALUES(60,'c2e7d9819d75845aa4770e1f524','I0062','2012-06-10 22:25:36.201638','1994-05-27 00:00:00',NULL,0,NULL,2,0,29,2,0,1); -INSERT INTO "grampsdb_person" VALUES(61,'c2e7d9818f26014a57c7e22944e','I0054','2012-06-10 22:25:36.454092','1994-05-29 00:00:00',NULL,0,NULL,3,1,5,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(62,'c2e7d9819414413814b85203f82','I0056','2012-06-10 22:25:36.702088','1969-12-31 19:00:00',NULL,0,NULL,2,0,59,125,0,1); -INSERT INTO "grampsdb_person" VALUES(63,'c2e7d98198ef1fcc9df292b14e','I0059','2012-06-10 22:25:37.013869','1994-05-29 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(64,'c2e7d98146f42fc43a22aa1088b','I0016','2012-06-10 22:25:37.358201','1969-12-31 19:00:00',NULL,0,NULL,3,1,82,NULL,0,-1); -INSERT INTO "grampsdb_person" VALUES(65,'c2e7d98140f20eaac50b036e055','I0012','2012-06-10 22:25:37.668915','1969-12-31 19:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(66,'c2e7d9814b655fa6bddb726fdc3','I0019','2012-06-10 22:25:37.925792','1969-12-31 19:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); -INSERT INTO "grampsdb_person" VALUES(67,'c2e7d9812b1385fdc2212104437','I0006','2012-06-10 22:25:38.184101','1994-05-27 00:00:00',NULL,0,NULL,3,0,39,74,0,1); -INSERT INTO "grampsdb_person" VALUES(68,'c2e7d9811de3b4a1e51cfc4e442','I0003','2012-06-10 22:25:38.460689','1994-05-29 00:00:00',NULL,0,NULL,2,0,79,105,1,2); -INSERT INTO "grampsdb_person" VALUES(69,'c2e7d9818a84a3f6dcddec6788f','I0053','2012-06-11 16:33:07.943070','2012-06-11 16:32:48.282165','admin',0,'KFMnYzJlN2Q5ODE4YTg0YTNmNmRjZGRlYzY3ODhmJwpWSTAwNTMKcDEKSTAKKEkwMAoobChsKEkw -CkkwCkkwCihJMApJMApJMApJMDAKTk5OTnRWCkkwCkkwCnRWSmFjcXVlbGluZQpwMgoobHAzCihW -Qk9VVklFUgpWCkkwMQooSTEKVgp0Vgp0cDQKYVYKVgooSTIKVkJpcnRoIE5hbWUKcDUKdFYKSTAK -STAKVgpWClYKdChsSTEKSTAKKGxwNgooSTAwCihsKGxWYzJlN2Q5ODE4YWI2MTI5M2Q5NjE3MzAz -NzY2CihJMQpWUHJpbWFyeQp0dHA3CmEoSTAwCihsKGxWYzJlN2Q5ODE4YjUxNWIzMjgyOTg5NmJj -OTI3CihJMQpWUHJpbWFyeQp0dHA4CmEoSTAwCihsKGxWYzJlN2Q5ODE4YmYxYWMxZjVlNDIxOGNj -NjIwCihJMQpWUHJpbWFyeQp0dHA5CmEoSTAwCihsKGxWYzJlN2Q5ODE4Y2I2N2VjYWI1ZDk5ZTU3 -YjZhCihJMQpWUHJpbWFyeQp0dHAxMAphKEkwMAoobChsVmMyZTdkOTgxOGQ1N2JlMDI1YTUxYmFk -ZmVmMQooSTEKVlByaW1hcnkKdHRwMTEKYShJMDAKKGwobFZjMmU3ZDk4MThkNjdmZjliMjFjNzZl -YmU3YTcKKEkxClZQcmltYXJ5CnR0cDEyCmEoSTAwCihsKGxWYzJlN2Q5ODE4ZDc1MmJiMzJiNTU4 -ODQwMDFkCihJMQpWUHJpbWFyeQp0dHAxMwphKGwobChsKGwobChsKGwobChscDE0ClZjMmU3ZDk4 -MThjYzQ5OGRiOGVlM2RlYTQxMzgKcDE1CmFWYzJlN2Q5ODE4Y2U2N2I5ZDE2OTkzZjUwMmQKcDE2 -CmFWYzJlN2Q5ODE4ZDE0N2MzZmJlMzllZjU3OGMyCnAxNwphVmMyZTdkOTgxOGQ0OTBjYzA5ZWE3 -Zjc4Njg0CnAxOAphVmMyZTdkOTgxOGU5Njg3YTY2OTBkMTJkNTEwMgpwMTkKYUkxMzM5NDQ2NzY4 -Cih0STAwCihsdHAyMAou -',3,0,14,130,0,1); +INSERT INTO "grampsdb_person" VALUES(1,'c30181e535d5ebdb004','I0050','2012-06-18 21:44:27.007428','1994-11-03 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(2,'c30181e4ce741e3fa73','I0016','2012-06-18 21:44:27.144104','1969-12-31 19:00:00',NULL,0,NULL,3,1,119,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(3,'c30181e538e3a266f35','I0052','2012-06-18 21:44:27.287829','1995-04-29 00:00:00',NULL,0,NULL,2,0,118,19,0,1); +INSERT INTO "grampsdb_person" VALUES(4,'c30181e560b10fa403b','I0061','2012-06-18 21:44:27.419876','1994-05-27 00:00:00',NULL,0,NULL,3,1,68,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(5,'c30181e55a51f84bcdd','I0058','2012-06-18 21:44:27.545303','1994-05-27 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(6,'c30181e4c66344d6b59','I0013','2012-06-18 21:44:27.679179','1969-12-31 19:00:00',NULL,0,NULL,2,1,67,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(7,'c30181e4a2c5bde9756','I0003','2012-06-18 21:44:27.956302','1994-05-29 00:00:00',NULL,0,NULL,2,0,123,63,1,2); +INSERT INTO "grampsdb_person" VALUES(8,'c30181e55bb4f5e7604','I0059','2012-06-18 21:44:28.088196','1994-05-29 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(9,'c30181e51582203951a','I0041','2012-06-18 21:44:28.221928','1969-12-31 19:00:00',NULL,0,NULL,3,1,24,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(10,'c30181e4f48333a0c57','I0030','2012-06-18 21:44:28.364165','1969-12-31 19:00:00',NULL,0,NULL,2,1,121,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(11,'c30181e4d8741e88bbb','I0020','2012-06-18 21:44:28.506923','1969-12-31 19:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(12,'c30181e563833367261','I0062','2012-06-18 21:44:28.642500','1994-05-27 00:00:00',NULL,0,NULL,2,0,21,64,0,1); +INSERT INTO "grampsdb_person" VALUES(13,'c30181e4d202bb7606a','I0017','2012-06-18 21:44:28.766293','1969-12-31 19:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(14,'c30181e4e7d52d85569','I0025','2012-06-18 21:44:28.900054','1969-12-31 19:00:00',NULL,0,NULL,2,1,73,NULL,1,-1); +INSERT INTO "grampsdb_person" VALUES(15,'c30181e513f2620d344','I0040','2012-06-18 21:44:29.033576','1994-05-29 00:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(16,'c30181e57345dfeb38d','I0068','2012-06-18 21:44:29.167327','1994-05-27 00:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(17,'c30181e4a9200f276fc','I0004','2012-06-18 21:44:29.301255','1996-01-23 00:00:00',NULL,0,NULL,3,1,41,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(18,'c30181e517e1b2362a7','I0042','2012-06-18 21:44:29.434837','1969-12-31 19:00:00',NULL,0,NULL,2,1,113,NULL,1,-1); +INSERT INTO "grampsdb_person" VALUES(19,'c30181e54a50cd16251','I0054','2012-06-18 21:44:29.576814','1994-05-29 00:00:00',NULL,0,NULL,3,1,95,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(20,'c30181e56ca410c2657','I0065','2012-06-18 21:44:29.711463','1994-05-27 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(21,'c30181e4da97c2c0892','I0021','2012-06-18 21:44:29.847144','1994-05-29 00:00:00',NULL,0,NULL,2,0,124,125,0,1); +INSERT INTO "grampsdb_person" VALUES(22,'c30181e50d12404b391','I0038','2012-06-18 21:44:29.970892','1969-12-31 19:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(23,'c30181e4d6503fbab95','I0019','2012-06-18 21:44:30.112742','1969-12-31 19:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(24,'c30181e50f35512fd74','I0039','2012-06-18 21:44:30.246424','1994-05-29 00:00:00',NULL,0,NULL,2,1,70,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(25,'c30181e575d2a16862f','I0069','2012-06-18 21:44:30.380129','1994-05-27 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(26,'c30181e4fb65b64e169','I0032','2012-06-18 21:44:30.513934','1969-12-31 19:00:00',NULL,0,NULL,2,1,128,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(27,'c30181e49a8263cfd55','I0002','2012-06-18 21:44:30.649349','1995-01-26 00:00:00',NULL,0,NULL,3,0,139,78,0,1); +INSERT INTO "grampsdb_person" VALUES(28,'c30181e4fee6bca5abf','I0033','2012-06-18 21:44:30.781420','1969-12-31 19:00:00',NULL,0,NULL,3,1,112,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(29,'c30181e56e25e112620','I0066','2012-06-18 21:44:30.907888','1994-05-27 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(30,'c30181e48f33c0c82ae','I0001','2012-06-18 21:44:31.035144','1995-01-26 00:00:00',NULL,0,NULL,2,0,48,4,0,1); +INSERT INTO "grampsdb_person" VALUES(31,'c30181e4b04289ee499','I0006','2012-06-18 21:44:31.168652','1994-05-27 00:00:00',NULL,0,NULL,3,0,36,32,0,1); +INSERT INTO "grampsdb_person" VALUES(32,'c30181e524f2f0d0185','I0046','2012-06-18 21:44:31.302418','1994-10-16 00:00:00',NULL,0,NULL,2,0,140,44,0,1); +INSERT INTO "grampsdb_person" VALUES(33,'c30181e5535600afb6d','I0056','2012-06-18 21:44:31.436364','1969-12-31 19:00:00',NULL,0,NULL,2,0,27,138,0,1); +INSERT INTO "grampsdb_person" VALUES(34,'c30181e4f801f1cd999','I0031','2012-06-18 21:44:31.568239','1969-12-31 19:00:00',NULL,0,NULL,2,1,133,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(35,'c30181e4bda64b67fc2','I0009','2012-06-18 21:44:31.702026','1969-12-31 19:00:00',NULL,0,NULL,2,1,144,NULL,1,-1); +INSERT INTO "grampsdb_person" VALUES(36,'c30181e4c434cf2456c','I0012','2012-06-18 21:44:31.844201','1969-12-31 19:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(37,'c30181e5378053b965e','I0051','2012-06-18 21:44:31.977889','1994-11-03 00:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(38,'c30181e4c1b677ed2b1','I0011','2012-06-18 21:44:32.111460','1994-06-30 00:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(39,'c30181e51d020c99a60','I0044','2012-06-18 21:44:32.248085','1994-05-29 00:00:00',NULL,0,NULL,2,0,103,94,0,1); +INSERT INTO "grampsdb_person" VALUES(40,'c30181e52a83c428ed5','I0047','2012-06-18 21:44:32.381797','1994-10-16 00:00:00',NULL,0,NULL,3,0,57,77,0,1); +INSERT INTO "grampsdb_person" VALUES(41,'c30181e507b0fa099ba','I0036','2012-06-18 21:44:32.513836','1969-12-31 19:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(42,'c30181e56b1191a3720','I0064','2012-06-18 21:44:32.647382','1994-05-27 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(43,'c30181e4f1c1e2b4737','I0029','2012-06-18 21:44:32.781001','1969-12-31 19:00:00',NULL,0,NULL,3,1,81,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(44,'c30181e56fb11fbeea6','I0067','2012-06-18 21:44:32.914975','1994-05-27 00:00:00',NULL,0,NULL,3,1,91,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(45,'c30181e4e577ded1337','I0024','2012-06-18 21:44:33.048746','1969-12-31 19:00:00',NULL,0,NULL,2,1,135,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(46,'c30181e5028607ecc73','I0034','2012-06-18 21:44:33.174205','1969-12-31 19:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(47,'c30181e4e1b6981809d','I0022','2012-06-18 21:44:33.299587','1969-12-31 19:00:00',NULL,0,NULL,3,1,83,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(48,'c30181e56750f5540a3','I0063','2012-06-18 21:44:33.434032','1994-05-27 00:00:00',NULL,0,NULL,3,1,10,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(49,'c30181e4e3238a80483','I0023','2012-06-18 21:44:33.568012','1969-12-31 19:00:00',NULL,0,NULL,3,1,60,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(50,'c30181e503c2ca35ed9','I0035','2012-06-18 21:44:33.710869','1994-05-29 00:00:00',NULL,0,NULL,3,1,86,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(51,'c30181e4ecc53881846','I0027','2012-06-18 21:44:33.844085','1969-12-31 19:00:00',NULL,0,NULL,3,1,43,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(52,'c30181e4adc5c16c637','I0005','2012-06-18 21:44:34.005846','1969-12-31 19:00:00',NULL,0,NULL,2,0,23,29,0,1); +INSERT INTO "grampsdb_person" VALUES(53,'c30181e541b2e7cbb85','I0053','2012-06-18 21:44:34.172122','1994-05-29 00:00:00',NULL,0,NULL,3,0,37,42,0,1); +INSERT INTO "grampsdb_person" VALUES(54,'c30181e4cd050176a7c','I0015','2012-06-18 21:44:34.304042','1969-12-31 19:00:00',NULL,0,NULL,2,1,7,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(55,'c30181e4ea50fae3132','I0026','2012-06-18 21:44:34.437812','1969-12-31 19:00:00',NULL,0,NULL,2,1,96,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(56,'c30181e4c9a4de4acbb','I0014','2012-06-18 21:44:34.563242','1969-12-31 19:00:00',NULL,0,NULL,2,1,2,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(57,'c30181e52ee3b3e79a3','I0048','2012-06-18 21:44:34.699687','1994-06-30 00:00:00',NULL,0,NULL,2,0,NULL,101,-1,1); +INSERT INTO "grampsdb_person" VALUES(58,'c30181e4c0109979a61','I0010','2012-06-18 21:44:34.832135','1994-10-16 00:00:00',NULL,0,NULL,2,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(59,'c30181e557a52efa5da','I0057','2012-06-18 21:44:34.974194','1994-05-27 00:00:00',NULL,0,NULL,3,1,102,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(60,'c30181e534251f77dd2','I0049','2012-06-18 21:44:35.107405','1994-05-27 00:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(61,'c30181e4ef475b4a36d','I0028','2012-06-18 21:44:35.241237','1969-12-31 19:00:00',NULL,0,NULL,2,1,54,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(62,'c30181e51aa7c8661a3','I0043','2012-06-18 21:44:35.374936','1969-12-31 19:00:00',NULL,0,NULL,2,1,109,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(63,'c30181e523374ece98b','I0045','2012-06-18 21:44:35.751494','1994-05-29 00:00:00',NULL,0,NULL,3,0,NULL,99,-1,0); +INSERT INTO "grampsdb_person" VALUES(64,'c30181e509c100ee2b1','I0037','2012-06-18 21:44:35.883376','1969-12-31 19:00:00',NULL,0,NULL,2,1,1,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(65,'c30181e4b611ebce47a','I0007','2012-06-18 21:44:36.033738','1994-05-27 00:00:00',NULL,0,NULL,2,1,40,NULL,1,-1); +INSERT INTO "grampsdb_person" VALUES(66,'c30181e54f47d176b2a','I0055','2012-06-18 21:44:36.168422','1995-04-29 00:00:00',NULL,0,NULL,2,1,38,NULL,1,-1); +INSERT INTO "grampsdb_person" VALUES(67,'c30181e4d437b7664ed','I0018','2012-06-18 21:44:36.302050','1969-12-31 19:00:00',NULL,0,NULL,3,1,NULL,NULL,-1,-1); +INSERT INTO "grampsdb_person" VALUES(68,'c30181e55d23cb0928f','I0060','2012-06-18 21:44:36.435813','1994-05-27 00:00:00',NULL,0,NULL,3,1,17,NULL,0,-1); +INSERT INTO "grampsdb_person" VALUES(69,'c30181e4b8e670156ec','I0008','2012-06-18 21:44:36.569528','1969-12-31 19:00:00',NULL,0,NULL,3,1,20,NULL,0,-1); CREATE TABLE "grampsdb_family_tags" ( "id" integer NOT NULL PRIMARY KEY, "family_id" integer NOT NULL, @@ -950,25 +1043,25 @@ CREATE TABLE "grampsdb_family" ( "mother_id" integer REFERENCES "grampsdb_person" ("id"), "family_rel_type_id" integer NOT NULL REFERENCES "grampsdb_familyreltype" ("id") ); -INSERT INTO "grampsdb_family" VALUES(1,'c2e7d9803943fb9762fa08aed46','F0009','2012-06-10 22:25:15.833810','1969-12-31 19:00:00',NULL,0,NULL,48,43,5); -INSERT INTO "grampsdb_family" VALUES(2,'c2e7d9811be42ee8096a2072b04','F0012','2012-06-10 22:25:16.082209','1969-12-31 19:00:00',NULL,0,NULL,28,49,1); -INSERT INTO "grampsdb_family" VALUES(3,'c2e7d9819a945a96ff1513a0081','F0016','2012-06-10 22:25:16.401086','1969-12-31 19:00:00',NULL,0,NULL,31,19,5); -INSERT INTO "grampsdb_family" VALUES(4,'c2e7d98165233b3d1514fa732','F0007','2012-06-10 22:25:16.621307','1969-12-31 19:00:00',NULL,0,NULL,46,42,5); -INSERT INTO "grampsdb_family" VALUES(5,'c2e7d9818334185f428ecb1719d','F0019','2012-06-10 22:25:16.644076','1969-12-31 19:00:00',NULL,0,NULL,29,25,5); -INSERT INTO "grampsdb_family" VALUES(6,'c2e7d9819c2551eb6aa8c0c333c','F0017','2012-06-10 22:25:16.743425','1969-12-31 19:00:00',NULL,0,NULL,20,18,5); -INSERT INTO "grampsdb_family" VALUES(7,'c2e7d9818d9d0592e7e396f61d','F0015','2012-06-10 22:25:16.801625','1969-12-31 19:00:00',NULL,0,NULL,63,69,1); -INSERT INTO "grampsdb_family" VALUES(8,'c2e7d9817621bdae63027934dde','F0010','2012-06-10 22:25:16.921089','1969-12-31 19:00:00',NULL,0,NULL,7,34,5); -INSERT INTO "grampsdb_family" VALUES(9,'c2e7d98196d592bec68644108d8','F0014','2012-06-10 22:25:16.973993','1969-12-31 19:00:00',NULL,0,NULL,40,50,1); -INSERT INTO "grampsdb_family" VALUES(10,'c2e7d9803923bfdb91518ebca47','F0001','2012-06-10 22:25:17.125106','1969-12-31 19:00:00',NULL,0,NULL,23,33,5); -INSERT INTO "grampsdb_family" VALUES(11,'c2e7d981466658770dc43b7586e','F0005','2012-06-10 22:25:17.165687','1969-12-31 19:00:00',NULL,0,NULL,57,64,1); -INSERT INTO "grampsdb_family" VALUES(12,'c2e7d981a0633a6e8883fb7ac71','F0018','2012-06-10 22:25:17.194612','1969-12-31 19:00:00',NULL,0,NULL,3,6,5); -INSERT INTO "grampsdb_family" VALUES(13,'c2e7d981335351ada2dae0b88d5','F0003','2012-06-10 22:25:17.371427','1969-12-31 19:00:00',NULL,0,NULL,12,56,5); -INSERT INTO "grampsdb_family" VALUES(14,'c2e7d9816d752e58ba42e9fcb6e','F0008','2012-06-10 22:25:17.655605','1969-12-31 19:00:00',NULL,0,NULL,27,4,5); -INSERT INTO "grampsdb_family" VALUES(15,'c2e7d98129c57a78691b7fe3f52','F0002','2012-06-10 22:25:17.935227','1969-12-31 19:00:00',NULL,0,NULL,14,67,5); -INSERT INTO "grampsdb_family" VALUES(16,'c2e7d98150873e2dbb44ecbcf65','F0006','2012-06-10 22:25:18.146829','1969-12-31 19:00:00',NULL,0,NULL,21,16,5); -INSERT INTO "grampsdb_family" VALUES(17,'c2e7d98188b3af23c99c4f4ef8d','F0013','2012-06-10 22:25:18.372841','1969-12-31 19:00:00',NULL,0,NULL,51,69,5); -INSERT INTO "grampsdb_family" VALUES(18,'c2e7d98182140ba9f409ba160e7','F0011','2012-06-10 22:25:18.404341','1969-12-31 19:00:00',NULL,0,NULL,1,25,1); -INSERT INTO "grampsdb_family" VALUES(19,'c2e7d9813ec1c8a83cb49be562a','F0004','2012-06-10 22:25:18.447402','1969-12-31 19:00:00',NULL,0,NULL,11,58,1); +INSERT INTO "grampsdb_family" VALUES(1,'c30181e55e70c81bfe8','F0016','2012-06-18 21:44:21.776185','1969-12-31 19:00:00',NULL,0,NULL,29,68,5); +INSERT INTO "grampsdb_family" VALUES(2,'c30181e5582444c0bf3','F0014','2012-06-18 21:44:22.713264','1969-12-31 19:00:00',NULL,0,NULL,5,59,5); +INSERT INTO "grampsdb_family" VALUES(3,'c30181e49645bf7aa16','F0009','2012-06-18 21:44:22.964227','1969-12-31 19:00:00',NULL,0,NULL,39,63,5); +INSERT INTO "grampsdb_family" VALUES(4,'c30181e4c0709538bc4','F0004','2012-06-18 21:44:22.996128','1969-12-31 19:00:00',NULL,0,NULL,58,38,5); +INSERT INTO "grampsdb_family" VALUES(5,'c30181e502c5805c157','F0007','2012-06-18 21:44:23.223371','1969-12-31 19:00:00',NULL,0,NULL,46,50,5); +INSERT INTO "grampsdb_family" VALUES(6,'c30181e534921cadd07','F0019','2012-06-18 21:44:23.398452','1969-12-31 19:00:00',NULL,0,NULL,25,60,5); +INSERT INTO "grampsdb_family" VALUES(7,'c30181e496232b6add1','F0001','2012-06-18 21:44:23.417689','1969-12-31 19:00:00',NULL,0,NULL,30,27,5); +INSERT INTO "grampsdb_family" VALUES(8,'c30181e520a53997002','F0010','2012-06-18 21:44:23.563672','1969-12-31 19:00:00',NULL,0,NULL,32,40,5); +INSERT INTO "grampsdb_family" VALUES(9,'c30181e532552ac8f35','F0011','2012-06-18 21:44:23.897917','1969-12-31 19:00:00',NULL,0,NULL,57,60,5); +INSERT INTO "grampsdb_family" VALUES(10,'c30181e5614684141e2','F0017','2012-06-18 21:44:24.211262','1969-12-31 19:00:00',NULL,0,NULL,42,4,5); +INSERT INTO "grampsdb_family" VALUES(11,'c30181e568c79dfa768','F0018','2012-06-18 21:44:24.558084','1969-12-31 19:00:00',NULL,0,NULL,20,48,5); +INSERT INTO "grampsdb_family" VALUES(12,'c30181e4b7a0eb54cf3','F0003','2012-06-18 21:44:24.921302','1969-12-31 19:00:00',NULL,0,NULL,65,69,5); +INSERT INTO "grampsdb_family" VALUES(13,'c30181e53ec11f3aad3','F0013','2012-06-18 21:44:25.126956','1969-12-31 19:00:00',NULL,0,NULL,3,53,5); +INSERT INTO "grampsdb_family" VALUES(14,'c30181e4a0244bca5df','F0012','2012-06-18 21:44:25.269064','1969-12-31 19:00:00',NULL,0,NULL,1,37,5); +INSERT INTO "grampsdb_family" VALUES(15,'c30181e4cd86d1206ce','F0005','2012-06-18 21:44:25.503346','1969-12-31 19:00:00',NULL,0,NULL,54,2,5); +INSERT INTO "grampsdb_family" VALUES(16,'c30181e4af518af27e4','F0002','2012-06-18 21:44:25.980532','1969-12-31 19:00:00',NULL,0,NULL,52,31,5); +INSERT INTO "grampsdb_family" VALUES(17,'c30181e5112348535d9','F0008','2012-06-18 21:44:26.006860','1969-12-31 19:00:00',NULL,0,NULL,24,15,5); +INSERT INTO "grampsdb_family" VALUES(18,'c30181e54772c5ecfaf','F0015','2012-06-18 21:44:26.617589','1969-12-31 19:00:00',NULL,0,NULL,8,53,5); +INSERT INTO "grampsdb_family" VALUES(19,'c30181e4def38b64a89','F0006','2012-06-18 21:44:26.755563','1969-12-31 19:00:00',NULL,0,NULL,21,47,5); CREATE TABLE "grampsdb_citation" ( "calendar" integer NOT NULL, "modifier" integer NOT NULL, @@ -1010,17 +1103,17 @@ CREATE TABLE "grampsdb_source" ( "pubinfo" varchar(50), "abbrev" varchar(50) ); -INSERT INTO "grampsdb_source" VALUES(1,'c2e7d981acd5fe9a782e4371147','S0005','2012-06-10 22:25:15.061383','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0005','','',''); -INSERT INTO "grampsdb_source" VALUES(2,'c2e7d981b0f594cdb18c1652cd0','S0008','2012-06-10 22:25:15.091490','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0008','','',''); -INSERT INTO "grampsdb_source" VALUES(3,'c2e7d981ae557e383f5325d7d6b','S0006','2012-06-10 22:25:15.181379','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0006','','',''); -INSERT INTO "grampsdb_source" VALUES(4,'c2e7d981afa70e7f3805ff9cf97','S0007','2012-06-10 22:25:15.220948','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0007','','',''); -INSERT INTO "grampsdb_source" VALUES(5,'c2e7d981b3299e0188b1ec76fe','S0010','2012-06-10 22:25:15.260624','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0010','','',''); -INSERT INTO "grampsdb_source" VALUES(6,'c2e7d981aa05d3f3af9fd1aa55','S0002','2012-06-10 22:25:15.301377','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0002','','',''); -INSERT INTO "grampsdb_source" VALUES(7,'c2e7d981a905f36ea6f8651e849','S0001','2012-06-10 22:25:15.391493','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0001','','',''); -INSERT INTO "grampsdb_source" VALUES(8,'c2e7d981aaf4f0a6b6b287487ff','S0003','2012-06-10 22:25:15.500731','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0003','','',''); -INSERT INTO "grampsdb_source" VALUES(9,'c2e7d981abe6309eb27d4b07c38','S0004','2012-06-10 22:25:15.520413','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0004','','',''); -INSERT INTO "grampsdb_source" VALUES(10,'c2e7d981b415a3eb43cd1b9aec4','S0011','2012-06-10 22:25:15.597182','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0011','','',''); -INSERT INTO "grampsdb_source" VALUES(11,'c2e7d981b236742e45ef146d831','S0009','2012-06-10 22:25:15.692047','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0009','','',''); +INSERT INTO "grampsdb_source" VALUES(1,'c30181e586e58b05f95','S0010','2012-06-18 21:44:20.772518','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0010','','',''); +INSERT INTO "grampsdb_source" VALUES(2,'c30181e579127c5333c','S0002','2012-06-18 21:44:20.906119','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0002','','',''); +INSERT INTO "grampsdb_source" VALUES(3,'c30181e57c834b373fe','S0004','2012-06-18 21:44:21.081664','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0004','','',''); +INSERT INTO "grampsdb_source" VALUES(4,'c30181e58526c2ca5a7','S0009','2012-06-18 21:44:21.187178','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0009','','',''); +INSERT INTO "grampsdb_source" VALUES(5,'c30181e581a1a23df61','S0007','2012-06-18 21:44:21.210953','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0007','','',''); +INSERT INTO "grampsdb_source" VALUES(6,'c30181e58006dae8fbf','S0006','2012-06-18 21:44:21.425740','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0006','','',''); +INSERT INTO "grampsdb_source" VALUES(7,'c30181e58376f39240f','S0008','2012-06-18 21:44:21.451903','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0008','','',''); +INSERT INTO "grampsdb_source" VALUES(8,'c30181e577553160493','S0001','2012-06-18 21:44:21.491063','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0001','','',''); +INSERT INTO "grampsdb_source" VALUES(9,'c30181e57e33594def8','S0005','2012-06-18 21:44:21.578494','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0005','','',''); +INSERT INTO "grampsdb_source" VALUES(10,'c30181e57ac72627de2','S0003','2012-06-18 21:44:21.584269','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0003','','',''); +INSERT INTO "grampsdb_source" VALUES(11,'c30181e588935d3ec0c','S0011','2012-06-18 21:44:21.749153','1969-12-31 19:00:00',NULL,0,NULL,'No title - ID S0011','','',''); CREATE TABLE "grampsdb_event" ( "calendar" integer NOT NULL, "modifier" integer NOT NULL, @@ -1048,150 +1141,150 @@ CREATE TABLE "grampsdb_event" ( "description" varchar(50) NOT NULL, "place_id" integer ); -INSERT INTO "grampsdb_event" VALUES(0,0,0,25,11,1963,0,0,0,0,0,'25 NOV 1963',2438359,0,1,'c2e7d9818705d2a9d0a54ceefb','E0098','2012-06-10 22:25:15.699897','1969-12-31 19:00:00',NULL,0,NULL,11,'',3); -INSERT INTO "grampsdb_event" VALUES(0,0,0,24,9,1855,0,0,0,0,0,'24 SEP 1855',2398851,0,2,'c2e7d9819e44dd8badd21fd8b51','E0123','2012-06-10 22:25:15.042811','1969-12-31 19:00:00',NULL,0,NULL,5,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,6,1942,0,0,0,0,0,'JUN 1942',2430512,0,3,'c2e7d981ea15d2ccb5bf1dadc4b','E0143','2012-06-10 22:25:15.046067','1969-12-31 19:00:00',NULL,0,NULL,37,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,3,1960,0,0,0,0,0,'MAR 1960',2436995,0,4,'c2e7d9817004199dbf5ca26f835','E0065','2012-06-10 22:25:15.066666','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,27,11,1957,0,0,0,0,0,'27 NOV 1957',2436170,0,5,'c2e7d9818f4674427bce0e28718','E0110','2012-06-10 22:25:15.968256','1969-12-31 19:00:00',NULL,0,NULL,4,'',23); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,9,1918,0,0,0,0,0,'SEP 1918',2421838,0,6,'c2e7d98122d4bd9271626b89b89','E0023','2012-06-10 22:25:15.995166','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,9,1,1965,0,0,0,0,0,'9 JAN 1965',2438770,0,7,'c2e7d9815f1681bc649fdece90b','E0056','2012-06-10 22:25:15.998660','1969-12-31 19:00:00',NULL,0,NULL,4,'',23); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,8,'c2e7d98155a401feaa0998798b5','E0049','2012-06-10 22:25:15.082914','1969-12-31 19:00:00',NULL,0,NULL,27,'Jr.',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,8,1963,0,0,0,0,0,'AUG 1963',2438243,0,9,'c2e7d98172d174277e6e0abdfe1','E0068','2012-06-10 22:25:15.084355','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,10,'c2e7d9813fa109ddf53df7f5a2b','E0036','2012-06-10 22:25:15.085780','1969-12-31 19:00:00',NULL,0,NULL,18,'Georgetown University',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,11,'c2e7d9817c2777d87ddc0a3dc58','E0079','2012-06-10 22:25:15.092834','1969-12-31 19:00:00',NULL,0,NULL,29,'Cooper, Ward Boss',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,12,'c2e7d9811e173cfa644747596f5','E0017','2012-06-10 22:25:15.095616','1969-12-31 19:00:00',NULL,0,NULL,27,'Jr.',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,13,'c2e7d98037f718f0a794e2d3f81','E0006','2012-06-10 22:25:15.097655','1969-12-31 19:00:00',NULL,0,NULL,47,'Bronxville, MA',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,28,7,1929,0,0,0,0,0,'28 JUL 1929',2425821,0,14,'c2e7d9818ab61293d9617303766','E0103','2012-06-10 22:25:16.034200','1969-12-31 19:00:00',NULL,0,NULL,4,'',14); -INSERT INTO "grampsdb_event" VALUES(0,0,0,24,3,1967,0,0,0,0,0,'24 MAR 1967',2439574,0,15,'c2e7d98160f5242991055c5f9f7','E0057','2012-06-10 22:25:16.037709','1969-12-31 19:00:00',NULL,0,NULL,4,'',7); -INSERT INTO "grampsdb_event" VALUES(0,0,0,23,5,1953,0,0,0,0,0,'23 MAY 1953',2434521,0,16,'c2e7d981c496ff536cd3d1fa3eb','E0131','2012-06-10 22:25:15.103209','1969-12-31 19:00:00',NULL,0,NULL,37,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,5,1929,0,0,0,0,0,'MAY 1929',2425733,0,17,'c2e7d98174e7dffa88367ceb7e','E0070','2012-06-10 22:25:15.106367','1969-12-31 19:00:00',NULL,0,NULL,5,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,18,'c2e7d980278619a308590dc04ce','E0002','2012-06-10 22:25:16.122546','1969-12-31 19:00:00',NULL,0,NULL,11,'',13); -INSERT INTO "grampsdb_event" VALUES(0,0,0,9,8,1851,0,0,0,0,0,'9 AUG 1851',2397344,0,19,'c2e7d98199d1a7377260caa9956','E0120','2012-06-10 22:25:16.126052','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,9,1960,0,0,0,0,0,'SEP 1960',2437179,0,20,'c2e7d98169540efbd6293605cc5','E0061','2012-06-10 22:25:16.129524','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,21,'c2e7d9818311149395470de3fd1','E0094','2012-06-10 22:25:15.128242','1969-12-31 19:00:00',NULL,0,NULL,47,'Newport, RI',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,13,12,1957,0,0,0,0,0,'13 DEC 1957',2436186,0,22,'c2e7d9818ff4701d1867e58899f','E0111','2012-06-10 22:25:16.204265','1969-12-31 19:00:00',NULL,0,NULL,14,'',9); -INSERT INTO "grampsdb_event" VALUES(0,0,0,22,11,1858,0,0,0,0,0,'22 NOV 1858',2400006,0,23,'c2e7d9817b679fae1ce4aaf400a','E0078','2012-06-10 22:25:16.208524','1969-12-31 19:00:00',NULL,0,NULL,5,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,24,'c2e7d98184048836fa7a48b58d0','E0095','2012-06-10 22:25:15.133154','1969-12-31 19:00:00',NULL,0,NULL,29,'Mayor',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,25,'c2e7d981a1d608dac5dbac83934','E0125','2012-06-10 22:25:15.140333','1969-12-31 19:00:00',NULL,0,NULL,29,'Janitor',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,22,1,1995,0,0,0,0,0,'22 JAN 1995',2449740,0,26,'c2e7d981176281ac3fbce52dea4','E0012','2012-06-10 22:25:16.314997','1969-12-31 19:00:00',NULL,0,NULL,5,'',16); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,27,'c2e7d98166957975cf5d3cea108','E0060','2012-06-10 22:25:15.152753','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,7,1940,0,0,0,0,0,'JUL 1940',2429812,0,28,'c2e7d981dfa26a5eb250321b5c1','E0138','2012-06-10 22:25:15.162943','1969-12-31 19:00:00',NULL,0,NULL,43,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,4,1,1854,0,0,0,0,0,'4 JAN 1854',2398223,0,29,'c2e7d9819d9626a30dec45fc464','E0122','2012-06-10 22:25:16.438776','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,18,11,1969,0,0,0,0,0,'18 NOV 1969',2440544,0,30,'c2e7d9802605aa5ee22f4c7cb73','E0001','2012-06-10 22:25:16.442304','1969-12-31 19:00:00',NULL,0,NULL,5,'',10); -INSERT INTO "grampsdb_event" VALUES(0,0,0,8,6,1968,0,0,0,0,0,'8 JUN 1968',2440016,0,31,'c2e7d9814f46ed91954c713b2a8','E0043','2012-06-10 22:25:16.571776','1969-12-31 19:00:00',NULL,0,NULL,11,'',3); -INSERT INTO "grampsdb_event" VALUES(0,0,0,14,1,1858,0,0,0,0,0,'14 JAN 1858',2399694,0,32,'c2e7d981742633f389097e0c3d6','E0069','2012-06-10 22:25:16.615069','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,33,'c2e7d9816f325d38ff5c94e5b51','E0064','2012-06-10 22:25:15.202976','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1956,0,0,0,0,0,'1956',2435474,0,34,'c2e7d981d3a158ebcb5bb955305','E0134','2012-06-10 22:25:15.205849','1969-12-31 19:00:00',NULL,0,NULL,37,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,35,'c2e7d98190a447c044ac2328646','E0113','2012-06-10 22:25:15.217493','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,36,'c2e7d980296774a35c789f442a5','E0004','2012-06-10 22:25:15.220006','1969-12-31 19:00:00',NULL,0,NULL,18,'Harvard Graduate',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1957,0,0,0,0,0,'1957',2435840,0,37,'c2e7d9815a44f203265dfa5b264','E0053','2012-06-10 22:25:15.225572','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,38,'c2e7d9817ca34182beec6b4d1c5','E0082','2012-06-10 22:25:15.228418','1969-12-31 19:00:00',NULL,0,NULL,47,'Liverpool St., East Boston, MA',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1920,0,0,0,0,0,'1920',2422325,0,39,'c2e7d9812b512a0820f7dea3000','E0027','2012-06-10 22:25:16.738158','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,40,'c2e7d9818d752bb32b55884001d','E0109','2012-06-10 22:25:15.232860','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,41,'c2e7d98175f277e780cb869f496','E0073','2012-06-10 22:25:15.237562','1969-12-31 19:00:00',NULL,0,NULL,47,'Webster St., Boston, MA',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,42,'c2e7d98187b2947786b7ccb8bb4','E0099','2012-06-10 22:25:15.243770','1969-12-31 19:00:00',NULL,0,NULL,29,'Senator',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,25,1,1995,0,0,0,0,0,'25 JAN 1995',2449743,0,43,'c2e7d98118910cf534391ddf973','E0013','2012-06-10 22:25:16.805821','1969-12-31 19:00:00',NULL,0,NULL,11,'',13); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,44,'c2e7d98120b5a7cb2467f7a0b23','E0022','2012-06-10 22:25:15.251741','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,45,'c2e7d9815043a7f6ef556134f73','E0044','2012-06-10 22:25:15.255866','1969-12-31 19:00:00',NULL,0,NULL,47,'Hickory Hill',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,46,'c2e7d9817ccd47f96fb1d0f2e0','E0083','2012-06-10 22:25:15.257916','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,47,'c2e7d98038e7757d98ef03c8c11','E0010','2012-06-10 22:25:15.259968','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,8,1957,0,0,0,0,0,'AUG 1957',2436052,0,48,'c2e7d98180752fe1e5496b64586','E0090','2012-06-10 22:25:16.852724','1969-12-31 19:00:00',NULL,0,NULL,5,'',17); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,49,'c2e7d9811a4aff7cb9890c91fe','E0015','2012-06-10 22:25:15.274021','1969-12-31 19:00:00',NULL,0,NULL,47,'Died of complications due to pneumonia. ',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1821,0,0,0,0,0,'1821',2386167,0,50,'c2e7d9817de4e50451349e3f818','E0084','2012-06-10 22:25:15.297379','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,51,'c2e7d981a391c45fbebdff8aee0','E0127','2012-06-10 22:25:15.299014','1969-12-31 19:00:00',NULL,0,NULL,29,'Teamster',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,7,9,1923,0,0,0,0,0,'7 SEP 1923',2423670,0,52,'c2e7d9814642b4a30a7abc27ced','E0039','2012-06-10 22:25:15.300551','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,53,'c2e7d98192d187fef93b2763ed3','E0116','2012-06-10 22:25:15.307560','1969-12-31 19:00:00',NULL,0,NULL,18,'Brown Univ',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,54,'c2e7d98175d18d1df57b85880c4','E0072','2012-06-10 22:25:15.309849','1969-12-31 19:00:00',NULL,0,NULL,47,'Meridian St., East Boston, MA',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,55,'c2e7d9818116231e029ac97fc6c','E0091','2012-06-10 22:25:16.908226','1969-12-31 19:00:00',NULL,0,NULL,11,'',26); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,56,'c2e7d98029940bad318b6258380','E0005','2012-06-10 22:25:15.314258','1969-12-31 19:00:00',NULL,0,NULL,47,'Joe Kennedy was a very hard worker, which often deteriorated',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,57,'c2e7d9819092271e43f7bf9012f','E0112','2012-06-10 22:25:15.316301','1969-12-31 19:00:00',NULL,0,NULL,18,'Brearly School',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,20,11,1925,0,0,0,0,0,'20 NOV 1925',2424475,0,58,'c2e7d9814df10a016dc3d0e5462','E0041','2012-06-10 22:25:16.913419','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,7,8,1963,0,0,0,0,0,'7 AUG 1963',2438249,0,59,'c2e7d981944134e9155f1b7cfb8','E0117','2012-06-10 22:25:16.916890','1969-12-31 19:00:00',NULL,0,NULL,4,'',24); -INSERT INTO "grampsdb_event" VALUES(0,0,0,9,11,1915,0,0,0,0,0,'9 NOV 1915',2420811,0,60,'c2e7d981321708e6de44e1e0f96','E0030','2012-06-10 22:25:16.969782','1969-12-31 19:00:00',NULL,0,NULL,4,'',5); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,61,'c2e7d9813b435b4a9ec53e2a5c','E0032','2012-06-10 22:25:15.347911','1969-12-31 19:00:00',NULL,0,NULL,47,'Timberlawn, MD',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,62,'c2e7d9817506191fc07a6afa454','E0071','2012-06-10 22:25:15.350935','1969-12-31 19:00:00',NULL,0,NULL,29,'Dockhand, Saloonkeeper, Senator, Bank President',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,22,7,1890,0,0,0,0,0,'22 JUL 1890',2411571,0,63,'c2e7d98115e17cf95dcc84e1dbb','E0011','2012-06-10 22:25:16.980764','1969-12-31 19:00:00',NULL,0,NULL,4,'',6); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1923,0,0,0,0,0,'1923',2423421,0,64,'c2e7d98179c623d0415bf903305','E0075','2012-06-10 22:25:15.356329','1969-12-31 19:00:00',NULL,0,NULL,5,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1882,0,0,0,0,0,'1882',2408447,0,65,'c2e7d981e8d3e28ecd8cb514b2b','E0142','2012-06-10 22:25:16.985190','1969-12-31 19:00:00',NULL,0,NULL,37,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,10,9,1944,0,0,0,0,0,'10 SEP 1944',2431344,0,66,'c2e7d98128a1164b3957677e039','E0026','2012-06-10 22:25:16.988801','1969-12-31 19:00:00',NULL,0,NULL,5,'',27); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1883,0,0,0,0,0,'1883',2408812,0,67,'c2e7d981e623fb7c8ea8b0a5b03','E0140','2012-06-10 22:25:16.993094','1969-12-31 19:00:00',NULL,0,NULL,37,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,12,12,1968,0,0,0,0,0,'12 DEC 1968',2440203,0,68,'c2e7d9816302b35cb69c5ff5cf','E0058','2012-06-10 22:25:16.996568','1969-12-31 19:00:00',NULL,0,NULL,4,'',7); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1958,0,0,0,0,0,'1958',2436205,0,69,'c2e7d9815ba64ca1a0870e97e64','E0054','2012-06-10 22:25:15.384793','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,4,7,1951,0,0,0,0,0,'4 JUL 1951',2433832,0,70,'c2e7d98152f6d62763056d39b98','E0047','2012-06-10 22:25:15.387815','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,71,'c2e7d98150617043edb79cdfdc5','E0045','2012-06-10 22:25:15.393804','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,72,'c2e7d9818d67ff9b21c76ebe7a7','E0108','2012-06-10 22:25:15.397485','1969-12-31 19:00:00',NULL,0,NULL,47,'Martha''s Vineyard ',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,73,'c2e7d9813eb3da305a5107fc3b3','E0035','2012-06-10 22:25:15.399611','1969-12-31 19:00:00',NULL,0,NULL,29,'Actor',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,13,5,1948,0,0,0,0,0,'13 MAY 1948',2432685,0,74,'c2e7d9812ca56268037cd0295e','E0028','2012-06-10 22:25:17.200805','1969-12-31 19:00:00',NULL,0,NULL,5,'',25); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,75,'c2e7d9817c310c915a0cb7070f6','E0080','2012-06-10 22:25:15.432087','1969-12-31 19:00:00',NULL,0,NULL,47,'He died of an outbreak of Cholera.',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,76,'c2e7d9817f4746171245236274c','E0087','2012-06-10 22:25:15.440429','1969-12-31 19:00:00',NULL,0,NULL,47,'Her death was caused by a cerebral hemorrhage.',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,20,12,1888,0,0,0,0,0,'20 DEC 1888',2410992,0,77,'c2e7d9817e1690352c6bf2da24','E0085','2012-06-10 22:25:17.344805','1969-12-31 19:00:00',NULL,0,NULL,5,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,20,7,1965,0,0,0,0,0,'20 JUL 1965',2438962,0,78,'c2e7d98144637538c4bc54b5853','E0038','2012-06-10 22:25:17.349244','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,7,1915,0,0,0,0,0,'JUL 1915',2420680,0,79,'c2e7d9811e3a2a2c4e47e5c1a7','E0018','2012-06-10 22:25:17.367202','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1954,0,0,0,0,0,'1954',2434744,0,80,'c2e7d98157245ed5085594588c9','E0051','2012-06-10 22:25:15.455248','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,81,'c2e7d9803823a3b1415bfb65293','E0007','2012-06-10 22:25:15.473450','1969-12-31 19:00:00',NULL,0,NULL,47,'Hyannis, MA',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,6,5,1924,0,0,0,0,0,'6 MAY 1924',2423912,0,82,'c2e7d98147223b844cac979c110','E0040','2012-06-10 22:25:17.503107','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,26,9,1961,0,0,0,0,0,'26 SEP 1961',2437569,0,83,'c2e7d9817176ac23cc6bbd8dde8','E0067','2012-06-10 22:25:15.487686','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,84,'c2e7d9817c96bd4f7fed7582b73','E0081','2012-06-10 22:25:15.490701','1969-12-31 19:00:00',NULL,0,NULL,47,'Duganstown, Ireland',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,25,11,1960,0,0,0,0,0,'25 NOV 1960',2437264,0,85,'c2e7d9819222c125c85eccd24cd','E0115','2012-06-10 22:25:17.522650','1969-12-31 19:00:00',NULL,0,NULL,4,'',7); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,86,'c2e7d9813d47532ba58297c4cb5','E0033','2012-06-10 22:25:15.499524','1969-12-31 19:00:00',NULL,0,NULL,27,'III',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,22,9,1872,0,0,0,0,0,'22 SEP 1872',2405059,0,87,'c2e7d981e7871b0349b4d8fd87a','E0141','2012-06-10 22:25:17.530109','1969-12-31 19:00:00',NULL,0,NULL,37,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,88,'c2e7d98180662a977b687755898','E0089','2012-06-10 22:25:15.513017','1969-12-31 19:00:00',NULL,0,NULL,27,'III',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,89,'c2e7d9817f744fd720533203ceb','E0088','2012-06-10 22:25:15.515900','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,90,'c2e7d9818cb67ecab5d99e57b6a','E0106','2012-06-10 22:25:15.519250','1969-12-31 19:00:00',NULL,0,NULL,47,'In 1955 Jackie suffered a miscarriage',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1823,0,0,0,0,0,'1823',2386897,0,91,'c2e7d9817ac52515d08d04c374f','E0077','2012-06-10 22:25:17.562671','1969-12-31 19:00:00',NULL,0,NULL,4,'',4); -INSERT INTO "grampsdb_event" VALUES(0,0,0,22,2,1932,0,0,0,0,0,'22 FEB 1932',2426760,0,92,'c2e7d9816c73db8348b0c6b01fb','E0062','2012-06-10 22:25:17.566198','1969-12-31 19:00:00',NULL,0,NULL,4,'',12); -INSERT INTO "grampsdb_event" VALUES(0,0,0,28,9,1849,0,0,0,0,0,'28 SEP 1849',2396664,0,93,'c2e7d981dd14afab07b5fd2a825','E0137','2012-06-10 22:25:17.641756','1969-12-31 19:00:00',NULL,0,NULL,37,'',2); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,94,'c2e7d9811a1f15c8ca34e502e0','E0014','2012-06-10 22:25:15.540790','1969-12-31 19:00:00',NULL,0,NULL,18,'Dorchester High School, Sacred Heart Convent',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,29,5,1917,0,0,0,0,0,'29 MAY 1917',2421378,0,95,'c2e7d98185c6a8d02b66ba6720e','E0096','2012-06-10 22:25:17.646135','1969-12-31 19:00:00',NULL,0,NULL,4,'',12); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,96,'c2e7d98038670eda1681bfcb8ad','E0008','2012-06-10 22:25:15.543844','1969-12-31 19:00:00',NULL,0,NULL,47,'Palm Beach, FL',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,97,'c2e7d9817eb6481cbdcc5dd24f8','E0086','2012-06-10 22:25:17.650548','1969-12-31 19:00:00',NULL,0,NULL,11,'',18); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1954,0,0,0,0,0,'1954',2434744,0,98,'c2e7d9813d52bee4e492ba2245d','E0034','2012-06-10 22:25:15.548693','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,99,'c2e7d98124158abcb87753d2fe7','E0024','2012-06-10 22:25:15.551506','1969-12-31 19:00:00',NULL,0,NULL,47,'In 1941 she had a frontal lobotomy.',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,4,12,1852,0,0,0,0,0,'4 DEC 1852',2397827,0,100,'c2e7d9819c06483737f3aa7ec2b','E0121','2012-06-10 22:25:15.560545','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,7,1921,0,0,0,0,0,'JUL 1921',2422872,0,101,'c2e7d9813796e3316d81dfcdd9e','E0031','2012-06-10 22:25:17.715124','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,102,'c2e7d9818207e3cb8b4d457442f','E0093','2012-06-10 22:25:15.563568','1969-12-31 19:00:00',NULL,0,NULL,47,'East Hampton, NY',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,23,5,1994,0,0,0,0,0,'23 MAY 1994',2449496,0,103,'c2e7d9818bf1ac1f5e4218cc620','E0105','2012-06-10 22:25:17.719491','1969-12-31 19:00:00',NULL,0,NULL,11,'',3); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1928,0,0,0,0,0,'1928',2425247,0,104,'c2e7d9815222289d4718eaba123','E0046','2012-06-10 22:25:15.570853','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,2,8,1944,0,0,0,0,0,'2 AUG 1944',2431305,0,105,'c2e7d9811f13b0c22ee70ef397c','E0019','2012-06-10 22:25:17.858562','1969-12-31 19:00:00',NULL,0,NULL,5,'',28); -INSERT INTO "grampsdb_event" VALUES(0,0,0,6,5,1944,0,0,0,0,0,'6 MAY 1944',2431217,0,106,'c2e7d981c041fbc32870fde9054','E0130','2012-06-10 22:25:17.862619','1969-12-31 19:00:00',NULL,0,NULL,37,'',15); -INSERT INTO "grampsdb_event" VALUES(0,0,0,7,10,1914,0,0,0,0,0,'7 OCT 1914',2420413,0,107,'c2e7d981bed7518f36fe418885','E0129','2012-06-10 22:25:17.866555','1969-12-31 19:00:00',NULL,0,NULL,37,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,6,9,1888,0,0,0,0,0,'6 SEP 1888',2410887,0,108,'c2e7d98023657b23677fbf8708b','E0000','2012-06-10 22:25:17.871831','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,109,'c2e7d98171643772096e4ec7e6b','E0066','2012-06-10 22:25:15.589619','1969-12-31 19:00:00',NULL,0,NULL,27,'Jr.',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,110,'c2e7d98181a1af703aae68bfc02','E0092','2012-06-10 22:25:15.591208','1969-12-31 19:00:00',NULL,0,NULL,47,'Died of cancer.',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,111,'c2e7d9819212028f5946ff0297a','E0114','2012-06-10 22:25:15.595116','1969-12-31 19:00:00',NULL,0,NULL,27,'Jr.',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1887,0,0,0,0,0,'1887',2410273,0,112,'c2e7d981d927e174bbf58be9ef9','E0136','2012-06-10 22:25:15.596560','1969-12-31 19:00:00',NULL,0,NULL,37,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,113,'c2e7d9818d57be025a51badfef1','E0107','2012-06-10 22:25:15.598681','1969-12-31 19:00:00',NULL,0,NULL,47,'5th Avenue, NYC, NY',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,114,'c2e7d98038b786aea1f239427ad','E0009','2012-06-10 22:25:15.603978','1969-12-31 19:00:00',NULL,0,NULL,47,'Brookline, MA',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,22,11,1963,0,0,0,0,0,'22 NOV 1963',2438356,0,115,'c2e7d981866566a4046a200fbd6','E0097','2012-06-10 22:25:18.010725','1969-12-31 19:00:00',NULL,0,NULL,5,'',20); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,116,'c2e7d98188a772317c9793d7e06','E0102','2012-06-10 22:25:15.606867','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,2,1928,0,0,0,0,0,'FEB 1928',2425278,0,117,'c2e7d98165d4b33177f0bd1d90a','E0059','2012-06-10 22:25:18.076256','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,118,'c2e7d98029370e7f1d074cba5d8','E0003','2012-06-10 22:25:15.614676','1969-12-31 19:00:00',NULL,0,NULL,29,'Bank President, Ambassador',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1898,0,0,0,0,0,'1898',2414291,0,119,'c2e7d98196b2fcfe46d41cf065d','E0119','2012-06-10 22:25:15.618069','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,120,'c2e7d9812013868484116e993c3','E0021','2012-06-10 22:25:15.627524','1969-12-31 19:00:00',NULL,0,NULL,47,'He suffered 2 cases of Jaundice during his beginning years a',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,121,'c2e7d981a2b4b631e24f5b4dbd2','E0126','2012-06-10 22:25:15.633346','1969-12-31 19:00:00',NULL,0,NULL,29,'Clerk',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1952,0,0,0,0,0,'1952',2434013,0,122,'c2e7d98154417d3a553ba91a60d','E0048','2012-06-10 22:25:15.636053','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,123,'c2e7d9817602255a08a6ea423b0','E0074','2012-06-10 22:25:15.637655','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,2,1964,0,0,0,0,0,'FEB 1964',2438427,0,124,'c2e7d9814273d42ca42f86ef577','E0037','2012-06-10 22:25:18.229677','1969-12-31 19:00:00',NULL,0,NULL,4,'',7); -INSERT INTO "grampsdb_event" VALUES(0,0,0,9,8,1963,0,0,0,0,0,'9 AUG 1963',2438251,0,125,'c2e7d98194d1eccf69327f26868','E0118','2012-06-10 22:25:18.233207','1969-12-31 19:00:00',NULL,0,NULL,5,'',19); -INSERT INTO "grampsdb_event" VALUES(0,0,0,17,6,1950,0,0,0,0,0,'17 JUN 1950',2433450,0,126,'c2e7d981d054ac642daaf37186b','E0133','2012-06-10 22:25:18.236703','1969-12-31 19:00:00',NULL,0,NULL,37,'',1); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1955,0,0,0,0,0,'1955',2435109,0,127,'c2e7d98158e6819eaaca236503f','E0052','2012-06-10 22:25:15.643984','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,128,'c2e7d98187e764e03d39c6d1b8a','E0101','2012-06-10 22:25:15.645584','1969-12-31 19:00:00',NULL,0,NULL,47,'Later on in life he faced serious back surgery two times, on',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1953,0,0,0,0,0,'1953',2434379,0,129,'c2e7d98155a3067712c37754513','E0050','2012-06-10 22:25:15.647038','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,19,5,1994,0,0,0,0,0,'19 MAY 1994',2449492,0,130,'c2e7d9818b515b32829896bc927','E0104','2012-06-10 22:25:18.317389','1969-12-31 19:00:00',NULL,0,NULL,5,'',22); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,131,'c2e7d98179e21030dafd57451c8','E0076','2012-06-10 22:25:15.652485','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,6,6,1968,0,0,0,0,0,'6 JUN 1968',2440014,0,132,'c2e7d9814ea2a4dee17e4251acb','E0042','2012-06-10 22:25:18.321810','1969-12-31 19:00:00',NULL,0,NULL,5,'',8); -INSERT INTO "grampsdb_event" VALUES(0,0,0,18,7,1855,0,0,0,0,0,'18 JUL 1855',2398783,0,133,'c2e7d9819fc89cf81d325feca7','E0124','2012-06-10 22:25:18.325510','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,134,'c2e7d9816d64bd454c10afc290d','E0063','2012-06-10 22:25:15.661956','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,29,11,1958,0,0,0,0,0,'29 NOV 1958',2436537,0,135,'c2e7d981d6574ccc32392b62310','E0135','2012-06-10 22:25:15.663393','1969-12-31 19:00:00',NULL,0,NULL,37,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,136,'c2e7d98187c5f05a35bf4ae88bd','E0100','2012-06-10 22:25:15.664816','1969-12-31 19:00:00',NULL,0,NULL,18,'Choate, London Sch. Of Econ., Princeton, Harvard',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,10,12,1917,0,0,0,0,0,'10 DEC 1917',2421573,0,137,'c2e7d98128744b237bb0011aee2','E0025','2012-06-10 22:25:15.666260','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,12,9,1953,0,0,0,0,0,'12 SEP 1953',2434633,0,138,'c2e7d981e3b34419998c9467446','E0139','2012-06-10 22:25:18.366007','1969-12-31 19:00:00',NULL,0,NULL,37,'',11); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,139,'c2e7d98131f2561c50729351265','E0029','2012-06-10 22:25:15.674010','1969-12-31 19:00:00',NULL,0,NULL,27,'Jr.',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,140,'c2e7d9811ba63df6d641e1d6a43','E0016','2012-06-10 22:25:15.675445','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1965,0,0,0,0,0,'1965',2438762,0,141,'c2e7d981c864a7296a834610378','E0132','2012-06-10 22:25:15.685488','1969-12-31 19:00:00',NULL,0,NULL,43,'',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,142,'c2e7d9811ff7b8590e73e209d67','E0020','2012-06-10 22:25:15.690178','1969-12-31 19:00:00',NULL,0,NULL,18,'Harvard University, Harvard Law School',NULL); -INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1892,0,0,0,0,0,'1892',2412099,0,143,'c2e7d981a475bfe1cf7484fe831','E0128','2012-06-10 22:25:18.596689','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); -INSERT INTO "grampsdb_event" VALUES(0,0,0,4,6,1963,0,0,0,0,0,'4 JUN 1963',2438185,0,144,'c2e7d9815d1591c860096c3a0ff','E0055','2012-06-10 22:25:18.600956','1969-12-31 19:00:00',NULL,0,NULL,4,'',21); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,9,1960,0,0,0,0,0,'SEP 1960',2437179,0,1,'c30181e50a064dd1f9f','E0061','2012-06-18 21:44:21.757653','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,20,7,1965,0,0,0,0,0,'20 JUL 1965',2438962,0,2,'c30181e4c9e3e855a25','E0038','2012-06-18 21:44:21.764377','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1882,0,0,0,0,0,'1882',2408447,0,3,'c30181e5e323afd0bfd','E0142','2012-06-18 21:44:21.789782','1969-12-31 19:00:00',NULL,0,NULL,37,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,18,11,1969,0,0,0,0,0,'18 NOV 1969',2440544,0,4,'c30181e490e63a65a2b','E0001','2012-06-18 21:44:21.796095','1969-12-31 19:00:00',NULL,0,NULL,5,'',24); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,5,'c30181e52d46c97b1a7','E0087','2012-06-18 21:44:20.762290','1969-12-31 19:00:00',NULL,0,NULL,47,'Her death was caused by a cerebral hemorrhage.',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,6,'c30181e5201238e0923','E0072','2012-06-18 21:44:20.765538','1969-12-31 19:00:00',NULL,0,NULL,47,'Meridian St., East Boston, MA',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,7,9,1923,0,0,0,0,0,'7 SEP 1923',2423670,0,7,'c30181e4cd312bf0464','E0039','2012-06-18 21:44:20.775163','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,8,'c30181e53ca0183ef52','E0099','2012-06-18 21:44:20.786009','1969-12-31 19:00:00',NULL,0,NULL,29,'Senator',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,23,5,1953,0,0,0,0,0,'23 MAY 1953',2434521,0,9,'c30181e5a5642135eb7','E0131','2012-06-18 21:44:20.793225','1969-12-31 19:00:00',NULL,0,NULL,37,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,18,7,1855,0,0,0,0,0,'18 JUL 1855',2398783,0,10,'c30181e56793471789e','E0124','2012-06-18 21:44:22.296367','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,11,'c30181e4a5907033f73','E0021','2012-06-18 21:44:20.814667','1969-12-31 19:00:00',NULL,0,NULL,47,'He suffered 2 cases of Jaundice during his beginning years a',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,12,'c30181e49e96cfc38b4','E0015','2012-06-18 21:44:20.820795','1969-12-31 19:00:00',NULL,0,NULL,47,'Died of complications due to pneumonia. ',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,13,'c30181e4a572e8cf3d4','E0020','2012-06-18 21:44:20.823482','1969-12-31 19:00:00',NULL,0,NULL,18,'Harvard University, Harvard Law School',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,14,'c30181e54f90315f1d4','E0114','2012-06-18 21:44:20.826966','1969-12-31 19:00:00',NULL,0,NULL,27,'Jr.',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,15,'c30181e495838a24851','E0008','2012-06-18 21:44:20.836996','1969-12-31 19:00:00',NULL,0,NULL,47,'Palm Beach, FL',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,16,'c30181e49357f186999','E0005','2012-06-18 21:44:20.851765','1969-12-31 19:00:00',NULL,0,NULL,47,'Joe Kennedy was a very hard worker, which often deteriorated',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,9,8,1851,0,0,0,0,0,'9 AUG 1851',2397344,0,17,'c30181e55d635228327','E0120','2012-06-18 21:44:22.473826','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,18,'c30181e49532f09b472','E0006','2012-06-18 21:44:20.872067','1969-12-31 19:00:00',NULL,0,NULL,47,'Bronxville, MA',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,22,11,1963,0,0,0,0,0,'22 NOV 1963',2438356,0,19,'c30181e53a658b4c1bf','E0097','2012-06-18 21:44:22.592511','1969-12-31 19:00:00',NULL,0,NULL,5,'',22); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,7,1921,0,0,0,0,0,'JUL 1921',2422872,0,20,'c30181e4b920f747399','E0031','2012-06-18 21:44:22.598861','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,4,1,1854,0,0,0,0,0,'4 JAN 1854',2398223,0,21,'c30181e563c0d2c5580','E0122','2012-06-18 21:44:22.606809','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,22,'c30181e527b60dc98cb','E0079','2012-06-18 21:44:20.894569','1969-12-31 19:00:00',NULL,0,NULL,29,'Cooper, Ward Boss',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,10,12,1917,0,0,0,0,0,'10 DEC 1917',2421573,0,23,'c30181e4ae116d472bf','E0025','2012-06-18 21:44:20.899406','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,3,1960,0,0,0,0,0,'MAR 1960',2436995,0,24,'c30181e515c701f2a9a','E0065','2012-06-18 21:44:20.917350','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,23,5,1994,0,0,0,0,0,'23 MAY 1994',2449496,0,25,'c30181e544122208a82','E0105','2012-06-18 21:44:22.720724','1969-12-31 19:00:00',NULL,0,NULL,11,'',28); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,26,'c30181e54ce07185a6d','E0112','2012-06-18 21:44:20.927982','1969-12-31 19:00:00',NULL,0,NULL,18,'Brearly School',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,7,8,1963,0,0,0,0,0,'7 AUG 1963',2438249,0,27,'c30181e553a4c54640e','E0117','2012-06-18 21:44:22.818986','1969-12-31 19:00:00',NULL,0,NULL,4,'',1); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,28,'c30181e5144566a50dd','E0064','2012-06-18 21:44:20.943161','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,10,9,1944,0,0,0,0,0,'10 SEP 1944',2431344,0,29,'c30181e4ae46030da52','E0026','2012-06-18 21:44:22.881614','1969-12-31 19:00:00',NULL,0,NULL,5,'',17); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,30,'c30181e4c1f29b24811','E0036','2012-06-18 21:44:20.950628','1969-12-31 19:00:00',NULL,0,NULL,18,'Georgetown University',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,31,'c30181e4deb39027837','E0045','2012-06-18 21:44:20.953237','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,13,5,1948,0,0,0,0,0,'13 MAY 1948',2432685,0,32,'c30181e4b1c29fafe65','E0028','2012-06-18 21:44:23.038433','1969-12-31 19:00:00',NULL,0,NULL,5,'',9); +INSERT INTO "grampsdb_event" VALUES(0,0,0,12,9,1953,0,0,0,0,0,'12 SEP 1953',2434633,0,33,'c30181e5da829af2ca6','E0139','2012-06-18 21:44:23.153200','1969-12-31 19:00:00',NULL,0,NULL,37,'',26); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,34,'c30181e50523c42e733','E0060','2012-06-18 21:44:20.975209','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,35,'c30181e53e92c5dabfc','E0102','2012-06-18 21:44:20.977828','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1920,0,0,0,0,0,'1920',2422325,0,36,'c30181e4b09236f6b4f','E0027','2012-06-18 21:44:23.189914','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,28,7,1929,0,0,0,0,0,'28 JUL 1929',2425821,0,37,'c30181e54202bb27193','E0103','2012-06-18 21:44:23.252738','1969-12-31 19:00:00',NULL,0,NULL,4,'',2); +INSERT INTO "grampsdb_event" VALUES(0,0,0,25,11,1960,0,0,0,0,0,'25 NOV 1960',2437264,0,38,'c30181e54fa50dab2cb','E0115','2012-06-18 21:44:23.260499','1969-12-31 19:00:00',NULL,0,NULL,4,'',8); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,39,'c30181e4a684a1c97e6','E0022','2012-06-18 21:44:20.999798','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,9,11,1915,0,0,0,0,0,'9 NOV 1915',2420811,0,40,'c30181e4b677626cfaf','E0030','2012-06-18 21:44:23.268274','1969-12-31 19:00:00',NULL,0,NULL,4,'',12); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,9,1918,0,0,0,0,0,'SEP 1918',2421838,0,41,'c30181e4a981cd9203d','E0023','2012-06-18 21:44:23.276049','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,19,5,1994,0,0,0,0,0,'19 MAY 1994',2449492,0,42,'c30181e54312e09f62c','E0104','2012-06-18 21:44:23.282467','1969-12-31 19:00:00',NULL,0,NULL,5,'',15); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1955,0,0,0,0,0,'1955',2435109,0,43,'c30181e4ed0653b7724','E0052','2012-06-18 21:44:21.016759','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,22,11,1858,0,0,0,0,0,'22 NOV 1858',2400006,0,44,'c30181e52652698fe9a','E0078','2012-06-18 21:44:23.290437','1969-12-31 19:00:00',NULL,0,NULL,5,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,45,'c30181e52d8430abe8c','E0088','2012-06-18 21:44:21.028203','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1956,0,0,0,0,0,'1956',2435474,0,46,'c30181e5be86d525dd1','E0134','2012-06-18 21:44:21.039482','1969-12-31 19:00:00',NULL,0,NULL,37,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,47,'c30181e4e8253e73044','E0049','2012-06-18 21:44:21.050752','1969-12-31 19:00:00',NULL,0,NULL,27,'Jr.',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,6,9,1888,0,0,0,0,0,'6 SEP 1888',2410887,0,48,'c30181e48fa5fe28ce0','E0000','2012-06-18 21:44:23.302739','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,49,'c30181e4b66345094be','E0029','2012-06-18 21:44:21.056014','1969-12-31 19:00:00',NULL,0,NULL,27,'Jr.',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1883,0,0,0,0,0,'1883',2408812,0,50,'c30181e5deb6f4dfa25','E0140','2012-06-18 21:44:23.310694','1969-12-31 19:00:00',NULL,0,NULL,37,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,51,'c30181e4a302228cf9f','E0017','2012-06-18 21:44:21.061223','1969-12-31 19:00:00',NULL,0,NULL,27,'Jr.',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,52,'c30181e53d124aa18ae','E0101','2012-06-18 21:44:21.064964','1969-12-31 19:00:00',NULL,0,NULL,47,'Later on in life he faced serious back surgery two times, on',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,53,'c30181e4920149cccea','E0002','2012-06-18 21:44:23.321373','1969-12-31 19:00:00',NULL,0,NULL,11,'',25); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1957,0,0,0,0,0,'1957',2435840,0,54,'c30181e4ef818f24294','E0053','2012-06-18 21:44:21.084181','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,55,'c30181e493079f99e2a','E0003','2012-06-18 21:44:21.095122','1969-12-31 19:00:00',NULL,0,NULL,29,'Bank President, Ambassador',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,56,'c30181e54d0497d16d4','E0113','2012-06-18 21:44:21.097888','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1821,0,0,0,0,0,'1821',2386167,0,57,'c30181e52ad6d99c52f','E0084','2012-06-18 21:44:21.108980','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,58,'c30181e53cc57040c7d','E0100','2012-06-18 21:44:21.114981','1969-12-31 19:00:00',NULL,0,NULL,18,'Choate, London Sch. Of Econ., Princeton, Harvard',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,59,'c30181e545566960e64','E0106','2012-06-18 21:44:21.118432','1969-12-31 19:00:00',NULL,0,NULL,47,'In 1955 Jackie suffered a miscarriage',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,4,7,1951,0,0,0,0,0,'4 JUL 1951',2433832,0,60,'c30181e4e363414c7c1','E0047','2012-06-18 21:44:21.125498','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,61,'c30181e4bde1ec9d6c8','E0033','2012-06-18 21:44:21.128784','1969-12-31 19:00:00',NULL,0,NULL,27,'III',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,62,'c30181e4de954e9bdfa','E0044','2012-06-18 21:44:21.139054','1969-12-31 19:00:00',NULL,0,NULL,47,'Hickory Hill',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,2,8,1944,0,0,0,0,0,'2 AUG 1944',2431305,0,63,'c30181e4a443edd4b23','E0019','2012-06-18 21:44:23.623938','1969-12-31 19:00:00',NULL,0,NULL,5,'',18); +INSERT INTO "grampsdb_event" VALUES(0,0,0,24,9,1855,0,0,0,0,0,'24 SEP 1855',2398851,0,64,'c30181e564f18b5ef65','E0123','2012-06-18 21:44:21.147210','1969-12-31 19:00:00',NULL,0,NULL,5,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,65,'c30181e523b38d05f0d','E0076','2012-06-18 21:44:21.150402','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,66,'c30181e4955398370e1','E0007','2012-06-18 21:44:21.153770','1969-12-31 19:00:00',NULL,0,NULL,47,'Hyannis, MA',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,2,1964,0,0,0,0,0,'FEB 1964',2438427,0,67,'c30181e4c6a044bb732','E0037','2012-06-18 21:44:23.639251','1969-12-31 19:00:00',NULL,0,NULL,4,'',8); +INSERT INTO "grampsdb_event" VALUES(0,0,0,4,12,1852,0,0,0,0,0,'4 DEC 1852',2397827,0,68,'c30181e561012d82b9a','E0121','2012-06-18 21:44:21.160301','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,69,'c30181e56cd4bc40ebb','E0126','2012-06-18 21:44:21.163623','1969-12-31 19:00:00',NULL,0,NULL,29,'Clerk',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,22,2,1932,0,0,0,0,0,'22 FEB 1932',2426760,0,70,'c30181e50f876ba04d0','E0062','2012-06-18 21:44:23.829599','1969-12-31 19:00:00',NULL,0,NULL,4,'',4); +INSERT INTO "grampsdb_event" VALUES(0,0,0,6,5,1944,0,0,0,0,0,'6 MAY 1944',2431217,0,71,'c30181e59de39a7ebd9','E0130','2012-06-18 21:44:23.835931','1969-12-31 19:00:00',NULL,0,NULL,37,'',6); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,72,'c30181e52877569cf7d','E0081','2012-06-18 21:44:21.209633','1969-12-31 19:00:00',NULL,0,NULL,47,'Duganstown, Ireland',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1953,0,0,0,0,0,'1953',2434379,0,73,'c30181e4e830d05a844','E0050','2012-06-18 21:44:21.213950','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,74,'c30181e4c063f49fa0e','E0035','2012-06-18 21:44:21.217284','1969-12-31 19:00:00',NULL,0,NULL,29,'Actor',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,75,'c30181e56e74431e058','E0127','2012-06-18 21:44:21.224773','1969-12-31 19:00:00',NULL,0,NULL,29,'Teamster',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,7,10,1914,0,0,0,0,0,'7 OCT 1914',2420413,0,76,'c30181e59b8619ed053','E0129','2012-06-18 21:44:24.104399','1969-12-31 19:00:00',NULL,0,NULL,37,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,20,12,1888,0,0,0,0,0,'20 DEC 1888',2410992,0,77,'c30181e52b13a1f45ce','E0085','2012-06-18 21:44:24.110880','1969-12-31 19:00:00',NULL,0,NULL,5,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,22,1,1995,0,0,0,0,0,'22 JAN 1995',2449740,0,78,'c30181e49c02e640850','E0012','2012-06-18 21:44:24.117308','1969-12-31 19:00:00',NULL,0,NULL,5,'',3); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,79,'c30181e51eb44bbfa38','E0071','2012-06-18 21:44:21.254804','1969-12-31 19:00:00',NULL,0,NULL,29,'Dockhand, Saloonkeeper, Senator, Bank President',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,80,'c30181e52f363dad054','E0089','2012-06-18 21:44:21.258026','1969-12-31 19:00:00',NULL,0,NULL,27,'III',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1958,0,0,0,0,0,'1958',2436205,0,81,'c30181e4f2130ab6455','E0054','2012-06-18 21:44:21.264382','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,82,'c30181e53607e649aa7','E0095','2012-06-18 21:44:21.267919','1969-12-31 19:00:00',NULL,0,NULL,29,'Mayor',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1928,0,0,0,0,0,'1928',2425247,0,83,'c30181e4e1e16f54c21','E0046','2012-06-18 21:44:21.271256','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1887,0,0,0,0,0,'1887',2410273,0,84,'c30181e5c8132d134d5','E0136','2012-06-18 21:44:21.274410','1969-12-31 19:00:00',NULL,0,NULL,37,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,85,'c30181e4bb174a634aa','E0032','2012-06-18 21:44:21.297787','1969-12-31 19:00:00',NULL,0,NULL,47,'Timberlawn, MD',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,2,1928,0,0,0,0,0,'FEB 1928',2425278,0,86,'c30181e50405aafa5a6','E0059','2012-06-18 21:44:24.224140','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,87,'c30181e518340c98032','E0066','2012-06-18 21:44:21.309222','1969-12-31 19:00:00',NULL,0,NULL,27,'Jr.',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,6,1942,0,0,0,0,0,'JUN 1942',2430512,0,88,'c30181e5e5600db124c','E0143','2012-06-18 21:44:21.312678','1969-12-31 19:00:00',NULL,0,NULL,37,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,89,'c30181e5322450c2a87','E0093','2012-06-18 21:44:21.335956','1969-12-31 19:00:00',NULL,0,NULL,47,'East Hampton, NY',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,90,'c30181e4aa919d6530f','E0024','2012-06-18 21:44:21.363895','1969-12-31 19:00:00',NULL,0,NULL,47,'In 1941 she had a frontal lobotomy.',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1892,0,0,0,0,0,'1892',2412099,0,91,'c30181e570004477f62','E0128','2012-06-18 21:44:24.513752','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,92,'c30181e5318307e4770','E0092','2012-06-18 21:44:21.382197','1969-12-31 19:00:00',NULL,0,NULL,47,'Died of cancer.',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,93,'c30181e56b537b4e14e','E0125','2012-06-18 21:44:21.395710','1969-12-31 19:00:00',NULL,0,NULL,29,'Janitor',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,5,1929,0,0,0,0,0,'MAY 1929',2425733,0,94,'c30181e51e8398aa506','E0070','2012-06-18 21:44:21.398389','1969-12-31 19:00:00',NULL,0,NULL,5,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,27,11,1957,0,0,0,0,0,'27 NOV 1957',2436170,0,95,'c30181e54aa5b523b42','E0110','2012-06-18 21:44:24.524709','1969-12-31 19:00:00',NULL,0,NULL,4,'',11); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1954,0,0,0,0,0,'1954',2434744,0,96,'c30181e4eaa2aab1ef6','E0051','2012-06-18 21:44:21.416723','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,22,9,1872,0,0,0,0,0,'22 SEP 1872',2405059,0,97,'c30181e5e0f09d98977','E0141','2012-06-18 21:44:24.645252','1969-12-31 19:00:00',NULL,0,NULL,37,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,98,'c30181e547331deddc7','E0109','2012-06-18 21:44:21.433421','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1923,0,0,0,0,0,'1923',2423421,0,99,'c30181e52374c774380','E0075','2012-06-18 21:44:21.436065','1969-12-31 19:00:00',NULL,0,NULL,5,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,100,'c30181e53082307d401','E0091','2012-06-18 21:44:24.907242','1969-12-31 19:00:00',NULL,0,NULL,11,'',27); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,8,1957,0,0,0,0,0,'AUG 1957',2436052,0,101,'c30181e52f4350e465c','E0090','2012-06-18 21:44:24.913590','1969-12-31 19:00:00',NULL,0,NULL,5,'',20); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1898,0,0,0,0,0,'1898',2414291,0,102,'c30181e557e06f2f3e5','E0119','2012-06-18 21:44:21.450826','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,14,1,1858,0,0,0,0,0,'14 JAN 1858',2399694,0,103,'c30181e51d50d162470','E0069','2012-06-18 21:44:25.031564','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,104,'c30181e511012f2d9e2','E0063','2012-06-18 21:44:21.464764','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,105,'c30181e495f0e2da01f','E0010','2012-06-18 21:44:21.471653','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,13,12,1957,0,0,0,0,0,'13 DEC 1957',2436186,0,106,'c30181e54bc0339f003','E0111','2012-06-18 21:44:25.197402','1969-12-31 19:00:00',NULL,0,NULL,14,'',21); +INSERT INTO "grampsdb_event" VALUES(0,0,0,25,1,1995,0,0,0,0,0,'25 JAN 1995',2449743,0,107,'c30181e49d04103d518','E0013','2012-06-18 21:44:25.210703','1969-12-31 19:00:00',NULL,0,NULL,11,'',25); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1965,0,0,0,0,0,'1965',2438762,0,108,'c30181e5ac154320785','E0132','2012-06-18 21:44:21.496979','1969-12-31 19:00:00',NULL,0,NULL,43,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,8,1963,0,0,0,0,0,'AUG 1963',2438243,0,109,'c30181e51ae4c78f74e','E0068','2012-06-18 21:44:21.499596','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,110,'c30181e52073247f681','E0074','2012-06-18 21:44:21.505616','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,17,6,1950,0,0,0,0,0,'17 JUN 1950',2433450,0,111,'c30181e5b9225ec68fa','E0133','2012-06-18 21:44:25.223047','1969-12-31 19:00:00',NULL,0,NULL,37,'',16); +INSERT INTO "grampsdb_event" VALUES(0,0,0,12,12,1968,0,0,0,0,0,'12 DEC 1968',2440203,0,112,'c30181e4ff33f7570e6','E0058','2012-06-18 21:44:25.229407','1969-12-31 19:00:00',NULL,0,NULL,4,'',8); +INSERT INTO "grampsdb_event" VALUES(0,0,0,26,9,1961,0,0,0,0,0,'26 SEP 1961',2437569,0,113,'c30181e518446c9b16a','E0067','2012-06-18 21:44:21.520042','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,7,1940,0,0,0,0,0,'JUL 1940',2429812,0,114,'c30181e5d36233e4ced','E0138','2012-06-18 21:44:21.522690','1969-12-31 19:00:00',NULL,0,NULL,43,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,115,'c30181e528c44d39cf0','E0083','2012-06-18 21:44:21.525307','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,8,6,1968,0,0,0,0,0,'8 JUN 1968',2440016,0,116,'c30181e4dd20775aaf3','E0043','2012-06-18 21:44:25.326339','1969-12-31 19:00:00',NULL,0,NULL,11,'',28); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,117,'c30181e52897f795d4b','E0082','2012-06-18 21:44:21.548615','1969-12-31 19:00:00',NULL,0,NULL,47,'Liverpool St., East Boston, MA',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,29,5,1917,0,0,0,0,0,'29 MAY 1917',2421378,0,118,'c30181e53932ce5971d','E0096','2012-06-18 21:44:25.423310','1969-12-31 19:00:00',NULL,0,NULL,4,'',4); +INSERT INTO "grampsdb_event" VALUES(0,0,0,6,5,1924,0,0,0,0,0,'6 MAY 1924',2423912,0,119,'c30181e4cec197fdb51','E0040','2012-06-18 21:44:25.429673','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,120,'c30181e49e63995ac52','E0014','2012-06-18 21:44:21.558823','1969-12-31 19:00:00',NULL,0,NULL,18,'Dorchester High School, Sacred Heart Convent',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,4,6,1963,0,0,0,0,0,'4 JUN 1963',2438185,0,121,'c30181e4f4d5da3f0ad','E0055','2012-06-18 21:44:25.437702','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,122,'c30181e546d20ca6b5c','E0107','2012-06-18 21:44:21.569064','1969-12-31 19:00:00',NULL,0,NULL,47,'5th Avenue, NYC, NY',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,7,1915,0,0,0,0,0,'JUL 1915',2420680,0,123,'c30181e4a327ea5b833','E0018','2012-06-18 21:44:25.580032','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,20,11,1925,0,0,0,0,0,'20 NOV 1925',2424475,0,124,'c30181e4dad7ad287cd','E0041','2012-06-18 21:44:25.650012','1969-12-31 19:00:00',NULL,0,NULL,4,'',19); +INSERT INTO "grampsdb_event" VALUES(0,0,0,6,6,1968,0,0,0,0,0,'6 JUN 1968',2440014,0,125,'c30181e4dc041fa6f0d','E0042','2012-06-18 21:44:25.835347','1969-12-31 19:00:00',NULL,0,NULL,5,'',7); +INSERT INTO "grampsdb_event" VALUES(0,0,0,28,9,1849,0,0,0,0,0,'28 SEP 1849',2396664,0,126,'c30181e5ced2f26274b','E0137','2012-06-18 21:44:25.931151','1969-12-31 19:00:00',NULL,0,NULL,37,'',5); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,127,'c30181e55116d5da680','E0116','2012-06-18 21:44:21.598530','1969-12-31 19:00:00',NULL,0,NULL,18,'Brown Univ',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,24,3,1967,0,0,0,0,0,'24 MAR 1967',2439574,0,128,'c30181e4fba77152b03','E0057','2012-06-18 21:44:25.991495','1969-12-31 19:00:00',NULL,0,NULL,4,'',8); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,129,'c30181e52c37633e7f0','E0086','2012-06-18 21:44:25.997833','1969-12-31 19:00:00',NULL,0,NULL,11,'',13); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,130,'c30181e520403f6ea34','E0073','2012-06-18 21:44:21.637652','1969-12-31 19:00:00',NULL,0,NULL,47,'Webster St., Boston, MA',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,131,'c30181e495c6ea02d2c','E0009','2012-06-18 21:44:21.645016','1969-12-31 19:00:00',NULL,0,NULL,47,'Brookline, MA',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,132,'c30181e49fe1b46b996','E0016','2012-06-18 21:44:21.655291','1969-12-31 19:00:00',NULL,0,NULL,33,'Roman Catholic',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,9,1,1965,0,0,0,0,0,'9 JAN 1965',2438770,0,133,'c30181e4f83206b566d','E0056','2012-06-18 21:44:26.217127','1969-12-31 19:00:00',NULL,0,NULL,4,'',11); +INSERT INTO "grampsdb_event" VALUES(0,0,0,25,11,1963,0,0,0,0,0,'25 NOV 1963',2438359,0,134,'c30181e53b77b934368','E0098','2012-06-18 21:44:26.346839','1969-12-31 19:00:00',NULL,0,NULL,11,'',28); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1952,0,0,0,0,0,'1952',2434013,0,135,'c30181e4e5b140b3d57','E0048','2012-06-18 21:44:21.693025','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,136,'c30181e49331ac90378','E0004','2012-06-18 21:44:21.697075','1969-12-31 19:00:00',NULL,0,NULL,18,'Harvard Graduate',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,137,'c30181e546f01cfb4bc','E0108','2012-06-18 21:44:21.702368','1969-12-31 19:00:00',NULL,0,NULL,47,'Martha''s Vineyard ',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,9,8,1963,0,0,0,0,0,'9 AUG 1963',2438251,0,138,'c30181e554b7c4caa19','E0118','2012-06-18 21:44:26.570236','1969-12-31 19:00:00',NULL,0,NULL,5,'',10); +INSERT INTO "grampsdb_event" VALUES(0,0,0,22,7,1890,0,0,0,0,0,'22 JUL 1890',2411571,0,139,'c30181e49ad4f8c4c64','E0011','2012-06-18 21:44:26.576568','1969-12-31 19:00:00',NULL,0,NULL,4,'',14); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1823,0,0,0,0,0,'1823',2386897,0,140,'c30181e52544e118135','E0077','2012-06-18 21:44:26.608489','1969-12-31 19:00:00',NULL,0,NULL,4,'',23); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,141,'c30181e53451c401c12','E0094','2012-06-18 21:44:21.729485','1969-12-31 19:00:00',NULL,0,NULL,47,'Newport, RI',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,29,11,1958,0,0,0,0,0,'29 NOV 1958',2436537,0,142,'c30181e5c331bb7e885','E0135','2012-06-18 21:44:21.736598','1969-12-31 19:00:00',NULL,0,NULL,37,'',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,0,0,0,0,0,0,'',0,0,143,'c30181e527d3745b60c','E0080','2012-06-18 21:44:21.745225','1969-12-31 19:00:00',NULL,0,NULL,47,'He died of an outbreak of Cholera.',NULL); +INSERT INTO "grampsdb_event" VALUES(0,0,0,0,0,1954,0,0,0,0,0,'1954',2434744,0,144,'c30181e4be1721dc6e8','E0034','2012-06-18 21:44:21.748072','1969-12-31 19:00:00',NULL,0,NULL,4,'',NULL); CREATE TABLE "grampsdb_repository" ( "id" integer NOT NULL PRIMARY KEY, "handle" varchar(19) NOT NULL UNIQUE, @@ -1217,34 +1310,34 @@ CREATE TABLE "grampsdb_place" ( "long" text NOT NULL, "lat" text NOT NULL ); -INSERT INTO "grampsdb_place" VALUES(1,'c2e7d981d0e488927236c973387','P0051','2012-06-10 22:25:15.056948','1969-12-31 19:00:00',NULL,0,NULL,'Greenwich, Connecticut','',''); -INSERT INTO "grampsdb_place" VALUES(2,'c2e7d981dd9253baf6f159c49f2','P0053','2012-06-10 22:25:15.067267','1969-12-31 19:00:00',NULL,0,NULL,'Holy Cross Cathedral, Boston, MA','',''); -INSERT INTO "grampsdb_place" VALUES(3,'c2e7d9814fe390d1a70b2005d49','P0023','2012-06-10 22:25:15.078304','1969-12-31 19:00:00',NULL,0,NULL,'Arlington National, VA','',''); -INSERT INTO "grampsdb_place" VALUES(4,'c2e7d9817b56533ae4b9d6d11eb','P0029','2012-06-10 22:25:15.105033','1969-12-31 19:00:00',NULL,0,NULL,'Dunganstown, Ireland','',''); -INSERT INTO "grampsdb_place" VALUES(5,'c2e7d9813316b941b6b0610ad09','P0017','2012-06-10 22:25:15.111985','1969-12-31 19:00:00',NULL,0,NULL,'Westminster, MD','',''); -INSERT INTO "grampsdb_place" VALUES(6,'c2e7d9811713280dcadd2246581','P0007','2012-06-10 22:25:15.130305','1969-12-31 19:00:00',NULL,0,NULL,'North End, Boston, MA','',''); -INSERT INTO "grampsdb_place" VALUES(7,'c2e7d98142f1ddd5ced580b8239','P0019','2012-06-10 22:25:15.238392','1969-12-31 19:00:00',NULL,0,NULL,'Washington, DC','',''); -INSERT INTO "grampsdb_place" VALUES(8,'c2e7d9814f277250b3d906813e7','P0021','2012-06-10 22:25:15.278217','1969-12-31 19:00:00',NULL,0,NULL,'Los Angeles, CA','',''); -INSERT INTO "grampsdb_place" VALUES(9,'c2e7d98190713f6bfce46bf4ec0','P0043','2012-06-10 22:25:15.328884','1969-12-31 19:00:00',NULL,0,NULL,'St. Patricks Cathedral','',''); -INSERT INTO "grampsdb_place" VALUES(10,'c2e7d98027539da81413f86db4b','P0003','2012-06-10 22:25:15.329601','1969-12-31 19:00:00',NULL,0,NULL,'Hyannis Port, MA','',''); -INSERT INTO "grampsdb_place" VALUES(11,'c2e7d981e443fc750f3a5523ae9','P0055','2012-06-10 22:25:15.330239','1969-12-31 19:00:00',NULL,0,NULL,'Newport, RI','',''); -INSERT INTO "grampsdb_place" VALUES(12,'c2e7d9816d024c64a018da9c8cb','P0027','2012-06-10 22:25:15.352136','1969-12-31 19:00:00',NULL,0,NULL,'Brookline, MA','',''); -INSERT INTO "grampsdb_place" VALUES(13,'c2e7d980290dfba8c6111d8681','P0005','2012-06-10 22:25:15.365059','1969-12-31 19:00:00',NULL,0,NULL,'Holyhood Cemetery, Brookline, MA ','',''); -INSERT INTO "grampsdb_place" VALUES(14,'c2e7d9818b348154106ceeca5d1','P0039','2012-06-10 22:25:15.382084','1969-12-31 19:00:00',NULL,0,NULL,'Southampton, Long Island, NY','',''); -INSERT INTO "grampsdb_place" VALUES(15,'c2e7d981c0c5c3a9a99860f9a42','P0049','2012-06-10 22:25:15.394642','1969-12-31 19:00:00',NULL,0,NULL,'London','',''); -INSERT INTO "grampsdb_place" VALUES(16,'c2e7d9811862333e940d3d36f6f','P0009','2012-06-10 22:25:15.395316','1969-12-31 19:00:00',NULL,0,NULL,'Hyannis Port, MA ','',''); -INSERT INTO "grampsdb_place" VALUES(17,'c2e7d98180f64cd92fbc10fe3ce','P0033','2012-06-10 22:25:15.421588','1969-12-31 19:00:00',NULL,0,NULL,'Lennox Hill Hosp., NY','',''); -INSERT INTO "grampsdb_place" VALUES(18,'c2e7d9817f378c2dec0ce4c8285','P0031','2012-06-10 22:25:15.422088','1969-12-31 19:00:00',NULL,0,NULL,'Cathedral Of The Holy Cross, MA','',''); -INSERT INTO "grampsdb_place" VALUES(19,'c2e7d9819556ab75cb9f638bd53','P0047','2012-06-10 22:25:15.434601','1969-12-31 19:00:00',NULL,0,NULL,'Boston, Mass','',''); -INSERT INTO "grampsdb_place" VALUES(20,'c2e7d98186e4f9c701b41a36a5f','P0037','2012-06-10 22:25:15.435265','1969-12-31 19:00:00',NULL,0,NULL,'Dallas, TX','',''); -INSERT INTO "grampsdb_place" VALUES(21,'c2e7d98025b73928981abcd464','P0001','2012-06-10 22:25:15.445343','1969-12-31 19:00:00',NULL,0,NULL,'Boston, MA','',''); -INSERT INTO "grampsdb_place" VALUES(22,'c2e7d9818be1696aedef5079ccc','P0041','2012-06-10 22:25:15.528339','1969-12-31 19:00:00',NULL,0,NULL,'NYC, NY','',''); -INSERT INTO "grampsdb_place" VALUES(23,'c2e7d9815f97082df4d525d64d5','P0025','2012-06-10 22:25:15.591831','1969-12-31 19:00:00',NULL,0,NULL,'New York','',''); -INSERT INTO "grampsdb_place" VALUES(24,'c2e7d98194b2b5bf5c886dd0f90','P0045','2012-06-10 22:25:15.607471','1969-12-31 19:00:00',NULL,0,NULL,'Otis Air Force B, Mass','',''); -INSERT INTO "grampsdb_place" VALUES(25,'c2e7d9812db79e50b2f4ba193b2','P0015','2012-06-10 22:25:15.609286','1969-12-31 19:00:00',NULL,0,NULL,'France','',''); -INSERT INTO "grampsdb_place" VALUES(26,'c2e7d981818e31aa2beb6bd794','P0035','2012-06-10 22:25:15.642658','1969-12-31 19:00:00',NULL,0,NULL,'St. Philomena''s Cemetery, NY','',''); -INSERT INTO "grampsdb_place" VALUES(27,'c2e7d9812997b0ded88d5487e0d','P0013','2012-06-10 22:25:15.672673','1969-12-31 19:00:00',NULL,0,NULL,'Belgium','',''); -INSERT INTO "grampsdb_place" VALUES(28,'c2e7d9811fd1330bccebd96b28e','P0011','2012-06-10 22:25:15.694017','1969-12-31 19:00:00',NULL,0,NULL,'Suffolk, England','',''); +INSERT INTO "grampsdb_place" VALUES(1,'c30181e5547507f1b95','P0045','2012-06-18 21:44:20.728523','1969-12-31 19:00:00',NULL,0,NULL,'Otis Air Force B, Mass','',''); +INSERT INTO "grampsdb_place" VALUES(2,'c30181e542e38adc7bc','P0039','2012-06-18 21:44:20.733113','1969-12-31 19:00:00',NULL,0,NULL,'Southampton, Long Island, NY','',''); +INSERT INTO "grampsdb_place" VALUES(3,'c30181e49ce5f2a3fda','P0009','2012-06-18 21:44:20.743906','1969-12-31 19:00:00',NULL,0,NULL,'Hyannis Port, MA ','',''); +INSERT INTO "grampsdb_place" VALUES(4,'c30181e51060e653e6b','P0027','2012-06-18 21:44:20.756204','1969-12-31 19:00:00',NULL,0,NULL,'Brookline, MA','',''); +INSERT INTO "grampsdb_place" VALUES(5,'c30181e5cfd64f937bc','P0053','2012-06-18 21:44:20.815759','1969-12-31 19:00:00',NULL,0,NULL,'Holy Cross Cathedral, Boston, MA','',''); +INSERT INTO "grampsdb_place" VALUES(6,'c30181e59ec2b05a236','P0049','2012-06-18 21:44:20.824536','1969-12-31 19:00:00',NULL,0,NULL,'London','',''); +INSERT INTO "grampsdb_place" VALUES(7,'c30181e4dcd1190d651','P0021','2012-06-18 21:44:20.889526','1969-12-31 19:00:00',NULL,0,NULL,'Los Angeles, CA','',''); +INSERT INTO "grampsdb_place" VALUES(8,'c30181e4c78043db2d4','P0019','2012-06-18 21:44:20.978891','1969-12-31 19:00:00',NULL,0,NULL,'Washington, DC','',''); +INSERT INTO "grampsdb_place" VALUES(9,'c30181e4b2d0157da9f','P0015','2012-06-18 21:44:20.994745','1969-12-31 19:00:00',NULL,0,NULL,'France','',''); +INSERT INTO "grampsdb_place" VALUES(10,'c30181e5558424036a8','P0047','2012-06-18 21:44:21.003619','1969-12-31 19:00:00',NULL,0,NULL,'Boston, Mass','',''); +INSERT INTO "grampsdb_place" VALUES(11,'c30181e4f9276a83b2a','P0025','2012-06-18 21:44:21.025802','1969-12-31 19:00:00',NULL,0,NULL,'New York','',''); +INSERT INTO "grampsdb_place" VALUES(12,'c30181e4b767a1ebf72','P0017','2012-06-18 21:44:21.062260','1969-12-31 19:00:00',NULL,0,NULL,'Westminster, MD','',''); +INSERT INTO "grampsdb_place" VALUES(13,'c30181e52d11a6229e5','P0031','2012-06-18 21:44:21.119693','1969-12-31 19:00:00',NULL,0,NULL,'Cathedral Of The Holy Cross, MA','',''); +INSERT INTO "grampsdb_place" VALUES(14,'c30181e49bc50d87f78','P0007','2012-06-18 21:44:21.144111','1969-12-31 19:00:00',NULL,0,NULL,'North End, Boston, MA','',''); +INSERT INTO "grampsdb_place" VALUES(15,'c30181e543f715bab9c','P0041','2012-06-18 21:44:21.176614','1969-12-31 19:00:00',NULL,0,NULL,'NYC, NY','',''); +INSERT INTO "grampsdb_place" VALUES(16,'c30181e5ba0351f4872','P0051','2012-06-18 21:44:21.198929','1969-12-31 19:00:00',NULL,0,NULL,'Greenwich, Connecticut','',''); +INSERT INTO "grampsdb_place" VALUES(17,'c30181e4af372d9e672','P0013','2012-06-18 21:44:21.241797','1969-12-31 19:00:00',NULL,0,NULL,'Belgium','',''); +INSERT INTO "grampsdb_place" VALUES(18,'c30181e4a5438ffb3b6','P0011','2012-06-18 21:44:21.306063','1969-12-31 19:00:00',NULL,0,NULL,'Suffolk, England','',''); +INSERT INTO "grampsdb_place" VALUES(19,'c30181e490b3eb730d1','P0001','2012-06-18 21:44:21.465837','1969-12-31 19:00:00',NULL,0,NULL,'Boston, MA','',''); +INSERT INTO "grampsdb_place" VALUES(20,'c30181e53050d991edb','P0033','2012-06-18 21:44:21.469184','1969-12-31 19:00:00',NULL,0,NULL,'Lennox Hill Hosp., NY','',''); +INSERT INTO "grampsdb_place" VALUES(21,'c30181e54cb0f1aa53b','P0043','2012-06-18 21:44:21.491905','1969-12-31 19:00:00',NULL,0,NULL,'St. Patricks Cathedral','',''); +INSERT INTO "grampsdb_place" VALUES(22,'c30181e53b478406597','P0037','2012-06-18 21:44:21.506713','1969-12-31 19:00:00',NULL,0,NULL,'Dallas, TX','',''); +INSERT INTO "grampsdb_place" VALUES(23,'c30181e52621c9d8854','P0029','2012-06-18 21:44:21.530190','1969-12-31 19:00:00',NULL,0,NULL,'Dunganstown, Ireland','',''); +INSERT INTO "grampsdb_place" VALUES(24,'c30181e491c448a8afd','P0003','2012-06-18 21:44:21.533308','1969-12-31 19:00:00',NULL,0,NULL,'Hyannis Port, MA','',''); +INSERT INTO "grampsdb_place" VALUES(25,'c30181e492e571baf78','P0005','2012-06-18 21:44:21.534167','1969-12-31 19:00:00',NULL,0,NULL,'Holyhood Cemetery, Brookline, MA ','',''); +INSERT INTO "grampsdb_place" VALUES(26,'c30181e5db73e334da0','P0055','2012-06-18 21:44:21.535053','1969-12-31 19:00:00',NULL,0,NULL,'Newport, RI','',''); +INSERT INTO "grampsdb_place" VALUES(27,'c30181e53140c06f148','P0035','2012-06-18 21:44:21.677969','1969-12-31 19:00:00',NULL,0,NULL,'St. Philomena''s Cemetery, NY','',''); +INSERT INTO "grampsdb_place" VALUES(28,'c30181e4ddf39eda033','P0023','2012-06-18 21:44:21.750000','1969-12-31 19:00:00',NULL,0,NULL,'Arlington National, VA','',''); CREATE TABLE "grampsdb_media_tags" ( "id" integer NOT NULL PRIMARY KEY, "media_id" integer NOT NULL, @@ -1297,245 +1390,195 @@ CREATE TABLE "grampsdb_note" ( "text" text NOT NULL, "preformatted" bool NOT NULL ); -INSERT INTO "grampsdb_note" VALUES(1,'c2e7d9817c55526722b5897e12a','N0038','2012-06-10 22:25:15.035821','1969-12-31 19:00:00',NULL,0,NULL,3,'The potato famine of 1845-48, plagued the country of Ireland and pushed many Irishmen to flee to the land of promise, the USA. Patrick Kennedy was among those to leave his home in Wexford County, Ireland, in 1848, in hopes of finding a better +INSERT INTO "grampsdb_note" VALUES(1,'c30181e53d42b157837','N0047','2012-06-18 21:44:20.725124','1969-12-31 19:00:00',NULL,0,NULL,3,'In 1960 he became President of the United States.',0); +INSERT INTO "grampsdb_note" VALUES(2,'c30181e527f79384805','N0038','2012-06-18 21:44:20.730854','1969-12-31 19:00:00',NULL,0,NULL,3,'The potato famine of 1845-48, plagued the country of Ireland and pushed many Irishmen to flee to the land of promise, the USA. Patrick Kennedy was among those to leave his home in Wexford County, Ireland, in 1848, in hopes of finding a better life in the US. Once he arrived in the US, he settled in East Boston, where he remained for the rest of his life.',0); -INSERT INTO "grampsdb_note" VALUES(2,'c2e7d981ac571aa49322c4b6412','N0060','2012-06-10 22:25:15.038979','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0004: +INSERT INTO "grampsdb_note" VALUES(3,'c30181e58a5668763f5','N0068','2012-06-18 21:44:20.736023','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: -Line ignored as not understood Line 701: 1 NAME New York Times, March 6, 1946. +Line ignored as not understood Line 716: 0 C1 CSTA +Skipped subordinate line Line 717: 1 NAME Twin ',0); -INSERT INTO "grampsdb_note" VALUES(3,'c2e7d981ab63c4bfc6b1ad335b2','N0059','2012-06-10 22:25:15.047504','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0003: +INSERT INTO "grampsdb_note" VALUES(4,'c30181e536300087061','N0045','2012-06-18 21:44:20.741655','1969-12-31 19:00:00',NULL,0,NULL,3,'He was known as "Honey Fitz".',0); +INSERT INTO "grampsdb_note" VALUES(5,'c30181e545b25b031d6','N0053','2012-06-18 21:44:20.745928','1969-12-31 19:00:00',NULL,0,NULL,3,'Before marrying JFK, Jackie worked as a photo journalist in Washington DC.',0); +INSERT INTO "grampsdb_note" VALUES(6,'c30181e4baa1f6209f3','N0023','2012-06-18 21:44:20.770272','1969-12-31 19:00:00',NULL,0,NULL,3,'She ran a summer home for retarded children.',0); +INSERT INTO "grampsdb_note" VALUES(7,'c30181e57ba3fde82f0','N0059','2012-06-18 21:44:20.777752','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0003: Line ignored as not understood Line 699: 1 NAME New York Times, March 4, 1946, pp. 1,3. ',0); -INSERT INTO "grampsdb_note" VALUES(4,'c2e7d98175285db77279797c28','N0033','2012-06-10 22:25:15.055643','1969-12-31 19:00:00',NULL,0,NULL,3,'As a young man, Patrick dropped out of school to work on the docks of Boston.',0); -INSERT INTO "grampsdb_note" VALUES(5,'c2e7d9818802e5e500e76024dbf','N0046','2012-06-10 22:25:15.062605','1969-12-31 19:00:00',NULL,0,NULL,3,'',0); -INSERT INTO "grampsdb_note" VALUES(6,'c2e7d9812465f7984cb185da276','N0015','2012-06-10 22:25:15.064514','1969-12-31 19:00:00',NULL,0,NULL,3,'She was born severely mentally retarded. For years her parents were ashamed of her and never told anyone about her problems.',0); -INSERT INTO "grampsdb_note" VALUES(7,'c2e7d981b7f533a7d7145101942','N0074','2012-06-10 22:25:15.070007','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: +INSERT INTO "grampsdb_note" VALUES(8,'c30181e57f108e3c511','N0061','2012-06-18 21:44:20.803024','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0005: + +Line ignored as not understood Line 703: 1 NAME New York World Telegram and Sun, Oct 11, 1957, pg. 1. +',0); +INSERT INTO "grampsdb_note" VALUES(9,'c30181e52d678793d34','N0041','2012-06-18 21:44:20.808195','1969-12-31 19:00:00',NULL,0,NULL,3,'After her husband died, she opened up a "Notions Shop" to provide for her family.',0); +INSERT INTO "grampsdb_note" VALUES(10,'c30181e51fb7989d62e','N0035','2012-06-18 21:44:20.832841','1969-12-31 19:00:00',NULL,0,NULL,3,'Patrick later became a very successful businessman getting into wholesale liquor sales, owning a coal company and becoming the president of a bank.',0); +INSERT INTO "grampsdb_note" VALUES(11,'c30181e590474b2c67e','N0074','2012-06-18 21:44:20.839621','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: Line ignored as not understood Line 728: 0 C7 CSTA Skipped subordinate line Line 729: 1 NAME Adopted Twin ',0); -INSERT INTO "grampsdb_note" VALUES(8,'c2e7d98188924cabda321db84ba','N0050','2012-06-10 22:25:15.075601','1969-12-31 19:00:00',NULL,0,NULL,3,'He was assassinated in Dallas, TX.',0); -INSERT INTO "grampsdb_note" VALUES(9,'c2e7d981a9742ee5f69a83ea6d6','N0057','2012-06-10 22:25:15.079606','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0001: +INSERT INTO "grampsdb_note" VALUES(12,'c30181e4b3565158156','N0019','2012-06-18 21:44:20.854076','1969-12-31 19:00:00',NULL,0,NULL,3,'Served with the Red Cross in England during the war.',0); +INSERT INTO "grampsdb_note" VALUES(13,'c30181e57824861d37c','N0057','2012-06-18 21:44:20.866193','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0001: Line ignored as not understood Line 695: 1 NAME Joseph P. Kennedy, A Life and Times, by David E. Koskoff. ',0); -INSERT INTO "grampsdb_note" VALUES(10,'c2e7d9816d43190e4a6c955092a','N0031','2012-06-10 22:25:15.087070','1969-12-31 19:00:00',NULL,0,NULL,3,'Was known as "Teddy".',0); -INSERT INTO "grampsdb_note" VALUES(11,'c2e7d981b2a15db832f02051586','N0065','2012-06-10 22:25:15.089231','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0009: - -Line ignored as not understood Line 711: 1 NAME Harrisburg Patriot News, 23 May 1994. -',0); -INSERT INTO "grampsdb_note" VALUES(12,'c2e7d9815004746bfffc2650c9e','N0027','2012-06-10 22:25:15.109386','1969-12-31 19:00:00',NULL,0,NULL,3,'Robert Francis was assassinated in California during his 1968 presidential campaign.',0); -INSERT INTO "grampsdb_note" VALUES(13,'c2e7d98037c6f173e34ba8aa0a9','N0004','2012-06-10 22:25:15.113129','1969-12-31 19:00:00',NULL,0,NULL,3,'He was fiercely proud of his family. He was quoted as having said his family was the finest thing in his life. ',0); -INSERT INTO "grampsdb_note" VALUES(14,'c2e7d98120a158f5708f62efcdb','N0013','2012-06-10 22:25:15.117175','1969-12-31 19:00:00',NULL,0,NULL,3,'He was known as Jack.',0); -INSERT INTO "grampsdb_note" VALUES(15,'c2e7d9817f64aed876e0b99404c','N0041','2012-06-10 22:25:15.122154','1969-12-31 19:00:00',NULL,0,NULL,3,'After her husband died, she opened up a "Notions Shop" to provide for her family.',0); -INSERT INTO "grampsdb_note" VALUES(16,'c2e7d981271720f4434c6db3d26','N0017','2012-06-10 22:25:15.135835','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0004: - -Empty note ignored Line 98: 1 NOTE -',0); -INSERT INTO "grampsdb_note" VALUES(17,'c2e7d9815033c3f2d05c7f1a982','N0028','2012-06-10 22:25:15.141609','1969-12-31 19:00:00',NULL,0,NULL,3,'He was very dedicated to his children and every evening had prayers with them, each of them saying the Rosary.',0); -INSERT INTO "grampsdb_note" VALUES(18,'c2e7d981b6f63b0a54f02886c0f','N0072','2012-06-10 22:25:15.146264','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: - -Line ignored as not understood Line 724: 0 C5 CSTA -Skipped subordinate line Line 725: 1 NAME Stillborn -',0); -INSERT INTO "grampsdb_note" VALUES(19,'c2e7d9811ad13d32faabb0ab30f','N0007','2012-06-10 22:25:15.149201','1969-12-31 19:00:00',NULL,0,NULL,3,'She graduated from high school, one of the three highest in a class of 285. She was then sent to finish school in Europe for two years.',0); -INSERT INTO "grampsdb_note" VALUES(20,'c2e7d9813349b015f3db31de2b','N0021','2012-06-10 22:25:15.156518','1969-12-31 19:00:00',NULL,0,NULL,3,'1972 was the vice presidential candidate.',0); -INSERT INTO "grampsdb_note" VALUES(21,'c2e7d9811d2773e6ea5cccef41d','N0010','2012-06-10 22:25:15.159813','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0002: +INSERT INTO "grampsdb_note" VALUES(14,'c30181e4cfe5d5e04bd','N0026','2012-06-18 21:44:20.876582','1969-12-31 19:00:00',NULL,0,NULL,3,'Was a help to her brother John F. during his political campaigns.',0); +INSERT INTO "grampsdb_note" VALUES(15,'c30181e4a1c203223e4','N0010','2012-06-18 21:44:20.880266','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0002: Empty note ignored Line 58: 1 NOTE Empty note ignored Line 60: 1 NOTE Empty note ignored Line 62: 1 NOTE ',0); -INSERT INTO "grampsdb_note" VALUES(22,'c2e7d9817c87e57a02eb5330d17','N0039','2012-06-10 22:25:15.164200','1969-12-31 19:00:00',NULL,0,NULL,3,'Upon Patrick''s arrival in Boston, he immediately became involved in politics. He was known as a Ward Boss in Boston, looking out for the other Irish immigrants and trying to improve the conditions in the community.',0); -INSERT INTO "grampsdb_note" VALUES(23,'c2e7d98147c625cf389af2f2e41','N0026','2012-06-10 22:25:15.166122','1969-12-31 19:00:00',NULL,0,NULL,3,'Was a help to her brother John F. during his political campaigns.',0); -INSERT INTO "grampsdb_note" VALUES(24,'c2e7d9817556015ad3b0c4eb845','N0034','2012-06-10 22:25:15.170746','1969-12-31 19:00:00',NULL,0,NULL,3,'Patrick was able to work his way from being a SaloonKeeper to becoming a Ward Boss, helping out other Irish immigrants. His popularity rose and at the age of thirty he had become a power in Boston politics. In 1892 and 1893 he was elected to -the Massachusetts Senate.',0); -INSERT INTO "grampsdb_note" VALUES(25,'c2e7d9802d7350857b331d1200f','N0001','2012-06-10 22:25:15.172668','1969-12-31 19:00:00',NULL,0,NULL,3,'He had an interesting hobby of tinkering with clocks.',0); -INSERT INTO "grampsdb_note" VALUES(26,'c2e7d9812e5666554debe8b2223','N0019','2012-06-10 22:25:15.195832','1969-12-31 19:00:00',NULL,0,NULL,3,'Served with the Red Cross in England during the war.',0); -INSERT INTO "grampsdb_note" VALUES(27,'c2e7d981b5878726b21eaed3d03','N0069','2012-06-10 22:25:15.211213','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: - -Line ignored as not understood Line 718: 0 C2 CSTA -Skipped subordinate line Line 719: 1 NAME Adopted -',0); -INSERT INTO "grampsdb_note" VALUES(28,'c2e7d9817d215fd0cc5541d6f7f','N0040','2012-06-10 22:25:15.269708','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0046: - -Empty note ignored Line 438: 1 NOTE -',0); -INSERT INTO "grampsdb_note" VALUES(29,'c2e7d981826c13718a9723ff14','N0044','2012-06-10 22:25:15.275731','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0048: - -Empty note ignored Line 473: 1 NOTE -',0); -INSERT INTO "grampsdb_note" VALUES(30,'c2e7d981b78d0d8b89584c4aff','N0073','2012-06-10 22:25:15.279720','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: +INSERT INTO "grampsdb_note" VALUES(16,'c30181e493f3a822d42','N0001','2012-06-18 21:44:20.901622','1969-12-31 19:00:00',NULL,0,NULL,3,'He had an interesting hobby of tinkering with clocks.',0); +INSERT INTO "grampsdb_note" VALUES(17,'c30181e494a061baf89','N0003','2012-06-18 21:44:20.908149','1969-12-31 19:00:00',NULL,0,NULL,3,'Was one of the youngest Bank Presidents in US history. ',0); +INSERT INTO "grampsdb_note" VALUES(18,'c30181e4946576246e7','N0002','2012-06-18 21:44:20.913549','1969-12-31 19:00:00',NULL,0,NULL,3,'Joe was a poor student, but good at athletics and had an attractive personality. He was able to overcome many ethnic barriers during his school years at Boston Latin, a protestant and primarily Yankee school.',0); +INSERT INTO "grampsdb_note" VALUES(19,'c30181e58f44efe4539','N0073','2012-06-18 21:44:20.922513','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: Line ignored as not understood Line 726: 0 C6 CSTA Skipped subordinate line Line 727: 1 NAME Foster ',0); -INSERT INTO "grampsdb_note" VALUES(31,'c2e7d981aec7b102455b8bf26fc','N0062','2012-06-10 22:25:15.283857','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0006: +INSERT INTO "grampsdb_note" VALUES(20,'c30181e53d36cc370d9','N0046','2012-06-18 21:44:20.939422','1969-12-31 19:00:00',NULL,0,NULL,3,'',0); +INSERT INTO "grampsdb_note" VALUES(21,'c30181e4b307c2eb2a0','N0018','2012-06-18 21:44:20.961754','1969-12-31 19:00:00',NULL,0,NULL,3,'Died in an airplane crash with her lover in France three years after her older brother Joseph''s death.',0); +INSERT INTO "grampsdb_note" VALUES(22,'c30181e4bcb3b5e1633','N0025','2012-06-18 21:44:20.981199','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0008: -Line ignored as not understood Line 705: 1 NAME The Kennedys Dynasty and Disaster 1848-1983, by John H. Davis. +Empty note ignored Line 146: 1 NOTE +Empty note ignored Line 148: 1 NOTE ',0); -INSERT INTO "grampsdb_note" VALUES(32,'c2e7d98188672ce8dcff5bc755b','N0049','2012-06-10 22:25:15.287990','1969-12-31 19:00:00',NULL,0,NULL,3,'He had personal finances that were estimated to be around $10 million while in the Presidency.',0); -INSERT INTO "grampsdb_note" VALUES(33,'c2e7d981517482dd27c7dcf26e4','N0029','2012-06-10 22:25:15.290292','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0021: - -Empty note ignored Line 237: 1 NOTE -',0); -INSERT INTO "grampsdb_note" VALUES(34,'c2e7d9812e060ddd2f5cfa8aa21','N0018','2012-06-10 22:25:15.293558','1969-12-31 19:00:00',NULL,0,NULL,3,'Died in an airplane crash with her lover in France three years after her older brother Joseph''s death.',0); -INSERT INTO "grampsdb_note" VALUES(35,'c2e7d98178f6b15a96bfcb1a419','N0037','2012-06-10 22:25:15.303231','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0044: - -Empty note ignored Line 402: 1 NOTE -Empty note ignored Line 405: 1 NOTE -Empty note ignored Line 407: 1 NOTE -',0); -INSERT INTO "grampsdb_note" VALUES(36,'c2e7d981884475a9a5f06186e07','N0048','2012-06-10 22:25:15.320181','1969-12-31 19:00:00',NULL,0,NULL,3,'He wrote 2 books, including "Profiles in Courage", which won him a Pulitzer Prize.',0); -INSERT INTO "grampsdb_note" VALUES(37,'c2e7d9811b37a0458124a2bffe6','N0008','2012-06-10 22:25:15.323051','1969-12-31 19:00:00',NULL,0,NULL,3,'She was courted by some of the finest young men, not only Boston''s Irish, but members of the English nobility as well.',0); -INSERT INTO "grampsdb_note" VALUES(38,'c2e7d98120319928652348bfd55','N0011','2012-06-10 22:25:15.332216','1969-12-31 19:00:00',NULL,0,NULL,3,'Joseph Patrick was well liked, quick to smile, and had a tremendous dose of Irish charm.',0); -INSERT INTO "grampsdb_note" VALUES(39,'c2e7d9818e9687a6690d12d5102','N0056','2012-06-10 22:25:15.339378','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0053: - -Empty note ignored Line 544: 1 NOTE -Empty note ignored Line 546: 1 NOTE -',0); -INSERT INTO "grampsdb_note" VALUES(40,'c2e7d981b487143f65969df856f','N0067','2012-06-10 22:25:15.362607','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0011: - -Line ignored as not understood Line 715: 1 NAME Harrisburg Patriot News, January 25, 1995. -',0); -INSERT INTO "grampsdb_note" VALUES(41,'c2e7d98121e651fcc66a36c7eac','N0014','2012-06-10 22:25:15.371233','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0003: - -Empty note ignored Line 82: 1 NOTE -Empty note ignored Line 84: 1 NOTE -',0); -INSERT INTO "grampsdb_note" VALUES(42,'c2e7d9818415869921ce53964d8','N0045','2012-06-10 22:25:15.409050','1969-12-31 19:00:00',NULL,0,NULL,3,'He was known as "Honey Fitz".',0); -INSERT INTO "grampsdb_note" VALUES(43,'c2e7d98181b5e340b797bb66b10','N0042','2012-06-10 22:25:15.412003','1969-12-31 19:00:00',NULL,0,NULL,3,'He was known as "Black Jack."',0); -INSERT INTO "grampsdb_note" VALUES(44,'c2e7d9816e81f3c1665f8818109','N0032','2012-06-10 22:25:15.418374','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0039: - -Empty note ignored Line 359: 1 NOTE -',0); -INSERT INTO "grampsdb_note" VALUES(45,'c2e7d98181e1f6c8392b19b48f9','N0043','2012-06-10 22:25:15.424726','1969-12-31 19:00:00',NULL,0,NULL,3,'He was known to drink alcohol excessively.',0); -INSERT INTO "grampsdb_note" VALUES(46,'c2e7d981aa614c3705f03cf00e','N0058','2012-06-10 22:25:15.428464','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0002: - -Line ignored as not understood Line 697: 1 NAME Rose, by Gail Cameron. -',0); -INSERT INTO "grampsdb_note" VALUES(47,'c2e7d98029e5777d56d7f5eac0c','N0000','2012-06-10 22:25:15.437050','1969-12-31 19:00:00',NULL,0,NULL,3,'From the time he was a school boy he was interested in making money.',0); -INSERT INTO "grampsdb_note" VALUES(48,'c2e7d9818d490cc09ea7f78684','N0055','2012-06-10 22:25:15.464516','1969-12-31 19:00:00',NULL,0,NULL,3,'She was said to be the only First Lady to resemble royalty. She shunned the media and never publicly discussed the assassination of JFK, how she felt about it, or the alleged affairs of her first husband.',0); -INSERT INTO "grampsdb_note" VALUES(49,'c2e7d9802fc6e2af2921c578d49','N0002','2012-06-10 22:25:15.467360','1969-12-31 19:00:00',NULL,0,NULL,3,'Joe was a poor student, but good at athletics and had an attractive personality. He was able to overcome many ethnic barriers during his school years at Boston Latin, a protestant and primarily Yankee school.',0); -INSERT INTO "grampsdb_note" VALUES(50,'c2e7d9813af6156bde2a80a5c56','N0023','2012-06-10 22:25:15.470149','1969-12-31 19:00:00',NULL,0,NULL,3,'She ran a summer home for retarded children.',0); -INSERT INTO "grampsdb_note" VALUES(51,'c2e7d9818805687906797423a9f','N0047','2012-06-10 22:25:15.475601','1969-12-31 19:00:00',NULL,0,NULL,3,'In 1960 he became President of the United States.',0); -INSERT INTO "grampsdb_note" VALUES(52,'c2e7d981ad51ba7e8c4708c3f7e','N0061','2012-06-10 22:25:15.479874','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0005: - -Line ignored as not understood Line 703: 1 NAME New York World Telegram and Sun, Oct 11, 1957, pg. 1. -',0); -INSERT INTO "grampsdb_note" VALUES(53,'c2e7d9818d147c3fbe39ef578c2','N0054','2012-06-10 22:25:15.508526','1969-12-31 19:00:00',NULL,0,NULL,3,'While dating JFK, Jackie did not want him to know that she was not rich and think that she was only marrying him for his money. So, she went to great lengths to appear rich.',0); -INSERT INTO "grampsdb_note" VALUES(54,'c2e7d981b4f62f77d122612b547','N0068','2012-06-10 22:25:15.524550','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: - -Line ignored as not understood Line 716: 0 C1 CSTA -Skipped subordinate line Line 717: 1 NAME Twin -',0); -INSERT INTO "grampsdb_note" VALUES(55,'c2e7d981b5f7199bcd53f2ab08f','N0070','2012-06-10 22:25:15.530971','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: - -Line ignored as not understood Line 720: 0 C3 CSTA -Skipped subordinate line Line 721: 1 NAME Illegitimate -',0); -INSERT INTO "grampsdb_note" VALUES(56,'c2e7d981b387f5f1bbff1ad45ab','N0066','2012-06-10 22:25:15.534055','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0010: - -Line ignored as not understood Line 713: 1 NAME CBS This Morning show. -',0); -INSERT INTO "grampsdb_note" VALUES(57,'c2e7d98124c346fe9febd7a80f1','N0016','2012-06-10 22:25:15.536959','1969-12-31 19:00:00',NULL,0,NULL,3,'In 1946 her father gave $600,000 for the construction of the Joseph P. Kennedy Jr. Convalescent Home for disadvantaged children, because of Rosemary''s condition.',0); -INSERT INTO "grampsdb_note" VALUES(58,'c2e7d9811b85bc82b85514f7706','N0009','2012-06-10 22:25:15.545099','1969-12-31 19:00:00',NULL,0,NULL,3,'She was very dedicated to her family, which was evident by the strong support she gave her sons in their political campaigns.',0); -INSERT INTO "grampsdb_note" VALUES(59,'c2e7d9818ce67b9d16993f502d','N0053','2012-06-10 22:25:15.552791','1969-12-31 19:00:00',NULL,0,NULL,3,'Before marrying JFK, Jackie worked as a photo journalist in Washington DC.',0); -INSERT INTO "grampsdb_note" VALUES(60,'c2e7d98189f70f172e912ff3957','N0051','2012-06-10 22:25:15.557431','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0052: - -Empty note ignored Line 518: 1 NOTE -Empty note ignored Line 520: 1 NOTE -Empty note ignored Line 522: 1 NOTE -',0); -INSERT INTO "grampsdb_note" VALUES(61,'c2e7d981b68425932471c84c258','N0071','2012-06-10 22:25:15.567707','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: +INSERT INTO "grampsdb_note" VALUES(23,'c30181e58d50a3973cd','N0071','2012-06-18 21:44:21.011320','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: Line ignored as not understood Line 722: 0 C4 CSTA Skipped subordinate line Line 723: 1 NAME Duplicate ',0); -INSERT INTO "grampsdb_note" VALUES(62,'c2e7d9818cc498db8ee3dea4138','N0052','2012-06-10 22:25:15.573371','1969-12-31 19:00:00',NULL,0,NULL,3,'',0); -INSERT INTO "grampsdb_note" VALUES(63,'c2e7d980468170d31685e92235c','N0005','2012-06-10 22:25:15.575432','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0001: +INSERT INTO "grampsdb_note" VALUES(24,'c30181e4acd32bde247','N0017','2012-06-18 21:44:21.019312','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0004: + +Empty note ignored Line 98: 1 NOTE +',0); +INSERT INTO "grampsdb_note" VALUES(25,'c30181e53db0178264b','N0048','2012-06-18 21:44:21.030426','1969-12-31 19:00:00',NULL,0,NULL,3,'He wrote 2 books, including "Profiles in Courage", which won him a Pulitzer Prize.',0); +INSERT INTO "grampsdb_note" VALUES(26,'c30181e4b517a24c01b','N0020','2012-06-18 21:44:21.034039','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0006: + +Empty note ignored Line 122: 1 NOTE +',0); +INSERT INTO "grampsdb_note" VALUES(27,'c30181e531b1962e79f','N0042','2012-06-18 21:44:21.041697','1969-12-31 19:00:00',NULL,0,NULL,3,'He was known as "Black Jack."',0); +INSERT INTO "grampsdb_note" VALUES(28,'c30181e54955cda4320','N0056','2012-06-18 21:44:21.045319','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0053: + +Empty note ignored Line 544: 1 NOTE +Empty note ignored Line 546: 1 NOTE +',0); +INSERT INTO "grampsdb_note" VALUES(29,'c30181e499704167c0b','N0005','2012-06-18 21:44:21.074428','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0001: Empty note ignored Line 26: 1 NOTE Empty note ignored Line 28: 1 NOTE Empty note ignored Line 30: 1 NOTE Empty note ignored Line 32: 1 NOTE ',0); -INSERT INTO "grampsdb_note" VALUES(64,'c2e7d9817594a0d00a51f363437','N0035','2012-06-10 22:25:15.579794','1969-12-31 19:00:00',NULL,0,NULL,3,'Patrick later became a very successful businessman getting into wholesale liquor sales, owning a coal company and becoming the president of a bank.',0); -INSERT INTO "grampsdb_note" VALUES(65,'c2e7d98120727d077fef968bbd9','N0012','2012-06-10 22:25:15.583359','1969-12-31 19:00:00',NULL,0,NULL,3,'He enlisted in the Navy during World War II, and died during a naval flight.',0); -INSERT INTO "grampsdb_note" VALUES(66,'c2e7d98036c6ae8226513082ccf','N0003','2012-06-10 22:25:15.592987','1969-12-31 19:00:00',NULL,0,NULL,3,'Was one of the youngest Bank Presidents in US history. ',0); -INSERT INTO "grampsdb_note" VALUES(67,'c2e7d98175c2d61569f78381d82','N0036','2012-06-10 22:25:15.611030','1969-12-31 19:00:00',NULL,0,NULL,3,'His personality was mild-mannered, quiet and reserved, and he was viewed as a man of moderate habits.',0); -INSERT INTO "grampsdb_note" VALUES(68,'c2e7d9813937f3aa990fe421c3b','N0022','2012-06-10 22:25:15.615958','1969-12-31 19:00:00',NULL,0,NULL,3,'She helped in the many political campaigns of her brother, John Fitzgerald.',0); -INSERT INTO "grampsdb_note" VALUES(69,'c2e7d9813c8242eeee978eadc2c','N0025','2012-06-10 22:25:15.620937','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0008: +INSERT INTO "grampsdb_note" VALUES(30,'c30181e4b792156d1dc','N0021','2012-06-18 21:44:21.079465','1969-12-31 19:00:00',NULL,0,NULL,3,'1972 was the vice presidential candidate.',0); +INSERT INTO "grampsdb_note" VALUES(31,'c30181e4de83804cdb2','N0028','2012-06-18 21:44:21.100167','1969-12-31 19:00:00',NULL,0,NULL,3,'He was very dedicated to his children and every evening had prayers with them, each of them saying the Rosary.',0); +INSERT INTO "grampsdb_note" VALUES(32,'c30181e4de1058fc8ef','N0027','2012-06-18 21:44:21.134078','1969-12-31 19:00:00',NULL,0,NULL,3,'Robert Francis was assassinated in California during his 1968 presidential campaign.',0); +INSERT INTO "grampsdb_note" VALUES(33,'c30181e51f513521e0b','N0034','2012-06-18 21:44:21.166711','1969-12-31 19:00:00',NULL,0,NULL,3,'Patrick was able to work his way from being a SaloonKeeper to becoming a Ward Boss, helping out other Irish immigrants. His popularity rose and at the age of thirty he had become a power in Boston politics. In 1892 and 1893 he was elected to +the Massachusetts Senate.',0); +INSERT INTO "grampsdb_note" VALUES(34,'c30181e51f056e1b07f','N0033','2012-06-18 21:44:21.173860','1969-12-31 19:00:00',NULL,0,NULL,3,'As a young man, Patrick dropped out of school to work on the docks of Boston.',0); +INSERT INTO "grampsdb_note" VALUES(35,'c30181e49fc547b92a6','N0009','2012-06-18 21:44:21.189726','1969-12-31 19:00:00',NULL,0,NULL,3,'She was very dedicated to her family, which was evident by the strong support she gave her sons in their political campaigns.',0); +INSERT INTO "grampsdb_note" VALUES(36,'c30181e58c50c783cc5','N0070','2012-06-18 21:44:21.194085','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: -Empty note ignored Line 146: 1 NOTE -Empty note ignored Line 148: 1 NOTE +Line ignored as not understood Line 720: 0 C3 CSTA +Skipped subordinate line Line 721: 1 NAME Illegitimate ',0); -INSERT INTO "grampsdb_note" VALUES(70,'c2e7d9816d241b53f482b98497b','N0030','2012-06-10 22:25:15.623957','1969-12-31 19:00:00',NULL,0,NULL,3,'Enlisted in the Navy during World War II.',0); -INSERT INTO "grampsdb_note" VALUES(71,'c2e7d981b191a44abef9463baad','N0064','2012-06-10 22:25:15.630233','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0008: +INSERT INTO "grampsdb_note" VALUES(37,'c30181e540a2e19ad0a','N0051','2012-06-18 21:44:21.202036','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0052: -Line ignored as not understood Line 709: 1 NAME New York Times, Nov. 22, 1963. +Empty note ignored Line 518: 1 NOTE +Empty note ignored Line 520: 1 NOTE +Empty note ignored Line 522: 1 NOTE ',0); -INSERT INTO "grampsdb_note" VALUES(72,'c2e7d9813b22ce4d81879099d8e','N0024','2012-06-10 22:25:15.655227','1969-12-31 19:00:00',NULL,0,NULL,3,'After her mother, Eunice was considered the family''s model woman.',0); -INSERT INTO "grampsdb_note" VALUES(73,'c2e7d9813067e03c20efb9e575c','N0020','2012-06-10 22:25:15.658798','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0006: +INSERT INTO "grampsdb_note" VALUES(38,'c30181e49f256308ece','N0007','2012-06-18 21:44:21.220096','1969-12-31 19:00:00',NULL,0,NULL,3,'She graduated from high school, one of the three highest in a class of 285. She was then sent to finish school in Europe for two years.',0); +INSERT INTO "grampsdb_note" VALUES(39,'c30181e580c172b9b4d','N0062','2012-06-18 21:44:21.233291','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0006: -Empty note ignored Line 122: 1 NOTE +Line ignored as not understood Line 705: 1 NAME The Kennedys Dynasty and Disaster 1848-1983, by John H. Davis. ',0); -INSERT INTO "grampsdb_note" VALUES(74,'c2e7d981b0262dd756d26ae93c4','N0063','2012-06-10 22:25:15.668950','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0007: +INSERT INTO "grampsdb_note" VALUES(40,'c30181e4aad15ee2787','N0015','2012-06-18 21:44:21.277133','1969-12-31 19:00:00',NULL,0,NULL,3,'She was born severely mentally retarded. For years her parents were ashamed of her and never told anyone about her problems.',0); +INSERT INTO "grampsdb_note" VALUES(41,'c30181e58e428977473','N0072','2012-06-18 21:44:21.284088','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: + +Line ignored as not understood Line 724: 0 C5 CSTA +Skipped subordinate line Line 725: 1 NAME Stillborn +',0); +INSERT INTO "grampsdb_note" VALUES(42,'c30181e58286298635f','N0063','2012-06-18 21:44:21.290838','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0007: Line ignored as not understood Line 707: 1 NAME Growing Up Kennedy, Harrison Raine and John Quinn. ',0); -INSERT INTO "grampsdb_note" VALUES(75,'c2e7d9811a83528a052fc9ccffb','N0006','2012-06-10 22:25:15.686765','1969-12-31 19:00:00',NULL,0,NULL,3,'She was considered the flower of Boston Irish society.',0); -INSERT INTO "grampsdb_note" VALUES(76,'c2ea2e7680b58d99355e521b943','N0075','2012-06-11 16:08:37.769654','2012-06-11 16:08:36.006871','admin',0,'KFMnYzJlYTJlNzY4MGI1OGQ5OTM1NWU1MjFiOTQzJwpWTjAwNzUKcDEKKGxwMgpWIkJyaWRnZXBv -cnQgTG9kZ2UsIE5vLiAxNjIsIEYuIGFuZCBBLiBNLiwgd2FzIGNoYXJ0ZXJlZCBNYXkgMjQsIDE4 -NTQsIEpvc2VwaCBILiBCYWxsYXJkLCBXLiBNLjsgTm9haCBSZWFnYW4sIFMuIFcuOyBTYW11ZWwg -Ry4gT3dlbiwgSi4gVy4gVGhlIHByZXNlbnQgb2ZmaWNlcnMgb2YgdGhlIGxvZGdlIGFyZSBIdW1w -aHJleSBGb3JzaGEsIFcuIE0uOyBQZXRlciBQLiBCbGFuaywgUy4gVy47IFdvb2Rmb3JkIFRob21w -c29uLCBKLiBXLjsgRGFuaWVsIEJyb2Fkd2F5LCBUcmVhcy47IFIuIFcuIFRob21wc29uLCBTZWMu -IFRoZSBsb2RnZSBoYXMgbm93IHRoaXJ0eS1maXZlIG1lbWJlcnMuIlx1MDAwYVx1MDAwYUZyb206 -XHUwMDBhXHUwMDBhaHR0cHM6Ly9zaXRlcy5nb29nbGUuY29tL3NpdGUvbWFyaW9uY291bnR5aW5n -ZW53ZWIvaG9tZS90b3duc2hpcC1oaXN0b3JpZXMvd2F5bmUtdG93bnNoaXBcdTAwMGFcdTAwMGFc -dTAwMGFcdTAwMGFTLlcuIHdhcyBwcm9iYWJseSAiU2VuaW9yIFdhcmRlbiIuXHUwMDBhXHUwMDBh -IlRoZSBTZW5pb3IgV2FyZGVuIChzb21ldGltZXMga25vd24gYXMgRmlyc3QgV2FyZGVuKSBpcyB0 -aGUgc2Vjb25kIG9mIHRoZSB0aHJlZSBwcmluY2lwYWwgb2ZmaWNlcnMgb2YgYSBsb2RnZSwgYW5k -IGlzIHRoZSBNYXN0ZXIncyBwcmluY2lwYWwgZGVwdXR5LiBVbmRlciBzb21lIGNvbnN0aXR1dGlv -bnMsIGlmIHRoZSBXb3JzaGlwZnVsIE1hc3RlciBpcyBhYnNlbnQgdGhlbiB0aGUgU2VuaW9yIFdh -cmRlbiBwcmVzaWRlcyBhdCBtZWV0aW5ncyBhcyAiYWN0aW5nIE1hc3RlciIsIGFuZCBtYXkgYWN0 -IGZvciB0aGUgTWFzdGVyIGluIGFsbCBtYXR0ZXJzIG9mIGxvZGdlIGJ1c2luZXNzLiBVbmRlciBv -dGhlciBjb25zdGl0dXRpb25zLCBpbmNsdWRpbmcgR3JhbmQgTG9kZ2Ugb2YgRW5nbGFuZCBhbmQg -R3JhbmQgTG9kZ2Ugb2YgSXJlbGFuZCwgb25seSBzaXR0aW5nIE1hc3RlcnMgb3IgUGFzdCBNYXN0 -ZXJzIG1heSBwcmVzaWRlIGFzICJhY3RpbmcgTWFzdGVyIiwgYW5kIHNvIHRoZSBTZW5pb3IgV2Fy -ZGVuIGNhbm5vdCBmdWxmaWxsIHRoaXMgcm9sZSB1bmxlc3MgaGUgaXMgYWxzbyBhIFBhc3QgTWFz -dGVyLiBJbiBtYW55IGxvZGdlcyBpdCBpcyBwcmVzdW1lZCB0aGF0IHRoZSBTZW5pb3IgV2FyZGVu -IHdpbGwgYmVjb21lIHRoZSBuZXh0IFdvcnNoaXBmdWwgTWFzdGVyLiJcdTAwMGFcdTAwMGFodHRw -Oi8vZW4ud2lraXBlZGlhLm9yZy93aWtpL01hc29uaWNfTG9kZ2VfT2ZmaWNlcnNcdTAwMGFcdTAw -MGFGLiBhbmQgQS5NLiBiZWluZyBGcmVlIGFuZCBBY2NlcHRlZCBNYXNvbnNcdTAwMGFcdTAwMGFc -dTAwMGFcdTAwMGEKcDMKYShscDQKKChJMwpWZm9udGZhY2UKdFYKKGxwNQooSTQ3MgpJMTE0MAp0 -cDYKYXRwNwphKChJMQpWaXRhbGljCnROKGxwOAooSTEyMTMKSTEyMzcKdHA5CmF0cDEwCmEoKEk4 -ClZsaW5rCnRWaHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9NYXNvbmljX0xvZGdlX09mZmlj -ZXJzCihscDExCihJMTE0MgpJMTE5Mwp0cDEyCmF0cDEzCmEoKEk4ClZsaW5rCnRWaHR0cHM6Ly9z -aXRlcy5nb29nbGUuY29tL3NpdGUvbWFyaW9uY291bnR5aW5nZW53ZWIvaG9tZS90b3duc2hpcC1o -aXN0b3JpZXMvd2F5bmUtdG93bnNoaXAKKGxwMTQKKEkzNDMKSTQzMgp0cDE1CmF0cDE2CmFhSTAw -CihJMQpWR2VuZXJhbApwMTcKdEkxMzM5NDQ1MzE2Cih0STAwCnRwMTgKLg== -',3,'"Bridgeport Lodge, No. 162, F. and A. M., was chartered May 24, 1854, Joseph H. Ballard, W. M.; Noah Reagan, S. W.; Samuel G. Owen, J. W. The present officers of the lodge are Humphrey Forsha, W. M.; Peter P. Blank, S. W.; Woodford Thompson, J. W.; Daniel Broadway, Treas.; R. W. Thompson, Sec. The lodge has now thirty-five members." - -From: - -https://sites.google.com/site/marioncountyingenweb/home/township-histories/wayne-township - - - -S.W. was probably "Senior Warden". - -"The Senior Warden (sometimes known as First Warden) is the second of the three principal officers of a lodge, and is the Master''s principal deputy. Under some constitutions, if the Worshipful Master is absent then the Senior Warden presides at meetings as "acting Master", and may act for the Master in all matters of lodge business. Under other constitutions, including Grand Lodge of England and Grand Lodge of Ireland, only sitting Masters or Past Masters may preside as "acting Master", and so the Senior Warden cannot fulfill this role unless he is also a Past Master. In many lodges it is presumed that the Senior Warden will become the next Worshipful Master." - -http://en.wikipedia.org/wiki/Masonic_Lodge_Officers - -F. and A.M. being Free and Accepted Masons - - +INSERT INTO "grampsdb_note" VALUES(43,'c30181e510d4acb1be4','N0031','2012-06-18 21:44:21.300683','1969-12-31 19:00:00',NULL,0,NULL,3,'Was known as "Teddy".',0); +INSERT INTO "grampsdb_note" VALUES(44,'c30181e58433ff4662b','N0064','2012-06-18 21:44:21.315767','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0008: +Line ignored as not understood Line 709: 1 NAME New York Times, Nov. 22, 1963. ',0); +INSERT INTO "grampsdb_note" VALUES(45,'c30181e4ba561d35a3e','N0022','2012-06-18 21:44:21.322180','1969-12-31 19:00:00',NULL,0,NULL,3,'She helped in the many political campaigns of her brother, John Fitzgerald.',0); +INSERT INTO "grampsdb_note" VALUES(46,'c30181e52855e218b93','N0039','2012-06-18 21:44:21.338775','1969-12-31 19:00:00',NULL,0,NULL,3,'Upon Patrick''s arrival in Boston, he immediately became involved in politics. He was known as a Ward Boss in Boston, looking out for the other Irish immigrants and trying to improve the conditions in the community.',0); +INSERT INTO "grampsdb_note" VALUES(47,'c30181e4a5c1f1539ba','N0011','2012-06-18 21:44:21.343892','1969-12-31 19:00:00',NULL,0,NULL,3,'Joseph Patrick was well liked, quick to smile, and had a tremendous dose of Irish charm.',0); +INSERT INTO "grampsdb_note" VALUES(48,'c30181e4e0b597fafcc','N0029','2012-06-18 21:44:21.351143','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0021: + +Empty note ignored Line 237: 1 NOTE +',0); +INSERT INTO "grampsdb_note" VALUES(49,'c30181e587a25840546','N0066','2012-06-18 21:44:21.366664','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0010: + +Line ignored as not understood Line 713: 1 NAME CBS This Morning show. +',0); +INSERT INTO "grampsdb_note" VALUES(50,'c30181e58b55bdb0093','N0069','2012-06-18 21:44:21.384800','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into Top Level: + +Line ignored as not understood Line 718: 0 C2 CSTA +Skipped subordinate line Line 719: 1 NAME Adopted +',0); +INSERT INTO "grampsdb_note" VALUES(51,'c30181e5298757a23fe','N0040','2012-06-18 21:44:21.390216','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0046: + +Empty note ignored Line 438: 1 NOTE +',0); +INSERT INTO "grampsdb_note" VALUES(52,'c30181e57d46954be30','N0060','2012-06-18 21:44:21.403552','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0004: + +Line ignored as not understood Line 701: 1 NAME New York Times, March 6, 1946. +',0); +INSERT INTO "grampsdb_note" VALUES(53,'c30181e49f80ef08a92','N0008','2012-06-18 21:44:21.412937','1969-12-31 19:00:00',NULL,0,NULL,3,'She was courted by some of the finest young men, not only Boston''s Irish, but members of the English nobility as well.',0); +INSERT INTO "grampsdb_note" VALUES(54,'c30181e4a836d692953','N0014','2012-06-18 21:44:21.419299','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0003: + +Empty note ignored Line 82: 1 NOTE +Empty note ignored Line 84: 1 NOTE +',0); +INSERT INTO "grampsdb_note" VALUES(55,'c30181e49ed00f988ea','N0006','2012-06-18 21:44:21.458329','1969-12-31 19:00:00',NULL,0,NULL,3,'She was considered the flower of Boston Irish society.',0); +INSERT INTO "grampsdb_note" VALUES(56,'c30181e52001a69e6d0','N0036','2012-06-18 21:44:21.476123','1969-12-31 19:00:00',NULL,0,NULL,3,'His personality was mild-mannered, quiet and reserved, and he was viewed as a man of moderate habits.',0); +INSERT INTO "grampsdb_note" VALUES(57,'c30181e589627577ffa','N0067','2012-06-18 21:44:21.479833','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0011: + +Line ignored as not understood Line 715: 1 NAME Harrisburg Patriot News, January 25, 1995. +',0); +INSERT INTO "grampsdb_note" VALUES(58,'c30181e49514eaec76c','N0004','2012-06-18 21:44:21.501828','1969-12-31 19:00:00',NULL,0,NULL,3,'He was fiercely proud of his family. He was quoted as having said his family was the finest thing in his life. ',0); +INSERT INTO "grampsdb_note" VALUES(59,'c30181e54652307dedf','N0054','2012-06-18 21:44:21.514027','1969-12-31 19:00:00',NULL,0,NULL,3,'While dating JFK, Jackie did not want him to know that she was not rich and think that she was only marrying him for his money. So, she went to great lengths to appear rich.',0); +INSERT INTO "grampsdb_note" VALUES(60,'c30181e4bb07a225ea5','N0024','2012-06-18 21:44:21.527816','1969-12-31 19:00:00',NULL,0,NULL,3,'After her mother, Eunice was considered the family''s model woman.',0); +INSERT INTO "grampsdb_note" VALUES(61,'c30181e510919967bbc','N0030','2012-06-18 21:44:21.539317','1969-12-31 19:00:00',NULL,0,NULL,3,'Enlisted in the Navy during World War II.',0); +INSERT INTO "grampsdb_note" VALUES(62,'c30181e53e80a60db4d','N0050','2012-06-18 21:44:21.576251','1969-12-31 19:00:00',NULL,0,NULL,3,'He was assassinated in Dallas, TX.',0); +INSERT INTO "grampsdb_note" VALUES(63,'c30181e545744f38427','N0052','2012-06-18 21:44:21.605113','1969-12-31 19:00:00',NULL,0,NULL,3,'',0); +INSERT INTO "grampsdb_note" VALUES(64,'c30181e546b4cf41c3c','N0055','2012-06-18 21:44:21.608600','1969-12-31 19:00:00',NULL,0,NULL,3,'She was said to be the only First Lady to resemble royalty. She shunned the media and never publicly discussed the assassination of JFK, how she felt about it, or the alleged affairs of her first husband.',0); +INSERT INTO "grampsdb_note" VALUES(65,'c30181e579d41d2d22b','N0058','2012-06-18 21:44:21.612327','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0002: + +Line ignored as not understood Line 697: 1 NAME Rose, by Gail Cameron. +',0); +INSERT INTO "grampsdb_note" VALUES(66,'c30181e4ab2407624c2','N0016','2012-06-18 21:44:21.619488','1969-12-31 19:00:00',NULL,0,NULL,3,'In 1946 her father gave $600,000 for the construction of the Joseph P. Kennedy Jr. Convalescent Home for disadvantaged children, because of Rosemary''s condition.',0); +INSERT INTO "grampsdb_note" VALUES(67,'c30181e52234f9a30bc','N0037','2012-06-18 21:44:21.625869','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0044: + +Empty note ignored Line 402: 1 NOTE +Empty note ignored Line 405: 1 NOTE +Empty note ignored Line 407: 1 NOTE +',0); +INSERT INTO "grampsdb_note" VALUES(68,'c30181e493a64d2db2e','N0000','2012-06-18 21:44:21.633597','1969-12-31 19:00:00',NULL,0,NULL,3,'From the time he was a school boy he was interested in making money.',0); +INSERT INTO "grampsdb_note" VALUES(69,'c30181e585f010c35cd','N0065','2012-06-18 21:44:21.647605','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into SOUR (source) Gramps ID S0009: + +Line ignored as not understood Line 711: 1 NAME Harrisburg Patriot News, 23 May 1994. +',0); +INSERT INTO "grampsdb_note" VALUES(70,'c30181e4a610a2e3911','N0012','2012-06-18 21:44:21.667154','1969-12-31 19:00:00',NULL,0,NULL,3,'He enlisted in the Navy during World War II, and died during a naval flight.',0); +INSERT INTO "grampsdb_note" VALUES(71,'c30181e4a671cdf9e0b','N0013','2012-06-18 21:44:21.673098','1969-12-31 19:00:00',NULL,0,NULL,3,'He was known as Jack.',0); +INSERT INTO "grampsdb_note" VALUES(72,'c30181e532f12af9357','N0044','2012-06-18 21:44:21.684874','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0048: + +Empty note ignored Line 473: 1 NOTE +',0); +INSERT INTO "grampsdb_note" VALUES(73,'c30181e53205b8153b0','N0043','2012-06-18 21:44:21.709355','1969-12-31 19:00:00',NULL,0,NULL,3,'He was known to drink alcohol excessively.',0); +INSERT INTO "grampsdb_note" VALUES(74,'c30181e512f6668bc46','N0032','2012-06-18 21:44:21.715917','1969-12-31 19:00:00',NULL,0,NULL,27,'Records not imported into INDI (individual) Gramps ID I0039: + +Empty note ignored Line 359: 1 NOTE +',0); +INSERT INTO "grampsdb_note" VALUES(75,'c30181e53df1a89fbf1','N0049','2012-06-18 21:44:21.738887','1969-12-31 19:00:00',NULL,0,NULL,3,'He had personal finances that were estimated to be around $10 million while in the Presidency.',0); CREATE TABLE "grampsdb_surname" ( "id" integer NOT NULL PRIMARY KEY, "name_origin_type_id" integer NOT NULL REFERENCES "grampsdb_nameorigintype" ("id"), @@ -1546,75 +1589,75 @@ CREATE TABLE "grampsdb_surname" ( "name_id" integer NOT NULL, "order" integer unsigned NOT NULL ); -INSERT INTO "grampsdb_surname" VALUES(1,1,'BOUVIER','',1,'',1,1); +INSERT INTO "grampsdb_surname" VALUES(1,1,'FITZGERALD','',1,'',1,1); INSERT INTO "grampsdb_surname" VALUES(2,1,'KENNEDY','',1,'',2,1); -INSERT INTO "grampsdb_surname" VALUES(3,1,'CAULFIELD','',1,'',3,1); -INSERT INTO "grampsdb_surname" VALUES(4,1,'BENNETT','',1,'',4,1); -INSERT INTO "grampsdb_surname" VALUES(5,1,'BOUVIER','',1,'',5,1); -INSERT INTO "grampsdb_surname" VALUES(6,1,'KENNEDY','',1,'',6,1); +INSERT INTO "grampsdb_surname" VALUES(3,1,'KENNEDY','',1,'',3,1); +INSERT INTO "grampsdb_surname" VALUES(4,1,'KENNEDY','',1,'',4,1); +INSERT INTO "grampsdb_surname" VALUES(5,1,'BURKE','',1,'',5,1); +INSERT INTO "grampsdb_surname" VALUES(6,1,'SHRIVER','',1,'',6,1); INSERT INTO "grampsdb_surname" VALUES(7,1,'KENNEDY','',1,'',7,1); -INSERT INTO "grampsdb_surname" VALUES(8,1,'SHRIVER','',1,'',8,1); +INSERT INTO "grampsdb_surname" VALUES(8,1,'ONASSIS','',1,'',8,1); INSERT INTO "grampsdb_surname" VALUES(9,1,'KENNEDY','',1,'',9,1); -INSERT INTO "grampsdb_surname" VALUES(10,1,'SMITH','',1,'',10,1); -INSERT INTO "grampsdb_surname" VALUES(11,1,'SCHWARZENEGGER','',1,'',11,1); -INSERT INTO "grampsdb_surname" VALUES(12,1,'SHRIVER','',1,'',12,1); -INSERT INTO "grampsdb_surname" VALUES(13,1,'KENNEDY','',1,'',13,1); -INSERT INTO "grampsdb_surname" VALUES(14,1,'CAVENDISH','',1,'',14,1); -INSERT INTO "grampsdb_surname" VALUES(15,1,'LAWFORD','',1,'',15,1); -INSERT INTO "grampsdb_surname" VALUES(16,1,'SKAKEL','',1,'',16,1); -INSERT INTO "grampsdb_surname" VALUES(17,1,'SMITH','',1,'',17,1); +INSERT INTO "grampsdb_surname" VALUES(10,1,'KENNEDY','',1,'',10,1); +INSERT INTO "grampsdb_surname" VALUES(11,1,'LAWFORD','',1,'',11,1); +INSERT INTO "grampsdb_surname" VALUES(12,1,'KENNEDY','',1,'',12,1); +INSERT INTO "grampsdb_surname" VALUES(13,1,'LAWFORD','',1,'',13,1); +INSERT INTO "grampsdb_surname" VALUES(14,1,'KENNEDY','',1,'',14,1); +INSERT INTO "grampsdb_surname" VALUES(15,1,'BENNETT','',1,'',15,1); +INSERT INTO "grampsdb_surname" VALUES(16,1,'BOUVIER','',1,'',16,1); +INSERT INTO "grampsdb_surname" VALUES(17,1,'KENNEDY','',1,'',17,1); INSERT INTO "grampsdb_surname" VALUES(18,1,'KENNEDY','',1,'',18,1); INSERT INTO "grampsdb_surname" VALUES(19,1,'KENNEDY','',1,'',19,1); -INSERT INTO "grampsdb_surname" VALUES(20,1,'MAHONEY','',1,'',20,1); +INSERT INTO "grampsdb_surname" VALUES(20,1,'CAULFIELD','',1,'',20,1); INSERT INTO "grampsdb_surname" VALUES(21,1,'KENNEDY','',1,'',21,1); -INSERT INTO "grampsdb_surname" VALUES(22,1,'KENNEDY','',1,'',22,1); -INSERT INTO "grampsdb_surname" VALUES(23,1,'KENNEDY','',1,'',23,1); +INSERT INTO "grampsdb_surname" VALUES(22,1,'SMITH','',1,'',22,1); +INSERT INTO "grampsdb_surname" VALUES(23,1,'LAWFORD','',1,'',23,1); INSERT INTO "grampsdb_surname" VALUES(24,1,'KENNEDY','',1,'',24,1); -INSERT INTO "grampsdb_surname" VALUES(25,1,'LEE','',1,'',25,1); +INSERT INTO "grampsdb_surname" VALUES(25,1,'ACHINCLOSS','',1,'',25,1); INSERT INTO "grampsdb_surname" VALUES(26,1,'KENNEDY','',1,'',26,1); -INSERT INTO "grampsdb_surname" VALUES(27,1,'KENNEDY','',1,'',27,1); -INSERT INTO "grampsdb_surname" VALUES(28,1,'FITZGERALD','',1,'',28,1); -INSERT INTO "grampsdb_surname" VALUES(29,1,'ACHINCLOSS','',1,'',29,1); +INSERT INTO "grampsdb_surname" VALUES(27,1,'FITZGERALD','',1,'',27,1); +INSERT INTO "grampsdb_surname" VALUES(28,1,'KENNEDY','',1,'',28,1); +INSERT INTO "grampsdb_surname" VALUES(29,1,'KANE','',1,'',29,1); INSERT INTO "grampsdb_surname" VALUES(30,1,'KENNEDY','',1,'',30,1); -INSERT INTO "grampsdb_surname" VALUES(31,1,'KANE','',1,'',31,1); +INSERT INTO "grampsdb_surname" VALUES(31,1,'KENNEDY','',1,'',31,1); INSERT INTO "grampsdb_surname" VALUES(32,1,'KENNEDY','',1,'',32,1); -INSERT INTO "grampsdb_surname" VALUES(33,1,'FITZGERALD','',1,'',33,1); -INSERT INTO "grampsdb_surname" VALUES(34,1,'MURPHY','',1,'',34,1); -INSERT INTO "grampsdb_surname" VALUES(35,1,'KENNEDY','',1,'',35,1); -INSERT INTO "grampsdb_surname" VALUES(36,1,'LAWFORD','',1,'',36,1); -INSERT INTO "grampsdb_surname" VALUES(37,1,'KENNEDY','',1,'',37,1); +INSERT INTO "grampsdb_surname" VALUES(33,1,'KENNEDY','',1,'',33,1); +INSERT INTO "grampsdb_surname" VALUES(34,1,'KENNEDY','',1,'',34,1); +INSERT INTO "grampsdb_surname" VALUES(35,1,'SHRIVER','',1,'',35,1); +INSERT INTO "grampsdb_surname" VALUES(36,1,'SHRIVER','',1,'',36,1); +INSERT INTO "grampsdb_surname" VALUES(37,1,'HANNON','',1,'',37,1); INSERT INTO "grampsdb_surname" VALUES(38,1,'SHRIVER','',1,'',38,1); INSERT INTO "grampsdb_surname" VALUES(39,1,'KENNEDY','',1,'',39,1); -INSERT INTO "grampsdb_surname" VALUES(40,1,'BURKE','',1,'',40,1); +INSERT INTO "grampsdb_surname" VALUES(40,1,'MURPHY','',1,'',40,1); INSERT INTO "grampsdb_surname" VALUES(41,1,'SMITH','',1,'',41,1); -INSERT INTO "grampsdb_surname" VALUES(42,1,'KENNEDY','',1,'',42,1); -INSERT INTO "grampsdb_surname" VALUES(43,1,'HICKEY','',1,'',43,1); -INSERT INTO "grampsdb_surname" VALUES(44,1,'LAWFORD','',1,'',44,1); +INSERT INTO "grampsdb_surname" VALUES(42,1,'MAHONEY','',1,'',42,1); +INSERT INTO "grampsdb_surname" VALUES(43,1,'KENNEDY','',1,'',43,1); +INSERT INTO "grampsdb_surname" VALUES(44,1,'KENNEDY','',1,'',44,1); INSERT INTO "grampsdb_surname" VALUES(45,1,'KENNEDY','',1,'',45,1); INSERT INTO "grampsdb_surname" VALUES(46,1,'SMITH','',1,'',46,1); -INSERT INTO "grampsdb_surname" VALUES(47,1,'KENNEDY','',1,'',47,1); +INSERT INTO "grampsdb_surname" VALUES(47,1,'SKAKEL','',1,'',47,1); INSERT INTO "grampsdb_surname" VALUES(48,1,'KENNEDY','',1,'',48,1); -INSERT INTO "grampsdb_surname" VALUES(49,1,'HANNON','',1,'',49,1); +INSERT INTO "grampsdb_surname" VALUES(49,1,'KENNEDY','',1,'',49,1); INSERT INTO "grampsdb_surname" VALUES(50,1,'KENNEDY','',1,'',50,1); INSERT INTO "grampsdb_surname" VALUES(51,1,'KENNEDY','',1,'',51,1); -INSERT INTO "grampsdb_surname" VALUES(52,1,'KENNEDY','',1,'',52,1); -INSERT INTO "grampsdb_surname" VALUES(53,1,'SHRIVER','',1,'',53,1); -INSERT INTO "grampsdb_surname" VALUES(54,1,'KENNEDY','',1,'',54,1); +INSERT INTO "grampsdb_surname" VALUES(52,1,'CAVENDISH','',1,'',52,1); +INSERT INTO "grampsdb_surname" VALUES(53,1,'BOUVIER','',1,'',53,1); +INSERT INTO "grampsdb_surname" VALUES(54,1,'LAWFORD','',1,'',54,1); INSERT INTO "grampsdb_surname" VALUES(55,1,'KENNEDY','',1,'',55,1); -INSERT INTO "grampsdb_surname" VALUES(56,1,'KENNEDY','',1,'',56,1); -INSERT INTO "grampsdb_surname" VALUES(57,1,'LAWFORD','',1,'',57,1); -INSERT INTO "grampsdb_surname" VALUES(58,1,'SHRIVER','',1,'',58,1); +INSERT INTO "grampsdb_surname" VALUES(56,1,'SHRIVER','',1,'',56,1); +INSERT INTO "grampsdb_surname" VALUES(57,1,'BOUVIER','',1,'',57,1); +INSERT INTO "grampsdb_surname" VALUES(58,1,'SCHWARZENEGGER','',1,'',58,1); INSERT INTO "grampsdb_surname" VALUES(59,1,'KENNEDY','',1,'',59,1); -INSERT INTO "grampsdb_surname" VALUES(60,1,'KENNEDY','',1,'',60,1); +INSERT INTO "grampsdb_surname" VALUES(60,1,'LEE','',1,'',60,1); INSERT INTO "grampsdb_surname" VALUES(61,1,'KENNEDY','',1,'',61,1); INSERT INTO "grampsdb_surname" VALUES(62,1,'KENNEDY','',1,'',62,1); -INSERT INTO "grampsdb_surname" VALUES(63,1,'ONASSIS','',1,'',63,1); -INSERT INTO "grampsdb_surname" VALUES(64,1,'KENNEDY','',1,'',64,1); +INSERT INTO "grampsdb_surname" VALUES(63,1,'HICKEY','',1,'',63,1); +INSERT INTO "grampsdb_surname" VALUES(64,1,'SMITH','',1,'',64,1); INSERT INTO "grampsdb_surname" VALUES(65,1,'SHRIVER','',1,'',65,1); -INSERT INTO "grampsdb_surname" VALUES(66,1,'LAWFORD','',1,'',66,1); -INSERT INTO "grampsdb_surname" VALUES(67,1,'KENNEDY','',1,'',67,1); +INSERT INTO "grampsdb_surname" VALUES(66,1,'KENNEDY','',1,'',66,1); +INSERT INTO "grampsdb_surname" VALUES(67,1,'LAWFORD','',1,'',67,1); INSERT INTO "grampsdb_surname" VALUES(68,1,'KENNEDY','',1,'',68,1); -INSERT INTO "grampsdb_surname" VALUES(69,1,'BOUVIER','',1,'',69,1); +INSERT INTO "grampsdb_surname" VALUES(69,1,'KENNEDY','',1,'',69,1); CREATE TABLE "grampsdb_name" ( "id" integer NOT NULL PRIMARY KEY, "calendar" integer NOT NULL, @@ -1649,75 +1692,75 @@ CREATE TABLE "grampsdb_name" ( "display_as_id" integer NOT NULL REFERENCES "grampsdb_nameformattype" ("id"), "person_id" integer NOT NULL REFERENCES "grampsdb_person" ("id") ); -INSERT INTO "grampsdb_name" VALUES(1,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:15.706415',NULL,NULL,1,4,1,'John Vernou','','','','','','',1,1,1); -INSERT INTO "grampsdb_name" VALUES(2,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:15.768043',NULL,NULL,1,4,1,'Douglas Harriman','','','','','','',1,1,2); -INSERT INTO "grampsdb_name" VALUES(3,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:15.791663',NULL,NULL,1,4,1,'John T.','','','','','','',1,1,3); -INSERT INTO "grampsdb_name" VALUES(4,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:15.814243',NULL,NULL,1,4,1,'Virginia Joan','','','','','','',1,1,4); -INSERT INTO "grampsdb_name" VALUES(5,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:15.854161',NULL,NULL,1,4,1,'Lee','','','','','','',1,1,5); -INSERT INTO "grampsdb_name" VALUES(6,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:15.868407',NULL,NULL,1,4,1,'Margaret','','','','','','',1,1,6); -INSERT INTO "grampsdb_name" VALUES(7,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:15.894945',NULL,NULL,1,4,1,'Patrick','','','','','','',1,1,7); -INSERT INTO "grampsdb_name" VALUES(8,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:15.973452',NULL,NULL,1,4,1,'Anthony Paul','','','','','','',1,1,8); -INSERT INTO "grampsdb_name" VALUES(9,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.010894',NULL,NULL,1,4,1,'Michael L.','','','','','','',1,1,9); -INSERT INTO "grampsdb_name" VALUES(10,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.042774',NULL,NULL,1,4,1,'Stephen','','','','','','',1,1,10); -INSERT INTO "grampsdb_name" VALUES(11,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.059691',NULL,NULL,1,4,1,'Arnold','','','','','','',1,1,11); -INSERT INTO "grampsdb_name" VALUES(12,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.090555',NULL,NULL,1,4,1,'Robert Sargent','','','','','','',1,1,12); -INSERT INTO "grampsdb_name" VALUES(13,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.134784',NULL,NULL,1,4,1,'Christopher George','','','','','','',1,1,13); -INSERT INTO "grampsdb_name" VALUES(14,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,'',0,0,0,'2012-06-11 16:36:17.222852','2012-06-11 16:36:17.220356','admin',1,4,1,'William John Robert','','','','','','',1,1,14); -INSERT INTO "grampsdb_name" VALUES(15,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.190702',NULL,NULL,1,4,1,'Christopher','','','','','','',1,1,15); -INSERT INTO "grampsdb_name" VALUES(16,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.214403',NULL,NULL,1,4,1,'Ethel','','','','','','',1,1,16); -INSERT INTO "grampsdb_name" VALUES(17,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.237610',NULL,NULL,1,4,1,'William Kennedy','','','','','','',1,1,17); -INSERT INTO "grampsdb_name" VALUES(18,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.263117',NULL,NULL,1,4,1,'Johanna','','','','','','',1,1,18); -INSERT INTO "grampsdb_name" VALUES(19,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.289812',NULL,NULL,1,4,1,'Mary','','','','','','',1,1,19); -INSERT INTO "grampsdb_name" VALUES(20,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.320848',NULL,NULL,1,4,1,'Humphrey','','','','','','',1,1,20); -INSERT INTO "grampsdb_name" VALUES(21,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.341306',NULL,NULL,1,4,1,'Robert Francis','','','','','','',1,1,21); -INSERT INTO "grampsdb_name" VALUES(22,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.409696',NULL,NULL,1,4,1,'Robert Francis','','','','','','',1,1,22); -INSERT INTO "grampsdb_name" VALUES(23,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.447369',NULL,NULL,1,4,1,'Joseph Patrick','','','','','','',1,1,23); -INSERT INTO "grampsdb_name" VALUES(24,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.580991',NULL,NULL,1,4,1,'David Anthony','','','','','','',1,1,24); -INSERT INTO "grampsdb_name" VALUES(25,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.658227',NULL,NULL,1,4,1,'Janet','','','','','','',1,1,25); -INSERT INTO "grampsdb_name" VALUES(26,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.703581',NULL,NULL,1,4,1,'Kathleen Hartington','','','','','','',1,1,26); -INSERT INTO "grampsdb_name" VALUES(27,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.754974',NULL,NULL,1,4,1,'Edward Moore','','','','','','',1,1,27); -INSERT INTO "grampsdb_name" VALUES(28,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.810884',NULL,NULL,1,4,1,'John F.','','','','','','',1,1,28); -INSERT INTO "grampsdb_name" VALUES(29,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.834303',NULL,NULL,1,4,1,'Hugh','','','','','','',1,1,29); -INSERT INTO "grampsdb_name" VALUES(30,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.857778',NULL,NULL,1,4,1,'Mary Kerry','','','','','','',1,1,30); -INSERT INTO "grampsdb_name" VALUES(31,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.882283',NULL,NULL,1,4,1,'Laurence','','','','','','',1,1,31); -INSERT INTO "grampsdb_name" VALUES(32,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:16.948261',NULL,NULL,1,4,1,'Patrick Joseph','','','','','','',1,1,32); -INSERT INTO "grampsdb_name" VALUES(33,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.001740',NULL,NULL,1,4,1,'Rose','','','','','','',1,1,33); -INSERT INTO "grampsdb_name" VALUES(34,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.073183',NULL,NULL,1,4,1,'Bridget','','','','','','',1,1,34); -INSERT INTO "grampsdb_name" VALUES(35,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.205911',NULL,NULL,1,4,1,'Rosemary','','','','','','',1,1,35); -INSERT INTO "grampsdb_name" VALUES(36,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.242658',NULL,NULL,1,4,1,'Robin','','','','','','',1,1,36); -INSERT INTO "grampsdb_name" VALUES(37,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.259040',NULL,NULL,1,4,1,'Joseph Patrick','','','','','','',1,1,37); -INSERT INTO "grampsdb_name" VALUES(38,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.282391',NULL,NULL,1,4,1,'Mark Kennedy','','','','','','',1,1,38); -INSERT INTO "grampsdb_name" VALUES(39,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.306163',NULL,NULL,1,4,1,'Matthew Maxwell Taylor','','','','','','',1,1,39); -INSERT INTO "grampsdb_name" VALUES(40,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.331975',NULL,NULL,1,4,1,'Charles','','','','','','',1,1,40); -INSERT INTO "grampsdb_name" VALUES(41,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.354257',NULL,NULL,1,4,1,'Amanda','','','','','','',1,1,41); -INSERT INTO "grampsdb_name" VALUES(42,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.397072',NULL,NULL,1,4,1,'Jean Ann','','','','','','',1,1,42); -INSERT INTO "grampsdb_name" VALUES(43,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.429764',NULL,NULL,1,4,1,'Mary Augusta','','','','','','',1,1,43); -INSERT INTO "grampsdb_name" VALUES(44,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.459013',NULL,NULL,1,4,1,'Victoria','','','','','','',1,1,44); -INSERT INTO "grampsdb_name" VALUES(45,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.473221',NULL,NULL,1,4,1,'Edward More','','','','','','',1,1,45); -INSERT INTO "grampsdb_name" VALUES(46,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.509848',NULL,NULL,1,4,1,'Stephen Edward','','','','','','',1,1,46); -INSERT INTO "grampsdb_name" VALUES(47,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.535139',NULL,NULL,1,4,1,'Rory Elizabeth','','','','','','',1,1,47); -INSERT INTO "grampsdb_name" VALUES(48,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.571996',NULL,NULL,1,4,1,'Patrick Joseph','','','','','','',1,1,48); -INSERT INTO "grampsdb_name" VALUES(49,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.674620',NULL,NULL,1,4,1,'Josephine Mary','','','','','','',1,1,49); -INSERT INTO "grampsdb_name" VALUES(50,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.688988',NULL,NULL,1,4,1,'Margaret','','','','','','',1,1,50); -INSERT INTO "grampsdb_name" VALUES(51,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.724747',NULL,NULL,1,4,1,'John Fitzgerald','','','','','','',1,1,51); -INSERT INTO "grampsdb_name" VALUES(52,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.825063',NULL,NULL,1,4,1,'Loretta','','','','','','',1,1,52); -INSERT INTO "grampsdb_name" VALUES(53,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.879357',NULL,NULL,1,4,1,'Robert Sargent','','','','','','',1,1,53); -INSERT INTO "grampsdb_name" VALUES(54,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.946749',NULL,NULL,1,4,1,'Mary Courtney','','','','','','',1,1,54); -INSERT INTO "grampsdb_name" VALUES(55,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:17.978712',NULL,NULL,1,4,1,'Kara Ann','','','','','','',1,1,55); -INSERT INTO "grampsdb_name" VALUES(56,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.021259',NULL,NULL,1,4,1,'Eunice Mary','','','','','','',1,1,56); -INSERT INTO "grampsdb_name" VALUES(57,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.086384',NULL,NULL,1,4,1,'Peter','','','','','','',1,1,57); -INSERT INTO "grampsdb_name" VALUES(58,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.119533',NULL,NULL,1,4,1,'Maria','','','','','','',1,1,58); -INSERT INTO "grampsdb_name" VALUES(59,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.193174',NULL,NULL,1,4,1,'John Fitzgerald','','','','','','',1,1,59); -INSERT INTO "grampsdb_name" VALUES(60,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.245209',NULL,NULL,1,4,1,'John','','','','','','',1,1,60); -INSERT INTO "grampsdb_name" VALUES(61,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.278605',NULL,NULL,1,4,1,'Caroline Bouvier','','','','','','',1,1,61); -INSERT INTO "grampsdb_name" VALUES(62,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.334116',NULL,NULL,1,4,1,'Patrick Bouvier','','','','','','',1,1,62); -INSERT INTO "grampsdb_name" VALUES(63,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.390866',NULL,NULL,1,4,1,'Aristotle','','','','','','',1,1,63); -INSERT INTO "grampsdb_name" VALUES(64,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.418868',NULL,NULL,1,4,1,'Patricia','','','','','','',1,1,64); -INSERT INTO "grampsdb_name" VALUES(65,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.452264',NULL,NULL,1,4,1,'Timothy','','','','','','',1,1,65); -INSERT INTO "grampsdb_name" VALUES(66,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.466609',NULL,NULL,1,4,1,'Sydney','','','','','','',1,1,66); -INSERT INTO "grampsdb_name" VALUES(67,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.482156',NULL,NULL,1,4,1,'Kathleen','','','','','','',1,1,67); -INSERT INTO "grampsdb_name" VALUES(68,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-10 22:25:18.526609',NULL,NULL,1,4,1,'Joseph Patrick','','','','','','',1,1,68); -INSERT INTO "grampsdb_name" VALUES(69,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,'',0,0,0,'2012-06-11 16:33:07.312620','2012-06-11 16:33:07.310642','admin',1,4,1,'Jacqueline','','','','','','',1,1,69); +INSERT INTO "grampsdb_name" VALUES(1,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:21.807222',NULL,NULL,1,4,1,'John F.','','','','','','',1,1,1); +INSERT INTO "grampsdb_name" VALUES(2,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:21.859574',NULL,NULL,1,4,1,'Patricia','','','','','','',1,1,2); +INSERT INTO "grampsdb_name" VALUES(3,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:21.921215',NULL,NULL,1,4,1,'John Fitzgerald','','','','','','',1,1,3); +INSERT INTO "grampsdb_name" VALUES(4,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.062340',NULL,NULL,1,4,1,'Johanna','','','','','','',1,1,4); +INSERT INTO "grampsdb_name" VALUES(5,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.110030',NULL,NULL,1,4,1,'Charles','','','','','','',1,1,5); +INSERT INTO "grampsdb_name" VALUES(6,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.137585',NULL,NULL,1,4,1,'Mark Kennedy','','','','','','',1,1,6); +INSERT INTO "grampsdb_name" VALUES(7,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.178340',NULL,NULL,1,4,1,'Joseph Patrick','','','','','','',1,1,7); +INSERT INTO "grampsdb_name" VALUES(8,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.305663',NULL,NULL,1,4,1,'Aristotle','','','','','','',1,1,8); +INSERT INTO "grampsdb_name" VALUES(9,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.334069',NULL,NULL,1,4,1,'Kara Ann','','','','','','',1,1,9); +INSERT INTO "grampsdb_name" VALUES(10,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.384535',NULL,NULL,1,4,1,'Christopher George','','','','','','',1,1,10); +INSERT INTO "grampsdb_name" VALUES(11,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.443888',NULL,NULL,1,4,1,'Robin','','','','','','',1,1,11); +INSERT INTO "grampsdb_name" VALUES(12,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.488577',NULL,NULL,1,4,1,'John','','','','','','',1,1,12); +INSERT INTO "grampsdb_name" VALUES(13,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.569315',NULL,NULL,1,4,1,'Christopher','','','','','','',1,1,13); +INSERT INTO "grampsdb_name" VALUES(14,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.617424',NULL,NULL,1,4,1,'Robert Francis','','','','','','',1,1,14); +INSERT INTO "grampsdb_name" VALUES(15,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.673135',NULL,NULL,1,4,1,'Virginia Joan','','','','','','',1,1,15); +INSERT INTO "grampsdb_name" VALUES(16,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.731517',NULL,NULL,1,4,1,'Lee','','','','','','',1,1,16); +INSERT INTO "grampsdb_name" VALUES(17,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.757190',NULL,NULL,1,4,1,'Rosemary','','','','','','',1,1,17); +INSERT INTO "grampsdb_name" VALUES(18,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.828143',NULL,NULL,1,4,1,'Edward More','','','','','','',1,1,18); +INSERT INTO "grampsdb_name" VALUES(19,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:22.890920',NULL,NULL,1,4,1,'Caroline Bouvier','','','','','','',1,1,19); +INSERT INTO "grampsdb_name" VALUES(20,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.004684',NULL,NULL,1,4,1,'John T.','','','','','','',1,1,20); +INSERT INTO "grampsdb_name" VALUES(21,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.047577',NULL,NULL,1,4,1,'Robert Francis','','','','','','',1,1,21); +INSERT INTO "grampsdb_name" VALUES(22,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.162394',NULL,NULL,1,4,1,'Amanda','','','','','','',1,1,22); +INSERT INTO "grampsdb_name" VALUES(23,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.199056',NULL,NULL,1,4,1,'Sydney','','','','','','',1,1,23); +INSERT INTO "grampsdb_name" VALUES(24,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.330323',NULL,NULL,1,4,1,'Edward Moore','','','','','','',1,1,24); +INSERT INTO "grampsdb_name" VALUES(25,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.490745',NULL,NULL,1,4,1,'Hugh','','','','','','',1,1,25); +INSERT INTO "grampsdb_name" VALUES(26,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.520967',NULL,NULL,1,4,1,'Douglas Harriman','','','','','','',1,1,26); +INSERT INTO "grampsdb_name" VALUES(27,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.652820',NULL,NULL,1,4,1,'Rose','','','','','','',1,1,27); +INSERT INTO "grampsdb_name" VALUES(28,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.788267',NULL,NULL,1,4,1,'Rory Elizabeth','','','','','','',1,1,28); +INSERT INTO "grampsdb_name" VALUES(29,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.863307',NULL,NULL,1,4,1,'Laurence','','','','','','',1,1,29); +INSERT INTO "grampsdb_name" VALUES(30,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:23.924212',NULL,NULL,1,4,1,'Joseph Patrick','','','','','','',1,1,30); +INSERT INTO "grampsdb_name" VALUES(31,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.129382',NULL,NULL,1,4,1,'Kathleen','','','','','','',1,1,31); +INSERT INTO "grampsdb_name" VALUES(32,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.237750',NULL,NULL,1,4,1,'Patrick','','','','','','',1,1,32); +INSERT INTO "grampsdb_name" VALUES(33,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.359687',NULL,NULL,1,4,1,'Patrick Bouvier','','','','','','',1,1,33); +INSERT INTO "grampsdb_name" VALUES(34,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.418340',NULL,NULL,1,4,1,'Matthew Maxwell Taylor','','','','','','',1,1,34); +INSERT INTO "grampsdb_name" VALUES(35,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.460757',NULL,NULL,1,4,1,'Robert Sargent','','','','','','',1,1,35); +INSERT INTO "grampsdb_name" VALUES(36,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.533834',NULL,NULL,1,4,1,'Timothy','','','','','','',1,1,36); +INSERT INTO "grampsdb_name" VALUES(37,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.573559',NULL,NULL,1,4,1,'Josephine Mary','','','','','','',1,1,37); +INSERT INTO "grampsdb_name" VALUES(38,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.604641',NULL,NULL,1,4,1,'Maria','','','','','','',1,1,38); +INSERT INTO "grampsdb_name" VALUES(39,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.657421',NULL,NULL,1,4,1,'Patrick Joseph','','','','','','',1,1,39); +INSERT INTO "grampsdb_name" VALUES(40,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.811402',NULL,NULL,1,4,1,'Bridget','','','','','','',1,1,40); +INSERT INTO "grampsdb_name" VALUES(41,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.972323',NULL,NULL,1,4,1,'Stephen','','','','','','',1,1,41); +INSERT INTO "grampsdb_name" VALUES(42,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:24.997985',NULL,NULL,1,4,1,'Humphrey','','','','','','',1,1,42); +INSERT INTO "grampsdb_name" VALUES(43,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.043601',NULL,NULL,1,4,1,'Mary Kerry','','','','','','',1,1,43); +INSERT INTO "grampsdb_name" VALUES(44,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.087298',NULL,NULL,1,4,1,'Loretta','','','','','','',1,1,44); +INSERT INTO "grampsdb_name" VALUES(45,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.159288',NULL,NULL,1,4,1,'Joseph Patrick','','','','','','',1,1,45); +INSERT INTO "grampsdb_name" VALUES(46,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.238561',NULL,NULL,1,4,1,'Stephen Edward','','','','','','',1,1,46); +INSERT INTO "grampsdb_name" VALUES(47,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.287980',NULL,NULL,1,4,1,'Ethel','','','','','','',1,1,47); +INSERT INTO "grampsdb_name" VALUES(48,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.335504',NULL,NULL,1,4,1,'Margaret','','','','','','',1,1,48); +INSERT INTO "grampsdb_name" VALUES(49,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.385018',NULL,NULL,1,4,1,'Kathleen Hartington','','','','','','',1,1,49); +INSERT INTO "grampsdb_name" VALUES(50,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.446880',NULL,NULL,1,4,1,'Jean Ann','','','','','','',1,1,50); +INSERT INTO "grampsdb_name" VALUES(51,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.542495',NULL,NULL,1,4,1,'Mary Courtney','','','','','','',1,1,51); +INSERT INTO "grampsdb_name" VALUES(52,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.594221',NULL,NULL,1,4,1,'William John Robert','','','','','','',1,1,52); +INSERT INTO "grampsdb_name" VALUES(53,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.664199',NULL,NULL,1,4,1,'Jacqueline','','','','','','',1,1,53); +INSERT INTO "grampsdb_name" VALUES(54,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.852773',NULL,NULL,1,4,1,'Peter','','','','','','',1,1,54); +INSERT INTO "grampsdb_name" VALUES(55,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.893336',NULL,NULL,1,4,1,'David Anthony','','','','','','',1,1,55); +INSERT INTO "grampsdb_name" VALUES(56,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:25.941667',NULL,NULL,1,4,1,'Anthony Paul','','','','','','',1,1,56); +INSERT INTO "grampsdb_name" VALUES(57,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.038707',NULL,NULL,1,4,1,'John Vernou','','','','','','',1,1,57); +INSERT INTO "grampsdb_name" VALUES(58,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.135464',NULL,NULL,1,4,1,'Arnold','','','','','','',1,1,58); +INSERT INTO "grampsdb_name" VALUES(59,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.172605',NULL,NULL,1,4,1,'Margaret','','','','','','',1,1,59); +INSERT INTO "grampsdb_name" VALUES(60,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.226073',NULL,NULL,1,4,1,'Janet','','','','','','',1,1,60); +INSERT INTO "grampsdb_name" VALUES(61,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.268668',NULL,NULL,1,4,1,'Michael L.','','','','','','',1,1,61); +INSERT INTO "grampsdb_name" VALUES(62,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.309198',NULL,NULL,1,4,1,'Patrick Joseph','','','','','','',1,1,62); +INSERT INTO "grampsdb_name" VALUES(63,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.357190',NULL,NULL,1,4,1,'Mary Augusta','','','','','','',1,1,63); +INSERT INTO "grampsdb_name" VALUES(64,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.410570',NULL,NULL,1,4,1,'William Kennedy','','','','','','',1,1,64); +INSERT INTO "grampsdb_name" VALUES(65,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.452235',NULL,NULL,1,4,1,'Robert Sargent','','','','','','',1,1,65); +INSERT INTO "grampsdb_name" VALUES(66,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.509354',NULL,NULL,1,4,1,'John Fitzgerald','','','','','','',1,1,66); +INSERT INTO "grampsdb_name" VALUES(67,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.585526',NULL,NULL,1,4,1,'Victoria','','','','','','',1,1,67); +INSERT INTO "grampsdb_name" VALUES(68,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.626109',NULL,NULL,1,4,1,'Mary','','','','','','',1,1,68); +INSERT INTO "grampsdb_name" VALUES(69,0,0,0,0,0,0,0,0,0,0,0,'',0,0,0,'2012-06-18 21:44:26.674859',NULL,NULL,1,4,1,'Eunice Mary','','','','','','',1,1,69); CREATE TABLE "grampsdb_lds" ( "id" integer NOT NULL PRIMARY KEY, "calendar" integer NOT NULL, @@ -1755,41 +1798,37 @@ CREATE TABLE "grampsdb_markup" ( "string" text, "start_stop_list" text NOT NULL ); -INSERT INTO "grampsdb_markup" VALUES(1,2,4,1,'Monospace','[(0, 143)]'); -INSERT INTO "grampsdb_markup" VALUES(2,3,4,1,'Monospace','[(0, 152)]'); -INSERT INTO "grampsdb_markup" VALUES(3,7,4,1,'Monospace','[(0, 162)]'); -INSERT INTO "grampsdb_markup" VALUES(4,9,4,1,'Monospace','[(0, 170)]'); -INSERT INTO "grampsdb_markup" VALUES(5,11,4,1,'Monospace','[(0, 150)]'); -INSERT INTO "grampsdb_markup" VALUES(6,16,4,1,'Monospace','[(0, 117)]'); -INSERT INTO "grampsdb_markup" VALUES(7,18,4,1,'Monospace','[(0, 159)]'); -INSERT INTO "grampsdb_markup" VALUES(8,21,4,1,'Monospace','[(0, 227)]'); -INSERT INTO "grampsdb_markup" VALUES(9,27,4,1,'Monospace','[(0, 157)]'); -INSERT INTO "grampsdb_markup" VALUES(10,28,4,1,'Monospace','[(0, 117)]'); -INSERT INTO "grampsdb_markup" VALUES(11,29,4,1,'Monospace','[(0, 117)]'); -INSERT INTO "grampsdb_markup" VALUES(12,30,4,1,'Monospace','[(0, 156)]'); -INSERT INTO "grampsdb_markup" VALUES(13,31,4,1,'Monospace','[(0, 175)]'); -INSERT INTO "grampsdb_markup" VALUES(14,33,4,1,'Monospace','[(0, 117)]'); -INSERT INTO "grampsdb_markup" VALUES(15,35,4,1,'Monospace','[(0, 227)]'); -INSERT INTO "grampsdb_markup" VALUES(16,39,4,1,'Monospace','[(0, 172)]'); -INSERT INTO "grampsdb_markup" VALUES(17,40,4,1,'Monospace','[(0, 155)]'); -INSERT INTO "grampsdb_markup" VALUES(18,41,4,1,'Monospace','[(0, 172)]'); -INSERT INTO "grampsdb_markup" VALUES(19,44,4,1,'Monospace','[(0, 117)]'); -INSERT INTO "grampsdb_markup" VALUES(20,46,4,1,'Monospace','[(0, 135)]'); -INSERT INTO "grampsdb_markup" VALUES(21,52,4,1,'Monospace','[(0, 166)]'); -INSERT INTO "grampsdb_markup" VALUES(22,54,4,1,'Monospace','[(0, 154)]'); -INSERT INTO "grampsdb_markup" VALUES(23,55,4,1,'Monospace','[(0, 162)]'); -INSERT INTO "grampsdb_markup" VALUES(24,56,4,1,'Monospace','[(0, 135)]'); -INSERT INTO "grampsdb_markup" VALUES(25,60,4,1,'Monospace','[(0, 227)]'); -INSERT INTO "grampsdb_markup" VALUES(26,61,4,1,'Monospace','[(0, 159)]'); -INSERT INTO "grampsdb_markup" VALUES(27,63,4,1,'Monospace','[(0, 282)]'); -INSERT INTO "grampsdb_markup" VALUES(28,69,4,1,'Monospace','[(0, 172)]'); -INSERT INTO "grampsdb_markup" VALUES(29,71,4,1,'Monospace','[(0, 143)]'); -INSERT INTO "grampsdb_markup" VALUES(30,73,4,1,'Monospace','[(0, 117)]'); -INSERT INTO "grampsdb_markup" VALUES(31,74,4,1,'Monospace','[(0, 163)]'); -INSERT INTO "grampsdb_markup" VALUES(32,76,4,1,'','[(472, 1140)]'); -INSERT INTO "grampsdb_markup" VALUES(33,76,2,1,NULL,'[(1213, 1237)]'); -INSERT INTO "grampsdb_markup" VALUES(34,76,9,1,'http://en.wikipedia.org/wiki/Masonic_Lodge_Officers','[(1142, 1193)]'); -INSERT INTO "grampsdb_markup" VALUES(35,76,9,1,'https://sites.google.com/site/marioncountyingenweb/home/township-histories/wayne-township','[(343, 432)]'); +INSERT INTO "grampsdb_markup" VALUES(1,3,4,1,'Monospace','[(0, 154)]'); +INSERT INTO "grampsdb_markup" VALUES(2,7,4,1,'Monospace','[(0, 152)]'); +INSERT INTO "grampsdb_markup" VALUES(3,8,4,1,'Monospace','[(0, 166)]'); +INSERT INTO "grampsdb_markup" VALUES(4,11,4,1,'Monospace','[(0, 162)]'); +INSERT INTO "grampsdb_markup" VALUES(5,13,4,1,'Monospace','[(0, 170)]'); +INSERT INTO "grampsdb_markup" VALUES(6,15,4,1,'Monospace','[(0, 227)]'); +INSERT INTO "grampsdb_markup" VALUES(7,19,4,1,'Monospace','[(0, 156)]'); +INSERT INTO "grampsdb_markup" VALUES(8,22,4,1,'Monospace','[(0, 172)]'); +INSERT INTO "grampsdb_markup" VALUES(9,23,4,1,'Monospace','[(0, 159)]'); +INSERT INTO "grampsdb_markup" VALUES(10,24,4,1,'Monospace','[(0, 117)]'); +INSERT INTO "grampsdb_markup" VALUES(11,26,4,1,'Monospace','[(0, 117)]'); +INSERT INTO "grampsdb_markup" VALUES(12,28,4,1,'Monospace','[(0, 172)]'); +INSERT INTO "grampsdb_markup" VALUES(13,29,4,1,'Monospace','[(0, 282)]'); +INSERT INTO "grampsdb_markup" VALUES(14,36,4,1,'Monospace','[(0, 162)]'); +INSERT INTO "grampsdb_markup" VALUES(15,37,4,1,'Monospace','[(0, 227)]'); +INSERT INTO "grampsdb_markup" VALUES(16,39,4,1,'Monospace','[(0, 175)]'); +INSERT INTO "grampsdb_markup" VALUES(17,41,4,1,'Monospace','[(0, 159)]'); +INSERT INTO "grampsdb_markup" VALUES(18,42,4,1,'Monospace','[(0, 163)]'); +INSERT INTO "grampsdb_markup" VALUES(19,44,4,1,'Monospace','[(0, 143)]'); +INSERT INTO "grampsdb_markup" VALUES(20,48,4,1,'Monospace','[(0, 117)]'); +INSERT INTO "grampsdb_markup" VALUES(21,49,4,1,'Monospace','[(0, 135)]'); +INSERT INTO "grampsdb_markup" VALUES(22,50,4,1,'Monospace','[(0, 157)]'); +INSERT INTO "grampsdb_markup" VALUES(23,51,4,1,'Monospace','[(0, 117)]'); +INSERT INTO "grampsdb_markup" VALUES(24,52,4,1,'Monospace','[(0, 143)]'); +INSERT INTO "grampsdb_markup" VALUES(25,54,4,1,'Monospace','[(0, 172)]'); +INSERT INTO "grampsdb_markup" VALUES(26,57,4,1,'Monospace','[(0, 155)]'); +INSERT INTO "grampsdb_markup" VALUES(27,65,4,1,'Monospace','[(0, 135)]'); +INSERT INTO "grampsdb_markup" VALUES(28,67,4,1,'Monospace','[(0, 227)]'); +INSERT INTO "grampsdb_markup" VALUES(29,69,4,1,'Monospace','[(0, 150)]'); +INSERT INTO "grampsdb_markup" VALUES(30,72,4,1,'Monospace','[(0, 117)]'); +INSERT INTO "grampsdb_markup" VALUES(31,74,4,1,'Monospace','[(0, 117)]'); CREATE TABLE "grampsdb_sourcedatamap" ( "id" integer NOT NULL PRIMARY KEY, "key" varchar(80) NOT NULL, @@ -1860,6 +1899,19 @@ CREATE TABLE "grampsdb_attribute" ( "object_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"), "object_id" integer unsigned NOT NULL ); +CREATE TABLE "grampsdb_log" ( + "id" integer NOT NULL PRIMARY KEY, + "object_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"), + "object_id" integer unsigned NOT NULL, + "order" integer unsigned NOT NULL, + "last_saved" datetime NOT NULL, + "last_changed" datetime, + "last_changed_by" text, + "private" bool NOT NULL, + "log_type" varchar(10) NOT NULL, + "reason" text NOT NULL, + "cache" text +); CREATE TABLE "grampsdb_noteref" ( "id" integer NOT NULL PRIMARY KEY, "object_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"), @@ -1871,74 +1923,74 @@ CREATE TABLE "grampsdb_noteref" ( "private" bool NOT NULL, "ref_object_id" integer NOT NULL REFERENCES "grampsdb_note" ("id") ); -INSERT INTO "grampsdb_noteref" VALUES(1,32,1,1,'2012-06-10 22:25:15.731661',NULL,NULL,0,43); -INSERT INTO "grampsdb_noteref" VALUES(2,32,1,1,'2012-06-10 22:25:15.733930',NULL,NULL,0,45); -INSERT INTO "grampsdb_noteref" VALUES(3,32,1,1,'2012-06-10 22:25:15.736070',NULL,NULL,0,29); -INSERT INTO "grampsdb_noteref" VALUES(4,32,7,1,'2012-06-10 22:25:15.921748',NULL,NULL,0,1); -INSERT INTO "grampsdb_noteref" VALUES(5,32,7,1,'2012-06-10 22:25:15.923953',NULL,NULL,0,22); -INSERT INTO "grampsdb_noteref" VALUES(6,32,7,1,'2012-06-10 22:25:15.926082',NULL,NULL,0,28); -INSERT INTO "grampsdb_noteref" VALUES(7,35,1,1,'2012-06-10 22:25:15.963920',NULL,NULL,0,52); -INSERT INTO "grampsdb_noteref" VALUES(8,35,2,1,'2012-06-10 22:25:16.005826',NULL,NULL,0,71); -INSERT INTO "grampsdb_noteref" VALUES(9,32,12,1,'2012-06-10 22:25:16.103603',NULL,NULL,0,20); -INSERT INTO "grampsdb_noteref" VALUES(10,32,21,1,'2012-06-10 22:25:16.366491',NULL,NULL,0,12); -INSERT INTO "grampsdb_noteref" VALUES(11,32,21,1,'2012-06-10 22:25:16.368605',NULL,NULL,0,17); -INSERT INTO "grampsdb_noteref" VALUES(12,32,21,1,'2012-06-10 22:25:16.370717',NULL,NULL,0,33); -INSERT INTO "grampsdb_noteref" VALUES(13,32,23,1,'2012-06-10 22:25:16.489313',NULL,NULL,0,47); -INSERT INTO "grampsdb_noteref" VALUES(14,32,23,1,'2012-06-10 22:25:16.491450',NULL,NULL,0,25); -INSERT INTO "grampsdb_noteref" VALUES(15,32,23,1,'2012-06-10 22:25:16.493602',NULL,NULL,0,49); -INSERT INTO "grampsdb_noteref" VALUES(16,32,23,1,'2012-06-10 22:25:16.495713',NULL,NULL,0,66); -INSERT INTO "grampsdb_noteref" VALUES(17,32,23,1,'2012-06-10 22:25:16.497822',NULL,NULL,0,13); -INSERT INTO "grampsdb_noteref" VALUES(18,32,23,1,'2012-06-10 22:25:16.499952',NULL,NULL,0,63); -INSERT INTO "grampsdb_noteref" VALUES(19,35,3,1,'2012-06-10 22:25:16.566132',NULL,NULL,0,31); -INSERT INTO "grampsdb_noteref" VALUES(20,35,4,1,'2012-06-10 22:25:16.695037',NULL,NULL,0,74); -INSERT INTO "grampsdb_noteref" VALUES(21,32,27,1,'2012-06-10 22:25:16.779231',NULL,NULL,0,70); -INSERT INTO "grampsdb_noteref" VALUES(22,32,27,1,'2012-06-10 22:25:16.782477',NULL,NULL,0,10); -INSERT INTO "grampsdb_noteref" VALUES(23,32,27,1,'2012-06-10 22:25:16.784618',NULL,NULL,0,44); -INSERT INTO "grampsdb_noteref" VALUES(24,32,28,1,'2012-06-10 22:25:16.821076',NULL,NULL,0,42); -INSERT INTO "grampsdb_noteref" VALUES(25,35,5,1,'2012-06-10 22:25:16.850061',NULL,NULL,0,56); -INSERT INTO "grampsdb_noteref" VALUES(26,35,6,1,'2012-06-10 22:25:16.903843',NULL,NULL,0,46); -INSERT INTO "grampsdb_noteref" VALUES(27,32,33,1,'2012-06-10 22:25:17.030148',NULL,NULL,0,75); -INSERT INTO "grampsdb_noteref" VALUES(28,32,33,1,'2012-06-10 22:25:17.032269',NULL,NULL,0,19); -INSERT INTO "grampsdb_noteref" VALUES(29,32,33,1,'2012-06-10 22:25:17.034424',NULL,NULL,0,37); -INSERT INTO "grampsdb_noteref" VALUES(30,32,33,1,'2012-06-10 22:25:17.036551',NULL,NULL,0,58); -INSERT INTO "grampsdb_noteref" VALUES(31,32,33,1,'2012-06-10 22:25:17.038700',NULL,NULL,0,21); -INSERT INTO "grampsdb_noteref" VALUES(32,32,34,1,'2012-06-10 22:25:17.094787',NULL,NULL,0,15); -INSERT INTO "grampsdb_noteref" VALUES(33,35,7,1,'2012-06-10 22:25:17.186475',NULL,NULL,0,9); -INSERT INTO "grampsdb_noteref" VALUES(34,32,35,1,'2012-06-10 22:25:17.218894',NULL,NULL,0,6); -INSERT INTO "grampsdb_noteref" VALUES(35,32,35,1,'2012-06-10 22:25:17.221015',NULL,NULL,0,57); -INSERT INTO "grampsdb_noteref" VALUES(36,32,35,1,'2012-06-10 22:25:17.223219',NULL,NULL,0,16); -INSERT INTO "grampsdb_noteref" VALUES(37,35,8,1,'2012-06-10 22:25:17.527438',NULL,NULL,0,3); -INSERT INTO "grampsdb_noteref" VALUES(38,35,9,1,'2012-06-10 22:25:17.559959',NULL,NULL,0,2); -INSERT INTO "grampsdb_noteref" VALUES(39,32,48,1,'2012-06-10 22:25:17.600199',NULL,NULL,0,4); -INSERT INTO "grampsdb_noteref" VALUES(40,32,48,1,'2012-06-10 22:25:17.602353',NULL,NULL,0,24); -INSERT INTO "grampsdb_noteref" VALUES(41,32,48,1,'2012-06-10 22:25:17.604472',NULL,NULL,0,64); -INSERT INTO "grampsdb_noteref" VALUES(42,32,48,1,'2012-06-10 22:25:17.606604',NULL,NULL,0,67); -INSERT INTO "grampsdb_noteref" VALUES(43,32,48,1,'2012-06-10 22:25:17.608739',NULL,NULL,0,35); -INSERT INTO "grampsdb_noteref" VALUES(44,32,51,1,'2012-06-10 22:25:17.756182',NULL,NULL,0,5); -INSERT INTO "grampsdb_noteref" VALUES(45,32,51,1,'2012-06-10 22:25:17.758490',NULL,NULL,0,51); -INSERT INTO "grampsdb_noteref" VALUES(46,32,51,1,'2012-06-10 22:25:17.760624',NULL,NULL,0,36); -INSERT INTO "grampsdb_noteref" VALUES(47,32,51,1,'2012-06-10 22:25:17.762760',NULL,NULL,0,32); -INSERT INTO "grampsdb_noteref" VALUES(48,32,51,1,'2012-06-10 22:25:17.764871',NULL,NULL,0,8); -INSERT INTO "grampsdb_noteref" VALUES(49,32,51,1,'2012-06-10 22:25:17.767039',NULL,NULL,0,60); -INSERT INTO "grampsdb_noteref" VALUES(50,35,10,1,'2012-06-10 22:25:17.928888',NULL,NULL,0,40); -INSERT INTO "grampsdb_noteref" VALUES(51,32,56,1,'2012-06-10 22:25:18.041188',NULL,NULL,0,68); -INSERT INTO "grampsdb_noteref" VALUES(52,32,56,1,'2012-06-10 22:25:18.044000',NULL,NULL,0,50); -INSERT INTO "grampsdb_noteref" VALUES(53,32,56,1,'2012-06-10 22:25:18.047212',NULL,NULL,0,72); -INSERT INTO "grampsdb_noteref" VALUES(54,32,56,1,'2012-06-10 22:25:18.050306',NULL,NULL,0,69); -INSERT INTO "grampsdb_noteref" VALUES(55,32,64,1,'2012-06-10 22:25:18.433226',NULL,NULL,0,23); -INSERT INTO "grampsdb_noteref" VALUES(56,32,67,1,'2012-06-10 22:25:18.499113',NULL,NULL,0,34); -INSERT INTO "grampsdb_noteref" VALUES(57,32,67,1,'2012-06-10 22:25:18.501261',NULL,NULL,0,26); -INSERT INTO "grampsdb_noteref" VALUES(58,32,67,1,'2012-06-10 22:25:18.503403',NULL,NULL,0,73); -INSERT INTO "grampsdb_noteref" VALUES(59,32,68,1,'2012-06-10 22:25:18.551204',NULL,NULL,0,38); -INSERT INTO "grampsdb_noteref" VALUES(60,32,68,1,'2012-06-10 22:25:18.553342',NULL,NULL,0,65); -INSERT INTO "grampsdb_noteref" VALUES(61,32,68,1,'2012-06-10 22:25:18.555469',NULL,NULL,0,14); -INSERT INTO "grampsdb_noteref" VALUES(62,32,68,1,'2012-06-10 22:25:18.557612',NULL,NULL,0,41); -INSERT INTO "grampsdb_noteref" VALUES(63,35,11,1,'2012-06-10 22:25:18.593992',NULL,NULL,0,11); -INSERT INTO "grampsdb_noteref" VALUES(64,32,69,1,'2012-06-10 22:25:18.641021',NULL,NULL,0,62); -INSERT INTO "grampsdb_noteref" VALUES(65,32,69,1,'2012-06-10 22:25:18.643167',NULL,NULL,0,59); -INSERT INTO "grampsdb_noteref" VALUES(66,32,69,1,'2012-06-10 22:25:18.645325',NULL,NULL,0,53); -INSERT INTO "grampsdb_noteref" VALUES(67,32,69,1,'2012-06-10 22:25:18.647443',NULL,NULL,0,48); -INSERT INTO "grampsdb_noteref" VALUES(68,32,69,1,'2012-06-10 22:25:18.649593',NULL,NULL,0,39); +INSERT INTO "grampsdb_noteref" VALUES(1,32,1,1,'2012-06-18 21:44:21.830825',NULL,NULL,0,4); +INSERT INTO "grampsdb_noteref" VALUES(2,32,2,1,'2012-06-18 21:44:21.885811',NULL,NULL,0,14); +INSERT INTO "grampsdb_noteref" VALUES(3,35,1,1,'2012-06-18 21:44:21.912155',NULL,NULL,0,49); +INSERT INTO "grampsdb_noteref" VALUES(4,32,3,1,'2012-06-18 21:44:21.976232',NULL,NULL,0,20); +INSERT INTO "grampsdb_noteref" VALUES(5,32,3,1,'2012-06-18 21:44:21.980105',NULL,NULL,0,1); +INSERT INTO "grampsdb_noteref" VALUES(6,32,3,1,'2012-06-18 21:44:21.983843',NULL,NULL,0,25); +INSERT INTO "grampsdb_noteref" VALUES(7,32,3,1,'2012-06-18 21:44:21.987563',NULL,NULL,0,75); +INSERT INTO "grampsdb_noteref" VALUES(8,32,3,1,'2012-06-18 21:44:21.991415',NULL,NULL,0,62); +INSERT INTO "grampsdb_noteref" VALUES(9,32,3,1,'2012-06-18 21:44:21.995166',NULL,NULL,0,37); +INSERT INTO "grampsdb_noteref" VALUES(10,32,7,1,'2012-06-18 21:44:22.221594',NULL,NULL,0,47); +INSERT INTO "grampsdb_noteref" VALUES(11,32,7,1,'2012-06-18 21:44:22.225494',NULL,NULL,0,70); +INSERT INTO "grampsdb_noteref" VALUES(12,32,7,1,'2012-06-18 21:44:22.229260',NULL,NULL,0,71); +INSERT INTO "grampsdb_noteref" VALUES(13,32,7,1,'2012-06-18 21:44:22.233004',NULL,NULL,0,54); +INSERT INTO "grampsdb_noteref" VALUES(14,35,2,1,'2012-06-18 21:44:22.707245',NULL,NULL,0,65); +INSERT INTO "grampsdb_noteref" VALUES(15,32,17,1,'2012-06-18 21:44:22.780492',NULL,NULL,0,40); +INSERT INTO "grampsdb_noteref" VALUES(16,32,17,1,'2012-06-18 21:44:22.784389',NULL,NULL,0,66); +INSERT INTO "grampsdb_noteref" VALUES(17,32,17,1,'2012-06-18 21:44:22.789462',NULL,NULL,0,24); +INSERT INTO "grampsdb_noteref" VALUES(18,32,21,1,'2012-06-18 21:44:23.092783',NULL,NULL,0,32); +INSERT INTO "grampsdb_noteref" VALUES(19,32,21,1,'2012-06-18 21:44:23.096555',NULL,NULL,0,31); +INSERT INTO "grampsdb_noteref" VALUES(20,32,21,1,'2012-06-18 21:44:23.100428',NULL,NULL,0,48); +INSERT INTO "grampsdb_noteref" VALUES(21,32,24,1,'2012-06-18 21:44:23.360614',NULL,NULL,0,61); +INSERT INTO "grampsdb_noteref" VALUES(22,32,24,1,'2012-06-18 21:44:23.364551',NULL,NULL,0,43); +INSERT INTO "grampsdb_noteref" VALUES(23,32,24,1,'2012-06-18 21:44:23.368274',NULL,NULL,0,74); +INSERT INTO "grampsdb_noteref" VALUES(24,35,3,1,'2012-06-18 21:44:23.410125',NULL,NULL,0,52); +INSERT INTO "grampsdb_noteref" VALUES(25,32,27,1,'2012-06-18 21:44:23.709955',NULL,NULL,0,55); +INSERT INTO "grampsdb_noteref" VALUES(26,32,27,1,'2012-06-18 21:44:23.713720',NULL,NULL,0,38); +INSERT INTO "grampsdb_noteref" VALUES(27,32,27,1,'2012-06-18 21:44:23.717481',NULL,NULL,0,53); +INSERT INTO "grampsdb_noteref" VALUES(28,32,27,1,'2012-06-18 21:44:23.721224',NULL,NULL,0,35); +INSERT INTO "grampsdb_noteref" VALUES(29,32,27,1,'2012-06-18 21:44:23.725230',NULL,NULL,0,15); +INSERT INTO "grampsdb_noteref" VALUES(30,35,4,1,'2012-06-18 21:44:23.842987',NULL,NULL,0,69); +INSERT INTO "grampsdb_noteref" VALUES(31,35,5,1,'2012-06-18 21:44:23.851287',NULL,NULL,0,42); +INSERT INTO "grampsdb_noteref" VALUES(32,32,30,1,'2012-06-18 21:44:23.999643',NULL,NULL,0,68); +INSERT INTO "grampsdb_noteref" VALUES(33,32,30,1,'2012-06-18 21:44:24.003657',NULL,NULL,0,16); +INSERT INTO "grampsdb_noteref" VALUES(34,32,30,1,'2012-06-18 21:44:24.007484',NULL,NULL,0,18); +INSERT INTO "grampsdb_noteref" VALUES(35,32,30,1,'2012-06-18 21:44:24.011393',NULL,NULL,0,17); +INSERT INTO "grampsdb_noteref" VALUES(36,32,30,1,'2012-06-18 21:44:24.015154',NULL,NULL,0,58); +INSERT INTO "grampsdb_noteref" VALUES(37,32,30,1,'2012-06-18 21:44:24.018893',NULL,NULL,0,29); +INSERT INTO "grampsdb_noteref" VALUES(38,32,31,1,'2012-06-18 21:44:24.159572',NULL,NULL,0,21); +INSERT INTO "grampsdb_noteref" VALUES(39,32,31,1,'2012-06-18 21:44:24.163490',NULL,NULL,0,12); +INSERT INTO "grampsdb_noteref" VALUES(40,32,31,1,'2012-06-18 21:44:24.167283',NULL,NULL,0,26); +INSERT INTO "grampsdb_noteref" VALUES(41,32,32,1,'2012-06-18 21:44:24.286031',NULL,NULL,0,2); +INSERT INTO "grampsdb_noteref" VALUES(42,32,32,1,'2012-06-18 21:44:24.289813',NULL,NULL,0,46); +INSERT INTO "grampsdb_noteref" VALUES(43,32,32,1,'2012-06-18 21:44:24.293581',NULL,NULL,0,51); +INSERT INTO "grampsdb_noteref" VALUES(44,35,6,1,'2012-06-18 21:44:24.597114',NULL,NULL,0,39); +INSERT INTO "grampsdb_noteref" VALUES(45,32,39,1,'2012-06-18 21:44:24.734661',NULL,NULL,0,34); +INSERT INTO "grampsdb_noteref" VALUES(46,32,39,1,'2012-06-18 21:44:24.739944',NULL,NULL,0,33); +INSERT INTO "grampsdb_noteref" VALUES(47,32,39,1,'2012-06-18 21:44:24.743777',NULL,NULL,0,10); +INSERT INTO "grampsdb_noteref" VALUES(48,32,39,1,'2012-06-18 21:44:24.747551',NULL,NULL,0,56); +INSERT INTO "grampsdb_noteref" VALUES(49,32,39,1,'2012-06-18 21:44:24.751312',NULL,NULL,0,67); +INSERT INTO "grampsdb_noteref" VALUES(50,32,40,1,'2012-06-18 21:44:24.852871',NULL,NULL,0,9); +INSERT INTO "grampsdb_noteref" VALUES(51,35,7,1,'2012-06-18 21:44:24.964817',NULL,NULL,0,44); +INSERT INTO "grampsdb_noteref" VALUES(52,35,8,1,'2012-06-18 21:44:25.204496',NULL,NULL,0,13); +INSERT INTO "grampsdb_noteref" VALUES(53,35,9,1,'2012-06-18 21:44:25.586906',NULL,NULL,0,8); +INSERT INTO "grampsdb_noteref" VALUES(54,35,10,1,'2012-06-18 21:44:25.656834',NULL,NULL,0,7); +INSERT INTO "grampsdb_noteref" VALUES(55,32,53,1,'2012-06-18 21:44:25.725447',NULL,NULL,0,63); +INSERT INTO "grampsdb_noteref" VALUES(56,32,53,1,'2012-06-18 21:44:25.729201',NULL,NULL,0,5); +INSERT INTO "grampsdb_noteref" VALUES(57,32,53,1,'2012-06-18 21:44:25.735546',NULL,NULL,0,59); +INSERT INTO "grampsdb_noteref" VALUES(58,32,53,1,'2012-06-18 21:44:25.750978',NULL,NULL,0,64); +INSERT INTO "grampsdb_noteref" VALUES(59,32,53,1,'2012-06-18 21:44:25.755975',NULL,NULL,0,28); +INSERT INTO "grampsdb_noteref" VALUES(60,32,57,1,'2012-06-18 21:44:26.076417',NULL,NULL,0,27); +INSERT INTO "grampsdb_noteref" VALUES(61,32,57,1,'2012-06-18 21:44:26.080167',NULL,NULL,0,73); +INSERT INTO "grampsdb_noteref" VALUES(62,32,57,1,'2012-06-18 21:44:26.083915',NULL,NULL,0,72); +INSERT INTO "grampsdb_noteref" VALUES(63,32,65,1,'2012-06-18 21:44:26.475213',NULL,NULL,0,30); +INSERT INTO "grampsdb_noteref" VALUES(64,32,69,1,'2012-06-18 21:44:26.704588',NULL,NULL,0,45); +INSERT INTO "grampsdb_noteref" VALUES(65,32,69,1,'2012-06-18 21:44:26.708426',NULL,NULL,0,6); +INSERT INTO "grampsdb_noteref" VALUES(66,32,69,1,'2012-06-18 21:44:26.712184',NULL,NULL,0,60); +INSERT INTO "grampsdb_noteref" VALUES(67,32,69,1,'2012-06-18 21:44:26.715923',NULL,NULL,0,22); +INSERT INTO "grampsdb_noteref" VALUES(68,35,11,1,'2012-06-18 21:44:26.748288',NULL,NULL,0,57); CREATE TABLE "grampsdb_eventref" ( "id" integer NOT NULL PRIMARY KEY, "object_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"), @@ -1951,150 +2003,150 @@ CREATE TABLE "grampsdb_eventref" ( "ref_object_id" integer NOT NULL REFERENCES "grampsdb_event" ("id"), "role_type_id" integer NOT NULL REFERENCES "grampsdb_eventroletype" ("id") ); -INSERT INTO "grampsdb_eventref" VALUES(1,32,1,1,'2012-06-10 22:25:15.712242',NULL,NULL,0,88,3); -INSERT INTO "grampsdb_eventref" VALUES(2,32,1,2,'2012-06-10 22:25:15.715165',NULL,NULL,0,48,3); -INSERT INTO "grampsdb_eventref" VALUES(3,32,1,3,'2012-06-10 22:25:15.717936',NULL,NULL,0,55,3); -INSERT INTO "grampsdb_eventref" VALUES(4,32,1,4,'2012-06-10 22:25:15.720698',NULL,NULL,0,110,3); -INSERT INTO "grampsdb_eventref" VALUES(5,32,1,5,'2012-06-10 22:25:15.723524',NULL,NULL,0,102,3); -INSERT INTO "grampsdb_eventref" VALUES(6,32,2,1,'2012-06-10 22:25:15.772134',NULL,NULL,0,15,3); -INSERT INTO "grampsdb_eventref" VALUES(7,32,3,1,'2012-06-10 22:25:15.795762',NULL,NULL,0,121,3); -INSERT INTO "grampsdb_eventref" VALUES(8,32,4,1,'2012-06-10 22:25:15.818350',NULL,NULL,0,33,3); -INSERT INTO "grampsdb_eventref" VALUES(9,33,1,1,'2012-06-10 22:25:15.849184',NULL,NULL,0,112,10); -INSERT INTO "grampsdb_eventref" VALUES(10,32,6,1,'2012-06-10 22:25:15.872480',NULL,NULL,0,133,3); -INSERT INTO "grampsdb_eventref" VALUES(11,32,7,1,'2012-06-10 22:25:15.899010',NULL,NULL,0,91,3); -INSERT INTO "grampsdb_eventref" VALUES(12,32,7,2,'2012-06-10 22:25:15.901784',NULL,NULL,0,23,3); -INSERT INTO "grampsdb_eventref" VALUES(13,32,7,3,'2012-06-10 22:25:15.904526',NULL,NULL,0,11,3); -INSERT INTO "grampsdb_eventref" VALUES(14,32,7,4,'2012-06-10 22:25:15.907305',NULL,NULL,0,75,3); -INSERT INTO "grampsdb_eventref" VALUES(15,32,7,5,'2012-06-10 22:25:15.910070',NULL,NULL,0,84,3); -INSERT INTO "grampsdb_eventref" VALUES(16,32,7,6,'2012-06-10 22:25:15.912825',NULL,NULL,0,38,3); -INSERT INTO "grampsdb_eventref" VALUES(17,32,7,7,'2012-06-10 22:25:15.915585',NULL,NULL,0,46,3); -INSERT INTO "grampsdb_eventref" VALUES(18,32,8,1,'2012-06-10 22:25:15.977646',NULL,NULL,0,78,3); -INSERT INTO "grampsdb_eventref" VALUES(19,32,9,1,'2012-06-10 22:25:16.015003',NULL,NULL,0,37,3); -INSERT INTO "grampsdb_eventref" VALUES(20,32,11,1,'2012-06-10 22:25:16.064964',NULL,NULL,0,73,3); -INSERT INTO "grampsdb_eventref" VALUES(21,32,12,1,'2012-06-10 22:25:16.094691',NULL,NULL,0,139,3); -INSERT INTO "grampsdb_eventref" VALUES(22,32,12,2,'2012-06-10 22:25:16.097475',NULL,NULL,0,60,3); -INSERT INTO "grampsdb_eventref" VALUES(23,32,13,1,'2012-06-10 22:25:16.138918',NULL,NULL,0,144,3); -INSERT INTO "grampsdb_eventref" VALUES(24,32,14,1,'2012-06-10 22:25:16.161737',NULL,NULL,0,137,3); -INSERT INTO "grampsdb_eventref" VALUES(25,32,14,2,'2012-06-10 22:25:16.164520',NULL,NULL,0,66,3); -INSERT INTO "grampsdb_eventref" VALUES(26,32,16,1,'2012-06-10 22:25:16.218494',NULL,NULL,0,104,3); -INSERT INTO "grampsdb_eventref" VALUES(27,32,17,1,'2012-06-10 22:25:16.241725',NULL,NULL,0,20,3); -INSERT INTO "grampsdb_eventref" VALUES(28,32,18,1,'2012-06-10 22:25:16.267239',NULL,NULL,0,100,3); -INSERT INTO "grampsdb_eventref" VALUES(29,32,19,1,'2012-06-10 22:25:16.293892',NULL,NULL,0,19,3); -INSERT INTO "grampsdb_eventref" VALUES(30,32,20,1,'2012-06-10 22:25:16.325072',NULL,NULL,0,25,3); -INSERT INTO "grampsdb_eventref" VALUES(31,32,21,1,'2012-06-10 22:25:16.345376',NULL,NULL,0,58,3); -INSERT INTO "grampsdb_eventref" VALUES(32,32,21,2,'2012-06-10 22:25:16.348157',NULL,NULL,0,132,3); -INSERT INTO "grampsdb_eventref" VALUES(33,32,21,3,'2012-06-10 22:25:16.350958',NULL,NULL,0,31,3); -INSERT INTO "grampsdb_eventref" VALUES(34,32,21,4,'2012-06-10 22:25:16.353746',NULL,NULL,0,45,3); -INSERT INTO "grampsdb_eventref" VALUES(35,32,21,5,'2012-06-10 22:25:16.356522',NULL,NULL,0,71,3); -INSERT INTO "grampsdb_eventref" VALUES(36,33,3,1,'2012-06-10 22:25:16.404544',NULL,NULL,0,67,10); -INSERT INTO "grampsdb_eventref" VALUES(37,32,22,1,'2012-06-10 22:25:16.413793',NULL,NULL,0,8,3); -INSERT INTO "grampsdb_eventref" VALUES(38,32,22,2,'2012-06-10 22:25:16.416566',NULL,NULL,0,129,3); -INSERT INTO "grampsdb_eventref" VALUES(39,32,23,1,'2012-06-10 22:25:16.451434',NULL,NULL,0,108,3); -INSERT INTO "grampsdb_eventref" VALUES(40,32,23,2,'2012-06-10 22:25:16.454234',NULL,NULL,0,30,3); -INSERT INTO "grampsdb_eventref" VALUES(41,32,23,3,'2012-06-10 22:25:16.456994',NULL,NULL,0,18,3); -INSERT INTO "grampsdb_eventref" VALUES(42,32,23,4,'2012-06-10 22:25:16.459781',NULL,NULL,0,118,3); -INSERT INTO "grampsdb_eventref" VALUES(43,32,23,5,'2012-06-10 22:25:16.462548',NULL,NULL,0,36,3); -INSERT INTO "grampsdb_eventref" VALUES(44,32,23,6,'2012-06-10 22:25:16.465312',NULL,NULL,0,56,3); -INSERT INTO "grampsdb_eventref" VALUES(45,32,23,7,'2012-06-10 22:25:16.468091',NULL,NULL,0,13,3); -INSERT INTO "grampsdb_eventref" VALUES(46,32,23,8,'2012-06-10 22:25:16.470898',NULL,NULL,0,81,3); -INSERT INTO "grampsdb_eventref" VALUES(47,32,23,9,'2012-06-10 22:25:16.473693',NULL,NULL,0,96,3); -INSERT INTO "grampsdb_eventref" VALUES(48,32,23,10,'2012-06-10 22:25:16.476511',NULL,NULL,0,114,3); -INSERT INTO "grampsdb_eventref" VALUES(49,32,23,11,'2012-06-10 22:25:16.479346',NULL,NULL,0,47,3); -INSERT INTO "grampsdb_eventref" VALUES(50,32,24,1,'2012-06-10 22:25:16.589410',NULL,NULL,0,80,3); -INSERT INTO "grampsdb_eventref" VALUES(51,33,4,1,'2012-06-10 22:25:16.638928',NULL,NULL,0,34,10); -INSERT INTO "grampsdb_eventref" VALUES(52,33,5,1,'2012-06-10 22:25:16.649296',NULL,NULL,0,3,10); -INSERT INTO "grampsdb_eventref" VALUES(53,32,25,1,'2012-06-10 22:25:16.664310',NULL,NULL,0,21,3); -INSERT INTO "grampsdb_eventref" VALUES(54,32,26,1,'2012-06-10 22:25:16.707824',NULL,NULL,0,70,3); -INSERT INTO "grampsdb_eventref" VALUES(55,33,6,1,'2012-06-10 22:25:16.747476',NULL,NULL,0,87,10); -INSERT INTO "grampsdb_eventref" VALUES(56,32,27,1,'2012-06-10 22:25:16.761138',NULL,NULL,0,92,3); -INSERT INTO "grampsdb_eventref" VALUES(57,32,27,2,'2012-06-10 22:25:16.765551',NULL,NULL,0,134,3); -INSERT INTO "grampsdb_eventref" VALUES(58,32,28,1,'2012-06-10 22:25:16.814989',NULL,NULL,0,24,3); -INSERT INTO "grampsdb_eventref" VALUES(59,32,30,1,'2012-06-10 22:25:16.861856',NULL,NULL,0,69,3); -INSERT INTO "grampsdb_eventref" VALUES(60,32,31,1,'2012-06-10 22:25:16.886373',NULL,NULL,0,51,3); -INSERT INTO "grampsdb_eventref" VALUES(61,33,8,1,'2012-06-10 22:25:16.941773',NULL,NULL,0,93,10); -INSERT INTO "grampsdb_eventref" VALUES(62,32,32,1,'2012-06-10 22:25:16.952363',NULL,NULL,0,9,3); -INSERT INTO "grampsdb_eventref" VALUES(63,32,33,1,'2012-06-10 22:25:17.005884',NULL,NULL,0,63,3); -INSERT INTO "grampsdb_eventref" VALUES(64,32,33,2,'2012-06-10 22:25:17.008684',NULL,NULL,0,26,3); -INSERT INTO "grampsdb_eventref" VALUES(65,32,33,3,'2012-06-10 22:25:17.011537',NULL,NULL,0,43,3); -INSERT INTO "grampsdb_eventref" VALUES(66,32,33,4,'2012-06-10 22:25:17.014323',NULL,NULL,0,94,3); -INSERT INTO "grampsdb_eventref" VALUES(67,32,33,5,'2012-06-10 22:25:17.017095',NULL,NULL,0,49,3); -INSERT INTO "grampsdb_eventref" VALUES(68,32,33,6,'2012-06-10 22:25:17.019924',NULL,NULL,0,140,3); -INSERT INTO "grampsdb_eventref" VALUES(69,32,34,1,'2012-06-10 22:25:17.077294',NULL,NULL,0,50,3); -INSERT INTO "grampsdb_eventref" VALUES(70,32,34,2,'2012-06-10 22:25:17.080081',NULL,NULL,0,77,3); -INSERT INTO "grampsdb_eventref" VALUES(71,32,34,3,'2012-06-10 22:25:17.083031',NULL,NULL,0,97,3); -INSERT INTO "grampsdb_eventref" VALUES(72,32,34,4,'2012-06-10 22:25:17.085849',NULL,NULL,0,76,3); -INSERT INTO "grampsdb_eventref" VALUES(73,32,34,5,'2012-06-10 22:25:17.088620',NULL,NULL,0,89,3); -INSERT INTO "grampsdb_eventref" VALUES(74,33,10,1,'2012-06-10 22:25:17.159782',NULL,NULL,0,107,10); -INSERT INTO "grampsdb_eventref" VALUES(75,33,11,1,'2012-06-10 22:25:17.182811',NULL,NULL,0,141,10); -INSERT INTO "grampsdb_eventref" VALUES(76,33,12,1,'2012-06-10 22:25:17.198138',NULL,NULL,0,65,10); -INSERT INTO "grampsdb_eventref" VALUES(77,32,35,1,'2012-06-10 22:25:17.209996',NULL,NULL,0,6,3); -INSERT INTO "grampsdb_eventref" VALUES(78,32,35,2,'2012-06-10 22:25:17.212770',NULL,NULL,0,99,3); -INSERT INTO "grampsdb_eventref" VALUES(79,32,37,1,'2012-06-10 22:25:17.263205',NULL,NULL,0,122,3); -INSERT INTO "grampsdb_eventref" VALUES(80,32,38,1,'2012-06-10 22:25:17.286527',NULL,NULL,0,124,3); -INSERT INTO "grampsdb_eventref" VALUES(81,32,39,1,'2012-06-10 22:25:17.310281',NULL,NULL,0,7,3); -INSERT INTO "grampsdb_eventref" VALUES(82,33,13,1,'2012-06-10 22:25:17.392011',NULL,NULL,0,16,10); -INSERT INTO "grampsdb_eventref" VALUES(83,32,42,1,'2012-06-10 22:25:17.401171',NULL,NULL,0,117,3); -INSERT INTO "grampsdb_eventref" VALUES(84,32,42,2,'2012-06-10 22:25:17.403955',NULL,NULL,0,27,3); -INSERT INTO "grampsdb_eventref" VALUES(85,32,43,1,'2012-06-10 22:25:17.434026',NULL,NULL,0,64,3); -INSERT INTO "grampsdb_eventref" VALUES(86,32,43,2,'2012-06-10 22:25:17.436808',NULL,NULL,0,131,3); -INSERT INTO "grampsdb_eventref" VALUES(87,32,45,1,'2012-06-10 22:25:17.477477',NULL,NULL,0,109,3); -INSERT INTO "grampsdb_eventref" VALUES(88,32,45,2,'2012-06-10 22:25:17.480326',NULL,NULL,0,83,3); -INSERT INTO "grampsdb_eventref" VALUES(89,32,47,1,'2012-06-10 22:25:17.539245',NULL,NULL,0,68,3); -INSERT INTO "grampsdb_eventref" VALUES(90,32,48,1,'2012-06-10 22:25:17.576152',NULL,NULL,0,32,3); -INSERT INTO "grampsdb_eventref" VALUES(91,32,48,2,'2012-06-10 22:25:17.578944',NULL,NULL,0,17,3); -INSERT INTO "grampsdb_eventref" VALUES(92,32,48,3,'2012-06-10 22:25:17.581788',NULL,NULL,0,62,3); -INSERT INTO "grampsdb_eventref" VALUES(93,32,48,4,'2012-06-10 22:25:17.584657',NULL,NULL,0,54,3); -INSERT INTO "grampsdb_eventref" VALUES(94,32,48,5,'2012-06-10 22:25:17.587426',NULL,NULL,0,41,3); -INSERT INTO "grampsdb_eventref" VALUES(95,32,48,6,'2012-06-10 22:25:17.590194',NULL,NULL,0,123,3); -INSERT INTO "grampsdb_eventref" VALUES(96,33,14,1,'2012-06-10 22:25:17.669505',NULL,NULL,0,135,10); -INSERT INTO "grampsdb_eventref" VALUES(97,32,50,1,'2012-06-10 22:25:17.693098',NULL,NULL,0,119,3); -INSERT INTO "grampsdb_eventref" VALUES(98,32,51,1,'2012-06-10 22:25:17.729016',NULL,NULL,0,95,3); -INSERT INTO "grampsdb_eventref" VALUES(99,32,51,2,'2012-06-10 22:25:17.731835',NULL,NULL,0,115,3); -INSERT INTO "grampsdb_eventref" VALUES(100,32,51,3,'2012-06-10 22:25:17.734657',NULL,NULL,0,1,3); -INSERT INTO "grampsdb_eventref" VALUES(101,32,51,4,'2012-06-10 22:25:17.737466',NULL,NULL,0,42,3); -INSERT INTO "grampsdb_eventref" VALUES(102,32,51,5,'2012-06-10 22:25:17.740261',NULL,NULL,0,136,3); -INSERT INTO "grampsdb_eventref" VALUES(103,32,51,6,'2012-06-10 22:25:17.743088',NULL,NULL,0,128,3); -INSERT INTO "grampsdb_eventref" VALUES(104,32,51,7,'2012-06-10 22:25:17.745895',NULL,NULL,0,116,3); -INSERT INTO "grampsdb_eventref" VALUES(105,32,52,1,'2012-06-10 22:25:17.832030',NULL,NULL,0,143,3); -INSERT INTO "grampsdb_eventref" VALUES(106,32,53,1,'2012-06-10 22:25:17.885559',NULL,NULL,0,86,3); -INSERT INTO "grampsdb_eventref" VALUES(107,32,53,2,'2012-06-10 22:25:17.889699',NULL,NULL,0,98,3); -INSERT INTO "grampsdb_eventref" VALUES(108,33,15,1,'2012-06-10 22:25:17.940452',NULL,NULL,0,106,10); -INSERT INTO "grampsdb_eventref" VALUES(109,32,54,1,'2012-06-10 22:25:17.955220',NULL,NULL,0,127,3); -INSERT INTO "grampsdb_eventref" VALUES(110,32,55,1,'2012-06-10 22:25:17.983865',NULL,NULL,0,4,3); -INSERT INTO "grampsdb_eventref" VALUES(111,32,56,1,'2012-06-10 22:25:18.026514',NULL,NULL,0,101,3); -INSERT INTO "grampsdb_eventref" VALUES(112,32,56,2,'2012-06-10 22:25:18.029780',NULL,NULL,0,61,3); -INSERT INTO "grampsdb_eventref" VALUES(113,32,57,1,'2012-06-10 22:25:18.092434',NULL,NULL,0,52,3); -INSERT INTO "grampsdb_eventref" VALUES(114,32,58,1,'2012-06-10 22:25:18.126397',NULL,NULL,0,10,3); -INSERT INTO "grampsdb_eventref" VALUES(115,33,16,1,'2012-06-10 22:25:18.188038',NULL,NULL,0,126,10); -INSERT INTO "grampsdb_eventref" VALUES(116,32,59,1,'2012-06-10 22:25:18.197291',NULL,NULL,0,111,3); -INSERT INTO "grampsdb_eventref" VALUES(117,32,59,2,'2012-06-10 22:25:18.200069',NULL,NULL,0,85,3); -INSERT INTO "grampsdb_eventref" VALUES(118,32,59,3,'2012-06-10 22:25:18.202839',NULL,NULL,0,53,3); -INSERT INTO "grampsdb_eventref" VALUES(119,32,60,1,'2012-06-10 22:25:18.249345',NULL,NULL,0,29,3); -INSERT INTO "grampsdb_eventref" VALUES(120,32,60,2,'2012-06-10 22:25:18.252143',NULL,NULL,0,2,3); -INSERT INTO "grampsdb_eventref" VALUES(121,32,61,1,'2012-06-10 22:25:18.282727',NULL,NULL,0,5,3); -INSERT INTO "grampsdb_eventref" VALUES(122,32,61,2,'2012-06-10 22:25:18.285518',NULL,NULL,0,22,3); -INSERT INTO "grampsdb_eventref" VALUES(123,32,61,3,'2012-06-10 22:25:18.288303',NULL,NULL,0,57,3); -INSERT INTO "grampsdb_eventref" VALUES(124,32,61,4,'2012-06-10 22:25:18.291116',NULL,NULL,0,35,3); -INSERT INTO "grampsdb_eventref" VALUES(125,32,62,1,'2012-06-10 22:25:18.338282',NULL,NULL,0,59,3); -INSERT INTO "grampsdb_eventref" VALUES(126,32,62,2,'2012-06-10 22:25:18.341079',NULL,NULL,0,125,3); -INSERT INTO "grampsdb_eventref" VALUES(127,33,17,1,'2012-06-10 22:25:18.386582',NULL,NULL,0,138,10); -INSERT INTO "grampsdb_eventref" VALUES(128,33,18,1,'2012-06-10 22:25:18.414629',NULL,NULL,0,28,10); -INSERT INTO "grampsdb_eventref" VALUES(129,32,64,1,'2012-06-10 22:25:18.422974',NULL,NULL,0,82,3); -INSERT INTO "grampsdb_eventref" VALUES(130,32,67,1,'2012-06-10 22:25:18.486304',NULL,NULL,0,39,3); -INSERT INTO "grampsdb_eventref" VALUES(131,32,67,2,'2012-06-10 22:25:18.489093',NULL,NULL,0,74,3); -INSERT INTO "grampsdb_eventref" VALUES(132,32,68,1,'2012-06-10 22:25:18.530791',NULL,NULL,0,12,3); -INSERT INTO "grampsdb_eventref" VALUES(133,32,68,2,'2012-06-10 22:25:18.533633',NULL,NULL,0,79,3); -INSERT INTO "grampsdb_eventref" VALUES(134,32,68,3,'2012-06-10 22:25:18.536433',NULL,NULL,0,105,3); -INSERT INTO "grampsdb_eventref" VALUES(135,32,68,4,'2012-06-10 22:25:18.539216',NULL,NULL,0,142,3); -INSERT INTO "grampsdb_eventref" VALUES(136,32,68,5,'2012-06-10 22:25:18.542218',NULL,NULL,0,120,3); -INSERT INTO "grampsdb_eventref" VALUES(137,32,68,6,'2012-06-10 22:25:18.545062',NULL,NULL,0,44,3); -INSERT INTO "grampsdb_eventref" VALUES(138,32,69,1,'2012-06-10 22:25:18.610179',NULL,NULL,0,14,3); -INSERT INTO "grampsdb_eventref" VALUES(139,32,69,2,'2012-06-10 22:25:18.612972',NULL,NULL,0,130,3); -INSERT INTO "grampsdb_eventref" VALUES(140,32,69,3,'2012-06-10 22:25:18.615753',NULL,NULL,0,103,3); -INSERT INTO "grampsdb_eventref" VALUES(141,32,69,4,'2012-06-10 22:25:18.618562',NULL,NULL,0,90,3); -INSERT INTO "grampsdb_eventref" VALUES(142,32,69,5,'2012-06-10 22:25:18.621356',NULL,NULL,0,113,3); -INSERT INTO "grampsdb_eventref" VALUES(143,32,69,6,'2012-06-10 22:25:18.624237',NULL,NULL,0,72,3); -INSERT INTO "grampsdb_eventref" VALUES(144,32,69,7,'2012-06-10 22:25:18.627048',NULL,NULL,0,40,3); +INSERT INTO "grampsdb_eventref" VALUES(1,33,1,1,'2012-06-18 21:44:21.784611',NULL,NULL,0,50,10); +INSERT INTO "grampsdb_eventref" VALUES(2,32,1,1,'2012-06-18 21:44:21.816702',NULL,NULL,0,82,3); +INSERT INTO "grampsdb_eventref" VALUES(3,32,2,1,'2012-06-18 21:44:21.866844',NULL,NULL,0,119,3); +INSERT INTO "grampsdb_eventref" VALUES(4,32,3,1,'2012-06-18 21:44:21.928414',NULL,NULL,0,118,3); +INSERT INTO "grampsdb_eventref" VALUES(5,32,3,2,'2012-06-18 21:44:21.933447',NULL,NULL,0,19,3); +INSERT INTO "grampsdb_eventref" VALUES(6,32,3,3,'2012-06-18 21:44:21.938348',NULL,NULL,0,134,3); +INSERT INTO "grampsdb_eventref" VALUES(7,32,3,4,'2012-06-18 21:44:21.943410',NULL,NULL,0,8,3); +INSERT INTO "grampsdb_eventref" VALUES(8,32,3,5,'2012-06-18 21:44:21.948318',NULL,NULL,0,58,3); +INSERT INTO "grampsdb_eventref" VALUES(9,32,3,6,'2012-06-18 21:44:21.953455',NULL,NULL,0,52,3); +INSERT INTO "grampsdb_eventref" VALUES(10,32,3,7,'2012-06-18 21:44:21.958387',NULL,NULL,0,35,3); +INSERT INTO "grampsdb_eventref" VALUES(11,32,4,1,'2012-06-18 21:44:22.069557',NULL,NULL,0,68,3); +INSERT INTO "grampsdb_eventref" VALUES(12,32,6,1,'2012-06-18 21:44:22.144946',NULL,NULL,0,67,3); +INSERT INTO "grampsdb_eventref" VALUES(13,32,7,1,'2012-06-18 21:44:22.185718',NULL,NULL,0,51,3); +INSERT INTO "grampsdb_eventref" VALUES(14,32,7,2,'2012-06-18 21:44:22.190672',NULL,NULL,0,123,3); +INSERT INTO "grampsdb_eventref" VALUES(15,32,7,3,'2012-06-18 21:44:22.195744',NULL,NULL,0,63,3); +INSERT INTO "grampsdb_eventref" VALUES(16,32,7,4,'2012-06-18 21:44:22.200651',NULL,NULL,0,13,3); +INSERT INTO "grampsdb_eventref" VALUES(17,32,7,5,'2012-06-18 21:44:22.205812',NULL,NULL,0,11,3); +INSERT INTO "grampsdb_eventref" VALUES(18,32,7,6,'2012-06-18 21:44:22.210749',NULL,NULL,0,39,3); +INSERT INTO "grampsdb_eventref" VALUES(19,32,9,1,'2012-06-18 21:44:22.341515',NULL,NULL,0,24,3); +INSERT INTO "grampsdb_eventref" VALUES(20,32,10,1,'2012-06-18 21:44:22.394432',NULL,NULL,0,121,3); +INSERT INTO "grampsdb_eventref" VALUES(21,32,12,1,'2012-06-18 21:44:22.498707',NULL,NULL,0,21,3); +INSERT INTO "grampsdb_eventref" VALUES(22,32,12,2,'2012-06-18 21:44:22.505421',NULL,NULL,0,64,3); +INSERT INTO "grampsdb_eventref" VALUES(23,32,14,1,'2012-06-18 21:44:22.624809',NULL,NULL,0,47,3); +INSERT INTO "grampsdb_eventref" VALUES(24,32,14,2,'2012-06-18 21:44:22.629847',NULL,NULL,0,73,3); +INSERT INTO "grampsdb_eventref" VALUES(25,32,15,1,'2012-06-18 21:44:22.680414',NULL,NULL,0,28,3); +INSERT INTO "grampsdb_eventref" VALUES(26,32,17,1,'2012-06-18 21:44:22.764597',NULL,NULL,0,41,3); +INSERT INTO "grampsdb_eventref" VALUES(27,32,17,2,'2012-06-18 21:44:22.769524',NULL,NULL,0,90,3); +INSERT INTO "grampsdb_eventref" VALUES(28,32,18,1,'2012-06-18 21:44:22.835569',NULL,NULL,0,87,3); +INSERT INTO "grampsdb_eventref" VALUES(29,32,18,2,'2012-06-18 21:44:22.840507',NULL,NULL,0,113,3); +INSERT INTO "grampsdb_eventref" VALUES(30,32,19,1,'2012-06-18 21:44:22.898255',NULL,NULL,0,95,3); +INSERT INTO "grampsdb_eventref" VALUES(31,32,19,2,'2012-06-18 21:44:22.903190',NULL,NULL,0,106,3); +INSERT INTO "grampsdb_eventref" VALUES(32,32,19,3,'2012-06-18 21:44:22.908359',NULL,NULL,0,26,3); +INSERT INTO "grampsdb_eventref" VALUES(33,32,19,4,'2012-06-18 21:44:22.913267',NULL,NULL,0,56,3); +INSERT INTO "grampsdb_eventref" VALUES(34,33,3,1,'2012-06-18 21:44:22.990161',NULL,NULL,0,84,10); +INSERT INTO "grampsdb_eventref" VALUES(35,32,20,1,'2012-06-18 21:44:23.012184',NULL,NULL,0,69,3); +INSERT INTO "grampsdb_eventref" VALUES(36,32,21,1,'2012-06-18 21:44:23.054847',NULL,NULL,0,124,3); +INSERT INTO "grampsdb_eventref" VALUES(37,32,21,2,'2012-06-18 21:44:23.059945',NULL,NULL,0,125,3); +INSERT INTO "grampsdb_eventref" VALUES(38,32,21,3,'2012-06-18 21:44:23.064869',NULL,NULL,0,116,3); +INSERT INTO "grampsdb_eventref" VALUES(39,32,21,4,'2012-06-18 21:44:23.069967',NULL,NULL,0,62,3); +INSERT INTO "grampsdb_eventref" VALUES(40,32,21,5,'2012-06-18 21:44:23.074907',NULL,NULL,0,31,3); +INSERT INTO "grampsdb_eventref" VALUES(41,33,5,1,'2012-06-18 21:44:23.247868',NULL,NULL,0,46,10); +INSERT INTO "grampsdb_eventref" VALUES(42,32,24,1,'2012-06-18 21:44:23.337681',NULL,NULL,0,70,3); +INSERT INTO "grampsdb_eventref" VALUES(43,32,24,2,'2012-06-18 21:44:23.342796',NULL,NULL,0,104,3); +INSERT INTO "grampsdb_eventref" VALUES(44,33,6,1,'2012-06-18 21:44:23.404810',NULL,NULL,0,88,10); +INSERT INTO "grampsdb_eventref" VALUES(45,33,7,1,'2012-06-18 21:44:23.478609',NULL,NULL,0,76,10); +INSERT INTO "grampsdb_eventref" VALUES(46,32,26,1,'2012-06-18 21:44:23.528330',NULL,NULL,0,128,3); +INSERT INTO "grampsdb_eventref" VALUES(47,33,8,1,'2012-06-18 21:44:23.616135',NULL,NULL,0,126,10); +INSERT INTO "grampsdb_eventref" VALUES(48,32,27,1,'2012-06-18 21:44:23.667384',NULL,NULL,0,139,3); +INSERT INTO "grampsdb_eventref" VALUES(49,32,27,2,'2012-06-18 21:44:23.672332',NULL,NULL,0,78,3); +INSERT INTO "grampsdb_eventref" VALUES(50,32,27,3,'2012-06-18 21:44:23.677553',NULL,NULL,0,107,3); +INSERT INTO "grampsdb_eventref" VALUES(51,32,27,4,'2012-06-18 21:44:23.682541',NULL,NULL,0,120,3); +INSERT INTO "grampsdb_eventref" VALUES(52,32,27,5,'2012-06-18 21:44:23.687450',NULL,NULL,0,12,3); +INSERT INTO "grampsdb_eventref" VALUES(53,32,27,6,'2012-06-18 21:44:23.692375',NULL,NULL,0,132,3); +INSERT INTO "grampsdb_eventref" VALUES(54,32,28,1,'2012-06-18 21:44:23.795550',NULL,NULL,0,112,3); +INSERT INTO "grampsdb_eventref" VALUES(55,32,29,1,'2012-06-18 21:44:23.870739',NULL,NULL,0,75,3); +INSERT INTO "grampsdb_eventref" VALUES(56,33,9,1,'2012-06-18 21:44:23.916582',NULL,NULL,0,114,10); +INSERT INTO "grampsdb_eventref" VALUES(57,32,30,1,'2012-06-18 21:44:23.931600',NULL,NULL,0,48,3); +INSERT INTO "grampsdb_eventref" VALUES(58,32,30,2,'2012-06-18 21:44:23.936522',NULL,NULL,0,4,3); +INSERT INTO "grampsdb_eventref" VALUES(59,32,30,3,'2012-06-18 21:44:23.941595',NULL,NULL,0,53,3); +INSERT INTO "grampsdb_eventref" VALUES(60,32,30,4,'2012-06-18 21:44:23.946535',NULL,NULL,0,55,3); +INSERT INTO "grampsdb_eventref" VALUES(61,32,30,5,'2012-06-18 21:44:23.951595',NULL,NULL,0,136,3); +INSERT INTO "grampsdb_eventref" VALUES(62,32,30,6,'2012-06-18 21:44:23.956501',NULL,NULL,0,16,3); +INSERT INTO "grampsdb_eventref" VALUES(63,32,30,7,'2012-06-18 21:44:23.961529',NULL,NULL,0,18,3); +INSERT INTO "grampsdb_eventref" VALUES(64,32,30,8,'2012-06-18 21:44:23.966479',NULL,NULL,0,66,3); +INSERT INTO "grampsdb_eventref" VALUES(65,32,30,9,'2012-06-18 21:44:23.971546',NULL,NULL,0,15,3); +INSERT INTO "grampsdb_eventref" VALUES(66,32,30,10,'2012-06-18 21:44:23.976544',NULL,NULL,0,131,3); +INSERT INTO "grampsdb_eventref" VALUES(67,32,30,11,'2012-06-18 21:44:23.981586',NULL,NULL,0,105,3); +INSERT INTO "grampsdb_eventref" VALUES(68,32,31,1,'2012-06-18 21:44:24.136799',NULL,NULL,0,36,3); +INSERT INTO "grampsdb_eventref" VALUES(69,32,31,2,'2012-06-18 21:44:24.141710',NULL,NULL,0,32,3); +INSERT INTO "grampsdb_eventref" VALUES(70,33,10,1,'2012-06-18 21:44:24.217654',NULL,NULL,0,97,10); +INSERT INTO "grampsdb_eventref" VALUES(71,32,32,1,'2012-06-18 21:44:24.245110',NULL,NULL,0,140,3); +INSERT INTO "grampsdb_eventref" VALUES(72,32,32,2,'2012-06-18 21:44:24.250060',NULL,NULL,0,44,3); +INSERT INTO "grampsdb_eventref" VALUES(73,32,32,3,'2012-06-18 21:44:24.255128',NULL,NULL,0,22,3); +INSERT INTO "grampsdb_eventref" VALUES(74,32,32,4,'2012-06-18 21:44:24.260061',NULL,NULL,0,143,3); +INSERT INTO "grampsdb_eventref" VALUES(75,32,32,5,'2012-06-18 21:44:24.265101',NULL,NULL,0,72,3); +INSERT INTO "grampsdb_eventref" VALUES(76,32,32,6,'2012-06-18 21:44:24.270047',NULL,NULL,0,117,3); +INSERT INTO "grampsdb_eventref" VALUES(77,32,32,7,'2012-06-18 21:44:24.275090',NULL,NULL,0,115,3); +INSERT INTO "grampsdb_eventref" VALUES(78,32,33,1,'2012-06-18 21:44:24.367176',NULL,NULL,0,27,3); +INSERT INTO "grampsdb_eventref" VALUES(79,32,33,2,'2012-06-18 21:44:24.372174',NULL,NULL,0,138,3); +INSERT INTO "grampsdb_eventref" VALUES(80,32,34,1,'2012-06-18 21:44:24.425595',NULL,NULL,0,133,3); +INSERT INTO "grampsdb_eventref" VALUES(81,32,35,1,'2012-06-18 21:44:24.468202',NULL,NULL,0,61,3); +INSERT INTO "grampsdb_eventref" VALUES(82,32,35,2,'2012-06-18 21:44:24.473238',NULL,NULL,0,144,3); +INSERT INTO "grampsdb_eventref" VALUES(83,33,11,1,'2012-06-18 21:44:24.564451',NULL,NULL,0,3,10); +INSERT INTO "grampsdb_eventref" VALUES(84,32,38,1,'2012-06-18 21:44:24.612194',NULL,NULL,0,30,3); +INSERT INTO "grampsdb_eventref" VALUES(85,32,39,1,'2012-06-18 21:44:24.671502',NULL,NULL,0,103,3); +INSERT INTO "grampsdb_eventref" VALUES(86,32,39,2,'2012-06-18 21:44:24.678020',NULL,NULL,0,94,3); +INSERT INTO "grampsdb_eventref" VALUES(87,32,39,3,'2012-06-18 21:44:24.687831',NULL,NULL,0,79,3); +INSERT INTO "grampsdb_eventref" VALUES(88,32,39,4,'2012-06-18 21:44:24.700844',NULL,NULL,0,6,3); +INSERT INTO "grampsdb_eventref" VALUES(89,32,39,5,'2012-06-18 21:44:24.706244',NULL,NULL,0,130,3); +INSERT INTO "grampsdb_eventref" VALUES(90,32,39,6,'2012-06-18 21:44:24.712317',NULL,NULL,0,110,3); +INSERT INTO "grampsdb_eventref" VALUES(91,32,40,1,'2012-06-18 21:44:24.818661',NULL,NULL,0,57,3); +INSERT INTO "grampsdb_eventref" VALUES(92,32,40,2,'2012-06-18 21:44:24.823588',NULL,NULL,0,77,3); +INSERT INTO "grampsdb_eventref" VALUES(93,32,40,3,'2012-06-18 21:44:24.828490',NULL,NULL,0,129,3); +INSERT INTO "grampsdb_eventref" VALUES(94,32,40,4,'2012-06-18 21:44:24.833413',NULL,NULL,0,5,3); +INSERT INTO "grampsdb_eventref" VALUES(95,32,40,5,'2012-06-18 21:44:24.838318',NULL,NULL,0,45,3); +INSERT INTO "grampsdb_eventref" VALUES(96,33,12,1,'2012-06-18 21:44:24.958050',NULL,NULL,0,9,10); +INSERT INTO "grampsdb_eventref" VALUES(97,32,42,1,'2012-06-18 21:44:25.005241',NULL,NULL,0,93,3); +INSERT INTO "grampsdb_eventref" VALUES(98,32,43,1,'2012-06-18 21:44:25.051005',NULL,NULL,0,81,3); +INSERT INTO "grampsdb_eventref" VALUES(99,32,44,1,'2012-06-18 21:44:25.094668',NULL,NULL,0,91,3); +INSERT INTO "grampsdb_eventref" VALUES(100,33,13,1,'2012-06-18 21:44:25.151772',NULL,NULL,0,33,10); +INSERT INTO "grampsdb_eventref" VALUES(101,32,45,1,'2012-06-18 21:44:25.166572',NULL,NULL,0,135,3); +INSERT INTO "grampsdb_eventref" VALUES(102,32,47,1,'2012-06-18 21:44:25.295401',NULL,NULL,0,83,3); +INSERT INTO "grampsdb_eventref" VALUES(103,32,48,1,'2012-06-18 21:44:25.342899',NULL,NULL,0,10,3); +INSERT INTO "grampsdb_eventref" VALUES(104,32,49,1,'2012-06-18 21:44:25.392403',NULL,NULL,0,60,3); +INSERT INTO "grampsdb_eventref" VALUES(105,32,50,1,'2012-06-18 21:44:25.454292',NULL,NULL,0,86,3); +INSERT INTO "grampsdb_eventref" VALUES(106,32,50,2,'2012-06-18 21:44:25.459287',NULL,NULL,0,34,3); +INSERT INTO "grampsdb_eventref" VALUES(107,33,15,1,'2012-06-18 21:44:25.533584',NULL,NULL,0,108,10); +INSERT INTO "grampsdb_eventref" VALUES(108,32,51,1,'2012-06-18 21:44:25.549739',NULL,NULL,0,43,3); +INSERT INTO "grampsdb_eventref" VALUES(109,32,52,1,'2012-06-18 21:44:25.601486',NULL,NULL,0,23,3); +INSERT INTO "grampsdb_eventref" VALUES(110,32,52,2,'2012-06-18 21:44:25.606455',NULL,NULL,0,29,3); +INSERT INTO "grampsdb_eventref" VALUES(111,32,53,1,'2012-06-18 21:44:25.671464',NULL,NULL,0,37,3); +INSERT INTO "grampsdb_eventref" VALUES(112,32,53,2,'2012-06-18 21:44:25.676399',NULL,NULL,0,42,3); +INSERT INTO "grampsdb_eventref" VALUES(113,32,53,3,'2012-06-18 21:44:25.681313',NULL,NULL,0,25,3); +INSERT INTO "grampsdb_eventref" VALUES(114,32,53,4,'2012-06-18 21:44:25.686232',NULL,NULL,0,59,3); +INSERT INTO "grampsdb_eventref" VALUES(115,32,53,5,'2012-06-18 21:44:25.691163',NULL,NULL,0,122,3); +INSERT INTO "grampsdb_eventref" VALUES(116,32,53,6,'2012-06-18 21:44:25.696065',NULL,NULL,0,137,3); +INSERT INTO "grampsdb_eventref" VALUES(117,32,53,7,'2012-06-18 21:44:25.701005',NULL,NULL,0,98,3); +INSERT INTO "grampsdb_eventref" VALUES(118,32,54,1,'2012-06-18 21:44:25.860153',NULL,NULL,0,7,3); +INSERT INTO "grampsdb_eventref" VALUES(119,32,55,1,'2012-06-18 21:44:25.900690',NULL,NULL,0,96,3); +INSERT INTO "grampsdb_eventref" VALUES(120,32,56,1,'2012-06-18 21:44:25.948952',NULL,NULL,0,2,3); +INSERT INTO "grampsdb_eventref" VALUES(121,33,16,1,'2012-06-18 21:44:25.986720',NULL,NULL,0,71,10); +INSERT INTO "grampsdb_eventref" VALUES(122,33,17,1,'2012-06-18 21:44:26.031360',NULL,NULL,0,142,10); +INSERT INTO "grampsdb_eventref" VALUES(123,32,57,1,'2012-06-18 21:44:26.045945',NULL,NULL,0,80,3); +INSERT INTO "grampsdb_eventref" VALUES(124,32,57,2,'2012-06-18 21:44:26.050888',NULL,NULL,0,101,3); +INSERT INTO "grampsdb_eventref" VALUES(125,32,57,3,'2012-06-18 21:44:26.055824',NULL,NULL,0,100,3); +INSERT INTO "grampsdb_eventref" VALUES(126,32,57,4,'2012-06-18 21:44:26.060733',NULL,NULL,0,92,3); +INSERT INTO "grampsdb_eventref" VALUES(127,32,57,5,'2012-06-18 21:44:26.065683',NULL,NULL,0,89,3); +INSERT INTO "grampsdb_eventref" VALUES(128,32,58,1,'2012-06-18 21:44:26.142731',NULL,NULL,0,74,3); +INSERT INTO "grampsdb_eventref" VALUES(129,32,59,1,'2012-06-18 21:44:26.179838',NULL,NULL,0,102,3); +INSERT INTO "grampsdb_eventref" VALUES(130,32,60,1,'2012-06-18 21:44:26.233343',NULL,NULL,0,141,3); +INSERT INTO "grampsdb_eventref" VALUES(131,32,61,1,'2012-06-18 21:44:26.275896',NULL,NULL,0,54,3); +INSERT INTO "grampsdb_eventref" VALUES(132,32,62,1,'2012-06-18 21:44:26.316464',NULL,NULL,0,109,3); +INSERT INTO "grampsdb_eventref" VALUES(133,32,63,1,'2012-06-18 21:44:26.364404',NULL,NULL,0,99,3); +INSERT INTO "grampsdb_eventref" VALUES(134,32,63,2,'2012-06-18 21:44:26.369336',NULL,NULL,0,65,3); +INSERT INTO "grampsdb_eventref" VALUES(135,32,64,1,'2012-06-18 21:44:26.417815',NULL,NULL,0,1,3); +INSERT INTO "grampsdb_eventref" VALUES(136,32,65,1,'2012-06-18 21:44:26.459513',NULL,NULL,0,49,3); +INSERT INTO "grampsdb_eventref" VALUES(137,32,65,2,'2012-06-18 21:44:26.464464',NULL,NULL,0,40,3); +INSERT INTO "grampsdb_eventref" VALUES(138,32,66,1,'2012-06-18 21:44:26.516595',NULL,NULL,0,14,3); +INSERT INTO "grampsdb_eventref" VALUES(139,32,66,2,'2012-06-18 21:44:26.521508',NULL,NULL,0,38,3); +INSERT INTO "grampsdb_eventref" VALUES(140,32,66,3,'2012-06-18 21:44:26.526435',NULL,NULL,0,127,3); +INSERT INTO "grampsdb_eventref" VALUES(141,32,68,1,'2012-06-18 21:44:26.633349',NULL,NULL,0,17,3); +INSERT INTO "grampsdb_eventref" VALUES(142,32,69,1,'2012-06-18 21:44:26.682050',NULL,NULL,0,20,3); +INSERT INTO "grampsdb_eventref" VALUES(143,32,69,2,'2012-06-18 21:44:26.687011',NULL,NULL,0,85,3); +INSERT INTO "grampsdb_eventref" VALUES(144,33,19,1,'2012-06-18 21:44:26.827754',NULL,NULL,0,111,10); CREATE TABLE "grampsdb_repositoryref" ( "id" integer NOT NULL PRIMARY KEY, "object_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"), @@ -2118,7 +2170,7 @@ CREATE TABLE "grampsdb_personref" ( "last_changed_by" text, "private" bool NOT NULL, "ref_object_id" integer NOT NULL REFERENCES "grampsdb_person" ("id"), - "description" varchar(50) NOT NULL + "description" varchar(50) ); CREATE TABLE "grampsdb_citationref" ( "id" integer NOT NULL PRIMARY KEY, @@ -2144,55 +2196,55 @@ CREATE TABLE "grampsdb_childref" ( "mother_rel_type_id" integer NOT NULL REFERENCES "grampsdb_childreftype" ("id"), "ref_object_id" integer NOT NULL REFERENCES "grampsdb_person" ("id") ); -INSERT INTO "grampsdb_childref" VALUES(1,33,1,1,'2012-06-10 22:25:15.839374',NULL,NULL,0,2,2,23); -INSERT INTO "grampsdb_childref" VALUES(2,33,1,2,'2012-06-10 22:25:15.842935',NULL,NULL,0,2,2,52); -INSERT INTO "grampsdb_childref" VALUES(3,33,1,3,'2012-06-10 22:25:15.846336',NULL,NULL,0,2,2,50); -INSERT INTO "grampsdb_childref" VALUES(4,33,2,1,'2012-06-10 22:25:16.086297',NULL,NULL,0,2,2,33); -INSERT INTO "grampsdb_childref" VALUES(5,33,4,1,'2012-06-10 22:25:16.625752',NULL,NULL,0,2,2,10); -INSERT INTO "grampsdb_childref" VALUES(6,33,4,2,'2012-06-10 22:25:16.630650',NULL,NULL,0,2,2,17); -INSERT INTO "grampsdb_childref" VALUES(7,33,4,3,'2012-06-10 22:25:16.634556',NULL,NULL,0,2,2,41); -INSERT INTO "grampsdb_childref" VALUES(8,33,8,1,'2012-06-10 22:25:16.925139',NULL,NULL,0,2,2,19); -INSERT INTO "grampsdb_childref" VALUES(9,33,8,2,'2012-06-10 22:25:16.928638',NULL,NULL,0,2,2,18); -INSERT INTO "grampsdb_childref" VALUES(10,33,8,3,'2012-06-10 22:25:16.932004',NULL,NULL,0,2,2,60); -INSERT INTO "grampsdb_childref" VALUES(11,33,8,4,'2012-06-10 22:25:16.935377',NULL,NULL,0,2,2,6); -INSERT INTO "grampsdb_childref" VALUES(12,33,8,5,'2012-06-10 22:25:16.938854',NULL,NULL,0,2,2,48); -INSERT INTO "grampsdb_childref" VALUES(13,33,10,1,'2012-06-10 22:25:17.129303',NULL,NULL,0,2,2,68); -INSERT INTO "grampsdb_childref" VALUES(14,33,10,2,'2012-06-10 22:25:17.132828',NULL,NULL,0,2,2,51); -INSERT INTO "grampsdb_childref" VALUES(15,33,10,3,'2012-06-10 22:25:17.136222',NULL,NULL,0,2,2,35); -INSERT INTO "grampsdb_childref" VALUES(16,33,10,4,'2012-06-10 22:25:17.139621',NULL,NULL,0,2,2,67); -INSERT INTO "grampsdb_childref" VALUES(17,33,10,5,'2012-06-10 22:25:17.143241',NULL,NULL,0,2,2,56); -INSERT INTO "grampsdb_childref" VALUES(18,33,10,6,'2012-06-10 22:25:17.146710',NULL,NULL,0,2,2,64); -INSERT INTO "grampsdb_childref" VALUES(19,33,10,7,'2012-06-10 22:25:17.150085',NULL,NULL,0,2,2,21); -INSERT INTO "grampsdb_childref" VALUES(20,33,10,8,'2012-06-10 22:25:17.153507',NULL,NULL,0,2,2,42); -INSERT INTO "grampsdb_childref" VALUES(21,33,10,9,'2012-06-10 22:25:17.156893',NULL,NULL,0,2,2,27); -INSERT INTO "grampsdb_childref" VALUES(22,33,11,1,'2012-06-10 22:25:17.169712',NULL,NULL,0,2,2,15); -INSERT INTO "grampsdb_childref" VALUES(23,33,11,2,'2012-06-10 22:25:17.173136',NULL,NULL,0,2,2,44); -INSERT INTO "grampsdb_childref" VALUES(24,33,11,3,'2012-06-10 22:25:17.176534',NULL,NULL,0,2,2,66); -INSERT INTO "grampsdb_childref" VALUES(25,33,11,4,'2012-06-10 22:25:17.179960',NULL,NULL,0,2,2,36); -INSERT INTO "grampsdb_childref" VALUES(26,33,13,1,'2012-06-10 22:25:17.375519',NULL,NULL,0,2,2,53); -INSERT INTO "grampsdb_childref" VALUES(27,33,13,2,'2012-06-10 22:25:17.378977',NULL,NULL,0,2,2,58); -INSERT INTO "grampsdb_childref" VALUES(28,33,13,3,'2012-06-10 22:25:17.382361',NULL,NULL,0,2,2,65); -INSERT INTO "grampsdb_childref" VALUES(29,33,13,4,'2012-06-10 22:25:17.385746',NULL,NULL,0,2,2,38); -INSERT INTO "grampsdb_childref" VALUES(30,33,13,5,'2012-06-10 22:25:17.389155',NULL,NULL,0,2,2,8); -INSERT INTO "grampsdb_childref" VALUES(31,33,14,1,'2012-06-10 22:25:17.659858',NULL,NULL,0,2,2,55); -INSERT INTO "grampsdb_childref" VALUES(32,33,14,2,'2012-06-10 22:25:17.663259',NULL,NULL,0,2,2,45); -INSERT INTO "grampsdb_childref" VALUES(33,33,14,3,'2012-06-10 22:25:17.666647',NULL,NULL,0,2,2,32); -INSERT INTO "grampsdb_childref" VALUES(34,33,16,1,'2012-06-10 22:25:18.150892',NULL,NULL,0,2,2,26); -INSERT INTO "grampsdb_childref" VALUES(35,33,16,2,'2012-06-10 22:25:18.154370',NULL,NULL,0,2,2,37); -INSERT INTO "grampsdb_childref" VALUES(36,33,16,3,'2012-06-10 22:25:18.157758',NULL,NULL,0,2,2,22); -INSERT INTO "grampsdb_childref" VALUES(37,33,16,4,'2012-06-10 22:25:18.161143',NULL,NULL,0,2,2,24); -INSERT INTO "grampsdb_childref" VALUES(38,33,16,5,'2012-06-10 22:25:18.164538',NULL,NULL,0,2,2,54); -INSERT INTO "grampsdb_childref" VALUES(39,33,16,6,'2012-06-10 22:25:18.168093',NULL,NULL,0,2,2,9); -INSERT INTO "grampsdb_childref" VALUES(40,33,16,7,'2012-06-10 22:25:18.171490',NULL,NULL,0,2,2,30); -INSERT INTO "grampsdb_childref" VALUES(41,33,16,8,'2012-06-10 22:25:18.174926',NULL,NULL,0,2,2,13); -INSERT INTO "grampsdb_childref" VALUES(42,33,16,9,'2012-06-10 22:25:18.178372',NULL,NULL,0,2,2,39); -INSERT INTO "grampsdb_childref" VALUES(43,33,16,10,'2012-06-10 22:25:18.181785',NULL,NULL,0,2,2,2); -INSERT INTO "grampsdb_childref" VALUES(44,33,16,11,'2012-06-10 22:25:18.185189',NULL,NULL,0,2,2,47); -INSERT INTO "grampsdb_childref" VALUES(45,33,17,1,'2012-06-10 22:25:18.376911',NULL,NULL,0,2,2,61); -INSERT INTO "grampsdb_childref" VALUES(46,33,17,2,'2012-06-10 22:25:18.380358',NULL,NULL,0,2,2,59); -INSERT INTO "grampsdb_childref" VALUES(47,33,17,3,'2012-06-10 22:25:18.383734',NULL,NULL,0,2,2,62); -INSERT INTO "grampsdb_childref" VALUES(48,33,18,1,'2012-06-10 22:25:18.408362',NULL,NULL,0,2,2,69); -INSERT INTO "grampsdb_childref" VALUES(49,33,18,2,'2012-06-10 22:25:18.411746',NULL,NULL,0,2,2,5); +INSERT INTO "grampsdb_childref" VALUES(1,33,3,1,'2012-06-18 21:44:22.972485',NULL,NULL,0,2,2,30); +INSERT INTO "grampsdb_childref" VALUES(2,33,3,2,'2012-06-18 21:44:22.978992',NULL,NULL,0,2,2,44); +INSERT INTO "grampsdb_childref" VALUES(3,33,3,3,'2012-06-18 21:44:22.984999',NULL,NULL,0,2,2,59); +INSERT INTO "grampsdb_childref" VALUES(4,33,5,1,'2012-06-18 21:44:23.230674',NULL,NULL,0,2,2,41); +INSERT INTO "grampsdb_childref" VALUES(5,33,5,2,'2012-06-18 21:44:23.236665',NULL,NULL,0,2,2,64); +INSERT INTO "grampsdb_childref" VALUES(6,33,5,3,'2012-06-18 21:44:23.242819',NULL,NULL,0,2,2,22); +INSERT INTO "grampsdb_childref" VALUES(7,33,7,1,'2012-06-18 21:44:23.425019',NULL,NULL,0,2,2,7); +INSERT INTO "grampsdb_childref" VALUES(8,33,7,2,'2012-06-18 21:44:23.431038',NULL,NULL,0,2,2,3); +INSERT INTO "grampsdb_childref" VALUES(9,33,7,3,'2012-06-18 21:44:23.437203',NULL,NULL,0,2,2,17); +INSERT INTO "grampsdb_childref" VALUES(10,33,7,4,'2012-06-18 21:44:23.443298',NULL,NULL,0,2,2,31); +INSERT INTO "grampsdb_childref" VALUES(11,33,7,5,'2012-06-18 21:44:23.449291',NULL,NULL,0,2,2,69); +INSERT INTO "grampsdb_childref" VALUES(12,33,7,6,'2012-06-18 21:44:23.455400',NULL,NULL,0,2,2,2); +INSERT INTO "grampsdb_childref" VALUES(13,33,7,7,'2012-06-18 21:44:23.461342',NULL,NULL,0,2,2,21); +INSERT INTO "grampsdb_childref" VALUES(14,33,7,8,'2012-06-18 21:44:23.467463',NULL,NULL,0,2,2,50); +INSERT INTO "grampsdb_childref" VALUES(15,33,7,9,'2012-06-18 21:44:23.473554',NULL,NULL,0,2,2,24); +INSERT INTO "grampsdb_childref" VALUES(16,33,8,1,'2012-06-18 21:44:23.574712',NULL,NULL,0,2,2,68); +INSERT INTO "grampsdb_childref" VALUES(17,33,8,2,'2012-06-18 21:44:23.581713',NULL,NULL,0,2,2,4); +INSERT INTO "grampsdb_childref" VALUES(18,33,8,3,'2012-06-18 21:44:23.589781',NULL,NULL,0,2,2,12); +INSERT INTO "grampsdb_childref" VALUES(19,33,8,4,'2012-06-18 21:44:23.597111',NULL,NULL,0,2,2,48); +INSERT INTO "grampsdb_childref" VALUES(20,33,8,5,'2012-06-18 21:44:23.604295',NULL,NULL,0,2,2,39); +INSERT INTO "grampsdb_childref" VALUES(21,33,9,1,'2012-06-18 21:44:23.905350',NULL,NULL,0,2,2,53); +INSERT INTO "grampsdb_childref" VALUES(22,33,9,2,'2012-06-18 21:44:23.911569',NULL,NULL,0,2,2,16); +INSERT INTO "grampsdb_childref" VALUES(23,33,12,1,'2012-06-18 21:44:24.928594',NULL,NULL,0,2,2,35); +INSERT INTO "grampsdb_childref" VALUES(24,33,12,2,'2012-06-18 21:44:24.934622',NULL,NULL,0,2,2,38); +INSERT INTO "grampsdb_childref" VALUES(25,33,12,3,'2012-06-18 21:44:24.940765',NULL,NULL,0,2,2,36); +INSERT INTO "grampsdb_childref" VALUES(26,33,12,4,'2012-06-18 21:44:24.946876',NULL,NULL,0,2,2,6); +INSERT INTO "grampsdb_childref" VALUES(27,33,12,5,'2012-06-18 21:44:24.952859',NULL,NULL,0,2,2,56); +INSERT INTO "grampsdb_childref" VALUES(28,33,13,1,'2012-06-18 21:44:25.134267',NULL,NULL,0,2,2,19); +INSERT INTO "grampsdb_childref" VALUES(29,33,13,2,'2012-06-18 21:44:25.140472',NULL,NULL,0,2,2,66); +INSERT INTO "grampsdb_childref" VALUES(30,33,13,3,'2012-06-18 21:44:25.146506',NULL,NULL,0,2,2,33); +INSERT INTO "grampsdb_childref" VALUES(31,33,14,1,'2012-06-18 21:44:25.276420',NULL,NULL,0,2,2,27); +INSERT INTO "grampsdb_childref" VALUES(32,33,15,1,'2012-06-18 21:44:25.510546',NULL,NULL,0,2,2,13); +INSERT INTO "grampsdb_childref" VALUES(33,33,15,2,'2012-06-18 21:44:25.516560',NULL,NULL,0,2,2,67); +INSERT INTO "grampsdb_childref" VALUES(34,33,15,3,'2012-06-18 21:44:25.522548',NULL,NULL,0,2,2,23); +INSERT INTO "grampsdb_childref" VALUES(35,33,15,4,'2012-06-18 21:44:25.528552',NULL,NULL,0,2,2,11); +INSERT INTO "grampsdb_childref" VALUES(36,33,17,1,'2012-06-18 21:44:26.014045',NULL,NULL,0,2,2,9); +INSERT INTO "grampsdb_childref" VALUES(37,33,17,2,'2012-06-18 21:44:26.020310',NULL,NULL,0,2,2,18); +INSERT INTO "grampsdb_childref" VALUES(38,33,17,3,'2012-06-18 21:44:26.026339',NULL,NULL,0,2,2,62); +INSERT INTO "grampsdb_childref" VALUES(39,33,19,1,'2012-06-18 21:44:26.762715',NULL,NULL,0,2,2,49); +INSERT INTO "grampsdb_childref" VALUES(40,33,19,2,'2012-06-18 21:44:26.768710',NULL,NULL,0,2,2,45); +INSERT INTO "grampsdb_childref" VALUES(41,33,19,3,'2012-06-18 21:44:26.774714',NULL,NULL,0,2,2,14); +INSERT INTO "grampsdb_childref" VALUES(42,33,19,4,'2012-06-18 21:44:26.780674',NULL,NULL,0,2,2,55); +INSERT INTO "grampsdb_childref" VALUES(43,33,19,5,'2012-06-18 21:44:26.786650',NULL,NULL,0,2,2,51); +INSERT INTO "grampsdb_childref" VALUES(44,33,19,6,'2012-06-18 21:44:26.792603',NULL,NULL,0,2,2,61); +INSERT INTO "grampsdb_childref" VALUES(45,33,19,7,'2012-06-18 21:44:26.798574',NULL,NULL,0,2,2,43); +INSERT INTO "grampsdb_childref" VALUES(46,33,19,8,'2012-06-18 21:44:26.804533',NULL,NULL,0,2,2,10); +INSERT INTO "grampsdb_childref" VALUES(47,33,19,9,'2012-06-18 21:44:26.810639',NULL,NULL,0,2,2,34); +INSERT INTO "grampsdb_childref" VALUES(48,33,19,10,'2012-06-18 21:44:26.816783',NULL,NULL,0,2,2,26); +INSERT INTO "grampsdb_childref" VALUES(49,33,19,11,'2012-06-18 21:44:26.822746',NULL,NULL,0,2,2,28); CREATE TABLE "grampsdb_mediaref" ( "id" integer NOT NULL PRIMARY KEY, "object_type_id" integer NOT NULL REFERENCES "django_content_type" ("id"), @@ -2249,83 +2301,84 @@ CREATE INDEX grampsdb_eventref_object_id_object_type_id ON grampsdb_eventref (object_id, object_type_id); CREATE INDEX grampsdb_childref_object_id_object_type_id ON grampsdb_childref (object_id, object_type_id); -CREATE INDEX "auth_permission_e4470c6e" ON "auth_permission" ("content_type_id"); -CREATE INDEX "auth_group_permissions_bda51c3c" ON "auth_group_permissions" ("group_id"); +CREATE INDEX "auth_permission_1bb8f392" ON "auth_permission" ("content_type_id"); +CREATE INDEX "auth_group_permissions_425ae3c4" ON "auth_group_permissions" ("group_id"); CREATE INDEX "auth_group_permissions_1e014c8f" ON "auth_group_permissions" ("permission_id"); -CREATE INDEX "auth_user_user_permissions_fbfc09f1" ON "auth_user_user_permissions" ("user_id"); +CREATE INDEX "auth_user_user_permissions_403f60f" ON "auth_user_user_permissions" ("user_id"); CREATE INDEX "auth_user_user_permissions_1e014c8f" ON "auth_user_user_permissions" ("permission_id"); -CREATE INDEX "auth_user_groups_fbfc09f1" ON "auth_user_groups" ("user_id"); -CREATE INDEX "auth_user_groups_bda51c3c" ON "auth_user_groups" ("group_id"); -CREATE INDEX "auth_message_fbfc09f1" ON "auth_message" ("user_id"); -CREATE INDEX "django_session_c25c2c28" ON "django_session" ("expire_date"); -CREATE INDEX "django_admin_log_fbfc09f1" ON "django_admin_log" ("user_id"); -CREATE INDEX "django_admin_log_e4470c6e" ON "django_admin_log" ("content_type_id"); +CREATE INDEX "auth_user_groups_403f60f" ON "auth_user_groups" ("user_id"); +CREATE INDEX "auth_user_groups_425ae3c4" ON "auth_user_groups" ("group_id"); +CREATE INDEX "auth_message_403f60f" ON "auth_message" ("user_id"); +CREATE INDEX "django_session_3da3d3d8" ON "django_session" ("expire_date"); +CREATE INDEX "django_admin_log_403f60f" ON "django_admin_log" ("user_id"); +CREATE INDEX "django_admin_log_1bb8f392" ON "django_admin_log" ("content_type_id"); CREATE INDEX "grampsdb_profile_71d2bf68" ON "grampsdb_profile" ("theme_type_id"); CREATE INDEX "grampsdb_person_families_21b911c5" ON "grampsdb_person_families" ("person_id"); -CREATE INDEX "grampsdb_person_families_ccf20756" ON "grampsdb_person_families" ("family_id"); +CREATE INDEX "grampsdb_person_families_330df8aa" ON "grampsdb_person_families" ("family_id"); CREATE INDEX "grampsdb_person_tags_21b911c5" ON "grampsdb_person_tags" ("person_id"); CREATE INDEX "grampsdb_person_tags_3747b463" ON "grampsdb_person_tags" ("tag_id"); CREATE INDEX "grampsdb_person_parent_families_21b911c5" ON "grampsdb_person_parent_families" ("person_id"); -CREATE INDEX "grampsdb_person_parent_families_ccf20756" ON "grampsdb_person_parent_families" ("family_id"); +CREATE INDEX "grampsdb_person_parent_families_330df8aa" ON "grampsdb_person_parent_families" ("family_id"); CREATE INDEX "grampsdb_person_79775e9" ON "grampsdb_person" ("gender_type_id"); CREATE INDEX "grampsdb_person_3a672176" ON "grampsdb_person" ("birth_id"); -CREATE INDEX "grampsdb_person_f406392b" ON "grampsdb_person" ("death_id"); -CREATE INDEX "grampsdb_family_tags_ccf20756" ON "grampsdb_family_tags" ("family_id"); +CREATE INDEX "grampsdb_person_bf9c6d5" ON "grampsdb_person" ("death_id"); +CREATE INDEX "grampsdb_family_tags_330df8aa" ON "grampsdb_family_tags" ("family_id"); CREATE INDEX "grampsdb_family_tags_3747b463" ON "grampsdb_family_tags" ("tag_id"); CREATE INDEX "grampsdb_family_656bfb9c" ON "grampsdb_family" ("father_id"); CREATE INDEX "grampsdb_family_3800eb51" ON "grampsdb_family" ("mother_id"); -CREATE INDEX "grampsdb_family_8a163760" ON "grampsdb_family" ("family_rel_type_id"); -CREATE INDEX "grampsdb_citation_89f89e85" ON "grampsdb_citation" ("source_id"); -CREATE INDEX "grampsdb_event_cb60d07f" ON "grampsdb_event" ("event_type_id"); -CREATE INDEX "grampsdb_event_c4391d6c" ON "grampsdb_event" ("place_id"); +CREATE INDEX "grampsdb_family_75e9c8a0" ON "grampsdb_family" ("family_rel_type_id"); +CREATE INDEX "grampsdb_citation_7607617b" ON "grampsdb_citation" ("source_id"); +CREATE INDEX "grampsdb_event_349f2f81" ON "grampsdb_event" ("event_type_id"); +CREATE INDEX "grampsdb_event_3bc6e294" ON "grampsdb_event" ("place_id"); CREATE INDEX "grampsdb_repository_5f9de118" ON "grampsdb_repository" ("repository_type_id"); CREATE INDEX "grampsdb_media_tags_11f50c51" ON "grampsdb_media_tags" ("media_id"); CREATE INDEX "grampsdb_media_tags_3747b463" ON "grampsdb_media_tags" ("tag_id"); CREATE INDEX "grampsdb_note_tags_14a186ec" ON "grampsdb_note_tags" ("note_id"); CREATE INDEX "grampsdb_note_tags_3747b463" ON "grampsdb_note_tags" ("tag_id"); -CREATE INDEX "grampsdb_note_8e504316" ON "grampsdb_note" ("note_type_id"); +CREATE INDEX "grampsdb_note_71afbcea" ON "grampsdb_note" ("note_type_id"); CREATE INDEX "grampsdb_surname_5489fd8b" ON "grampsdb_surname" ("name_origin_type_id"); CREATE INDEX "grampsdb_surname_632e075f" ON "grampsdb_surname" ("name_id"); -CREATE INDEX "grampsdb_name_bbd280b5" ON "grampsdb_name" ("name_type_id"); -CREATE INDEX "grampsdb_name_af013a48" ON "grampsdb_name" ("sort_as_id"); -CREATE INDEX "grampsdb_name_f5d4d029" ON "grampsdb_name" ("display_as_id"); +CREATE INDEX "grampsdb_name_442d7f4b" ON "grampsdb_name" ("name_type_id"); +CREATE INDEX "grampsdb_name_50fec5b8" ON "grampsdb_name" ("sort_as_id"); +CREATE INDEX "grampsdb_name_a2b2fd7" ON "grampsdb_name" ("display_as_id"); CREATE INDEX "grampsdb_name_21b911c5" ON "grampsdb_name" ("person_id"); -CREATE INDEX "grampsdb_lds_a9c5135e" ON "grampsdb_lds" ("lds_type_id"); -CREATE INDEX "grampsdb_lds_c4391d6c" ON "grampsdb_lds" ("place_id"); +CREATE INDEX "grampsdb_lds_563aeca2" ON "grampsdb_lds" ("lds_type_id"); +CREATE INDEX "grampsdb_lds_3bc6e294" ON "grampsdb_lds" ("place_id"); CREATE INDEX "grampsdb_lds_5934a803" ON "grampsdb_lds" ("famc_id"); CREATE INDEX "grampsdb_lds_44224078" ON "grampsdb_lds" ("status_id"); CREATE INDEX "grampsdb_lds_21b911c5" ON "grampsdb_lds" ("person_id"); -CREATE INDEX "grampsdb_lds_ccf20756" ON "grampsdb_lds" ("family_id"); +CREATE INDEX "grampsdb_lds_330df8aa" ON "grampsdb_lds" ("family_id"); CREATE INDEX "grampsdb_markup_14a186ec" ON "grampsdb_markup" ("note_id"); -CREATE INDEX "grampsdb_markup_b91c6fdf" ON "grampsdb_markup" ("styled_text_tag_type_id"); -CREATE INDEX "grampsdb_sourcedatamap_89f89e85" ON "grampsdb_sourcedatamap" ("source_id"); -CREATE INDEX "grampsdb_citationdatamap_958eecfd" ON "grampsdb_citationdatamap" ("citation_id"); +CREATE INDEX "grampsdb_markup_46e39021" ON "grampsdb_markup" ("styled_text_tag_type_id"); +CREATE INDEX "grampsdb_sourcedatamap_7607617b" ON "grampsdb_sourcedatamap" ("source_id"); +CREATE INDEX "grampsdb_citationdatamap_6a711303" ON "grampsdb_citationdatamap" ("citation_id"); CREATE INDEX "grampsdb_address_21b911c5" ON "grampsdb_address" ("person_id"); CREATE INDEX "grampsdb_address_6a730446" ON "grampsdb_address" ("repository_id"); -CREATE INDEX "grampsdb_location_c4391d6c" ON "grampsdb_location" ("place_id"); -CREATE INDEX "grampsdb_location_b213c1e9" ON "grampsdb_location" ("address_id"); -CREATE INDEX "grampsdb_url_9655b856" ON "grampsdb_url" ("url_type_id"); +CREATE INDEX "grampsdb_location_3bc6e294" ON "grampsdb_location" ("place_id"); +CREATE INDEX "grampsdb_location_4dec3e17" ON "grampsdb_location" ("address_id"); +CREATE INDEX "grampsdb_url_69aa47aa" ON "grampsdb_url" ("url_type_id"); CREATE INDEX "grampsdb_url_21b911c5" ON "grampsdb_url" ("person_id"); -CREATE INDEX "grampsdb_url_c4391d6c" ON "grampsdb_url" ("place_id"); +CREATE INDEX "grampsdb_url_3bc6e294" ON "grampsdb_url" ("place_id"); CREATE INDEX "grampsdb_url_6a730446" ON "grampsdb_url" ("repository_id"); -CREATE INDEX "grampsdb_attribute_ec24ebcd" ON "grampsdb_attribute" ("attribute_type_id"); -CREATE INDEX "grampsdb_attribute_ae71a55b" ON "grampsdb_attribute" ("object_type_id"); -CREATE INDEX "grampsdb_noteref_ae71a55b" ON "grampsdb_noteref" ("object_type_id"); -CREATE INDEX "grampsdb_noteref_d8532d97" ON "grampsdb_noteref" ("ref_object_id"); -CREATE INDEX "grampsdb_eventref_ae71a55b" ON "grampsdb_eventref" ("object_type_id"); -CREATE INDEX "grampsdb_eventref_d8532d97" ON "grampsdb_eventref" ("ref_object_id"); +CREATE INDEX "grampsdb_attribute_13db1433" ON "grampsdb_attribute" ("attribute_type_id"); +CREATE INDEX "grampsdb_attribute_518e5aa5" ON "grampsdb_attribute" ("object_type_id"); +CREATE INDEX "grampsdb_log_518e5aa5" ON "grampsdb_log" ("object_type_id"); +CREATE INDEX "grampsdb_noteref_518e5aa5" ON "grampsdb_noteref" ("object_type_id"); +CREATE INDEX "grampsdb_noteref_27acd269" ON "grampsdb_noteref" ("ref_object_id"); +CREATE INDEX "grampsdb_eventref_518e5aa5" ON "grampsdb_eventref" ("object_type_id"); +CREATE INDEX "grampsdb_eventref_27acd269" ON "grampsdb_eventref" ("ref_object_id"); CREATE INDEX "grampsdb_eventref_6ae08856" ON "grampsdb_eventref" ("role_type_id"); -CREATE INDEX "grampsdb_repositoryref_ae71a55b" ON "grampsdb_repositoryref" ("object_type_id"); -CREATE INDEX "grampsdb_repositoryref_d8532d97" ON "grampsdb_repositoryref" ("ref_object_id"); +CREATE INDEX "grampsdb_repositoryref_518e5aa5" ON "grampsdb_repositoryref" ("object_type_id"); +CREATE INDEX "grampsdb_repositoryref_27acd269" ON "grampsdb_repositoryref" ("ref_object_id"); CREATE INDEX "grampsdb_repositoryref_4fd76720" ON "grampsdb_repositoryref" ("source_media_type_id"); -CREATE INDEX "grampsdb_personref_ae71a55b" ON "grampsdb_personref" ("object_type_id"); -CREATE INDEX "grampsdb_personref_d8532d97" ON "grampsdb_personref" ("ref_object_id"); -CREATE INDEX "grampsdb_citationref_ae71a55b" ON "grampsdb_citationref" ("object_type_id"); -CREATE INDEX "grampsdb_citationref_958eecfd" ON "grampsdb_citationref" ("citation_id"); -CREATE INDEX "grampsdb_childref_ae71a55b" ON "grampsdb_childref" ("object_type_id"); +CREATE INDEX "grampsdb_personref_518e5aa5" ON "grampsdb_personref" ("object_type_id"); +CREATE INDEX "grampsdb_personref_27acd269" ON "grampsdb_personref" ("ref_object_id"); +CREATE INDEX "grampsdb_citationref_518e5aa5" ON "grampsdb_citationref" ("object_type_id"); +CREATE INDEX "grampsdb_citationref_6a711303" ON "grampsdb_citationref" ("citation_id"); +CREATE INDEX "grampsdb_childref_518e5aa5" ON "grampsdb_childref" ("object_type_id"); CREATE INDEX "grampsdb_childref_6f3234de" ON "grampsdb_childref" ("father_rel_type_id"); -CREATE INDEX "grampsdb_childref_de957003" ON "grampsdb_childref" ("mother_rel_type_id"); -CREATE INDEX "grampsdb_childref_d8532d97" ON "grampsdb_childref" ("ref_object_id"); -CREATE INDEX "grampsdb_mediaref_ae71a55b" ON "grampsdb_mediaref" ("object_type_id"); -CREATE INDEX "grampsdb_mediaref_d8532d97" ON "grampsdb_mediaref" ("ref_object_id"); +CREATE INDEX "grampsdb_childref_216a8ffd" ON "grampsdb_childref" ("mother_rel_type_id"); +CREATE INDEX "grampsdb_childref_27acd269" ON "grampsdb_childref" ("ref_object_id"); +CREATE INDEX "grampsdb_mediaref_518e5aa5" ON "grampsdb_mediaref" ("object_type_id"); +CREATE INDEX "grampsdb_mediaref_27acd269" ON "grampsdb_mediaref" ("ref_object_id"); COMMIT; diff --git a/src/webapp/grampsdb/models.py b/src/webapp/grampsdb/models.py index 7ca5920e1..48e61fa10 100644 --- a/src/webapp/grampsdb/models.py +++ b/src/webapp/grampsdb/models.py @@ -396,9 +396,9 @@ class Config(models.Model): """ All of the meta config items for the entire system. """ - setting = models.CharField('config setting', max_length=25) - description = models.TextField('description') - value_type = models.CharField('type of value', max_length=25) + setting = models.CharField('config setting', max_length=50) + description = models.TextField('description', null=True, blank=True) + value_type = models.CharField('type of value', max_length=80) value = models.TextField('value') def __unicode__(self): diff --git a/src/webapp/grampsdb/view/media.py b/src/webapp/grampsdb/view/media.py index 07afcdaf6..27d8ad12f 100644 --- a/src/webapp/grampsdb/view/media.py +++ b/src/webapp/grampsdb/view/media.py @@ -56,10 +56,11 @@ def process_media(request, context, handle, action, add_to=None): # view, edit, # Handle: edit, view, add, create, save, delete if action == "full": - # FIXME: path should come from config media = Media.objects.get(handle=handle) media_type, media_ext = media.mime.split("/", 1) - folder = config.get('behavior.addmedia-image-dir') + # FIXME: This should be absolute: + folder = Config.objects.get(setting="behavior.addmedia-image-dir").value + # FIXME: media.path should not have any .. for security image = Image.open("%s/%s" % (folder, media.path)) response = HttpResponse(mimetype=media.mime) image.save(response, media_ext.upper()) @@ -67,13 +68,18 @@ def process_media(request, context, handle, action, add_to=None): # view, edit, elif action == "thumbnail": media = Media.objects.get(handle=handle) media_type, media_ext = media.mime.split("/", 1) - folder = config.get('behavior.addmedia-image-dir') + # FIXME: This should be absolute: + folder = Config.objects.get(setting="behavior.addmedia-image-dir").value + # FIXME: media.path should not have any .. for security if os.path.exists("%s/thumbnail/%s" % (folder, media.path)): image = Image.open("%s/thumbnail/%s" % (folder, media.path)) else: image = Image.open("%s/%s" % (folder, media.path)) image.thumbnail((300,300), Image.ANTIALIAS) - os.makedirs("%s/thumbnail" % folder) + try: + os.makedirs("%s/thumbnail" % folder) + except: + pass image.save("%s/thumbnail/%s" % (folder, media.path)) response = HttpResponse(mimetype=media.mime) image.save(response, media_ext.upper()) diff --git a/src/webapp/init.py b/src/webapp/init.py index 5468250fd..0766eb0e5 100644 --- a/src/webapp/init.py +++ b/src/webapp/init.py @@ -31,6 +31,7 @@ import os os.environ["DJANGO_SETTINGS_MODULE"] = "settings" import settings +from gen.config import config from gen.lib.nametype import NameType from gen.lib.nameorigintype import NameOriginType from gen.lib.attrtype import AttributeType @@ -170,6 +171,23 @@ for table, entries in [("grampsdb.config", print " }," entry_count += 1 +pk = 4 +for section in config.get_sections(): + for setting in config.get_section_settings(section): + key = "%s.%s" % (section, setting) + value = config.get_default(key) + print " {" + print " \"model\": \"grampsdb.config\"," + print " \"pk\": %d," % pk + print " \"fields\":" + print " {" + print " \"setting\" : \"%s\"," % key + print " \"value_type\" : \"%s\"," % type(value).__name__ + print " \"value\": \"%s\"" % value + print " }" + print " },", + pk += 1 + ## Add the data for the type models: type_models = [NameType, NameOriginType, AttributeType, UrlType, ChildRefType, From 8892057886f7d42982c0a14c236f0259ed16b505 Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Tue, 19 Jun 2012 02:56:11 +0000 Subject: [PATCH 11/68] Error 5851 (part 3) svn: r19873 --- src/plugins/lib/libcairodoc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/lib/libcairodoc.py b/src/plugins/lib/libcairodoc.py index 6abe6700f..db4aa8b6b 100644 --- a/src/plugins/lib/libcairodoc.py +++ b/src/plugins/lib/libcairodoc.py @@ -1573,10 +1573,10 @@ links (like ODF) and write PDF from that format. # horizontal position of the text is not included in the style, # we assume that it is the size of the shadow, or 0.2mm - if style.get_shadow(): - x_offset = style.get_shadow_space() - else: - x_offset = 0.2 + if style.get_shadow(): + x_offset = style.get_shadow_space() + else: + x_offset = 0.2 new_text = GtkDocText(paragraph_style, 'center', self.__markup(text), From 08f380a4efcbf427132f971610b53cbee38e9415 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 19 Jun 2012 03:29:22 +0000 Subject: [PATCH 12/68] Pure-Python PNG reader/writer under MIT License svn: r19874 --- src/webapp/grampsdb/view/png.py | 3599 +++++++++++++++++++++++++++++++ 1 file changed, 3599 insertions(+) create mode 100644 src/webapp/grampsdb/view/png.py diff --git a/src/webapp/grampsdb/view/png.py b/src/webapp/grampsdb/view/png.py new file mode 100644 index 000000000..23e36e390 --- /dev/null +++ b/src/webapp/grampsdb/view/png.py @@ -0,0 +1,3599 @@ +#!/usr/bin/env python + +# $URL$ +# $Rev$ + +# png.py - PNG encoder/decoder in pure Python +# +# Copyright (C) 2006 Johann C. Rocholl +# Portions Copyright (C) 2009 David Jones +# And probably portions Copyright (C) 2006 Nicko van Someren +# +# Original concept by Johann C. Rocholl. +# +# LICENSE (The MIT License) +# +# Permission is hereby granted, free of charge, to any person +# obtaining a copy of this software and associated documentation files +# (the "Software"), to deal in the Software without restriction, +# including without limitation the rights to use, copy, modify, merge, +# publish, distribute, sublicense, and/or sell copies of the Software, +# and to permit persons to whom the Software is furnished to do so, +# subject to the following conditions: +# +# The above copyright notice and this permission notice shall be +# included in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS +# BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +# ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# Changelog (recent first): +# 2009-03-11 David: interlaced bit depth < 8 (writing). +# 2009-03-10 David: interlaced bit depth < 8 (reading). +# 2009-03-04 David: Flat and Boxed pixel formats. +# 2009-02-26 David: Palette support (writing). +# 2009-02-23 David: Bit-depths < 8; better PNM support. +# 2006-06-17 Nicko: Reworked into a class, faster interlacing. +# 2006-06-17 Johann: Very simple prototype PNG decoder. +# 2006-06-17 Nicko: Test suite with various image generators. +# 2006-06-17 Nicko: Alpha-channel, grey-scale, 16-bit/plane support. +# 2006-06-15 Johann: Scanline iterator interface for large input files. +# 2006-06-09 Johann: Very simple prototype PNG encoder. + +# Incorporated into Bangai-O Development Tools by drj on 2009-02-11 from +# http://trac.browsershots.org/browser/trunk/pypng/lib/png.py?rev=2885 + +# Incorporated into pypng by drj on 2009-03-12 from +# //depot/prj/bangaio/master/code/png.py#67 + + +""" +Pure Python PNG Reader/Writer + +This Python module implements support for PNG images (see PNG +specification at http://www.w3.org/TR/2003/REC-PNG-20031110/ ). It reads +and writes PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 +bits per pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, +RGBA, LA (greyscale with alpha) with 8/16 bits per channel; colour mapped +images (1/2/4/8 bit). Adam7 interlacing is supported for reading and +writing. A number of optional chunks can be specified (when writing) +and understood (when reading): ``tRNS``, ``bKGD``, ``gAMA``. + +For help, type ``import png; help(png)`` in your python interpreter. + +A good place to start is the :class:`Reader` and :class:`Writer` classes. + +Requires Python 2.3. Limited support is available for Python 2.2, but +not everything works. Best with Python 2.4 and higher. Installation is +trivial, but see the ``README.txt`` file (with the source distribution) +for details. + +This file can also be used as a command-line utility to convert +`Netpbm `_ PNM files to PNG, and the reverse conversion from PNG to +PNM. The interface is similar to that of the ``pnmtopng`` program from +Netpbm. Type ``python png.py --help`` at the shell prompt +for usage and a list of options. + +A note on spelling and terminology +---------------------------------- + +Generally British English spelling is used in the documentation. So +that's "greyscale" and "colour". This not only matches the author's +native language, it's also used by the PNG specification. + +The major colour models supported by PNG (and hence by PyPNG) are: +greyscale, RGB, greyscale--alpha, RGB--alpha. These are sometimes +referred to using the abbreviations: L, RGB, LA, RGBA. In this case +each letter abbreviates a single channel: *L* is for Luminance or Luma or +Lightness which is the channel used in greyscale images; *R*, *G*, *B* stand +for Red, Green, Blue, the components of a colour image; *A* stands for +Alpha, the opacity channel (used for transparency effects, but higher +values are more opaque, so it makes sense to call it opacity). + +A note on formats +----------------- + +When getting pixel data out of this module (reading) and presenting +data to this module (writing) there are a number of ways the data could +be represented as a Python value. Generally this module uses one of +three formats called "flat row flat pixel", "boxed row flat pixel", and +"boxed row boxed pixel". Basically the concern is whether each pixel +and each row comes in its own little tuple (box), or not. + +Consider an image that is 3 pixels wide by 2 pixels high, and each pixel +has RGB components: + +Boxed row flat pixel:: + + list([R,G,B, R,G,B, R,G,B], + [R,G,B, R,G,B, R,G,B]) + +Each row appears as its own list, but the pixels are flattened so that +three values for one pixel simply follow the three values for the previous +pixel. This is the most common format used, because it provides a good +compromise between space and convenience. PyPNG regards itself as +at liberty to replace any sequence type with any sufficiently compatible +other sequence type; in practice each row is an array (from the array +module), and the outer list is sometimes an iterator rather than an +explicit list (so that streaming is possible). + +Flat row flat pixel:: + + [R,G,B, R,G,B, R,G,B, + R,G,B, R,G,B, R,G,B] + +The entire image is one single giant sequence of colour values. +Generally an array will be used (to save space), not a list. + +Boxed row boxed pixel:: + + list([ (R,G,B), (R,G,B), (R,G,B) ], + [ (R,G,B), (R,G,B), (R,G,B) ]) + +Each row appears in its own list, but each pixel also appears in its own +tuple. A serious memory burn in Python. + +In all cases the top row comes first, and for each row the pixels are +ordered from left-to-right. Within a pixel the values appear in the +order, R-G-B-A (or L-A for greyscale--alpha). + +There is a fourth format, mentioned because it is used internally, +is close to what lies inside a PNG file itself, and has some support +from the public API. This format is called packed. When packed, +each row is a sequence of bytes (integers from 0 to 255), just as +it is before PNG scanline filtering is applied. When the bit depth +is 8 this is essentially the same as boxed row flat pixel; when the +bit depth is less than 8, several pixels are packed into each byte; +when the bit depth is 16 (the only value more than 8 that is supported +by the PNG image format) each pixel value is decomposed into 2 bytes +(and `packed` is a misnomer). This format is used by the +:meth:`Writer.write_packed` method. It isn't usually a convenient +format, but may be just right if the source data for the PNG image +comes from something that uses a similar format (for example, 1-bit +BMPs, or another PNG file). + +And now, my famous members +-------------------------- +""" + +# http://www.python.org/doc/2.2.3/whatsnew/node5.html +from __future__ import generators + +__version__ = "$URL$ $Rev$" + +from array import array +try: # See :pyver:old + import itertools +except: + pass +import math +# http://www.python.org/doc/2.4.4/lib/module-operator.html +import operator +import struct +import sys +import zlib +# http://www.python.org/doc/2.4.4/lib/module-warnings.html +import warnings + + +__all__ = ['Image', 'Reader', 'Writer', 'write_chunks', 'from_array'] + + +# The PNG signature. +# http://www.w3.org/TR/PNG/#5PNG-file-signature +_signature = struct.pack('8B', 137, 80, 78, 71, 13, 10, 26, 10) + +_adam7 = ((0, 0, 8, 8), + (4, 0, 8, 8), + (0, 4, 4, 8), + (2, 0, 4, 4), + (0, 2, 2, 4), + (1, 0, 2, 2), + (0, 1, 1, 2)) + +def group(s, n): + # See + # http://www.python.org/doc/2.6/library/functions.html#zip + return zip(*[iter(s)]*n) + +def isarray(x): + """Same as ``isinstance(x, array)`` except on Python 2.2, where it + always returns ``False``. This helps PyPNG work on Python 2.2. + """ + + try: + return isinstance(x, array) + except: + return False + +try: # see :pyver:old + array.tostring +except: + def tostring(row): + l = len(row) + return struct.pack('%dB' % l, *row) +else: + def tostring(row): + """Convert row of bytes to string. Expects `row` to be an + ``array``. + """ + return row.tostring() + +# Conditionally convert to bytes. Works on Python 2 and Python 3. +try: + bytes('', 'ascii') + def strtobytes(x): return bytes(x, 'iso8859-1') + def bytestostr(x): return str(x, 'iso8859-1') +except: + strtobytes = str + bytestostr = str + +def interleave_planes(ipixels, apixels, ipsize, apsize): + """ + Interleave (colour) planes, e.g. RGB + A = RGBA. + + Return an array of pixels consisting of the `ipsize` elements of data + from each pixel in `ipixels` followed by the `apsize` elements of data + from each pixel in `apixels`. Conventionally `ipixels` and + `apixels` are byte arrays so the sizes are bytes, but it actually + works with any arrays of the same type. The returned array is the + same type as the input arrays which should be the same type as each other. + """ + + itotal = len(ipixels) + atotal = len(apixels) + newtotal = itotal + atotal + newpsize = ipsize + apsize + # Set up the output buffer + # See http://www.python.org/doc/2.4.4/lib/module-array.html#l2h-1356 + out = array(ipixels.typecode) + # It's annoying that there is no cheap way to set the array size :-( + out.extend(ipixels) + out.extend(apixels) + # Interleave in the pixel data + for i in range(ipsize): + out[i:newtotal:newpsize] = ipixels[i:itotal:ipsize] + for i in range(apsize): + out[i+ipsize:newtotal:newpsize] = apixels[i:atotal:apsize] + return out + +def check_palette(palette): + """Check a palette argument (to the :class:`Writer` class) for validity. + Returns the palette as a list if okay; raises an exception otherwise. + """ + + # None is the default and is allowed. + if palette is None: + return None + + p = list(palette) + if not (0 < len(p) <= 256): + raise ValueError("a palette must have between 1 and 256 entries") + seen_triple = False + for i,t in enumerate(p): + if len(t) not in (3,4): + raise ValueError( + "palette entry %d: entries must be 3- or 4-tuples." % i) + if len(t) == 3: + seen_triple = True + if seen_triple and len(t) == 4: + raise ValueError( + "palette entry %d: all 4-tuples must precede all 3-tuples" % i) + for x in t: + if int(x) != x or not(0 <= x <= 255): + raise ValueError( + "palette entry %d: values must be integer: 0 <= x <= 255" % i) + return p + +class Error(Exception): + prefix = 'Error' + def __str__(self): + return self.prefix + ': ' + ' '.join(self.args) + +class FormatError(Error): + """Problem with input file format. In other words, PNG file does + not conform to the specification in some way and is invalid. + """ + + prefix = 'FormatError' + +class ChunkError(FormatError): + prefix = 'ChunkError' + + +class Writer: + """ + PNG encoder in pure Python. + """ + + def __init__(self, width=None, height=None, + size=None, + greyscale=False, + alpha=False, + bitdepth=8, + palette=None, + transparent=None, + background=None, + gamma=None, + compression=None, + interlace=False, + bytes_per_sample=None, # deprecated + planes=None, + colormap=None, + maxval=None, + chunk_limit=2**20): + """ + Create a PNG encoder object. + + Arguments: + + width, height + Image size in pixels, as two separate arguments. + size + Image size (w,h) in pixels, as single argument. + greyscale + Input data is greyscale, not RGB. + alpha + Input data has alpha channel (RGBA or LA). + bitdepth + Bit depth: from 1 to 16. + palette + Create a palette for a colour mapped image (colour type 3). + transparent + Specify a transparent colour (create a ``tRNS`` chunk). + background + Specify a default background colour (create a ``bKGD`` chunk). + gamma + Specify a gamma value (create a ``gAMA`` chunk). + compression + zlib compression level (1-9). + interlace + Create an interlaced image. + chunk_limit + Write multiple ``IDAT`` chunks to save memory. + + The image size (in pixels) can be specified either by using the + `width` and `height` arguments, or with the single `size` + argument. If `size` is used it should be a pair (*width*, + *height*). + + `greyscale` and `alpha` are booleans that specify whether + an image is greyscale (or colour), and whether it has an + alpha channel (or not). + + `bitdepth` specifies the bit depth of the source pixel values. + Each source pixel value must be an integer between 0 and + ``2**bitdepth-1``. For example, 8-bit images have values + between 0 and 255. PNG only stores images with bit depths of + 1,2,4,8, or 16. When `bitdepth` is not one of these values, + the next highest valid bit depth is selected, and an ``sBIT`` + (significant bits) chunk is generated that specifies the original + precision of the source image. In this case the supplied pixel + values will be rescaled to fit the range of the selected bit depth. + + The details of which bit depth / colour model combinations the + PNG file format supports directly, are somewhat arcane + (refer to the PNG specification for full details). Briefly: + "small" bit depths (1,2,4) are only allowed with greyscale and + colour mapped images; colour mapped images cannot have bit depth + 16. + + For colour mapped images (in other words, when the `palette` + argument is specified) the `bitdepth` argument must match one of + the valid PNG bit depths: 1, 2, 4, or 8. (It is valid to have a + PNG image with a palette and an ``sBIT`` chunk, but the meaning + is slightly different; it would be awkward to press the + `bitdepth` argument into service for this.) + + The `palette` option, when specified, causes a colour mapped image + to be created: the PNG colour type is set to 3; greyscale + must not be set; alpha must not be set; transparent must + not be set; the bit depth must be 1,2,4, or 8. When a colour + mapped image is created, the pixel values are palette indexes + and the `bitdepth` argument specifies the size of these indexes + (not the size of the colour values in the palette). + + The palette argument value should be a sequence of 3- or + 4-tuples. 3-tuples specify RGB palette entries; 4-tuples + specify RGBA palette entries. If both 4-tuples and 3-tuples + appear in the sequence then all the 4-tuples must come + before all the 3-tuples. A ``PLTE`` chunk is created; if there + are 4-tuples then a ``tRNS`` chunk is created as well. The + ``PLTE`` chunk will contain all the RGB triples in the same + sequence; the ``tRNS`` chunk will contain the alpha channel for + all the 4-tuples, in the same sequence. Palette entries + are always 8-bit. + + If specified, the `transparent` and `background` parameters must + be a tuple with three integer values for red, green, blue, or + a simple integer (or singleton tuple) for a greyscale image. + + If specified, the `gamma` parameter must be a positive number + (generally, a float). A ``gAMA`` chunk will be created. Note that + this will not change the values of the pixels as they appear in + the PNG file, they are assumed to have already been converted + appropriately for the gamma specified. + + The `compression` argument specifies the compression level + to be used by the ``zlib`` module. Higher values are likely + to compress better, but will be slower to compress. The + default for this argument is ``None``; this does not mean + no compression, rather it means that the default from the + ``zlib`` module is used (which is generally acceptable). + + If `interlace` is true then an interlaced image is created + (using PNG's so far only interace method, *Adam7*). This does not + affect how the pixels should be presented to the encoder, rather + it changes how they are arranged into the PNG file. On slow + connexions interlaced images can be partially decoded by the + browser to give a rough view of the image that is successively + refined as more image data appears. + + .. note :: + + Enabling the `interlace` option requires the entire image + to be processed in working memory. + + `chunk_limit` is used to limit the amount of memory used whilst + compressing the image. In order to avoid using large amounts of + memory, multiple ``IDAT`` chunks may be created. + """ + + # At the moment the `planes` argument is ignored; + # its purpose is to act as a dummy so that + # ``Writer(x, y, **info)`` works, where `info` is a dictionary + # returned by Reader.read and friends. + # Ditto for `colormap`. + + # A couple of helper functions come first. Best skipped if you + # are reading through. + + def isinteger(x): + try: + return int(x) == x + except: + return False + + def check_color(c, which): + """Checks that a colour argument for transparent or + background options is the right form. Also "corrects" bare + integers to 1-tuples. + """ + + if c is None: + return c + if greyscale: + try: + l = len(c) + except TypeError: + c = (c,) + if len(c) != 1: + raise ValueError("%s for greyscale must be 1-tuple" % + which) + if not isinteger(c[0]): + raise ValueError( + "%s colour for greyscale must be integer" % + which) + else: + if not (len(c) == 3 and + isinteger(c[0]) and + isinteger(c[1]) and + isinteger(c[2])): + raise ValueError( + "%s colour must be a triple of integers" % + which) + return c + + if size: + if len(size) != 2: + raise ValueError( + "size argument should be a pair (width, height)") + if width is not None and width != size[0]: + raise ValueError( + "size[0] (%r) and width (%r) should match when both are used." + % (size[0], width)) + if height is not None and height != size[1]: + raise ValueError( + "size[1] (%r) and height (%r) should match when both are used." + % (size[1], height)) + width,height = size + del size + + if width <= 0 or height <= 0: + raise ValueError("width and height must be greater than zero") + if not isinteger(width) or not isinteger(height): + raise ValueError("width and height must be integers") + # http://www.w3.org/TR/PNG/#7Integers-and-byte-order + if width > 2**32-1 or height > 2**32-1: + raise ValueError("width and height cannot exceed 2**32-1") + + if alpha and transparent is not None: + raise ValueError( + "transparent colour not allowed with alpha channel") + + if bytes_per_sample is not None: + warnings.warn('please use bitdepth instead of bytes_per_sample', + DeprecationWarning) + if bytes_per_sample not in (0.125, 0.25, 0.5, 1, 2): + raise ValueError( + "bytes per sample must be .125, .25, .5, 1, or 2") + bitdepth = int(8*bytes_per_sample) + del bytes_per_sample + if not isinteger(bitdepth) or bitdepth < 1 or 16 < bitdepth: + raise ValueError("bitdepth (%r) must be a postive integer <= 16" % + bitdepth) + + self.rescale = None + if palette: + if bitdepth not in (1,2,4,8): + raise ValueError("with palette, bitdepth must be 1, 2, 4, or 8") + if transparent is not None: + raise ValueError("transparent and palette not compatible") + if alpha: + raise ValueError("alpha and palette not compatible") + if greyscale: + raise ValueError("greyscale and palette not compatible") + else: + # No palette, check for sBIT chunk generation. + if alpha or not greyscale: + if bitdepth not in (8,16): + targetbitdepth = (8,16)[bitdepth > 8] + self.rescale = (bitdepth, targetbitdepth) + bitdepth = targetbitdepth + del targetbitdepth + else: + assert greyscale + assert not alpha + if bitdepth not in (1,2,4,8,16): + if bitdepth > 8: + targetbitdepth = 16 + elif bitdepth == 3: + targetbitdepth = 4 + else: + assert bitdepth in (5,6,7) + targetbitdepth = 8 + self.rescale = (bitdepth, targetbitdepth) + bitdepth = targetbitdepth + del targetbitdepth + + if bitdepth < 8 and (alpha or not greyscale and not palette): + raise ValueError( + "bitdepth < 8 only permitted with greyscale or palette") + if bitdepth > 8 and palette: + raise ValueError( + "bit depth must be 8 or less for images with palette") + + transparent = check_color(transparent, 'transparent') + background = check_color(background, 'background') + + # It's important that the true boolean values (greyscale, alpha, + # colormap, interlace) are converted to bool because Iverson's + # convention is relied upon later on. + self.width = width + self.height = height + self.transparent = transparent + self.background = background + self.gamma = gamma + self.greyscale = bool(greyscale) + self.alpha = bool(alpha) + self.colormap = bool(palette) + self.bitdepth = int(bitdepth) + self.compression = compression + self.chunk_limit = chunk_limit + self.interlace = bool(interlace) + self.palette = check_palette(palette) + + self.color_type = 4*self.alpha + 2*(not greyscale) + 1*self.colormap + assert self.color_type in (0,2,3,4,6) + + self.color_planes = (3,1)[self.greyscale or self.colormap] + self.planes = self.color_planes + self.alpha + # :todo: fix for bitdepth < 8 + self.psize = (self.bitdepth/8) * self.planes + + def make_palette(self): + """Create the byte sequences for a ``PLTE`` and if necessary a + ``tRNS`` chunk. Returned as a pair (*p*, *t*). *t* will be + ``None`` if no ``tRNS`` chunk is necessary. + """ + + p = array('B') + t = array('B') + + for x in self.palette: + p.extend(x[0:3]) + if len(x) > 3: + t.append(x[3]) + p = tostring(p) + t = tostring(t) + if t: + return p,t + return p,None + + def write(self, outfile, rows): + """Write a PNG image to the output file. `rows` should be + an iterable that yields each row in boxed row flat pixel format. + The rows should be the rows of the original image, so there + should be ``self.height`` rows of ``self.width * self.planes`` values. + If `interlace` is specified (when creating the instance), then + an interlaced PNG file will be written. Supply the rows in the + normal image order; the interlacing is carried out internally. + + .. note :: + + Interlacing will require the entire image to be in working memory. + """ + + if self.interlace: + fmt = 'BH'[self.bitdepth > 8] + a = array(fmt, itertools.chain(*rows)) + return self.write_array(outfile, a) + else: + nrows = self.write_passes(outfile, rows) + if nrows != self.height: + raise ValueError( + "rows supplied (%d) does not match height (%d)" % + (nrows, self.height)) + + def write_passes(self, outfile, rows, packed=False): + """ + Write a PNG image to the output file. + + Most users are expected to find the :meth:`write` or + :meth:`write_array` method more convenient. + + The rows should be given to this method in the order that + they appear in the output file. For straightlaced images, + this is the usual top to bottom ordering, but for interlaced + images the rows should have already been interlaced before + passing them to this function. + + `rows` should be an iterable that yields each row. When + `packed` is ``False`` the rows should be in boxed row flat pixel + format; when `packed` is ``True`` each row should be a packed + sequence of bytes. + + """ + + # http://www.w3.org/TR/PNG/#5PNG-file-signature + outfile.write(_signature) + + # http://www.w3.org/TR/PNG/#11IHDR + write_chunk(outfile, 'IHDR', + struct.pack("!2I5B", self.width, self.height, + self.bitdepth, self.color_type, + 0, 0, self.interlace)) + + # See :chunk:order + # http://www.w3.org/TR/PNG/#11gAMA + if self.gamma is not None: + write_chunk(outfile, 'gAMA', + struct.pack("!L", int(round(self.gamma*1e5)))) + + # See :chunk:order + # http://www.w3.org/TR/PNG/#11sBIT + if self.rescale: + write_chunk(outfile, 'sBIT', + struct.pack('%dB' % self.planes, + *[self.rescale[0]]*self.planes)) + + # :chunk:order: Without a palette (PLTE chunk), ordering is + # relatively relaxed. With one, gAMA chunk must precede PLTE + # chunk which must precede tRNS and bKGD. + # See http://www.w3.org/TR/PNG/#5ChunkOrdering + if self.palette: + p,t = self.make_palette() + write_chunk(outfile, 'PLTE', p) + if t: + # tRNS chunk is optional. Only needed if palette entries + # have alpha. + write_chunk(outfile, 'tRNS', t) + + # http://www.w3.org/TR/PNG/#11tRNS + if self.transparent is not None: + if self.greyscale: + write_chunk(outfile, 'tRNS', + struct.pack("!1H", *self.transparent)) + else: + write_chunk(outfile, 'tRNS', + struct.pack("!3H", *self.transparent)) + + # http://www.w3.org/TR/PNG/#11bKGD + if self.background is not None: + if self.greyscale: + write_chunk(outfile, 'bKGD', + struct.pack("!1H", *self.background)) + else: + write_chunk(outfile, 'bKGD', + struct.pack("!3H", *self.background)) + + # http://www.w3.org/TR/PNG/#11IDAT + if self.compression is not None: + compressor = zlib.compressobj(self.compression) + else: + compressor = zlib.compressobj() + + # Choose an extend function based on the bitdepth. The extend + # function packs/decomposes the pixel values into bytes and + # stuffs them onto the data array. + data = array('B') + if self.bitdepth == 8 or packed: + extend = data.extend + elif self.bitdepth == 16: + # Decompose into bytes + def extend(sl): + fmt = '!%dH' % len(sl) + data.extend(array('B', struct.pack(fmt, *sl))) + else: + # Pack into bytes + assert self.bitdepth < 8 + # samples per byte + spb = int(8/self.bitdepth) + def extend(sl): + a = array('B', sl) + # Adding padding bytes so we can group into a whole + # number of spb-tuples. + l = float(len(a)) + extra = math.ceil(l / float(spb))*spb - l + a.extend([0]*int(extra)) + # Pack into bytes + l = group(a, spb) + l = map(lambda e: reduce(lambda x,y: + (x << self.bitdepth) + y, e), l) + data.extend(l) + if self.rescale: + oldextend = extend + factor = \ + float(2**self.rescale[1]-1) / float(2**self.rescale[0]-1) + def extend(sl): + oldextend(map(lambda x: int(round(factor*x)), sl)) + + # Build the first row, testing mostly to see if we need to + # changed the extend function to cope with NumPy integer types + # (they cause our ordinary definition of extend to fail, so we + # wrap it). See + # http://code.google.com/p/pypng/issues/detail?id=44 + enumrows = enumerate(rows) + del rows + + # First row's filter type. + data.append(0) + # :todo: Certain exceptions in the call to ``.next()`` or the + # following try would indicate no row data supplied. + # Should catch. + i,row = enumrows.next() + try: + # If this fails... + extend(row) + except: + # ... try a version that converts the values to int first. + # Not only does this work for the (slightly broken) NumPy + # types, there are probably lots of other, unknown, "nearly" + # int types it works for. + def wrapmapint(f): + return lambda sl: f(map(int, sl)) + extend = wrapmapint(extend) + del wrapmapint + extend(row) + + for i,row in enumrows: + # Add "None" filter type. Currently, it's essential that + # this filter type be used for every scanline as we do not + # mark the first row of a reduced pass image; that means we + # could accidentally compute the wrong filtered scanline if + # we used "up", "average", or "paeth" on such a line. + data.append(0) + extend(row) + if len(data) > self.chunk_limit: + compressed = compressor.compress(tostring(data)) + if len(compressed): + # print >> sys.stderr, len(data), len(compressed) + write_chunk(outfile, 'IDAT', compressed) + # Because of our very witty definition of ``extend``, + # above, we must re-use the same ``data`` object. Hence + # we use ``del`` to empty this one, rather than create a + # fresh one (which would be my natural FP instinct). + del data[:] + if len(data): + compressed = compressor.compress(tostring(data)) + else: + compressed = '' + flushed = compressor.flush() + if len(compressed) or len(flushed): + # print >> sys.stderr, len(data), len(compressed), len(flushed) + write_chunk(outfile, 'IDAT', compressed + flushed) + # http://www.w3.org/TR/PNG/#11IEND + write_chunk(outfile, 'IEND') + return i+1 + + def write_array(self, outfile, pixels): + """ + Write an array in flat row flat pixel format as a PNG file on + the output file. See also :meth:`write` method. + """ + + if self.interlace: + self.write_passes(outfile, self.array_scanlines_interlace(pixels)) + else: + self.write_passes(outfile, self.array_scanlines(pixels)) + + def write_packed(self, outfile, rows): + """ + Write PNG file to `outfile`. The pixel data comes from `rows` + which should be in boxed row packed format. Each row should be + a sequence of packed bytes. + + Technically, this method does work for interlaced images but it + is best avoided. For interlaced images, the rows should be + presented in the order that they appear in the file. + + This method should not be used when the source image bit depth + is not one naturally supported by PNG; the bit depth should be + 1, 2, 4, 8, or 16. + """ + + if self.rescale: + raise Error("write_packed method not suitable for bit depth %d" % + self.rescale[0]) + return self.write_passes(outfile, rows, packed=True) + + def convert_pnm(self, infile, outfile): + """ + Convert a PNM file containing raw pixel data into a PNG file + with the parameters set in the writer object. Works for + (binary) PGM, PPM, and PAM formats. + """ + + if self.interlace: + pixels = array('B') + pixels.fromfile(infile, + (self.bitdepth/8) * self.color_planes * + self.width * self.height) + self.write_passes(outfile, self.array_scanlines_interlace(pixels)) + else: + self.write_passes(outfile, self.file_scanlines(infile)) + + def convert_ppm_and_pgm(self, ppmfile, pgmfile, outfile): + """ + Convert a PPM and PGM file containing raw pixel data into a + PNG outfile with the parameters set in the writer object. + """ + pixels = array('B') + pixels.fromfile(ppmfile, + (self.bitdepth/8) * self.color_planes * + self.width * self.height) + apixels = array('B') + apixels.fromfile(pgmfile, + (self.bitdepth/8) * + self.width * self.height) + pixels = interleave_planes(pixels, apixels, + (self.bitdepth/8) * self.color_planes, + (self.bitdepth/8)) + if self.interlace: + self.write_passes(outfile, self.array_scanlines_interlace(pixels)) + else: + self.write_passes(outfile, self.array_scanlines(pixels)) + + def file_scanlines(self, infile): + """ + Generates boxed rows in flat pixel format, from the input file + `infile`. It assumes that the input file is in a "Netpbm-like" + binary format, and is positioned at the beginning of the first + pixel. The number of pixels to read is taken from the image + dimensions (`width`, `height`, `planes`) and the number of bytes + per value is implied by the image `bitdepth`. + """ + + # Values per row + vpr = self.width * self.planes + row_bytes = vpr + if self.bitdepth > 8: + assert self.bitdepth == 16 + row_bytes *= 2 + fmt = '>%dH' % vpr + def line(): + return array('H', struct.unpack(fmt, infile.read(row_bytes))) + else: + def line(): + scanline = array('B', infile.read(row_bytes)) + return scanline + for y in range(self.height): + yield line() + + def array_scanlines(self, pixels): + """ + Generates boxed rows (flat pixels) from flat rows (flat pixels) + in an array. + """ + + # Values per row + vpr = self.width * self.planes + stop = 0 + for y in range(self.height): + start = stop + stop = start + vpr + yield pixels[start:stop] + + def array_scanlines_interlace(self, pixels): + """ + Generator for interlaced scanlines from an array. `pixels` is + the full source image in flat row flat pixel format. The + generator yields each scanline of the reduced passes in turn, in + boxed row flat pixel format. + """ + + # http://www.w3.org/TR/PNG/#8InterlaceMethods + # Array type. + fmt = 'BH'[self.bitdepth > 8] + # Value per row + vpr = self.width * self.planes + for xstart, ystart, xstep, ystep in _adam7: + if xstart >= self.width: + continue + # Pixels per row (of reduced image) + ppr = int(math.ceil((self.width-xstart)/float(xstep))) + # number of values in reduced image row. + row_len = ppr*self.planes + for y in range(ystart, self.height, ystep): + if xstep == 1: + offset = y * vpr + yield pixels[offset:offset+vpr] + else: + row = array(fmt) + # There's no easier way to set the length of an array + row.extend(pixels[0:row_len]) + offset = y * vpr + xstart * self.planes + end_offset = (y+1) * vpr + skip = self.planes * xstep + for i in range(self.planes): + row[i::self.planes] = \ + pixels[offset+i:end_offset:skip] + yield row + +def write_chunk(outfile, tag, data=strtobytes('')): + """ + Write a PNG chunk to the output file, including length and + checksum. + """ + + # http://www.w3.org/TR/PNG/#5Chunk-layout + outfile.write(struct.pack("!I", len(data))) + tag = strtobytes(tag) + outfile.write(tag) + outfile.write(data) + checksum = zlib.crc32(tag) + checksum = zlib.crc32(data, checksum) + checksum &= 2**32-1 + outfile.write(struct.pack("!I", checksum)) + +def write_chunks(out, chunks): + """Create a PNG file by writing out the chunks.""" + + out.write(_signature) + for chunk in chunks: + write_chunk(out, *chunk) + +def filter_scanline(type, line, fo, prev=None): + """Apply a scanline filter to a scanline. `type` specifies the + filter type (0 to 4); `line` specifies the current (unfiltered) + scanline as a sequence of bytes; `prev` specifies the previous + (unfiltered) scanline as a sequence of bytes. `fo` specifies the + filter offset; normally this is size of a pixel in bytes (the number + of bytes per sample times the number of channels), but when this is + < 1 (for bit depths < 8) then the filter offset is 1. + """ + + assert 0 <= type < 5 + + # The output array. Which, pathetically, we extend one-byte at a + # time (fortunately this is linear). + out = array('B', [type]) + + def sub(): + ai = -fo + for x in line: + if ai >= 0: + x = (x - line[ai]) & 0xff + out.append(x) + ai += 1 + def up(): + for i,x in enumerate(line): + x = (x - prev[i]) & 0xff + out.append(x) + def average(): + ai = -fo + for i,x in enumerate(line): + if ai >= 0: + x = (x - ((line[ai] + prev[i]) >> 1)) & 0xff + else: + x = (x - (prev[i] >> 1)) & 0xff + out.append(x) + ai += 1 + def paeth(): + # http://www.w3.org/TR/PNG/#9Filter-type-4-Paeth + ai = -fo # also used for ci + for i,x in enumerate(line): + a = 0 + b = prev[i] + c = 0 + + if ai >= 0: + a = line[ai] + c = prev[ai] + p = a + b - c + pa = abs(p - a) + pb = abs(p - b) + pc = abs(p - c) + if pa <= pb and pa <= pc: Pr = a + elif pb <= pc: Pr = b + else: Pr = c + + x = (x - Pr) & 0xff + out.append(x) + ai += 1 + + if not prev: + # We're on the first line. Some of the filters can be reduced + # to simpler cases which makes handling the line "off the top" + # of the image simpler. "up" becomes "none"; "paeth" becomes + # "left" (non-trivial, but true). "average" needs to be handled + # specially. + if type == 2: # "up" + return line # type = 0 + elif type == 3: + prev = [0]*len(line) + elif type == 4: # "paeth" + type = 1 + if type == 0: + out.extend(line) + elif type == 1: + sub() + elif type == 2: + up() + elif type == 3: + average() + else: # type == 4 + paeth() + return out + + +def from_array(a, mode=None, info={}): + """Create a PNG :class:`Image` object from a 2- or 3-dimensional array. + One application of this function is easy PIL-style saving: + ``png.from_array(pixels, 'L').save('foo.png')``. + + .. note : + + The use of the term *3-dimensional* is for marketing purposes + only. It doesn't actually work. Please bear with us. Meanwhile + enjoy the complimentary snacks (on request) and please use a + 2-dimensional array. + + Unless they are specified using the *info* parameter, the PNG's + height and width are taken from the array size. For a 3 dimensional + array the first axis is the height; the second axis is the width; + and the third axis is the channel number. Thus an RGB image that is + 16 pixels high and 8 wide will use an array that is 16x8x3. For 2 + dimensional arrays the first axis is the height, but the second axis + is ``width*channels``, so an RGB image that is 16 pixels high and 8 + wide will use a 2-dimensional array that is 16x24 (each row will be + 8*3==24 sample values). + + *mode* is a string that specifies the image colour format in a + PIL-style mode. It can be: + + ``'L'`` + greyscale (1 channel) + ``'LA'`` + greyscale with alpha (2 channel) + ``'RGB'`` + colour image (3 channel) + ``'RGBA'`` + colour image with alpha (4 channel) + + The mode string can also specify the bit depth (overriding how this + function normally derives the bit depth, see below). Appending + ``';16'`` to the mode will cause the PNG to be 16 bits per channel; + any decimal from 1 to 16 can be used to specify the bit depth. + + When a 2-dimensional array is used *mode* determines how many + channels the image has, and so allows the width to be derived from + the second array dimension. + + The array is expected to be a ``numpy`` array, but it can be any + suitable Python sequence. For example, a list of lists can be used: + ``png.from_array([[0, 255, 0], [255, 0, 255]], 'L')``. The exact + rules are: ``len(a)`` gives the first dimension, height; + ``len(a[0])`` gives the second dimension; ``len(a[0][0])`` gives the + third dimension, unless an exception is raised in which case a + 2-dimensional array is assumed. It's slightly more complicated than + that because an iterator of rows can be used, and it all still + works. Using an iterator allows data to be streamed efficiently. + + The bit depth of the PNG is normally taken from the array element's + datatype (but if *mode* specifies a bitdepth then that is used + instead). The array element's datatype is determined in a way which + is supposed to work both for ``numpy`` arrays and for Python + ``array.array`` objects. A 1 byte datatype will give a bit depth of + 8, a 2 byte datatype will give a bit depth of 16. If the datatype + does not have an implicit size, for example it is a plain Python + list of lists, as above, then a default of 8 is used. + + The *info* parameter is a dictionary that can be used to specify + metadata (in the same style as the arguments to the + :class:``png.Writer`` class). For this function the keys that are + useful are: + + height + overrides the height derived from the array dimensions and allows + *a* to be an iterable. + width + overrides the width derived from the array dimensions. + bitdepth + overrides the bit depth derived from the element datatype (but + must match *mode* if that also specifies a bit depth). + + Generally anything specified in the + *info* dictionary will override any implicit choices that this + function would otherwise make, but must match any explicit ones. + For example, if the *info* dictionary has a ``greyscale`` key then + this must be true when mode is ``'L'`` or ``'LA'`` and false when + mode is ``'RGB'`` or ``'RGBA'``. + """ + + # We abuse the *info* parameter by modifying it. Take a copy here. + # (Also typechecks *info* to some extent). + info = dict(info) + + # Syntax check mode string. + bitdepth = None + try: + mode = mode.split(';') + if len(mode) not in (1,2): + raise Error() + if mode[0] not in ('L', 'LA', 'RGB', 'RGBA'): + raise Error() + if len(mode) == 2: + try: + bitdepth = int(mode[1]) + except: + raise Error() + except Error: + raise Error("mode string should be 'RGB' or 'L;16' or similar.") + mode = mode[0] + + # Get bitdepth from *mode* if possible. + if bitdepth: + if info.get('bitdepth') and bitdepth != info['bitdepth']: + raise Error("mode bitdepth (%d) should match info bitdepth (%d)." % + (bitdepth, info['bitdepth'])) + info['bitdepth'] = bitdepth + + # Fill in and/or check entries in *info*. + # Dimensions. + if 'size' in info: + # Check width, height, size all match where used. + for dimension,axis in [('width', 0), ('height', 1)]: + if dimension in info: + if info[dimension] != info['size'][axis]: + raise Error( + "info[%r] shhould match info['size'][%r]." % + (dimension, axis)) + info['width'],info['height'] = info['size'] + if 'height' not in info: + try: + l = len(a) + except: + raise Error( + "len(a) does not work, supply info['height'] instead.") + info['height'] = l + # Colour format. + if 'greyscale' in info: + if bool(info['greyscale']) != ('L' in mode): + raise Error("info['greyscale'] should match mode.") + info['greyscale'] = 'L' in mode + if 'alpha' in info: + if bool(info['alpha']) != ('A' in mode): + raise Error("info['alpha'] should match mode.") + info['alpha'] = 'A' in mode + + planes = len(mode) + if 'planes' in info: + if info['planes'] != planes: + raise Error("info['planes'] should match mode.") + + # In order to work out whether we the array is 2D or 3D we need its + # first row, which requires that we take a copy of its iterator. + # We may also need the first row to derive width and bitdepth. + a,t = itertools.tee(a) + row = t.next() + del t + try: + row[0][0] + threed = True + testelement = row[0] + except: + threed = False + testelement = row + if 'width' not in info: + if threed: + width = len(row) + else: + width = len(row) // planes + info['width'] = width + + # Not implemented yet + assert not threed + + if 'bitdepth' not in info: + try: + dtype = testelement.dtype + # goto the "else:" clause. Sorry. + except: + try: + # Try a Python array.array. + bitdepth = 8 * testelement.itemsize + except: + # We can't determine it from the array element's + # datatype, use a default of 8. + bitdepth = 8 + else: + # If we got here without exception, we now assume that + # the array is a numpy array. + if dtype.kind == 'b': + bitdepth = 1 + else: + bitdepth = 8 * dtype.itemsize + info['bitdepth'] = bitdepth + + for thing in 'width height bitdepth greyscale alpha'.split(): + assert thing in info + return Image(a, info) + +# So that refugee's from PIL feel more at home. Not documented. +fromarray = from_array + +class Image: + """A PNG image. + You can create an :class:`Image` object from an array of pixels by calling + :meth:`png.from_array`. It can be saved to disk with the + :meth:`save` method.""" + def __init__(self, rows, info): + """ + .. note :: + + The constructor is not public. Please do not call it. + """ + + self.rows = rows + self.info = info + + def save(self, file): + """Save the image to *file*. If *file* looks like an open file + descriptor then it is used, otherwise it is treated as a + filename and a fresh file is opened. + + In general, you can only call this method once; after it has + been called the first time and the PNG image has been saved, the + source data will have been streamed, and cannot be streamed + again. + """ + + w = Writer(**self.info) + + try: + file.write + def close(): pass + except: + file = open(file, 'wb') + def close(): file.close() + + try: + w.write(file, self.rows) + finally: + close() + +class _readable: + """ + A simple file-like interface for strings and arrays. + """ + + def __init__(self, buf): + self.buf = buf + self.offset = 0 + + def read(self, n): + r = self.buf[self.offset:self.offset+n] + if isarray(r): + r = r.tostring() + self.offset += n + return r + + +class Reader: + """ + PNG decoder in pure Python. + """ + + def __init__(self, _guess=None, **kw): + """ + Create a PNG decoder object. + + The constructor expects exactly one keyword argument. If you + supply a positional argument instead, it will guess the input + type. You can choose among the following keyword arguments: + + filename + Name of input file (a PNG file). + file + A file-like object (object with a read() method). + bytes + ``array`` or ``string`` with PNG data. + + """ + if ((_guess is not None and len(kw) != 0) or + (_guess is None and len(kw) != 1)): + raise TypeError("Reader() takes exactly 1 argument") + + # Will be the first 8 bytes, later on. See validate_signature. + self.signature = None + self.transparent = None + # A pair of (len,type) if a chunk has been read but its data and + # checksum have not (in other words the file position is just + # past the 4 bytes that specify the chunk type). See preamble + # method for how this is used. + self.atchunk = None + + if _guess is not None: + if isarray(_guess): + kw["bytes"] = _guess + elif isinstance(_guess, str): + kw["filename"] = _guess + elif isinstance(_guess, file): + kw["file"] = _guess + + if "filename" in kw: + self.file = open(kw["filename"], "rb") + elif "file" in kw: + self.file = kw["file"] + elif "bytes" in kw: + self.file = _readable(kw["bytes"]) + else: + raise TypeError("expecting filename, file or bytes array") + + def chunk(self, seek=None): + """ + Read the next PNG chunk from the input file; returns a + (*type*,*data*) tuple. *type* is the chunk's type as a string + (all PNG chunk types are 4 characters long). *data* is the + chunk's data content, as a string. + + If the optional `seek` argument is + specified then it will keep reading chunks until it either runs + out of file or finds the type specified by the argument. Note + that in general the order of chunks in PNGs is unspecified, so + using `seek` can cause you to miss chunks. + """ + + self.validate_signature() + + while True: + # http://www.w3.org/TR/PNG/#5Chunk-layout + if not self.atchunk: + self.atchunk = self.chunklentype() + length,type = self.atchunk + self.atchunk = None + data = self.file.read(length) + if len(data) != length: + raise ChunkError('Chunk %s too short for required %i octets.' + % (type, length)) + checksum = self.file.read(4) + if len(checksum) != 4: + raise ValueError('Chunk %s too short for checksum.', tag) + if seek and type != seek: + continue + verify = zlib.crc32(strtobytes(type)) + verify = zlib.crc32(data, verify) + # Whether the output from zlib.crc32 is signed or not varies + # according to hideous implementation details, see + # http://bugs.python.org/issue1202 . + # We coerce it to be positive here (in a way which works on + # Python 2.3 and older). + verify &= 2**32 - 1 + verify = struct.pack('!I', verify) + if checksum != verify: + # print repr(checksum) + (a, ) = struct.unpack('!I', checksum) + (b, ) = struct.unpack('!I', verify) + raise ChunkError( + "Checksum error in %s chunk: 0x%08X != 0x%08X." % + (type, a, b)) + return type, data + + def chunks(self): + """Return an iterator that will yield each chunk as a + (*chunktype*, *content*) pair. + """ + + while True: + t,v = self.chunk() + yield t,v + if t == 'IEND': + break + + def undo_filter(self, filter_type, scanline, previous): + """Undo the filter for a scanline. `scanline` is a sequence of + bytes that does not include the initial filter type byte. + `previous` is decoded previous scanline (for straightlaced + images this is the previous pixel row, but for interlaced + images, it is the previous scanline in the reduced image, which + in general is not the previous pixel row in the final image). + When there is no previous scanline (the first row of a + straightlaced image, or the first row in one of the passes in an + interlaced image), then this argument should be ``None``. + + The scanline will have the effects of filtering removed, and the + result will be returned as a fresh sequence of bytes. + """ + + # :todo: Would it be better to update scanline in place? + + # Create the result byte array. It seems that the best way to + # create the array to be the right size is to copy from an + # existing sequence. *sigh* + # If we fill the result with scanline, then this allows a + # micro-optimisation in the "null" and "sub" cases. + result = array('B', scanline) + + if filter_type == 0: + # And here, we _rely_ on filling the result with scanline, + # above. + return result + + if filter_type not in (1,2,3,4): + raise FormatError('Invalid PNG Filter Type.' + ' See http://www.w3.org/TR/2003/REC-PNG-20031110/#9Filters .') + + # Filter unit. The stride from one pixel to the corresponding + # byte from the previous previous. Normally this is the pixel + # size in bytes, but when this is smaller than 1, the previous + # byte is used instead. + fu = max(1, self.psize) + + # For the first line of a pass, synthesize a dummy previous + # line. An alternative approach would be to observe that on the + # first line 'up' is the same as 'null', 'paeth' is the same + # as 'sub', with only 'average' requiring any special case. + if not previous: + previous = array('B', [0]*len(scanline)) + + def sub(): + """Undo sub filter.""" + + ai = 0 + # Loops starts at index fu. Observe that the initial part + # of the result is already filled in correctly with + # scanline. + for i in range(fu, len(result)): + x = scanline[i] + a = result[ai] + result[i] = (x + a) & 0xff + ai += 1 + + def up(): + """Undo up filter.""" + + for i in range(len(result)): + x = scanline[i] + b = previous[i] + result[i] = (x + b) & 0xff + + def average(): + """Undo average filter.""" + + ai = -fu + for i in range(len(result)): + x = scanline[i] + if ai < 0: + a = 0 + else: + a = result[ai] + b = previous[i] + result[i] = (x + ((a + b) >> 1)) & 0xff + ai += 1 + + def paeth(): + """Undo Paeth filter.""" + + # Also used for ci. + ai = -fu + for i in range(len(result)): + x = scanline[i] + if ai < 0: + a = c = 0 + else: + a = result[ai] + c = previous[ai] + b = previous[i] + p = a + b - c + pa = abs(p - a) + pb = abs(p - b) + pc = abs(p - c) + if pa <= pb and pa <= pc: + pr = a + elif pb <= pc: + pr = b + else: + pr = c + result[i] = (x + pr) & 0xff + ai += 1 + + # Call appropriate filter algorithm. Note that 0 has already + # been dealt with. + (None, sub, up, average, paeth)[filter_type]() + return result + + def deinterlace(self, raw): + """ + Read raw pixel data, undo filters, deinterlace, and flatten. + Return in flat row flat pixel format. + """ + + # print >> sys.stderr, ("Reading interlaced, w=%s, r=%s, planes=%s," + + # " bpp=%s") % (self.width, self.height, self.planes, self.bps) + # Values per row (of the target image) + vpr = self.width * self.planes + + # Make a result array, and make it big enough. Interleaving + # writes to the output array randomly (well, not quite), so the + # entire output array must be in memory. + fmt = 'BH'[self.bitdepth > 8] + a = array(fmt, [0]*vpr*self.height) + source_offset = 0 + + for xstart, ystart, xstep, ystep in _adam7: + # print >> sys.stderr, "Adam7: start=%s,%s step=%s,%s" % ( + # xstart, ystart, xstep, ystep) + if xstart >= self.width: + continue + # The previous (reconstructed) scanline. None at the + # beginning of a pass to indicate that there is no previous + # line. + recon = None + # Pixels per row (reduced pass image) + ppr = int(math.ceil((self.width-xstart)/float(xstep))) + # Row size in bytes for this pass. + row_size = int(math.ceil(self.psize * ppr)) + for y in range(ystart, self.height, ystep): + filter_type = raw[source_offset] + source_offset += 1 + scanline = raw[source_offset:source_offset+row_size] + source_offset += row_size + recon = self.undo_filter(filter_type, scanline, recon) + # Convert so that there is one element per pixel value + flat = self.serialtoflat(recon, ppr) + if xstep == 1: + assert xstart == 0 + offset = y * vpr + a[offset:offset+vpr] = flat + else: + offset = y * vpr + xstart * self.planes + end_offset = (y+1) * vpr + skip = self.planes * xstep + for i in range(self.planes): + a[offset+i:end_offset:skip] = \ + flat[i::self.planes] + return a + + def iterboxed(self, rows): + """Iterator that yields each scanline in boxed row flat pixel + format. `rows` should be an iterator that yields the bytes of + each row in turn. + """ + + def asvalues(raw): + """Convert a row of raw bytes into a flat row. Result may + or may not share with argument""" + + if self.bitdepth == 8: + return raw + if self.bitdepth == 16: + raw = tostring(raw) + return array('H', struct.unpack('!%dH' % (len(raw)//2), raw)) + assert self.bitdepth < 8 + width = self.width + # Samples per byte + spb = 8//self.bitdepth + out = array('B') + mask = 2**self.bitdepth - 1 + shifts = map(self.bitdepth.__mul__, reversed(range(spb))) + for o in raw: + out.extend(map(lambda i: mask&(o>>i), shifts)) + return out[:width] + + return itertools.imap(asvalues, rows) + + def serialtoflat(self, bytes, width=None): + """Convert serial format (byte stream) pixel data to flat row + flat pixel. + """ + + if self.bitdepth == 8: + return bytes + if self.bitdepth == 16: + bytes = tostring(bytes) + return array('H', + struct.unpack('!%dH' % (len(bytes)//2), bytes)) + assert self.bitdepth < 8 + if width is None: + width = self.width + # Samples per byte + spb = 8//self.bitdepth + out = array('B') + mask = 2**self.bitdepth - 1 + shifts = map(self.bitdepth.__mul__, reversed(range(spb))) + l = width + for o in bytes: + out.extend([(mask&(o>>s)) for s in shifts][:l]) + l -= spb + if l <= 0: + l = width + return out + + def iterstraight(self, raw): + """Iterator that undoes the effect of filtering, and yields each + row in serialised format (as a sequence of bytes). Assumes input + is straightlaced. `raw` should be an iterable that yields the + raw bytes in chunks of arbitrary size.""" + + # length of row, in bytes + rb = self.row_bytes + a = array('B') + # The previous (reconstructed) scanline. None indicates first + # line of image. + recon = None + for some in raw: + a.extend(some) + while len(a) >= rb + 1: + filter_type = a[0] + scanline = a[1:rb+1] + del a[:rb+1] + recon = self.undo_filter(filter_type, scanline, recon) + yield recon + if len(a) != 0: + # :file:format We get here with a file format error: when the + # available bytes (after decompressing) do not pack into exact + # rows. + raise FormatError( + 'Wrong size for decompressed IDAT chunk.') + assert len(a) == 0 + + def validate_signature(self): + """If signature (header) has not been read then read and + validate it; otherwise do nothing. + """ + + if self.signature: + return + self.signature = self.file.read(8) + if self.signature != _signature: + raise FormatError("PNG file has invalid signature.") + + def preamble(self): + """ + Extract the image metadata by reading the initial part of the PNG + file up to the start of the ``IDAT`` chunk. All the chunks that + precede the ``IDAT`` chunk are read and either processed for + metadata or discarded. + """ + + self.validate_signature() + + while True: + if not self.atchunk: + self.atchunk = self.chunklentype() + if self.atchunk is None: + raise FormatError( + 'This PNG file has no IDAT chunks.') + if self.atchunk[1] == 'IDAT': + return + self.process_chunk() + + def chunklentype(self): + """Reads just enough of the input to determine the next + chunk's length and type, returned as a (*length*, *type*) pair + where *type* is a string. If there are no more chunks, ``None`` + is returned. + """ + + x = self.file.read(8) + if not x: + return None + if len(x) != 8: + raise FormatError( + 'End of file whilst reading chunk length and type.') + length,type = struct.unpack('!I4s', x) + type = bytestostr(type) + if length > 2**31-1: + raise FormatError('Chunk %s is too large: %d.' % (type,length)) + return length,type + + def process_chunk(self): + """Process the next chunk and its data. This only processes the + following chunk types, all others are ignored: ``IHDR``, + ``PLTE``, ``bKGD``, ``tRNS``, ``gAMA``, ``sBIT``. + """ + + type, data = self.chunk() + if type == 'IHDR': + # http://www.w3.org/TR/PNG/#11IHDR + if len(data) != 13: + raise FormatError('IHDR chunk has incorrect length.') + (self.width, self.height, self.bitdepth, self.color_type, + self.compression, self.filter, + self.interlace) = struct.unpack("!2I5B", data) + + # Check that the header specifies only valid combinations. + if self.bitdepth not in (1,2,4,8,16): + raise Error("invalid bit depth %d" % self.bitdepth) + if self.color_type not in (0,2,3,4,6): + raise Error("invalid colour type %d" % self.color_type) + # Check indexed (palettized) images have 8 or fewer bits + # per pixel; check only indexed or greyscale images have + # fewer than 8 bits per pixel. + if ((self.color_type & 1 and self.bitdepth > 8) or + (self.bitdepth < 8 and self.color_type not in (0,3))): + raise FormatError("Illegal combination of bit depth (%d)" + " and colour type (%d)." + " See http://www.w3.org/TR/2003/REC-PNG-20031110/#table111 ." + % (self.bitdepth, self.color_type)) + if self.compression != 0: + raise Error("unknown compression method %d" % self.compression) + if self.filter != 0: + raise FormatError("Unknown filter method %d," + " see http://www.w3.org/TR/2003/REC-PNG-20031110/#9Filters ." + % self.filter) + if self.interlace not in (0,1): + raise FormatError("Unknown interlace method %d," + " see http://www.w3.org/TR/2003/REC-PNG-20031110/#8InterlaceMethods ." + % self.interlace) + + # Derived values + # http://www.w3.org/TR/PNG/#6Colour-values + colormap = bool(self.color_type & 1) + greyscale = not (self.color_type & 2) + alpha = bool(self.color_type & 4) + color_planes = (3,1)[greyscale or colormap] + planes = color_planes + alpha + + self.colormap = colormap + self.greyscale = greyscale + self.alpha = alpha + self.color_planes = color_planes + self.planes = planes + self.psize = float(self.bitdepth)/float(8) * planes + if int(self.psize) == self.psize: + self.psize = int(self.psize) + self.row_bytes = int(math.ceil(self.width * self.psize)) + # Stores PLTE chunk if present, and is used to check + # chunk ordering constraints. + self.plte = None + # Stores tRNS chunk if present, and is used to check chunk + # ordering constraints. + self.trns = None + # Stores sbit chunk if present. + self.sbit = None + elif type == 'PLTE': + # http://www.w3.org/TR/PNG/#11PLTE + if self.plte: + warnings.warn("Multiple PLTE chunks present.") + self.plte = data + if len(data) % 3 != 0: + raise FormatError( + "PLTE chunk's length should be a multiple of 3.") + if len(data) > (2**self.bitdepth)*3: + raise FormatError("PLTE chunk is too long.") + if len(data) == 0: + raise FormatError("Empty PLTE is not allowed.") + elif type == 'bKGD': + try: + if self.colormap: + if not self.plte: + warnings.warn( + "PLTE chunk is required before bKGD chunk.") + self.background = struct.unpack('B', data) + else: + self.background = struct.unpack("!%dH" % self.color_planes, + data) + except struct.error: + raise FormatError("bKGD chunk has incorrect length.") + elif type == 'tRNS': + # http://www.w3.org/TR/PNG/#11tRNS + self.trns = data + if self.colormap: + if not self.plte: + warnings.warn("PLTE chunk is required before tRNS chunk.") + else: + if len(data) > len(self.plte)/3: + # Was warning, but promoted to Error as it + # would otherwise cause pain later on. + raise FormatError("tRNS chunk is too long.") + else: + if self.alpha: + raise FormatError( + "tRNS chunk is not valid with colour type %d." % + self.color_type) + try: + self.transparent = \ + struct.unpack("!%dH" % self.color_planes, data) + except struct.error: + raise FormatError("tRNS chunk has incorrect length.") + elif type == 'gAMA': + try: + self.gamma = struct.unpack("!L", data)[0] / 100000.0 + except struct.error: + raise FormatError("gAMA chunk has incorrect length.") + elif type == 'sBIT': + self.sbit = data + if (self.colormap and len(data) != 3 or + not self.colormap and len(data) != self.planes): + raise FormatError("sBIT chunk has incorrect length.") + + def read(self): + """ + Read the PNG file and decode it. Returns (`width`, `height`, + `pixels`, `metadata`). + + May use excessive memory. + + `pixels` are returned in boxed row flat pixel format. + """ + + def iteridat(): + """Iterator that yields all the ``IDAT`` chunks as strings.""" + while True: + try: + type, data = self.chunk() + except ValueError, e: + raise ChunkError(e.args[0]) + if type == 'IEND': + # http://www.w3.org/TR/PNG/#11IEND + break + if type != 'IDAT': + continue + # type == 'IDAT' + # http://www.w3.org/TR/PNG/#11IDAT + if self.colormap and not self.plte: + warnings.warn("PLTE chunk is required before IDAT chunk") + yield data + + def iterdecomp(idat): + """Iterator that yields decompressed strings. `idat` should + be an iterator that yields the ``IDAT`` chunk data. + """ + + # Currently, with no max_length paramter to decompress, this + # routine will do one yield per IDAT chunk. So not very + # incremental. + d = zlib.decompressobj() + # Each IDAT chunk is passed to the decompressor, then any + # remaining state is decompressed out. + for data in idat: + # :todo: add a max_length argument here to limit output + # size. + yield array('B', d.decompress(data)) + yield array('B', d.flush()) + + self.preamble() + raw = iterdecomp(iteridat()) + + if self.interlace: + raw = array('B', itertools.chain(*raw)) + arraycode = 'BH'[self.bitdepth>8] + # Like :meth:`group` but producing an array.array object for + # each row. + pixels = itertools.imap(lambda *row: array(arraycode, row), + *[iter(self.deinterlace(raw))]*self.width*self.planes) + else: + pixels = self.iterboxed(self.iterstraight(raw)) + meta = dict() + for attr in 'greyscale alpha planes bitdepth interlace'.split(): + meta[attr] = getattr(self, attr) + meta['size'] = (self.width, self.height) + for attr in 'gamma transparent background'.split(): + a = getattr(self, attr, None) + if a is not None: + meta[attr] = a + return self.width, self.height, pixels, meta + + + def read_flat(self): + """ + Read a PNG file and decode it into flat row flat pixel format. + Returns (*width*, *height*, *pixels*, *metadata*). + + May use excessive memory. + + `pixels` are returned in flat row flat pixel format. + + See also the :meth:`read` method which returns pixels in the + more stream-friendly boxed row flat pixel format. + """ + + x, y, pixel, meta = self.read() + arraycode = 'BH'[meta['bitdepth']>8] + pixel = array(arraycode, itertools.chain(*pixel)) + return x, y, pixel, meta + + def palette(self, alpha='natural'): + """Returns a palette that is a sequence of 3-tuples or 4-tuples, + synthesizing it from the ``PLTE`` and ``tRNS`` chunks. These + chunks should have already been processed (for example, by + calling the :meth:`preamble` method). All the tuples are the + same size: 3-tuples if there is no ``tRNS`` chunk, 4-tuples when + there is a ``tRNS`` chunk. Assumes that the image is colour type + 3 and therefore a ``PLTE`` chunk is required. + + If the `alpha` argument is ``'force'`` then an alpha channel is + always added, forcing the result to be a sequence of 4-tuples. + """ + + if not self.plte: + raise FormatError( + "Required PLTE chunk is missing in colour type 3 image.") + plte = group(array('B', self.plte), 3) + if self.trns or alpha == 'force': + trns = array('B', self.trns or '') + trns.extend([255]*(len(plte)-len(trns))) + plte = map(operator.add, plte, group(trns, 1)) + return plte + + def asDirect(self): + """Returns the image data as a direct representation of an + ``x * y * planes`` array. This method is intended to remove the + need for callers to deal with palettes and transparency + themselves. Images with a palette (colour type 3) + are converted to RGB or RGBA; images with transparency (a + ``tRNS`` chunk) are converted to LA or RGBA as appropriate. + When returned in this format the pixel values represent the + colour value directly without needing to refer to palettes or + transparency information. + + Like the :meth:`read` method this method returns a 4-tuple: + + (*width*, *height*, *pixels*, *meta*) + + This method normally returns pixel values with the bit depth + they have in the source image, but when the source PNG has an + ``sBIT`` chunk it is inspected and can reduce the bit depth of + the result pixels; pixel values will be reduced according to + the bit depth specified in the ``sBIT`` chunk (PNG nerds should + note a single result bit depth is used for all channels; the + maximum of the ones specified in the ``sBIT`` chunk. An RGB565 + image will be rescaled to 6-bit RGB666). + + The *meta* dictionary that is returned reflects the `direct` + format and not the original source image. For example, an RGB + source image with a ``tRNS`` chunk to represent a transparent + colour, will have ``planes=3`` and ``alpha=False`` for the + source image, but the *meta* dictionary returned by this method + will have ``planes=4`` and ``alpha=True`` because an alpha + channel is synthesized and added. + + *pixels* is the pixel data in boxed row flat pixel format (just + like the :meth:`read` method). + + All the other aspects of the image data are not changed. + """ + + self.preamble() + + # Simple case, no conversion necessary. + if not self.colormap and not self.trns and not self.sbit: + return self.read() + + x,y,pixels,meta = self.read() + + if self.colormap: + meta['colormap'] = False + meta['alpha'] = bool(self.trns) + meta['bitdepth'] = 8 + meta['planes'] = 3 + bool(self.trns) + plte = self.palette() + def iterpal(pixels): + for row in pixels: + row = map(plte.__getitem__, row) + yield array('B', itertools.chain(*row)) + pixels = iterpal(pixels) + elif self.trns: + # It would be nice if there was some reasonable way of doing + # this without generating a whole load of intermediate tuples. + # But tuples does seem like the easiest way, with no other way + # clearly much simpler or much faster. (Actually, the L to LA + # conversion could perhaps go faster (all those 1-tuples!), but + # I still wonder whether the code proliferation is worth it) + it = self.transparent + maxval = 2**meta['bitdepth']-1 + planes = meta['planes'] + meta['alpha'] = True + meta['planes'] += 1 + typecode = 'BH'[meta['bitdepth']>8] + def itertrns(pixels): + for row in pixels: + # For each row we group it into pixels, then form a + # characterisation vector that says whether each pixel + # is opaque or not. Then we convert True/False to + # 0/maxval (by multiplication), and add it as the extra + # channel. + row = group(row, planes) + opa = map(it.__ne__, row) + opa = map(maxval.__mul__, opa) + opa = zip(opa) # convert to 1-tuples + yield array(typecode, + itertools.chain(*map(operator.add, row, opa))) + pixels = itertrns(pixels) + targetbitdepth = None + if self.sbit: + sbit = struct.unpack('%dB' % len(self.sbit), self.sbit) + targetbitdepth = max(sbit) + if targetbitdepth > meta['bitdepth']: + raise Error('sBIT chunk %r exceeds bitdepth %d' % + (sbit,self.bitdepth)) + if min(sbit) <= 0: + raise Error('sBIT chunk %r has a 0-entry' % sbit) + if targetbitdepth == meta['bitdepth']: + targetbitdepth = None + if targetbitdepth: + shift = meta['bitdepth'] - targetbitdepth + meta['bitdepth'] = targetbitdepth + def itershift(pixels): + for row in pixels: + yield map(shift.__rrshift__, row) + pixels = itershift(pixels) + return x,y,pixels,meta + + def asFloat(self, maxval=1.0): + """Return image pixels as per :meth:`asDirect` method, but scale + all pixel values to be floating point values between 0.0 and + *maxval*. + """ + + x,y,pixels,info = self.asDirect() + sourcemaxval = 2**info['bitdepth']-1 + del info['bitdepth'] + info['maxval'] = float(maxval) + factor = float(maxval)/float(sourcemaxval) + def iterfloat(): + for row in pixels: + yield map(factor.__mul__, row) + return x,y,iterfloat(),info + + def _as_rescale(self, get, targetbitdepth): + """Helper used by :meth:`asRGB8` and :meth:`asRGBA8`.""" + + width,height,pixels,meta = get() + maxval = 2**meta['bitdepth'] - 1 + targetmaxval = 2**targetbitdepth - 1 + factor = float(targetmaxval) / float(maxval) + meta['bitdepth'] = targetbitdepth + def iterscale(): + for row in pixels: + yield map(lambda x: int(round(x*factor)), row) + return width, height, iterscale(), meta + + def asRGB8(self): + """Return the image data as an RGB pixels with 8-bits per + sample. This is like the :meth:`asRGB` method except that + this method additionally rescales the values so that they + are all between 0 and 255 (8-bit). In the case where the + source image has a bit depth < 8 the transformation preserves + all the information; where the source image has bit depth + > 8, then rescaling to 8-bit values loses precision. No + dithering is performed. Like :meth:`asRGB`, an alpha channel + in the source image will raise an exception. + + This function returns a 4-tuple: + (*width*, *height*, *pixels*, *metadata*). + *width*, *height*, *metadata* are as per the :meth:`read` method. + + *pixels* is the pixel data in boxed row flat pixel format. + """ + + return self._as_rescale(self.asRGB, 8) + + def asRGBA8(self): + """Return the image data as RGBA pixels with 8-bits per + sample. This method is similar to :meth:`asRGB8` and + :meth:`asRGBA`: The result pixels have an alpha channel, *and* + values are rescaled to the range 0 to 255. The alpha channel is + synthesized if necessary (with a small speed penalty). + """ + + return self._as_rescale(self.asRGBA, 8) + + def asRGB(self): + """Return image as RGB pixels. RGB colour images are passed + through unchanged; greyscales are expanded into RGB + triplets (there is a small speed overhead for doing this). + + An alpha channel in the source image will raise an + exception. + + The return values are as for the :meth:`read` method + except that the *metadata* reflect the returned pixels, not the + source image. In particular, for this method + ``metadata['greyscale']`` will be ``False``. + """ + + width,height,pixels,meta = self.asDirect() + if meta['alpha']: + raise Error("will not convert image with alpha channel to RGB") + if not meta['greyscale']: + return width,height,pixels,meta + meta['greyscale'] = False + typecode = 'BH'[meta['bitdepth'] > 8] + def iterrgb(): + for row in pixels: + a = array(typecode, [0]) * 3 * width + for i in range(3): + a[i::3] = row + yield a + return width,height,iterrgb(),meta + + def asRGBA(self): + """Return image as RGBA pixels. Greyscales are expanded into + RGB triplets; an alpha channel is synthesized if necessary. + The return values are as for the :meth:`read` method + except that the *metadata* reflect the returned pixels, not the + source image. In particular, for this method + ``metadata['greyscale']`` will be ``False``, and + ``metadata['alpha']`` will be ``True``. + """ + + width,height,pixels,meta = self.asDirect() + if meta['alpha'] and not meta['greyscale']: + return width,height,pixels,meta + typecode = 'BH'[meta['bitdepth'] > 8] + maxval = 2**meta['bitdepth'] - 1 + def newarray(): + return array(typecode, [0]) * 4 * width + if meta['alpha'] and meta['greyscale']: + # LA to RGBA + def convert(): + for row in pixels: + # Create a fresh target row, then copy L channel + # into first three target channels, and A channel + # into fourth channel. + a = newarray() + for i in range(3): + a[i::4] = row[0::2] + a[3::4] = row[1::2] + yield a + elif meta['greyscale']: + # L to RGBA + def convert(): + for row in pixels: + a = newarray() + for i in range(3): + a[i::4] = row + a[3::4] = array(typecode, [maxval]) * width + yield a + else: + assert not meta['alpha'] and not meta['greyscale'] + # RGB to RGBA + def convert(): + for row in pixels: + a = newarray() + for i in range(3): + a[i::4] = row[i::3] + a[3::4] = array(typecode, [maxval]) * width + yield a + meta['alpha'] = True + meta['greyscale'] = False + return width,height,convert(),meta + + +# === Legacy Version Support === + +# :pyver:old: PyPNG works on Python versions 2.3 and 2.2, but not +# without some awkward problems. Really PyPNG works on Python 2.4 (and +# above); it works on Pythons 2.3 and 2.2 by virtue of fixing up +# problems here. It's a bit ugly (which is why it's hidden down here). +# +# Generally the strategy is one of pretending that we're running on +# Python 2.4 (or above), and patching up the library support on earlier +# versions so that it looks enough like Python 2.4. When it comes to +# Python 2.2 there is one thing we cannot patch: extended slices +# http://www.python.org/doc/2.3/whatsnew/section-slices.html. +# Instead we simply declare that features that are implemented using +# extended slices will not work on Python 2.2. +# +# In order to work on Python 2.3 we fix up a recurring annoyance involving +# the array type. In Python 2.3 an array cannot be initialised with an +# array, and it cannot be extended with a list (or other sequence). +# Both of those are repeated issues in the code. Whilst I would not +# normally tolerate this sort of behaviour, here we "shim" a replacement +# for array into place (and hope no-ones notices). You never read this. +# +# In an amusing case of warty hacks on top of warty hacks... the array +# shimming we try and do only works on Python 2.3 and above (you can't +# subclass array.array in Python 2.2). So to get it working on Python +# 2.2 we go for something much simpler and (probably) way slower. +try: + array('B').extend([]) + array('B', array('B')) +except: + # Expect to get here on Python 2.3 + try: + class _array_shim(array): + true_array = array + def __new__(cls, typecode, init=None): + super_new = super(_array_shim, cls).__new__ + it = super_new(cls, typecode) + if init is None: + return it + it.extend(init) + return it + def extend(self, extension): + super_extend = super(_array_shim, self).extend + if isinstance(extension, self.true_array): + return super_extend(extension) + if not isinstance(extension, (list, str)): + # Convert to list. Allows iterators to work. + extension = list(extension) + return super_extend(self.true_array(self.typecode, extension)) + array = _array_shim + except: + # Expect to get here on Python 2.2 + def array(typecode, init=()): + if type(init) == str: + return map(ord, init) + return list(init) + +# Further hacks to get it limping along on Python 2.2 +try: + enumerate +except: + def enumerate(seq): + i=0 + for x in seq: + yield i,x + i += 1 + +try: + reversed +except: + def reversed(l): + l = list(l) + l.reverse() + for x in l: + yield x + +try: + itertools +except: + class _dummy_itertools: + pass + itertools = _dummy_itertools() + def _itertools_imap(f, seq): + for x in seq: + yield f(x) + itertools.imap = _itertools_imap + def _itertools_chain(*iterables): + for it in iterables: + for element in it: + yield element + itertools.chain = _itertools_chain + + + +# === Internal Test Support === + +# This section comprises the tests that are internally validated (as +# opposed to tests which produce output files that are externally +# validated). Primarily they are unittests. + +# Note that it is difficult to internally validate the results of +# writing a PNG file. The only thing we can do is read it back in +# again, which merely checks consistency, not that the PNG file we +# produce is valid. + +# Run the tests from the command line: +# python -c 'import png;png.test()' + +# (For an in-memory binary file IO object) We use BytesIO where +# available, otherwise we use StringIO, but name it BytesIO. +try: + from io import BytesIO +except: + from StringIO import StringIO as BytesIO +import tempfile +# http://www.python.org/doc/2.4.4/lib/module-unittest.html +import unittest + + +def test(): + unittest.main(__name__) + +def topngbytes(name, rows, x, y, **k): + """Convenience function for creating a PNG file "in memory" as a + string. Creates a :class:`Writer` instance using the keyword arguments, + then passes `rows` to its :meth:`Writer.write` method. The resulting + PNG file is returned as a string. `name` is used to identify the file for + debugging. + """ + + import os + + print name + f = BytesIO() + w = Writer(x, y, **k) + w.write(f, rows) + if os.environ.get('PYPNG_TEST_TMP'): + w = open(name, 'wb') + w.write(f.getvalue()) + w.close() + return f.getvalue() + +def testWithIO(inp, out, f): + """Calls the function `f` with ``sys.stdin`` changed to `inp` + and ``sys.stdout`` changed to `out`. They are restored when `f` + returns. This function returns whatever `f` returns. + """ + + import os + + try: + oldin,sys.stdin = sys.stdin,inp + oldout,sys.stdout = sys.stdout,out + x = f() + finally: + sys.stdin = oldin + sys.stdout = oldout + if os.environ.get('PYPNG_TEST_TMP') and hasattr(out,'getvalue'): + name = mycallersname() + if name: + w = open(name+'.png', 'wb') + w.write(out.getvalue()) + w.close() + return x + +def mycallersname(): + """Returns the name of the caller of the caller of this function + (hence the name of the caller of the function in which + "mycallersname()" textually appears). Returns None if this cannot + be determined.""" + + # http://docs.python.org/library/inspect.html#the-interpreter-stack + import inspect + + frame = inspect.currentframe() + if not frame: + return None + frame_,filename_,lineno_,funname,linelist_,listi_ = ( + inspect.getouterframes(frame)[2]) + return funname + +def seqtobytes(s): + """Convert a sequence of integers to a *bytes* instance. Good for + plastering over Python 2 / Python 3 cracks. + """ + + return strtobytes(''.join(chr(x) for x in s)) + +class Test(unittest.TestCase): + # This member is used by the superclass. If we don't define a new + # class here then when we use self.assertRaises() and the PyPNG code + # raises an assertion then we get no proper traceback. I can't work + # out why, but defining a new class here means we get a proper + # traceback. + class failureException(Exception): + pass + + def helperLN(self, n): + mask = (1 << n) - 1 + # Use small chunk_limit so that multiple chunk writing is + # tested. Making it a test for Issue 20. + w = Writer(15, 17, greyscale=True, bitdepth=n, chunk_limit=99) + f = BytesIO() + w.write_array(f, array('B', map(mask.__and__, range(1, 256)))) + r = Reader(bytes=f.getvalue()) + x,y,pixels,meta = r.read() + self.assertEqual(x, 15) + self.assertEqual(y, 17) + self.assertEqual(list(itertools.chain(*pixels)), + map(mask.__and__, range(1,256))) + def testL8(self): + return self.helperLN(8) + def testL4(self): + return self.helperLN(4) + def testL2(self): + "Also tests asRGB8." + w = Writer(1, 4, greyscale=True, bitdepth=2) + f = BytesIO() + w.write_array(f, array('B', range(4))) + r = Reader(bytes=f.getvalue()) + x,y,pixels,meta = r.asRGB8() + self.assertEqual(x, 1) + self.assertEqual(y, 4) + for i,row in enumerate(pixels): + self.assertEqual(len(row), 3) + self.assertEqual(list(row), [0x55*i]*3) + def testP2(self): + "2-bit palette." + a = (255,255,255) + b = (200,120,120) + c = (50,99,50) + w = Writer(1, 4, bitdepth=2, palette=[a,b,c]) + f = BytesIO() + w.write_array(f, array('B', (0,1,1,2))) + r = Reader(bytes=f.getvalue()) + x,y,pixels,meta = r.asRGB8() + self.assertEqual(x, 1) + self.assertEqual(y, 4) + self.assertEqual(list(pixels), map(list, [a, b, b, c])) + def testPtrns(self): + "Test colour type 3 and tRNS chunk (and 4-bit palette)." + a = (50,99,50,50) + b = (200,120,120,80) + c = (255,255,255) + d = (200,120,120) + e = (50,99,50) + w = Writer(3, 3, bitdepth=4, palette=[a,b,c,d,e]) + f = BytesIO() + w.write_array(f, array('B', (4, 3, 2, 3, 2, 0, 2, 0, 1))) + r = Reader(bytes=f.getvalue()) + x,y,pixels,meta = r.asRGBA8() + self.assertEqual(x, 3) + self.assertEqual(y, 3) + c = c+(255,) + d = d+(255,) + e = e+(255,) + boxed = [(e,d,c),(d,c,a),(c,a,b)] + flat = map(lambda row: itertools.chain(*row), boxed) + self.assertEqual(map(list, pixels), map(list, flat)) + def testRGBtoRGBA(self): + "asRGBA8() on colour type 2 source.""" + # Test for Issue 26 + r = Reader(bytes=_pngsuite['basn2c08']) + x,y,pixels,meta = r.asRGBA8() + # Test the pixels at row 9 columns 0 and 1. + row9 = list(pixels)[9] + self.assertEqual(row9[0:8], + [0xff, 0xdf, 0xff, 0xff, 0xff, 0xde, 0xff, 0xff]) + def testLtoRGBA(self): + "asRGBA() on grey source.""" + # Test for Issue 60 + r = Reader(bytes=_pngsuite['basi0g08']) + x,y,pixels,meta = r.asRGBA() + row9 = list(list(pixels)[9]) + self.assertEqual(row9[0:8], + [222, 222, 222, 255, 221, 221, 221, 255]) + def testCtrns(self): + "Test colour type 2 and tRNS chunk." + # Test for Issue 25 + r = Reader(bytes=_pngsuite['tbrn2c08']) + x,y,pixels,meta = r.asRGBA8() + # I just happen to know that the first pixel is transparent. + # In particular it should be #7f7f7f00 + row0 = list(pixels)[0] + self.assertEqual(tuple(row0[0:4]), (0x7f, 0x7f, 0x7f, 0x00)) + def testAdam7read(self): + """Adam7 interlace reading. + Specifically, test that for images in the PngSuite that + have both an interlaced and straightlaced pair that both + images from the pair produce the same array of pixels.""" + for candidate in _pngsuite: + if not candidate.startswith('basn'): + continue + candi = candidate.replace('n', 'i') + if candi not in _pngsuite: + continue + print 'adam7 read', candidate + straight = Reader(bytes=_pngsuite[candidate]) + adam7 = Reader(bytes=_pngsuite[candi]) + # Just compare the pixels. Ignore x,y (because they're + # likely to be correct?); metadata is ignored because the + # "interlace" member differs. Lame. + straight = straight.read()[2] + adam7 = adam7.read()[2] + self.assertEqual(map(list, straight), map(list, adam7)) + def testAdam7write(self): + """Adam7 interlace writing. + For each test image in the PngSuite, write an interlaced + and a straightlaced version. Decode both, and compare results. + """ + # Not such a great test, because the only way we can check what + # we have written is to read it back again. + + for name,bytes in _pngsuite.items(): + # Only certain colour types supported for this test. + if name[3:5] not in ['n0', 'n2', 'n4', 'n6']: + continue + it = Reader(bytes=bytes) + x,y,pixels,meta = it.read() + pngi = topngbytes('adam7wn'+name+'.png', pixels, + x=x, y=y, bitdepth=it.bitdepth, + greyscale=it.greyscale, alpha=it.alpha, + transparent=it.transparent, + interlace=False) + x,y,ps,meta = Reader(bytes=pngi).read() + it = Reader(bytes=bytes) + x,y,pixels,meta = it.read() + pngs = topngbytes('adam7wi'+name+'.png', pixels, + x=x, y=y, bitdepth=it.bitdepth, + greyscale=it.greyscale, alpha=it.alpha, + transparent=it.transparent, + interlace=True) + x,y,pi,meta = Reader(bytes=pngs).read() + self.assertEqual(map(list, ps), map(list, pi)) + def testPGMin(self): + """Test that the command line tool can read PGM files.""" + def do(): + return _main(['testPGMin']) + s = BytesIO() + s.write(strtobytes('P5 2 2 3\n')) + s.write(strtobytes('\x00\x01\x02\x03')) + s.flush() + s.seek(0) + o = BytesIO() + testWithIO(s, o, do) + r = Reader(bytes=o.getvalue()) + x,y,pixels,meta = r.read() + self.assertTrue(r.greyscale) + self.assertEqual(r.bitdepth, 2) + def testPAMin(self): + """Test that the command line tool can read PAM file.""" + def do(): + return _main(['testPAMin']) + s = BytesIO() + s.write(strtobytes('P7\nWIDTH 3\nHEIGHT 1\nDEPTH 4\nMAXVAL 255\n' + 'TUPLTYPE RGB_ALPHA\nENDHDR\n')) + # The pixels in flat row flat pixel format + flat = [255,0,0,255, 0,255,0,120, 0,0,255,30] + asbytes = seqtobytes(flat) + s.write(asbytes) + s.flush() + s.seek(0) + o = BytesIO() + testWithIO(s, o, do) + r = Reader(bytes=o.getvalue()) + x,y,pixels,meta = r.read() + self.assertTrue(r.alpha) + self.assertTrue(not r.greyscale) + self.assertEqual(list(itertools.chain(*pixels)), flat) + def testLA4(self): + """Create an LA image with bitdepth 4.""" + bytes = topngbytes('la4.png', [[5, 12]], 1, 1, + greyscale=True, alpha=True, bitdepth=4) + sbit = Reader(bytes=bytes).chunk('sBIT')[1] + self.assertEqual(sbit, strtobytes('\x04\x04')) + def testPNMsbit(self): + """Test that PNM files can generates sBIT chunk.""" + def do(): + return _main(['testPNMsbit']) + s = BytesIO() + s.write(strtobytes('P6 8 1 1\n')) + for pixel in range(8): + s.write(struct.pack('>sys.stderr, "skipping numpy test" + return + + rows = [map(numpy.uint16, range(0,0x10000,0x5555))] + b = topngbytes('numpyuint16.png', rows, 4, 1, + greyscale=True, alpha=False, bitdepth=16) + def testNumpyuint8(self): + """numpy uint8.""" + + try: + import numpy + except ImportError: + print >>sys.stderr, "skipping numpy test" + return + + rows = [map(numpy.uint8, range(0,0x100,0x55))] + b = topngbytes('numpyuint8.png', rows, 4, 1, + greyscale=True, alpha=False, bitdepth=8) + def testNumpybool(self): + """numpy bool.""" + + try: + import numpy + except ImportError: + print >>sys.stderr, "skipping numpy test" + return + + rows = [map(numpy.bool, [0,1])] + b = topngbytes('numpybool.png', rows, 2, 1, + greyscale=True, alpha=False, bitdepth=1) + def testNumpyarray(self): + """numpy array.""" + try: + import numpy + except ImportError: + print >>sys.stderr, "skipping numpy test" + return + + pixels = numpy.array([[0,0x5555],[0x5555,0xaaaa]], numpy.uint16) + img = from_array(pixels, 'L') + img.save('testnumpyL16.png') + +# === Command Line Support === + +def _dehex(s): + """Liberally convert from hex string to binary string.""" + import re + import binascii + + # Remove all non-hexadecimal digits + s = re.sub(r'[^a-fA-F\d]', '', s) + # binscii.unhexlify works in Python 2 and Python 3 (unlike + # thing.decode('hex')). + return binascii.unhexlify(strtobytes(s)) +def _enhex(s): + """Convert from binary string (bytes) to hex string (str).""" + + import binascii + + return bytestostr(binascii.hexlify(s)) + +# Copies of PngSuite test files taken +# from http://www.schaik.com/pngsuite/pngsuite_bas_png.html +# on 2009-02-19 by drj and converted to hex. +# Some of these are not actually in PngSuite (but maybe they should +# be?), they use the same naming scheme, but start with a capital +# letter. +_pngsuite = { + 'basi0g01': _dehex(""" +89504e470d0a1a0a0000000d49484452000000200000002001000000012c0677 +cf0000000467414d41000186a031e8965f0000009049444154789c2d8d310ec2 +300c45dfc682c415187a00a42e197ab81e83b127e00c5639001363a580d8582c +65c910357c4b78b0bfbfdf4f70168c19e7acb970a3f2d1ded9695ce5bf5963df +d92aaf4c9fd927ea449e6487df5b9c36e799b91bdf082b4d4bd4014fe4014b01 +ab7a17aee694d28d328a2d63837a70451e1648702d9a9ff4a11d2f7a51aa21e5 +a18c7ffd0094e3511d661822f20000000049454e44ae426082 +"""), + 'basi0g02': _dehex(""" +89504e470d0a1a0a0000000d49484452000000200000002002000000016ba60d +1f0000000467414d41000186a031e8965f0000005149444154789c635062e860 +00e17286bb609c93c370ec189494960631366e4467b3ae675dcf10f521ea0303 +90c1ca006444e11643482064114a4852c710baea3f18c31918020c30410403a6 +0ac1a09239009c52804d85b6d97d0000000049454e44ae426082 +"""), + 'basi0g04': _dehex(""" +89504e470d0a1a0a0000000d4948445200000020000000200400000001e4e6f8 +bf0000000467414d41000186a031e8965f000000ae49444154789c658e5111c2 +301044171c141c141c041c843a287510ea20d441c041c141c141c04191102454 +03994998cecd7edcecedbb9bdbc3b2c2b6457545fbc4bac1be437347f7c66a77 +3c23d60db15e88f5c5627338a5416c2e691a9b475a89cd27eda12895ae8dfdab +43d61e590764f5c83a226b40d669bec307f93247701687723abf31ff83a2284b +a5b4ae6b63ac6520ad730ca4ed7b06d20e030369bd6720ed383290360406d24e +13811f2781eba9d34d07160000000049454e44ae426082 +"""), + 'basi0g08': _dehex(""" +89504e470d0a1a0a0000000d4948445200000020000000200800000001211615 +be0000000467414d41000186a031e8965f000000b549444154789cb5905d0ac2 +3010849dbac81c42c47bf843cf253e8878b0aa17110f214bdca6be240f5d21a5 +94ced3e49bcd322c1624115515154998aa424822a82a5624a1aa8a8b24c58f99 +999908130989a04a00d76c2c09e76cf21adcb209393a6553577da17140a2c59e +70ecbfa388dff1f03b82fb82bd07f05f7cb13f80bb07ad2fd60c011c3c588eef +f1f4e03bbec7ce832dca927aea005e431b625796345307b019c845e6bfc3bb98 +769d84f9efb02ea6c00f9bb9ff45e81f9f280000000049454e44ae426082 +"""), + 'basi0g16': _dehex(""" +89504e470d0a1a0a0000000d49484452000000200000002010000000017186c9 +fd0000000467414d41000186a031e8965f000000e249444154789cb5913b0ec2 +301044c7490aa8f85d81c3e4301c8f53a4ca0da8902c8144b3920b4043111282 +23bc4956681a6bf5fc3c5a3ba0448912d91a4de2c38dd8e380231eede4c4f7a1 +4677700bec7bd9b1d344689315a3418d1a6efbe5b8305ba01f8ff4808c063e26 +c60d5c81edcf6c58c535e252839e93801b15c0a70d810ae0d306b205dc32b187 +272b64057e4720ff0502154034831520154034c3df81400510cdf0015c86e5cc +5c79c639fddba9dcb5456b51d7980eb52d8e7d7fa620a75120d6064641a05120 +b606771a05626b401a05f1f589827cf0fe44c1f0bae0055698ee8914fffffe00 +00000049454e44ae426082 +"""), + 'basi2c08': _dehex(""" +89504e470d0a1a0a0000000d49484452000000200000002008020000018b1fdd +350000000467414d41000186a031e8965f000000f249444154789cd59341aa04 +210c44abc07b78133d59d37333bd89d76868b566d10cf4675af8596431a11662 +7c5688919280e312257dd6a0a4cf1a01008ee312a5f3c69c37e6fcc3f47e6776 +a07f8bdaf5b40feed2d33e025e2ff4fe2d4a63e1a16d91180b736d8bc45854c5 +6d951863f4a7e0b66dcf09a900f3ffa2948d4091e53ca86c048a64390f662b50 +4a999660ced906182b9a01a8be00a56404a6ede182b1223b4025e32c4de34304 +63457680c93aada6c99b73865aab2fc094920d901a203f5ddfe1970d28456783 +26cffbafeffcd30654f46d119be4793f827387fc0d189d5bc4d69a3c23d45a7f +db803146578337df4d0a3121fc3d330000000049454e44ae426082 +"""), + 'basi2c16': _dehex(""" +89504e470d0a1a0a0000000d4948445200000020000000201002000001db8f01 +760000000467414d41000186a031e8965f0000020a49444154789cd5962173e3 +3010853fcf1838cc61a1818185a53e56787fa13fa130852e3b5878b4b0b03081 +b97f7030070b53e6b057a0a8912bbb9163b9f109ececbc59bd7dcf2b45492409 +d66f00eb1dd83cb5497d65456aeb8e1040913b3b2c04504c936dd5a9c7e2c6eb +b1b8f17a58e8d043da56f06f0f9f62e5217b6ba3a1b76f6c9e99e8696a2a72e2 +c4fb1e4d452e92ec9652b807486d12b6669be00db38d9114b0c1961e375461a5 +5f76682a85c367ad6f682ff53a9c2a353191764b78bb07d8ddc3c97c1950f391 +6745c7b9852c73c2f212605a466a502705c8338069c8b9e84efab941eb393a97 +d4c9fd63148314209f1c1d3434e847ead6380de291d6f26a25c1ebb5047f5f24 +d85c49f0f22cc1d34282c72709cab90477bf25b89d49f0f351822297e0ea9704 +f34c82bc94002448ede51866e5656aef5d7c6a385cb4d80e6a538ceba04e6df2 +480e9aa84ddedb413bb5c97b3838456df2d4fec2c7a706983e7474d085fae820 +a841776a83073838973ac0413fea2f1dc4a06e71108fda73109bdae48954ad60 +bf867aac3ce44c7c1589a711cf8a81df9b219679d96d1cec3d8bbbeaa2012626 +df8c7802eda201b2d2e0239b409868171fc104ba8b76f10b4da09f6817ffc609 +c413ede267fd1fbab46880c90f80eccf0013185eb48b47ba03df2bdaadef3181 +cb8976f18e13188768170f98c0f844bb78cb04c62ddac59d09fc3fa25dfc1da4 +14deb3df1344f70000000049454e44ae426082 +"""), + 'basi3p08': _dehex(""" +89504e470d0a1a0a0000000d494844520000002000000020080300000133a3ba +500000000467414d41000186a031e8965f00000300504c5445224400f5ffed77 +ff77cbffff110a003a77002222ffff11ff110000222200ffac5566ff66ff6666 +ff01ff221200dcffffccff994444ff005555220000cbcbff44440055ff55cbcb +00331a00ffecdcedffffe4ffcbffdcdc44ff446666ff330000442200ededff66 +6600ffa444ffffaaeded0000cbcbfefffffdfffeffff0133ff33552a000101ff +8888ff00aaaa010100440000888800ffe4cbba5b0022ff22663200ffff99aaaa +ff550000aaaa00cb630011ff11d4ffaa773a00ff4444dc6b0066000001ff0188 +4200ecffdc6bdc00ffdcba00333300ed00ed7300ffff88994a0011ffff770000 +ff8301ffbabafe7b00fffeff00cb00ff999922ffff880000ffff77008888ffdc +ff1a33000000aa33ffff009900990000000001326600ffbaff44ffffffaaff00 +770000fefeaa00004a9900ffff66ff22220000998bff1155ffffff0101ff88ff +005500001111fffffefffdfea4ff4466ffffff66ff003300ffff55ff77770000 +88ff44ff00110077ffff006666ffffed000100fff5ed1111ffffff44ff22ffff +eded11110088ffff00007793ff2200dcdc3333fffe00febabaff99ffff333300 +63cb00baba00acff55ffffdcffff337bfe00ed00ed5555ffaaffffdcdcff5555 +00000066dcdc00dc00dc83ff017777fffefeffffffcbff5555777700fefe00cb +00cb0000fe010200010000122200ffff220044449bff33ffd4aa0000559999ff +999900ba00ba2a5500ffcbcbb4ff66ff9b33ffffbaaa00aa42880053aa00ffaa +aa0000ed00babaffff1100fe00000044009999990099ffcc99ba000088008800 +dc00ff93220000dcfefffeaa5300770077020100cb0000000033ffedff00ba00 +ff3333edffedffc488bcff7700aa00660066002222dc0000ffcbffdcffdcff8b +110000cb00010155005500880000002201ffffcbffcbed0000ff88884400445b +ba00ffbc77ff99ff006600baffba00777773ed00fe00003300330000baff77ff +004400aaffaafffefe000011220022c4ff8800eded99ff99ff55ff002200ffb4 +661100110a1100ff1111dcffbabaffff88ff88010001ff33ffb98ed362000002 +a249444154789c65d0695c0b001806f03711a9904a94d24dac63292949e5a810 +d244588a14ca5161d1a1323973252242d62157d12ae498c8124d25ca3a11398a +16e55a3cdffab0ffe7f77d7fcff3528645349b584c3187824d9d19d4ec2e3523 +9eb0ae975cf8de02f2486d502191841b42967a1ad49e5ddc4265f69a899e26b5 +e9e468181baae3a71a41b95669da8df2ea3594c1b31046d7b17bfb86592e4cbe +d89b23e8db0af6304d756e60a8f4ad378bdc2552ae5948df1d35b52143141533 +33bbbbababebeb3b3bc9c9c9c6c6c0c0d7b7b535323225a5aa8a02024a4bedec +0a0a2a2bcdcd7d7cf2f3a9a9c9cdcdd8b8adcdd5b5ababa828298982824a4ab2 +b21212acadbdbc1414e2e24859b9a72730302f4f49292c4c57373c9c0a0b7372 +8c8c1c1c3a3a92936d6dfdfd293e3e26262a4a4eaea2424b4b5fbfbc9c323278 +3c0b0ba1303abaae8ecdeeed950d6669a9a7a7a141d4de9e9d5d5cdcd2229b94 +c572716132f97cb1d8db9bc3110864a39795d9db6b6a26267a7a9a98d4d6a6a7 +cb76090ef6f030354d4d75766e686030545464cb393a1a1ac6c68686eae8f8f9 +a9aa4644c8b66d6e1689dcdd2512a994cb35330b0991ad9f9b6b659596a6addd +d8282fafae5e5323fb8f41d01f76c22fd8061be01bfc041a0323e1002c81cd30 +0b9ec027a0c930014ec035580fc3e112bc069a0b53e11c0c8095f00176c163a0 +e5301baec06a580677600ddc05ba0f13e120bc81a770133ec355a017300d4ec2 +0c7800bbe1219c02fa08f3e13c1c85dbb00a2ec05ea0dff00a6ec15a98027360 +070c047a06d7e1085c84f1b014f6c03fa0b33018b6c0211801ebe018fc00da0a +6f61113c877eb01d4ec317a085700f26c130f80efbe132bc039a0733e106fc81 +f7f017f6c10aa0d1300a0ec374780943e1382c06fa0a9b60238c83473016cec0 +02f80f73fefe1072afc1e50000000049454e44ae426082 +"""), + 'basi6a08': _dehex(""" +89504e470d0a1a0a0000000d4948445200000020000000200806000001047d4a +620000000467414d41000186a031e8965f0000012049444154789cc595414ec3 +3010459fa541b8bbb26641b8069b861e8b4d12c1c112c1452a710a2a65d840d5 +949041fc481ec98ae27c7f3f8d27e3e4648047600fec0d1f390fbbe2633a31e2 +9389e4e4ea7bfdbf3d9a6b800ab89f1bd6b553cfcbb0679e960563d72e0a9293 +b7337b9f988cc67f5f0e186d20e808042f1c97054e1309da40d02d7e27f92e03 +6cbfc64df0fc3117a6210a1b6ad1a00df21c1abcf2a01944c7101b0cb568a001 +909c9cf9e399cf3d8d9d4660a875405d9a60d000b05e2de55e25780b7a5268e0 +622118e2399aab063a815808462f1ab86890fc2e03e48bb109ded7d26ce4bf59 +0db91bac0050747fec5015ce80da0e5700281be533f0ce6d5900b59bcb00ea6d +200314cf801faab200ea752803a8d7a90c503a039f824a53f4694e7342000000 +0049454e44ae426082 +"""), + 'basn0g01': _dehex(""" +89504e470d0a1a0a0000000d49484452000000200000002001000000005b0147 +590000000467414d41000186a031e8965f0000005b49444154789c2dccb10903 +300c05d1ebd204b24a200b7a346f90153c82c18d0a61450751f1e08a2faaead2 +a4846ccea9255306e753345712e211b221bf4b263d1b427325255e8bdab29e6f +6aca30692e9d29616ee96f3065f0bf1f1087492fd02f14c90000000049454e44 +ae426082 +"""), + 'basn0g02': _dehex(""" +89504e470d0a1a0a0000000d49484452000000200000002002000000001ca13d +890000000467414d41000186a031e8965f0000001f49444154789c6360085df5 +1f8cf1308850c20053868f0133091f6390b90700bd497f818b0989a900000000 +49454e44ae426082 +"""), + # A version of basn0g04 dithered down to 3 bits. + 'Basn0g03': _dehex(""" +89504e470d0a1a0a0000000d494844520000002000000020040000000093e1c8 +2900000001734249540371d88211000000fd49444154789c6d90d18906210c84 +c356f22356b2889588604301b112112b11d94a96bb495cf7fe87f32d996f2689 +44741cc658e39c0b118f883e1f63cc89dafbc04c0f619d7d898396c54b875517 +83f3a2e7ac09a2074430e7f497f00f1138a5444f82839c5206b1f51053cca968 +63258821e7f2b5438aac16fbecc052b646e709de45cf18996b29648508728612 +952ca606a73566d44612b876845e9a347084ea4868d2907ff06be4436c4b41a3 +a3e1774285614c5affb40dbd931a526619d9fa18e4c2be420858de1df0e69893 +a0e3e5523461be448561001042b7d4a15309ce2c57aef2ba89d1c13794a109d7 +b5880aa27744fc5c4aecb5e7bcef5fe528ec6293a930690000000049454e44ae +426082 +"""), + 'basn0g04': _dehex(""" +89504e470d0a1a0a0000000d494844520000002000000020040000000093e1c8 +290000000467414d41000186a031e8965f0000004849444154789c6360601014 +545232367671090d4d4b2b2f6720430095dbd1418e002a77e64c720450b9ab56 +912380caddbd9b1c0154ee9933e408a072efde25470095fbee1d1902001f14ee +01eaff41fa0000000049454e44ae426082 +"""), + 'basn0g08': _dehex(""" +89504e470d0a1a0a0000000d4948445200000020000000200800000000561125 +280000000467414d41000186a031e8965f0000004149444154789c6364602400 +1408c8b30c05058c0f0829f8f71f3f6079301c1430ca11906764a2795c0c0605 +8c8ff0cafeffcff887e67131181430cae0956564040050e5fe7135e2d8590000 +000049454e44ae426082 +"""), + 'basn0g16': _dehex(""" +89504e470d0a1a0a0000000d49484452000000200000002010000000000681f9 +6b0000000467414d41000186a031e8965f0000005e49444154789cd5d2310ac0 +300c4351395bef7fc6dca093c0287b32d52a04a3d98f3f3880a7b857131363a0 +3a82601d089900dd82f640ca04e816dc06422640b7a03d903201ba05b7819009 +d02d680fa44c603f6f07ec4ff41938cf7f0016d84bd85fae2b9fd70000000049 +454e44ae426082 +"""), + 'basn2c08': _dehex(""" +89504e470d0a1a0a0000000d4948445200000020000000200802000000fc18ed +a30000000467414d41000186a031e8965f0000004849444154789cedd5c10900 +300c024085ec91fdb772133b442bf4a1f8cee12bb40d043b800a14f81ca0ede4 +7d4c784081020f4a871fc284071428f0a0743823a94081bb7077a3c00182b1f9 +5e0f40cf4b0000000049454e44ae426082 +"""), + 'basn2c16': _dehex(""" +89504e470d0a1a0a0000000d4948445200000020000000201002000000ac8831 +e00000000467414d41000186a031e8965f000000e549444154789cd596c10a83 +301044a7e0417fcb7eb7fdadf6961e06039286266693cc7a188645e43dd6a08f +1042003e2fe09aef6472737e183d27335fcee2f35a77b702ebce742870a23397 +f3edf2705dd10160f3b2815fe8ecf2027974a6b0c03f74a6e4192843e75c6c03 +35e8ec3202f5e84c0181bbe8cca967a00d9df3491bb040671f2e6087ce1c2860 +8d1e05f8c7ee0f1d00b667e70df44467ef26d01fbd9bc028f42860f71d188bce +fb8d3630039dbd59601e7ab3c06cf428507f0634d039afdc80123a7bb1801e7a +b1802a7a14c89f016d74ce331bf080ce9e08f8414f04bca133bfe642fe5e07bb +c4ec0000000049454e44ae426082 +"""), + 'basn6a08': _dehex(""" +89504e470d0a1a0a0000000d4948445200000020000000200806000000737a7a +f40000000467414d41000186a031e8965f0000006f49444154789cedd6310a80 +300c46e12764684fa1f73f55048f21c4ddc545781d52e85028fc1f4d28d98a01 +305e7b7e9cffba33831d75054703ca06a8f90d58a0074e351e227d805c8254e3 +1bb0420f5cdc2e0079208892ffe2a00136a07b4007943c1004d900195036407f +011bf00052201a9c160fb84c0000000049454e44ae426082 +"""), + 'cs3n3p08': _dehex(""" +89504e470d0a1a0a0000000d494844520000002000000020080300000044a48a +c60000000467414d41000186a031e8965f0000000373424954030303a392a042 +00000054504c544592ff0000ff9200ffff00ff0000dbff00ff6dffb600006dff +b6ff00ff9200dbff000049ffff2400ff000024ff0049ff0000ffdb00ff4900ff +b6ffff0000ff2400b6ffffdb000092ffff6d000024ffff49006dff00df702b17 +0000004b49444154789c85cac70182000000b1b3625754b0edbfa72324ef7486 +184ed0177a437b680bcdd0031c0ed00ea21f74852ed00a1c9ed0086da0057487 +6ed0121cd6d004bda0013a421ff803224033e177f4ae260000000049454e44ae +426082 +"""), + 's09n3p02': _dehex(""" +89504e470d0a1a0a0000000d49484452000000090000000902030000009dffee +830000000467414d41000186a031e8965f000000037342495404040477f8b5a3 +0000000c504c544500ff000077ffff00ffff7700ff5600640000001f49444154 +789c63600002fbff0c0c56ab19182ca381581a4283f82071200000696505c36a +437f230000000049454e44ae426082 +"""), + 'tbgn3p08': _dehex(""" +89504e470d0a1a0a0000000d494844520000002000000020080300000044a48a +c60000000467414d41000186a031e8965f00000207504c54457f7f7fafafafab +abab110000222200737300999999510d00444400959500959595e6e600919191 +8d8d8d620d00898989666600b7b700911600000000730d007373736f6f6faaaa +006b6b6b676767c41a00cccc0000f30000ef00d51e0055555567670000dd0051 +515100d1004d4d4de61e0038380000b700160d0d00ab00560d00090900009500 +009100008d003333332f2f2f2f2b2f2b2b000077007c7c001a05002b27000073 +002b2b2b006f00bb1600272727780d002323230055004d4d00cc1e00004d00cc +1a000d00003c09006f6f00002f003811271111110d0d0d55554d090909001100 +4d0900050505000d00e2e200000900000500626200a6a6a6a2a2a29e9e9e8484 +00fb00fbd5d500801100800d00ea00ea555500a6a600e600e6f7f700e200e233 +0500888888d900d9848484c01a007777003c3c05c8c8008080804409007c7c7c +bb00bbaa00aaa600a61e09056262629e009e9a009af322005e5e5e05050000ee +005a5a5adddd00a616008d008d00e20016050027270088110078780000c40078 +00787300736f006f44444400aa00c81e004040406600663c3c3c090000550055 +1a1a00343434d91e000084004d004d007c004500453c3c00ea1e00222222113c +113300331e1e1efb22001a1a1a004400afaf00270027003c001616161e001e0d +160d2f2f00808000001e00d1d1001100110d000db7b7b7090009050005b3b3b3 +6d34c4230000000174524e530040e6d86600000001624b474402660b7c640000 +01f249444154789c6360c0048c8c58049100575f215ee92e6161ef109cd2a15e +4b9645ce5d2c8f433aa4c24f3cbd4c98833b2314ab74a186f094b9c2c27571d2 +6a2a58e4253c5cda8559057a392363854db4d9d0641973660b0b0bb76bb16656 +06970997256877a07a95c75a1804b2fbcd128c80b482a0b0300f8a824276a9a8 +ec6e61612b3e57ee06fbf0009619d5fac846ac5c60ed20e754921625a2daadc6 +1967e29e97d2239c8aec7e61fdeca9cecebef54eb36c848517164514af16169e +866444b2b0b7b55534c815cc2ec22d89cd1353800a8473100a4485852d924a6a +412adc74e7ad1016ceed043267238c901716f633a812022998a4072267c4af02 +92127005c0f811b62830054935ce017b38bf0948cc5c09955f030a24617d9d46 +63371fd940b0827931cbfdf4956076ac018b592f72d45594a9b1f307f3261b1a +084bc2ad50018b1900719ba6ba4ca325d0427d3f6161449486f981144cf3100e +2a5f2a1ce8683e4ddf1b64275240c8438d98af0c729bbe07982b8a1c94201dc2 +b3174c9820bcc06201585ad81b25b64a2146384e3798290c05ad280a18c0a62e +e898260c07fca80a24c076cc864b777131a00190cdfa3069035eccbc038c30e1 +3e88b46d16b6acc5380d6ac202511c392f4b789aa7b0b08718765990111606c2 +9e854c38e5191878fbe471e749b0112bb18902008dc473b2b2e8e72700000000 +49454e44ae426082 +"""), + 'Tp2n3p08': _dehex(""" +89504e470d0a1a0a0000000d494844520000002000000020080300000044a48a +c60000000467414d41000186a031e8965f00000300504c544502ffff80ff05ff +7f0703ff7f0180ff04ff00ffff06ff000880ff05ff7f07ffff06ff000804ff00 +0180ff02ffff03ff7f02ffff80ff0503ff7f0180ffff0008ff7f0704ff00ffff +06ff000802ffffff7f0704ff0003ff7fffff0680ff050180ff04ff000180ffff +0008ffff0603ff7f80ff05ff7f0702ffffff000880ff05ffff0603ff7f02ffff +ff7f070180ff04ff00ffff06ff000880ff050180ffff7f0702ffff04ff0003ff +7fff7f0704ff0003ff7f0180ffffff06ff000880ff0502ffffffff0603ff7fff +7f0702ffff04ff000180ff80ff05ff0008ff7f07ffff0680ff0504ff00ff0008 +0180ff03ff7f02ffff02ffffffff0604ff0003ff7f0180ffff000880ff05ff7f +0780ff05ff00080180ff02ffffff7f0703ff7fffff0604ff00ff7f07ff0008ff +ff0680ff0504ff0002ffff0180ff03ff7fff0008ffff0680ff0504ff000180ff +02ffff03ff7fff7f070180ff02ffff04ff00ffff06ff0008ff7f0780ff0503ff +7fffff06ff0008ff7f0780ff0502ffff03ff7f0180ff04ff0002ffffff7f07ff +ff0604ff0003ff7fff00080180ff80ff05ffff0603ff7f0180ffff000804ff00 +80ff0502ffffff7f0780ff05ffff0604ff000180ffff000802ffffff7f0703ff +7fff0008ff7f070180ff03ff7f02ffff80ff05ffff0604ff00ff0008ffff0602 +ffff0180ff04ff0003ff7f80ff05ff7f070180ff04ff00ff7f0780ff0502ffff +ff000803ff7fffff0602ffffff7f07ffff0680ff05ff000804ff0003ff7f0180 +ff02ffff0180ffff7f0703ff7fff000804ff0080ff05ffff0602ffff04ff00ff +ff0603ff7fff7f070180ff80ff05ff000803ff7f0180ffff7f0702ffffff0008 +04ff00ffff0680ff0503ff7f0180ff04ff0080ff05ffff06ff000802ffffff7f +0780ff05ff0008ff7f070180ff03ff7f04ff0002ffffffff0604ff00ff7f07ff +000880ff05ffff060180ff02ffff03ff7f80ff05ffff0602ffff0180ff03ff7f +04ff00ff7f07ff00080180ffff000880ff0502ffff04ff00ff7f0703ff7fffff +06ff0008ffff0604ff00ff7f0780ff0502ffff03ff7f0180ffdeb83387000000 +f874524e53000000000000000008080808080808081010101010101010181818 +1818181818202020202020202029292929292929293131313131313131393939 +393939393941414141414141414a4a4a4a4a4a4a4a52525252525252525a5a5a +5a5a5a5a5a62626262626262626a6a6a6a6a6a6a6a73737373737373737b7b7b +7b7b7b7b7b83838383838383838b8b8b8b8b8b8b8b94949494949494949c9c9c +9c9c9c9c9ca4a4a4a4a4a4a4a4acacacacacacacacb4b4b4b4b4b4b4b4bdbdbd +bdbdbdbdbdc5c5c5c5c5c5c5c5cdcdcdcdcdcdcdcdd5d5d5d5d5d5d5d5dedede +dededededee6e6e6e6e6e6e6e6eeeeeeeeeeeeeeeef6f6f6f6f6f6f6f6b98ac5 +ca0000012c49444154789c6360e7169150d230b475f7098d4ccc28a96ced9e32 +63c1da2d7b8e9fb97af3d1fb8f3f18e8a0808953544a4dd7c4c2c9233c2621bf +b4aab17fdacce5ab36ee3a72eafaad87efbefea68702362e7159652d031b07cf +c0b8a4cce28aa68e89f316aedfb4ffd0b92bf79fbcfcfe931e0a183904e55435 +8decdcbcc22292b3caaadb7b27cc5db67af3be63e72fdf78fce2d31f7a2860e5 +119356d037b374f10e8a4fc92eaa6fee99347fc9caad7b0f9ebd74f7c1db2fbf +e8a180995f484645dbdccad12f38363dafbcb6a573faeca5ebb6ed3e7ce2c29d +e76fbefda38702063e0149751d537b67ff80e8d4dcc29a86bea97316add9b0e3 +c0e96bf79ebdfafc971e0a587885e515f58cad5d7d43a2d2720aeadaba26cf5a +bc62fbcea3272fde7efafac37f3a28000087c0fe101bc2f85f0000000049454e +44ae426082 +"""), + 'tbbn1g04': _dehex(""" +89504e470d0a1a0a0000000d494844520000002000000020040000000093e1c8 +290000000467414d41000186a031e8965f0000000274524e530007e8f7589b00 +000002624b47440000aa8d23320000013e49444154789c55d1cd4b024118c7f1 +efbe6419045b6a48a72d352808b435284f9187ae9b098627a1573a19945beba5 +e8129e8222af11d81e3a4545742de8ef6af6d5762e0fbf0fc33c33f36085cb76 +bc4204778771b867260683ee57e13f0c922df5c719c2b3b6c6c25b2382cea4b9 +9f7d4f244370746ac71f4ca88e0f173a6496749af47de8e44ba8f3bf9bdfa98a +0faf857a7dd95c7dc8d7c67c782c99727997f41eb2e3c1e554152465bb00fe8e +b692d190b718d159f4c0a45c4435915a243c58a7a4312a7a57913f05747594c6 +46169866c57101e4d4ce4d511423119c419183a3530cc63db88559ae28e7342a +1e9c8122b71139b8872d6e913153224bc1f35b60e4445bd4004e20ed6682c759 +1d9873b3da0fbf50137dc5c9bde84fdb2ec8bde1189e0448b63584735993c209 +7a601bd2710caceba6158797285b7f2084a2f82c57c01a0000000049454e44ae +426082 +"""), + 'tbrn2c08': _dehex(""" +89504e470d0a1a0a0000000d4948445200000020000000200802000000fc18ed +a30000000467414d41000186a031e8965f0000000674524e53007f007f007f8a +33334f00000006624b474400ff0000000033277cf3000004d649444154789cad +965f68537714c73fd912d640235e692f34d0406fa0c1663481045ab060065514 +56660a295831607df0a1488715167060840a1614e6431e9cb34fd2c00a762c85 +f6a10f816650c13b0cf40612e1822ddc4863bd628a8924d23d6464f9d3665dd9 +f7e977ce3dbff3cd3939bfdfef6bb87dfb364782dbed065ebe7cd93acc78b4ec +a228debd7bb7bfbfbfbbbbfb7f261045311a8d261209405194274f9ea4d3e916 +f15f1c3eb5dd6e4fa5fecce526239184a2b0b8486f6f617171b1f5ae4311381c +8e57af5e5dbd7a351088150a78bd389d44222c2f93cdfe66b7db8f4ee07038b6 +b6b6bebf766d7e7e7e60a06432313b4ba984c3c1c4049a46b95c5a58583822c1 +dbb76f27272733d1b9df853c3030c0f232562b9108cf9eb1b888d7cbf030abab +31abd5fa1f08dc6ef7e7cf9f1f3f7e1c8944745d4f1400c62c001313acad21cb +b8dd2c2c603271eb1640341aad4c6d331aa7e8c48913a150a861307ecc11e964 +74899919bc5e14e56fffc404f1388502f178dceff7ef4bf0a5cfe7abb533998c +e5f9ea2f1dd88c180d64cb94412df3dd57e83a6b3b3c7a84c98420100c72fd3a +636348bae726379fe69e8e8d8dbd79f3a6558b0607079796965256479b918085 +7b02db12712b6181950233023f3f647494ee6e2e5ea45864cce5b8a7fe3acffc +3aebb22c2bd5d20e22d0757d7b7bbbbdbd3d94a313bed1b0aa3cd069838b163a +8d4c59585f677292d0b84d9a995bd337def3fe6bbe5e6001989b9b6bfe27ea08 +36373781542ab56573248b4c5bc843ac4048c7ab21aa24ca00534c25482828a3 +8c9ee67475bbaaaab22cb722c8e57240a150301a8d219de94e44534d7d90e885 +87acb0e2c4f9800731629b6c5ee14a35a6b9887d2a0032994cb9cf15dbe59650 +ff7b46a04c9a749e7cc5112214266cc65c31354d5b5d5d3d90209bcd5616a552 +a95c2e87f2a659bd9ee01c2cd73964e438f129a6aa9e582c363838b80f81d7eb +5555b56a2a8ad2d9d7affd0409f8015c208013fea00177b873831b0282c964f2 +783c1e8fa7582cee5f81a669b5e6eeeeaee58e8559b0c233d8843c7c0b963a82 +34e94b5cb2396d7d7d7db22c8ba258fb0afd43f0e2c58b919191ba9de9b4d425 +118329b0c3323c8709d02041b52b4ea7f39de75d2a934a2693c0a953a76a93d4 +5d157ebf7f6565a5542a553df97c5e10045dd731c130b86113cc300cbd489224 +08422a952a140a95788fc763b1d41558d7a2d7af5f5fb870a1d6a3aaaacd6603 +18802da84c59015bd2e6897b745d9765b99a1df0f97c0daf74e36deaf7fbcd66 +73ad2797cb89a2c839880188a2e8743a8bc5a22ccbba5e376466b3b9bdbdbd21 +6123413a9d0e0402b51e4dd3bababa788eb022b85caeb6b6364551b6b7b76942 +43f7f727007a7a7a04a1ee8065b3595fde2768423299ac1ec6669c3973e65004 +c0f8f878ad69341a33994ced2969c0d0d0502412f9f8f163f3a7fd654b474787 +288ad53e74757535df6215b85cae60302849d2410aecc037f9f2e5cbd5b5c160 +680eb0dbede170381c0e7ff8f0a185be3b906068684892a4ca7a6f6faff69328 +8ad3d3d3f7efdfdfdbdbfb57e96868a14d0d0643381c96242997cbe5f3794010 +84603078fcf8f1d6496bd14a3aba5c2ea7d369341a5555b5582c8140e0fcf9f3 +1b1b1b87cf4eeb0a8063c78e45a3d19e9e1ebfdfdf5a831e844655d18093274f +9e3d7bf6d3a74f3b3b3b47c80efc05ff7af28fefb70d9b0000000049454e44ae +426082 +"""), + 'basn6a16': _dehex(""" +89504e470d0a1a0a0000000d494844520000002000000020100600000023eaa6 +b70000000467414d41000186a031e8965f00000d2249444154789cdd995f6c1c +d775c67ff38fb34b724d2ee55a8e4b04a0ac87049100cab4dbd8c6528902cb4d +10881620592e52d4325ac0905bc98a94025e71fd622cb5065ac98a0c283050c0 +728a00b6e542a1d126885cd3298928891d9a0444037e904434951d4b90b84b2f +c9dde1fcebc33977a95555348f411e16dfce9d3b77ee77eebde77ce78c95a669 +0ad07c17009a13edd898b87dfb1fcb7d2b4d1bff217f33df80deb1e6267df0ff +c1e6e6dfafdf1f5a7fd30f9aef66b6d546dd355bf02c40662e3307f9725a96c6 +744c3031f83782f171c148dbc3bf1774f5dad1e79d6f095a3f54d4fbec5234ef +d9a2f8d73afe4f14f57ef4f42def7b44f19060f06b45bddf1c5534d77fd922be +2973a15a82e648661c6e3240aa3612ead952b604bde57458894f29deaf133bac +13d2766f5227a4a3b8cf08da7adfd6fbd6bd8a4fe9dbb43d35e3dfa3f844fbf8 +9119bf4f7144094fb56333abf8a86063ca106f94b3a3b512343765e60082097f +1bb86ba72439a653519b09f5cee1ce61c897d37eedf5553580ae60f4af8af33a +b14fd400b6a0f34535c0434afc0b3a9f07147527a5fa7ca218ff56c74d74dc3f +155cfd3325fc278acf2ae1cb4a539f5f9937c457263b0bd51234c732a300cdd1 +cc1840f0aaff54db0e4874ed5a9b5d6d27d4bb36746d80de72baa877ff4b275a +d7895ed1897ea4139b5143fcbb1a62560da1ed9662aaed895ec78a91c18795b8 +5e07ab4af8ba128e95e682e0728bf8f2e5ae815a091a53d902ac1920d8e05f06 +589de8d8d66680789f4e454fb9d9ec66cd857af796ee2d902fa73fd5bba775a2 +153580ae44705ed0d37647d15697cb8f14bfa3e3e8fdf8031d47af571503357c +f30d25acedcbbf135c9a35c49766ba07ab255859e8ec03684e66860182dff8f7 +0304bff6ff1c20fc81b7afdd00a71475539a536e36bb5973a19e3b923b02bde5 +e4efd4003ac170eb2d13fe274157afedbd82d6fb3a9a1e85e4551d47cf7078f8 +9671fe4289ebf5f2bf08d63f37c4eb4773c55a0996efeefa0ca011671d8060ca +2f0004c7fcc300e166ef0240f825efe3361f106d57d423d0723f7acacd66376b +2ed47b7a7a7a205f4ef4ac4691e0aad9aa0d41cf13741c3580a506487574ddca +61a8c403c1863ebfbcac3475168b2de28b8b3d77544bb05ce92a02aceced3c0d +d0cc65ea371b201cf1c601c24dde1c4078cedbdeb60322f50126a019bf6edc9b +39e566b39b3517eaf97c3e0fbde5e4491d45bd74537145d155b476aa0176e868 +c6abebf30dbd5e525c54ac8e18e2d56abeb756827a3d970358a97416019a6f64 +f60004fdfe1580d5c98e618070cc1b05887eee7e0d209a70db7d8063029889b4 +c620ead78d7b33a7dc6c76b3e6427ddddbebde867c393aa7845e5403e8ca794a +d0d6fb897af5f03525fe5782f5e7046bdaef468bf88d1debc6ab25583cd17310 +6079b9ab0ba059c914018245bf076075b5a303200c3c1f209a733701444fbbaf +00c4134ebb016c5d0b23614c243701cdf875e3decce9349bddacb9505fbf7dfd +76e82d87736a00f5d2b5ffd4b7dce2719a4d25ae717ee153c1abef18e257cfad +7fa45682da48ef38c052b53b0fd06864b300c151ff08c0ea431de701a287dd5f +004497dc7b01a253ee3e80b8c7f91c20f967fb6fdb7c80ada7d8683723614c24 +3701cdf875e3decc29379bddacb950ef3fd47f08f2e5a61ea4aa2a3eb757cd55 +13345efcfa59c12b2f19e2578ef77fb75a82854ffbee01a83f977b11a031931d +040802df07082b5e11207cc17b1e209a770700e2df0a83e409fb7580f827c230 +99b06fd901fb058d6835dacd481813c94d40337eddb83773cacd66376b2ed437 +bebcf165e82d2f4e4beb7f3fa6e652c2d7ee10bc78c010bfb87fe3c95a09ae9f +bd732740bd2fb700d0f865f64180e059ff044018ca0ca28a5b04883f701e0088 +bfec7c0c909cb71f0448c6ec518074b375012079d9dedf66004bcfbc51eb2dd1 +aadacd481813c94d40337eddb83773cacd66376b2ed487868686205fbe7c49ef +5605a73f34c4a7a787eeab96e0da81bb4e022c15ba27019a5b339300e16bf286 +a8eae601e25866907cdf3e0890acb36f00245fb57f05904e59c300e92561946e +b2e600d209ab7d07f04d458dfb46ad1bd16ab49b913026929b8066fcba716fe6 +949bcd6ed65ca8ef7e7cf7e3d05b7e7c8f217ee6cdddbb6a25a856f37980e0c7 +fe4e80a82623c48193014846ec7180f4acf518409aca0cd28a5504e03b32c374 +de1a00608a0240faaa327a4b19fe946fb6f90054dbb5f2333d022db56eb4966a +3723614c243701cdf8f556bea8a7dc6c76b3e66bd46584ddbbcebc0990cf4b0f +ff4070520c282338a7e26700ec725202b01e4bcf0258963c6f1d4d8f0030cb20 +805549c520930c03584fa522b676f11600ffc03fde3e1b3489a9c9054c9aa23b +c08856a3dd8c843191dc0434e3d78d7b33a75c36fb993761f7ae5a69f72ef97f +e6ad336fed7e1c60e8bee96980bbdebbb60da07b7069062033d9dc0ae03d296f +70ab511ec071640676252902d833c916007b3e1900b0a6d2028035968e025861 +ea01581369fb11488c34d18cbc95989afccca42baad65ba2d5683723614c24d7 +8066fcbab8b7e96918baaf5aaa56219f975fb50a43f7c9bde90fa73f1c1a02d8 +78f2e27e803b77ca08b90519315b6fe400fc1392097a9eccc0ad444500e70199 +a1331f0f00d8934901c07e5d526ceb87c2d07e2579badd005a2b31a5089391b7 +1253358049535a6add8856dd0146c298482e01ede27ed878b256ba7600ee3a09 +c18fc1df09fe01084ec25defc1b56db0f1a4f4bd78e0e2818d2f0334e7330300 +7df7c888b917e50dd9c1c60c80efcb0cbc63e1f700bce7c31700dccbd1060027 +8add9b0de06c8e2f00d84962b7d7030e2a61538331b98051f92631bd253f336a +dd8856a3dd44c25c390efddfad96ae9f853b77c25201ba27c533b8bdf28b6ad0 +3d084b33d2e7fa59099e9901b8f2d29597fa0f01848f78e70082117f1ca07b76 +6910209b9519f895a008d031bbba05c09d8f06005c5b18b8fba25300cea6780e +c03e911c6ccf06d507b48a4fa606634a114609de929f9934c5a87511ad57cfc1 +fa476aa5854fa1ef1e3910b905686e85cc24c40138198915f133d2d6dc2a7dea +7df2ccc2a752faf2cec1d577aebeb37e3b4034eeee0008dff3be0e6b923773b4 +7904c0ef9119767cb4fa1500ef1361e08e452500f71561e84cc4ed3e20fab6a2 +c905f40cb76a3026bf3319b91ac2e46792a6dcd801ebc6aba5da08f48ecb81c8 +bd088d5f42f6417191de93908c803d0e76199292b485af41b60e8d9c3c537f0e +8211f0c7211a077707dc18b931b2ee6d80a4d7ae024491ebc24d4a708ff70680 +7f25e807e8785f1878e322d6ddaf453f0770ff2dfa769b01423dbbad72a391b6 +5a7c3235985629423372494cab55c8f7d64a8b27a0e7202c55a13b0f8d19c80e +4ae9ca3f015115dc3ca467c17a4c7ee95970ab10e5a54ff0ac3cd39881ee5958 +1a84f03df0be0e492fd855a8d6aa35d10b4962dbb0a604a3d3ee5e80a8eee600 +a24977f8660378bf0bbf00e01d0a8fb7f980f04b8aa6ce6aca8d5a7533c52753 +839152c4e222f4dc512dd5eb90cbc981e8ea12cf90cd8a8bf47d89159e2741d3 +7124f65b96fcd254dae258fa84a13c13043246a32129574787e49eae2b49b86d +c3e2e78b9ff7f4002415bb08907c66df0d103b4e0c104db90500ff70700c203a +ee1e82dba4c3e16e256c0acca6ceaae9afd1f612d7eb472157ac95962bd05594 +7dd1598466053245088e827f44628657942a825b84e4fb601f84b4025611aca3 +901e01bb024911dc0a4445f08e41f83df02b10142173149ab71baf027611ea95 +7a257704201d14cd9af4d90b00f194530088cb4e09c0df1c5c0088f7393f6833 +c0aa3ac156655de3bca9b34ab9716906ba07aba5e5bba1eb3358d90b9da7c533 +64f6888bf47b60f521e8380fe10be03d2feac17900927560df40f4e48f805960 +50328d648bf4893f9067c217a0631656b7c898c122847bc07b03a2d3e0ee85e4 +33b0ef867450c4fad2ecd26cf7168074c0ba0c904cdac300c9cfec4701924df6 +1cdca61e10685c6f7d52d0caba1498972f43d740adb4b2009d7d7220b20e3473 +90a943d00ffe959bb6eac3e0fe42ea49ee00c45f06e76329b1dabf127d690d80 +5581b408f63c2403e0cc433c00ee658836803b0fd100747c04ab5f917704fd10 +d5c1cd41ec801343d207f602a403605d86e5f9e5f9ae0d00e994556833806685 +c931fb709b0f08b4e869bea5c827859549e82c544b8d29c816a0390999613920 +7e610d5727a16318c2003c1fa24be0de2b32caf92224e7c17e5004b6350c4c01 +05601218066b0ad28224e149019c086257ca315102de2712903bde97b8144d82 +3b2c6ac52d403c054e019249b087f53d0558995a99ea946c70cc927458b3c1ff +550f30050df988d4284376b4566a8e416654cc921985e037e0df0fc131f00f4b +acf0c6211c036f14a239703741740adc7da227edd7e56b833d0ae92549b4d357 +25dfb49ed2ff63908e6adf27d6d0dda7638d4154d2778daca17f58e61297c129 +41f233b01f5dc3740cac51688c35c6b22580f48224fee9b83502569a66b629f1 +09f3713473413e2666e7fe6f6c6efefdfafda1f56f6e06f93496d9d67cb7366a +9964b6f92e64b689196ec6c604646fd3fe4771ff1bf03f65d8ecc3addbb5f300 +00000049454e44ae426082 +"""), +} + +def read_pam_header(infile): + """ + Read (the rest of a) PAM header. `infile` should be positioned + immediately after the initial 'P7' line (at the beginning of the + second line). Returns are as for `read_pnm_header`. + """ + + # Unlike PBM, PGM, and PPM, we can read the header a line at a time. + header = dict() + while True: + l = infile.readline().strip() + if l == strtobytes('ENDHDR'): + break + if not l: + raise EOFError('PAM ended prematurely') + if l[0] == strtobytes('#'): + continue + l = l.split(None, 1) + if l[0] not in header: + header[l[0]] = l[1] + else: + header[l[0]] += strtobytes(' ') + l[1] + + required = ['WIDTH', 'HEIGHT', 'DEPTH', 'MAXVAL'] + required = [strtobytes(x) for x in required] + WIDTH,HEIGHT,DEPTH,MAXVAL = required + present = [x for x in required if x in header] + if len(present) != len(required): + raise Error('PAM file must specify WIDTH, HEIGHT, DEPTH, and MAXVAL') + width = int(header[WIDTH]) + height = int(header[HEIGHT]) + depth = int(header[DEPTH]) + maxval = int(header[MAXVAL]) + if (width <= 0 or + height <= 0 or + depth <= 0 or + maxval <= 0): + raise Error( + 'WIDTH, HEIGHT, DEPTH, MAXVAL must all be positive integers') + return 'P7', width, height, depth, maxval + +def read_pnm_header(infile, supported=('P5','P6')): + """ + Read a PNM header, returning (format,width,height,depth,maxval). + `width` and `height` are in pixels. `depth` is the number of + channels in the image; for PBM and PGM it is synthesized as 1, for + PPM as 3; for PAM images it is read from the header. `maxval` is + synthesized (as 1) for PBM images. + """ + + # Generally, see http://netpbm.sourceforge.net/doc/ppm.html + # and http://netpbm.sourceforge.net/doc/pam.html + + supported = [strtobytes(x) for x in supported] + + # Technically 'P7' must be followed by a newline, so by using + # rstrip() we are being liberal in what we accept. I think this + # is acceptable. + type = infile.read(3).rstrip() + if type not in supported: + raise NotImplementedError('file format %s not supported' % type) + if type == strtobytes('P7'): + # PAM header parsing is completely different. + return read_pam_header(infile) + # Expected number of tokens in header (3 for P4, 4 for P6) + expected = 4 + pbm = ('P1', 'P4') + if type in pbm: + expected = 3 + header = [type] + + # We have to read the rest of the header byte by byte because the + # final whitespace character (immediately following the MAXVAL in + # the case of P6) may not be a newline. Of course all PNM files in + # the wild use a newline at this point, so it's tempting to use + # readline; but it would be wrong. + def getc(): + c = infile.read(1) + if not c: + raise Error('premature EOF reading PNM header') + return c + + c = getc() + while True: + # Skip whitespace that precedes a token. + while c.isspace(): + c = getc() + # Skip comments. + while c == '#': + while c not in '\n\r': + c = getc() + if not c.isdigit(): + raise Error('unexpected character %s found in header' % c) + # According to the specification it is legal to have comments + # that appear in the middle of a token. + # This is bonkers; I've never seen it; and it's a bit awkward to + # code good lexers in Python (no goto). So we break on such + # cases. + token = strtobytes('') + while c.isdigit(): + token += c + c = getc() + # Slight hack. All "tokens" are decimal integers, so convert + # them here. + header.append(int(token)) + if len(header) == expected: + break + # Skip comments (again) + while c == '#': + while c not in '\n\r': + c = getc() + if not c.isspace(): + raise Error('expected header to end with whitespace, not %s' % c) + + if type in pbm: + # synthesize a MAXVAL + header.append(1) + depth = (1,3)[type == strtobytes('P6')] + return header[0], header[1], header[2], depth, header[3] + +def write_pnm(file, width, height, pixels, meta): + """Write a Netpbm PNM/PAM file.""" + + bitdepth = meta['bitdepth'] + maxval = 2**bitdepth - 1 + # Rudely, the number of image planes can be used to determine + # whether we are L (PGM), LA (PAM), RGB (PPM), or RGBA (PAM). + planes = meta['planes'] + # Can be an assert as long as we assume that pixels and meta came + # from a PNG file. + assert planes in (1,2,3,4) + if planes in (1,3): + if 1 == planes: + # PGM + # Could generate PBM if maxval is 1, but we don't (for one + # thing, we'd have to convert the data, not just blat it + # out). + fmt = 'P5' + else: + # PPM + fmt = 'P6' + file.write('%s %d %d %d\n' % (fmt, width, height, maxval)) + if planes in (2,4): + # PAM + # See http://netpbm.sourceforge.net/doc/pam.html + if 2 == planes: + tupltype = 'GRAYSCALE_ALPHA' + else: + tupltype = 'RGB_ALPHA' + file.write('P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\n' + 'TUPLTYPE %s\nENDHDR\n' % + (width, height, planes, maxval, tupltype)) + # Values per row + vpr = planes * width + # struct format + fmt = '>%d' % vpr + if maxval > 0xff: + fmt = fmt + 'H' + else: + fmt = fmt + 'B' + for row in pixels: + file.write(struct.pack(fmt, *row)) + file.flush() + +def color_triple(color): + """ + Convert a command line colour value to a RGB triple of integers. + FIXME: Somewhere we need support for greyscale backgrounds etc. + """ + if color.startswith('#') and len(color) == 4: + return (int(color[1], 16), + int(color[2], 16), + int(color[3], 16)) + if color.startswith('#') and len(color) == 7: + return (int(color[1:3], 16), + int(color[3:5], 16), + int(color[5:7], 16)) + elif color.startswith('#') and len(color) == 13: + return (int(color[1:5], 16), + int(color[5:9], 16), + int(color[9:13], 16)) + +def _add_common_options(parser): + """Call *parser.add_option* for each of the options that are + common between this PNG--PNM conversion tool and the gen + tool. + """ + parser.add_option("-i", "--interlace", + default=False, action="store_true", + help="create an interlaced PNG file (Adam7)") + parser.add_option("-t", "--transparent", + action="store", type="string", metavar="#RRGGBB", + help="mark the specified colour as transparent") + parser.add_option("-b", "--background", + action="store", type="string", metavar="#RRGGBB", + help="save the specified background colour") + parser.add_option("-g", "--gamma", + action="store", type="float", metavar="value", + help="save the specified gamma value") + parser.add_option("-c", "--compression", + action="store", type="int", metavar="level", + help="zlib compression level (0-9)") + return parser + +def _main(argv): + """ + Run the PNG encoder with options from the command line. + """ + + # Parse command line arguments + from optparse import OptionParser + import re + version = '%prog ' + re.sub(r'( ?\$|URL: |Rev:)', '', __version__) + parser = OptionParser(version=version) + parser.set_usage("%prog [options] [imagefile]") + parser.add_option('-r', '--read-png', default=False, + action='store_true', + help='Read PNG, write PNM') + parser.add_option("-a", "--alpha", + action="store", type="string", metavar="pgmfile", + help="alpha channel transparency (RGBA)") + _add_common_options(parser) + + (options, args) = parser.parse_args(args=argv[1:]) + + # Convert options + if options.transparent is not None: + options.transparent = color_triple(options.transparent) + if options.background is not None: + options.background = color_triple(options.background) + + # Prepare input and output files + if len(args) == 0: + infilename = '-' + infile = sys.stdin + elif len(args) == 1: + infilename = args[0] + infile = open(infilename, 'rb') + else: + parser.error("more than one input file") + outfile = sys.stdout + if sys.platform == "win32": + import msvcrt, os + msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) + + if options.read_png: + # Encode PNG to PPM + png = Reader(file=infile) + width,height,pixels,meta = png.asDirect() + write_pnm(outfile, width, height, pixels, meta) + else: + # Encode PNM to PNG + format, width, height, depth, maxval = \ + read_pnm_header(infile, ('P5','P6','P7')) + # When it comes to the variety of input formats, we do something + # rather rude. Observe that L, LA, RGB, RGBA are the 4 colour + # types supported by PNG and that they correspond to 1, 2, 3, 4 + # channels respectively. So we use the number of channels in + # the source image to determine which one we have. We do not + # care about TUPLTYPE. + greyscale = depth <= 2 + pamalpha = depth in (2,4) + supported = map(lambda x: 2**x-1, range(1,17)) + try: + mi = supported.index(maxval) + except ValueError: + raise NotImplementedError( + 'your maxval (%s) not in supported list %s' % + (maxval, str(supported))) + bitdepth = mi+1 + writer = Writer(width, height, + greyscale=greyscale, + bitdepth=bitdepth, + interlace=options.interlace, + transparent=options.transparent, + background=options.background, + alpha=bool(pamalpha or options.alpha), + gamma=options.gamma, + compression=options.compression) + if options.alpha: + pgmfile = open(options.alpha, 'rb') + format, awidth, aheight, adepth, amaxval = \ + read_pnm_header(pgmfile, 'P5') + if amaxval != '255': + raise NotImplementedError( + 'maxval %s not supported for alpha channel' % amaxval) + if (awidth, aheight) != (width, height): + raise ValueError("alpha channel image size mismatch" + " (%s has %sx%s but %s has %sx%s)" + % (infilename, width, height, + options.alpha, awidth, aheight)) + writer.convert_ppm_and_pgm(infile, pgmfile, outfile) + else: + writer.convert_pnm(infile, outfile) + + +if __name__ == '__main__': + try: + _main(sys.argv) + except Error, e: + print >>sys.stderr, e From 47309dbcfb261e4183d9951f8a8b8f914e176117 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 19 Jun 2012 05:47:13 +0000 Subject: [PATCH 13/68] Need to use png until we get PIL 1.1.7 installed svn: r19875 --- src/webapp/grampsdb/view/media.py | 51 ++++++++++++++++++++++++++----- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/src/webapp/grampsdb/view/media.py b/src/webapp/grampsdb/view/media.py index 27d8ad12f..dcc852a19 100644 --- a/src/webapp/grampsdb/view/media.py +++ b/src/webapp/grampsdb/view/media.py @@ -35,11 +35,18 @@ from django.http import HttpResponse ## Other Python Modules from PIL import Image +NEW_PIL = [int(i) for i in Image.VERSION.split(".")] >= [1, 1, 7] +if not NEW_PIL: + import png import os ## Globals dji = DjangoInterface() +def pb2image(pb): + width, height = pb.get_width(), pb.get_height() + return Image.fromstring("RGB", (width,height), pb.get_pixels()) + def process_media(request, context, handle, action, add_to=None): # view, edit, save """ Process action on person. Can return a redirect. @@ -61,9 +68,16 @@ def process_media(request, context, handle, action, add_to=None): # view, edit, # FIXME: This should be absolute: folder = Config.objects.get(setting="behavior.addmedia-image-dir").value # FIXME: media.path should not have any .. for security - image = Image.open("%s/%s" % (folder, media.path)) response = HttpResponse(mimetype=media.mime) - image.save(response, media_ext.upper()) + if NEW_PIL or media_ext != "png": + image = Image.open("%s/%s" % (folder, media.path)) + image.save(response, media_ext) + else: + # FIXME: older PIL 1.1.6 cannot read interlaced PNG files + reader = png.Reader(filename="%s/%s" % (folder, media.path)) + x, y, pixels, meta = reader.asDirect() + image = png.Image(pixels, meta) + image.save(response) return response elif action == "thumbnail": media = Media.objects.get(handle=handle) @@ -71,18 +85,39 @@ def process_media(request, context, handle, action, add_to=None): # view, edit, # FIXME: This should be absolute: folder = Config.objects.get(setting="behavior.addmedia-image-dir").value # FIXME: media.path should not have any .. for security + response = HttpResponse(mimetype=media.mime) if os.path.exists("%s/thumbnail/%s" % (folder, media.path)): - image = Image.open("%s/thumbnail/%s" % (folder, media.path)) + if NEW_PIL or media_ext != "png": + image = Image.open("%s/thumbnail/%s" % (folder, media.path)) + image.save(response, media_ext) + else: + # FIXME: older PIL 1.1.6 cannot read interlaced PNG files + reader = png.Reader(filename="%s/thumbnail/%s" % (folder, media.path)) + x, y, pixels, meta = reader.asDirect() + image = png.Image(pixels, meta) + image.save(response) else: - image = Image.open("%s/%s" % (folder, media.path)) - image.thumbnail((300,300), Image.ANTIALIAS) try: os.makedirs("%s/thumbnail" % folder) except: pass - image.save("%s/thumbnail/%s" % (folder, media.path)) - response = HttpResponse(mimetype=media.mime) - image.save(response, media_ext.upper()) + if NEW_PIL or media_ext != "png": + image = Image.open("%s/%s" % (folder, media.path)) + image.thumbnail((300,300), Image.ANTIALIAS) + image.save("%s/thumbnail/%s" % (folder, media.path), media_ext) + image.save(response, media_ext) + else: + # FIXME: older PIL 1.1.6 cannot read interlaced PNG files + reader = png.Reader(filename="%s/%s" % (folder, media.path)) + x, y, pixels, meta = reader.asDirect() + meta["interlace"] = False + image = png.Image(pixels, meta) + image.save("/tmp/%s" % media.path) + # Now open in PIL to rescale + image = Image.open("/tmp/%s" % media.path) + image.thumbnail((300,300), Image.ANTIALIAS) + image.save("%s/thumbnail/%s" % (folder, media.path), media_ext) + image.save(response, media_ext.upper()) return response elif action == "add": media = Media(gramps_id=dji.get_next_id(Media, "M")) From e7032c45b6a3b3172de1975ddc264095313e7256 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 19 Jun 2012 14:15:39 +0000 Subject: [PATCH 14/68] 5794: Birthday list report has invalid code svn: r19879 --- src/plugins/textreport/BirthdayReport.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/textreport/BirthdayReport.py b/src/plugins/textreport/BirthdayReport.py index d9bed5957..5a0a01ace 100644 --- a/src/plugins/textreport/BirthdayReport.py +++ b/src/plugins/textreport/BirthdayReport.py @@ -255,7 +255,10 @@ class CalendarReport(Report): if father_handle: father = self.database.get_person_from_handle(father_handle) if father is not None: - father_lastname = father.get_primary_name().surname + primary_name = father.get_primary_name() + if primary_name: + father_lastname = primary_name.get_primary_surname() + short_name = self.get_name(person, father_lastname) alive = probably_alive(person, self.database, prob_alive_date) From 75f4cf2ee2dd630acfa752da9c5cb32a72173bc6 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 19 Jun 2012 15:39:05 +0000 Subject: [PATCH 15/68] Added set_borders which turns on all cell borders svn: r19880 --- src/gen/plug/docgen/tablestyle.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/gen/plug/docgen/tablestyle.py b/src/gen/plug/docgen/tablestyle.py index 5b23aa657..245bb0fcd 100644 --- a/src/gen/plug/docgen/tablestyle.py +++ b/src/gen/plug/docgen/tablestyle.py @@ -163,6 +163,17 @@ class TableCellStyle(object): "Return the cell padding in centimeters" self.padding = val + def set_borders(self, val): + """ + Defines if a border is used + + @param val: if True, a border is used, if False, it is not + """ + self.rborder = val + self.lborder = val + self.tborder = val + self.bborder = val + def set_right_border(self, val): """ Defines if a right border in used From 8f012c19b584ef012c78cf65df33ff13c2644299 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 19 Jun 2012 15:40:51 +0000 Subject: [PATCH 16/68] Added doc.use_table_headers to use th on first row; allow declaration style to be id-specific svn: r19881 --- src/plugins/docgen/HtmlDoc.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/plugins/docgen/HtmlDoc.py b/src/plugins/docgen/HtmlDoc.py index e940e1363..978f42f26 100644 --- a/src/plugins/docgen/HtmlDoc.py +++ b/src/plugins/docgen/HtmlDoc.py @@ -106,6 +106,7 @@ class HtmlDoc(BaseDoc, TextDoc): self.title = '' self.__title_written = -1 # -1 = not written, 0 = writing, 1 = written self.__link_attrs = {} # additional link attrs, eg {"style": "...", "class": "..."} + self.use_table_headers = False # th, td def set_css_filename(self, css_filename): """ @@ -159,7 +160,7 @@ class HtmlDoc(BaseDoc, TextDoc): ) self._backend.html_header += (meta, links) - def build_style_declaration(self): + def build_style_declaration(self, id="grampstextdoc"): """ Convert the styles of the report into inline css for the html doc """ @@ -179,11 +180,12 @@ class HtmlDoc(BaseDoc, TextDoc): left = 'thin solid #000000' if style.get_right_border(): right = 'thin solid #000000' - text.append('#grampstextdoc .%s {\n' + text.append('#%s .%s {\n' '\tpadding: %s %s %s %s;\n' '\tborder-top:%s; border-bottom:%s;\n' '\tborder-left:%s; border-right:%s;\n}' - % (sname, pad, pad, pad, pad, top, bottom, left, right)) + % (id, sname, pad, pad, pad, pad, top, bottom, + left, right)) for style_name in styles.get_paragraph_style_names(): @@ -220,7 +222,7 @@ class HtmlDoc(BaseDoc, TextDoc): # do not allow color, set in base css ! # so no : 'color: %s' % font_color # so no : 'font-family:%s;' % family - text.append('#grampstextdoc .%s {\n' + text.append('#%s .%s {\n' '\tfont-size: %dpt;\n' '\ttext-align: %s; text-indent: %scm;\n' '\tmargin-right: %scm; margin-left: %scm;\n' @@ -228,7 +230,7 @@ class HtmlDoc(BaseDoc, TextDoc): '\tborder-top:%s; border-bottom:%s;\n' '\tborder-left:%s; border-right:%s;\n' '\t%s%s\n}' - % (style_name, font_size, + % (id, style_name, font_size, align, text_indent, right_margin, left_margin, top_margin, bottom_margin, @@ -348,6 +350,7 @@ class HtmlDoc(BaseDoc, TextDoc): """ Overwrite base method """ + self.first_row = True styles = self.get_style_sheet() self._tbl = styles.get_table_style(style) self.htmllist += [Html('table', width=str(self._tbl.get_width())+'%', @@ -370,19 +373,24 @@ class HtmlDoc(BaseDoc, TextDoc): """ Overwrite base method """ + self.first_row = False self.__reduce_list() def start_cell(self, style_name, span=1): """ Overwrite base method """ + if self.use_table_headers and self.first_row: + tag = "th" + else: + tag = "td" self._empty = 1 if span > 1: - self.htmllist += (Html('td', colspan=str(span), + self.htmllist += (Html(tag, colspan=str(span), class_=style_name),) self._col += span else: - self.htmllist += (Html('td', colspan=str(span), + self.htmllist += (Html(tag, colspan=str(span), width=str(self._tbl.get_column_width( self._col))+ '%', class_=style_name),) From 846a46ee7f834171052f065dcca0a7a8617958d8 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Tue, 19 Jun 2012 15:42:32 +0000 Subject: [PATCH 17/68] Generate style for each table (too much style is currently included); set border styles in cells svn: r19882 --- src/webapp/utils.py | 84 ++++++++++++++++++++++++++++----------------- 1 file changed, 53 insertions(+), 31 deletions(-) diff --git a/src/webapp/utils.py b/src/webapp/utils.py index e8fd38db7..cc8940e4a 100644 --- a/src/webapp/utils.py +++ b/src/webapp/utils.py @@ -194,13 +194,14 @@ def nbsp(string): class Table(object): """ - >>> table = Table() + >>> table = Table("css_id") >>> table.columns("Col1", "Col2", "Col3") >>> table.row("1", "2", "3") >>> table.row("4", "5", "6") >>> table.get_html() """ - def __init__(self): + def __init__(self, id): + self.id = id # css id self.db = DbDjango() self.access = SimpleAccess(self.db) self.table = SimpleTable(self.access) @@ -209,10 +210,27 @@ class Table(object): self.doc = doc self.doc.set_link_attrs({"class": "browsecell"}) # None is paperstyle, which is ignored: - self.doc = Doc(HtmlDoc.HtmlDoc(make_basic_stylesheet(Table={"set_width":95}), None)) + self.doc = Doc(HtmlDoc.HtmlDoc( + make_basic_stylesheet( + Table={"set_width":95}, + TableHeaderCell={"set_bottom_border": True, + "set_right_border": True, + "set_padding": .1, + }, + TableDataCell={"set_bottom_border": True, + "set_right_border": True, + "set_padding": .1, + }, + ), + None)) self.doc.doc._backend = HtmlBackend() + self.doc.doc.use_table_headers = True # You can set elements id, class, etc: - self.doc.doc.htmllist += [Html('div', class_="content", id="Gallery", style="overflow: auto; height:150px; background-color: #f4f0ec;")] + self.doc.doc.htmllist += [ + Html('div', + class_="content", + id=self.id, + style="overflow: auto; height:150px; background-color: #f4f0ec;")] def columns(self, *args): self.table.columns(*args) @@ -232,8 +250,12 @@ class Table(object): def get_html(self): # The HTML writer escapes data: self.table.write(self.doc) # forces to htmllist + # FIXME: do once, or once per table? + self.doc.doc.build_style_declaration(self.id) # can pass id, for whole + # FIXME: don't want to repeat this, unless diff for each table: + retval = "" % self.doc.doc.style_declaration # We have a couple of HTML bits that we want to unescape: - return str(self.doc.doc.htmllist[0]).replace("&nbsp;", " ") + return retval + str(self.doc.doc.htmllist[0]).replace("&nbsp;", " ") def build_args(**kwargs): retval = "" @@ -273,7 +295,7 @@ def make_button(text, url, *args): def event_table(obj, user, action, url, args): retval = "" - table = Table() + table = Table("event_table") table.columns( _("Description"), _("Type"), @@ -305,7 +327,7 @@ def event_table(obj, user, action, url, args): def name_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("name_table") table.columns(_("Name"), _("Type"), _("Group As"), @@ -345,7 +367,7 @@ def surname_table(obj, user, action, url=None, *args): person_handle = args[0] order = args[1] retval = "" - table = Table() + table = Table("surname_table") table.columns(_("Order"), _("Surname"),) if user.is_authenticated(): try: @@ -366,7 +388,7 @@ def surname_table(obj, user, action, url=None, *args): def source_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("source_table") table.columns(_("ID"), _("Title"), _("Author"), @@ -394,7 +416,7 @@ def source_table(obj, user, action, url=None, *args): def citation_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("citation_table") table.columns(_("ID"), _("Confidence"), _("Page")) @@ -420,7 +442,7 @@ def citation_table(obj, user, action, url=None, *args): def repository_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("repository_table") table.columns( _("ID"), _("Type"), @@ -437,7 +459,7 @@ def repository_table(obj, user, action, url=None, *args): def note_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("note_table") table.columns( _("ID"), _("Type"), @@ -462,7 +484,7 @@ def note_table(obj, user, action, url=None, *args): def data_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("data_table") table.columns(_("Type"), _("Value"), ) @@ -477,7 +499,7 @@ def data_table(obj, user, action, url=None, *args): def attribute_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("attribute_table") table.columns(_("Type"), _("Value"), ) @@ -497,7 +519,7 @@ def attribute_table(obj, user, action, url=None, *args): def address_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("address_table") table.columns(_("Date"), _("Address"), _("City"), @@ -521,7 +543,7 @@ def address_table(obj, user, action, url=None, *args): def location_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("location_table") table.columns(_("Date"), _("Address"), _("City"), @@ -538,7 +560,7 @@ def location_table(obj, user, action, url=None, *args): def media_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("media_table") table.columns(_("Description"), _("Type"), ) @@ -562,7 +584,7 @@ def media_table(obj, user, action, url=None, *args): def internet_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("internet_table") table.columns(_("Type"), _("Path"), _("Description")) @@ -581,7 +603,7 @@ def internet_table(obj, user, action, url=None, *args): def association_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("association_table") table.columns(_("Name"), _("ID"), _("Association")) @@ -600,7 +622,7 @@ def association_table(obj, user, action, url=None, *args): def lds_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("lds_table") table.columns(_("Type"), _("Date"), _("Status"), @@ -624,7 +646,7 @@ def lds_table(obj, user, action, url=None, *args): def reference_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("reference_table") table.columns( _("Type"), _("Reference"), @@ -637,7 +659,7 @@ def reference_table(obj, user, action, url=None, *args): def person_reference_table(obj, user, action): retval = "" - table = Table() + table = Table("person_reference_table") table.columns( _("Type"), _("Reference"), @@ -659,7 +681,7 @@ def person_reference_table(obj, user, action): def note_reference_table(obj, user, action): retval = "" - table = Table() + table = Table("note_reference_table") table.columns( _("Type"), _("Reference"), @@ -678,7 +700,7 @@ def note_reference_table(obj, user, action): def event_reference_table(obj, user, action): retval = "" - table = Table() + table = Table("event_reference_table") table.columns( _("Type"), _("Reference"), @@ -697,7 +719,7 @@ def event_reference_table(obj, user, action): def repository_reference_table(obj, user, action): retval = "" - table = Table() + table = Table("repository_reference_table") table.columns( _("Type"), _("Reference"), @@ -716,7 +738,7 @@ def repository_reference_table(obj, user, action): def citation_reference_table(obj, user, action): retval = "" - table = Table() + table = Table("citation_reference_table") table.columns( _("Type"), _("Reference"), @@ -735,7 +757,7 @@ def citation_reference_table(obj, user, action): def source_reference_table(obj, user, action): retval = "" - table = Table() + table = Table("source_reference_table") table.columns( _("Type"), _("Reference"), @@ -749,7 +771,7 @@ def source_reference_table(obj, user, action): def media_reference_table(obj, user, action): retval = "" - table = Table() + table = Table("media_reference_table") table.columns( _("Type"), _("Reference"), @@ -768,7 +790,7 @@ def media_reference_table(obj, user, action): def place_reference_table(obj, user, action): retval = "" - table = Table() + table = Table("place_reference_table") table.columns( _("Type"), _("Reference"), @@ -781,7 +803,7 @@ def place_reference_table(obj, user, action): def tag_reference_table(obj, user, action): retval = "" - table = Table() + table = Table("tag_reference_table") table.columns( _("Type"), _("Reference"), @@ -800,7 +822,7 @@ def tag_reference_table(obj, user, action): def children_table(obj, user, action, url=None, *args): retval = "" - table = Table() + table = Table("children_table") table.columns( _("#"), _("ID"), From 32fbd754fb168f59f1fd54ad81dd2afe4061c61a Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Tue, 19 Jun 2012 22:21:36 +0000 Subject: [PATCH 18/68] update for feature 5854. Added a new Notes style so the user can modify this separately svn: r19884 --- src/plugins/drawreport/AncestorTree.py | 28 +++++++++++++++++++++++++- src/plugins/drawreport/DescendTree.py | 28 +++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/src/plugins/drawreport/AncestorTree.py b/src/plugins/drawreport/AncestorTree.py index 83a5f8993..40a6ac685 100644 --- a/src/plugins/drawreport/AncestorTree.py +++ b/src/plugins/drawreport/AncestorTree.py @@ -731,7 +731,7 @@ class AncestorTree(Report): #Note? if self.connect.get_val("inc_note"): - note_box = NoteBox(self.doc, "AC2-fam-box", + note_box = NoteBox(self.doc, "AC2-note-box", self.connect.get_val("note_place")) subst = SubstKeywords(self.database, None, None) note_box.text = subst.replace_and_clean( @@ -828,12 +828,24 @@ class AncestorTree(Report): graph_style.set_line_width(graph_style.get_line_width() * scale) style_sheet.add_draw_style("AC2-fam-box", graph_style) + graph_style = style_sheet.get_draw_style("AC2-note-box") + #graph_style.set_shadow(graph_style.get_shadow(), + # self.doc.report_opts.box_shadow * scale) + graph_style.set_line_width(graph_style.get_line_width() * scale) + style_sheet.add_draw_style("AC2-note-box", graph_style) + para_style = style_sheet.get_paragraph_style("AC2-Normal") font = para_style.get_font() font.set_size(font.get_size() * scale) para_style.set_font(font) style_sheet.add_paragraph_style("AC2-Normal", para_style) + para_style = style_sheet.get_paragraph_style("AC2-Note") + font = para_style.get_font() + font.set_size(font.get_size() * scale) + para_style.set_font(font) + style_sheet.add_paragraph_style("AC2-Note", para_style) + para_style = style_sheet.get_paragraph_style("AC2-Title") font = para_style.get_font() font.set_size(font.get_size() * scale) @@ -1085,6 +1097,15 @@ class AncestorTreeOptions(MenuReportOptions): default_style.add_paragraph_style("AC2-Normal", para_style) box_shadow = PT2CM(font.get_size()) * .6 + font = FontStyle() + font.set_size(9) + font.set_type_face(FONT_SANS_SERIF) + para_style = ParagraphStyle() + para_style.set_font(font) + para_style.set_description(_('The basic style used for the ' + 'note display.')) + default_style.add_paragraph_style("AC2-Note", para_style) + font = FontStyle() font.set_size(16) font.set_type_face(FONT_SANS_SERIF) @@ -1108,6 +1129,11 @@ class AncestorTreeOptions(MenuReportOptions): graph_style.set_fill_color((255, 255, 255)) default_style.add_draw_style("AC2-fam-box", graph_style) + graph_style = GraphicsStyle() + graph_style.set_paragraph_style("AC2-Note") + graph_style.set_fill_color((255, 255, 255)) + default_style.add_draw_style("AC2-note-box", graph_style) + graph_style = GraphicsStyle() graph_style.set_paragraph_style("AC2-Title") graph_style.set_color((0, 0, 0)) diff --git a/src/plugins/drawreport/DescendTree.py b/src/plugins/drawreport/DescendTree.py index 64beb6fdb..b8e0e34e4 100644 --- a/src/plugins/drawreport/DescendTree.py +++ b/src/plugins/drawreport/DescendTree.py @@ -1305,7 +1305,7 @@ class DescendTree(Report): #note? if self.Connect.get_val("inc_note"): - note_box = NoteBox(self.doc, "CG2-fam-box", + note_box = NoteBox(self.doc, "CG2-note-box", self.Connect.get_val("note_place")) subst = SubstKeywords(self.database, None, None) note_box.text = subst.replace_and_clean( @@ -1403,6 +1403,11 @@ class DescendTree(Report): graph_style.set_line_width(graph_style.get_line_width() * amount) style_sheet.add_draw_style("CG2b-box", graph_style) + graph_style = style_sheet.get_draw_style("CG2-note-box") + graph_style.set_shadow(graph_style.get_shadow(), 0) + graph_style.set_line_width(graph_style.get_line_width() * amount) + style_sheet.add_draw_style("CG2-note-box", graph_style) + para_style = style_sheet.get_paragraph_style("CG2-Title") font = para_style.get_font() font.set_size(font.get_size() * amount) @@ -1422,6 +1427,12 @@ class DescendTree(Report): para_style.set_font(font) style_sheet.add_paragraph_style("CG2-Bold", para_style) + para_style = style_sheet.get_paragraph_style("CG2-Note") + font = para_style.get_font() + font.set_size(font.get_size() * amount) + para_style.set_font(font) + style_sheet.add_paragraph_style("CG2-Note", para_style) + self.doc.set_style_sheet(style_sheet) @@ -1698,6 +1709,16 @@ class DescendTreeOptions(MenuReportOptions): ) default_style.add_paragraph_style("CG2-Bold", para_style) + font = FontStyle() + font.set_size(9) + font.set_type_face(FONT_SANS_SERIF) + para_style = ParagraphStyle() + para_style.set_font(font) + para_style.set_description( + _('The basic style used for the note display.') + ) + default_style.add_paragraph_style("CG2-Note", para_style) + graph_style = GraphicsStyle() graph_style.set_paragraph_style("CG2-Title") graph_style.set_color((0, 0, 0)) @@ -1723,6 +1744,11 @@ class DescendTreeOptions(MenuReportOptions): graph_style.set_fill_color((255, 255, 255)) default_style.add_draw_style("CG2b-box", graph_style) + graph_style = GraphicsStyle() + graph_style.set_paragraph_style("CG2-Note") + graph_style.set_fill_color((255, 255, 255)) + default_style.add_draw_style("CG2-note-box", graph_style) + graph_style = GraphicsStyle() default_style.add_draw_style("CG2-line", graph_style) From 4b0962fcc90af6503e87e3c6e67cd62344fb5453 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 20 Jun 2012 02:34:15 +0000 Subject: [PATCH 19/68] Show Log history for every object svn: r19886 --- src/data/templates/view_citation_detail.html | 15 ++++++++++- src/data/templates/view_event_detail.html | 4 +++ src/data/templates/view_family_detail.html | 4 +++ src/data/templates/view_media_detail.html | 4 +++ src/data/templates/view_note_detail.html | 4 +++ src/data/templates/view_person_detail.html | 4 +++ src/data/templates/view_place_detail.html | 4 +++ .../templates/view_repository_detail.html | 4 +++ src/data/templates/view_source_detail.html | 4 +++ src/webapp/utils.py | 26 +++++++++++++++++++ 10 files changed, 72 insertions(+), 1 deletion(-) diff --git a/src/data/templates/view_citation_detail.html b/src/data/templates/view_citation_detail.html index 65440e25b..8dccf11a6 100644 --- a/src/data/templates/view_citation_detail.html +++ b/src/data/templates/view_citation_detail.html @@ -10,6 +10,11 @@ document.location.hash = ui.panel.id; } }); + $('#shared-tabs').tabs({ + 'select': function(event, ui){ + document.location.hash = ui.panel.id; + } + }); }); @@ -36,6 +41,7 @@
  • Media
  • Data
  • References
  • +
  • History
  • @@ -73,6 +79,9 @@
    {% citation_reference_table citation user action %}
    +
    + {% history_table citation user action %} +

    Note: Any changes in the shared citation information will be reflected @@ -82,13 +91,14 @@


    Shared source information

    -
    +
    @@ -130,6 +140,9 @@
    {% citation_reference_table source user action %}
    +
    + {% history_table source user action %} +

    Note: Any changes in the shared source information will be reflected diff --git a/src/data/templates/view_event_detail.html b/src/data/templates/view_event_detail.html index 7b83f1ff9..f7028de77 100644 --- a/src/data/templates/view_event_detail.html +++ b/src/data/templates/view_event_detail.html @@ -57,6 +57,7 @@

  • Media
  • Attributes
  • References
  • +
  • History
  • {% citation_table event user action "/citation/$act/event/%s" event.handle %} @@ -73,6 +74,9 @@
    {% event_reference_table event user action %}
    +
    + {% history_table event user action %} +
    {% if user.is_superuser %} diff --git a/src/data/templates/view_family_detail.html b/src/data/templates/view_family_detail.html index 838c3c910..400523f79 100644 --- a/src/data/templates/view_family_detail.html +++ b/src/data/templates/view_family_detail.html @@ -103,6 +103,7 @@
  • Notes
  • Media
  • LDS
  • +
  • History
  • @@ -126,6 +127,9 @@
    {% lds_table family user action "/lds/add/family/%s" family.handle %}
    +
    + {% history_table family user action %} +
    {% if user.is_superuser %} diff --git a/src/data/templates/view_media_detail.html b/src/data/templates/view_media_detail.html index 2e7eadfc1..4bc318222 100644 --- a/src/data/templates/view_media_detail.html +++ b/src/data/templates/view_media_detail.html @@ -61,6 +61,7 @@
  • Attributes
  • Notes
  • References
  • +
  • History
  • {% citation_table media user action "/citation/$act/media/%s" media.handle %} @@ -74,6 +75,9 @@
    {% media_reference_table media user action %}
    +
    + {% history_table media user action %} +
    {% if user.is_superuser %} diff --git a/src/data/templates/view_note_detail.html b/src/data/templates/view_note_detail.html index 254e4367a..171bfc334 100644 --- a/src/data/templates/view_note_detail.html +++ b/src/data/templates/view_note_detail.html @@ -75,10 +75,14 @@
    {% note_reference_table note user action %}
    +
    + {% history_table note user action %} +
    diff --git a/src/data/templates/view_person_detail.html b/src/data/templates/view_person_detail.html index aa70376f4..ab4eb11ca 100644 --- a/src/data/templates/view_person_detail.html +++ b/src/data/templates/view_person_detail.html @@ -94,6 +94,7 @@
  • Associations
  • LDS
  • References
  • +
  • History
  • @@ -130,6 +131,9 @@
    {% person_reference_table person user action %}
    +
    + {% history_table person user action %} +
    {% if logform %} diff --git a/src/data/templates/view_place_detail.html b/src/data/templates/view_place_detail.html index 00d0113ff..bfdae9abf 100644 --- a/src/data/templates/view_place_detail.html +++ b/src/data/templates/view_place_detail.html @@ -57,6 +57,7 @@
  • Media
  • Internet
  • References
  • +
  • History
  • @@ -79,6 +80,9 @@
    {% place_reference_table place user action %}
    +
    + {% history_table place user action %} +
    diff --git a/src/data/templates/view_repository_detail.html b/src/data/templates/view_repository_detail.html index 24801125c..75df7da3d 100644 --- a/src/data/templates/view_repository_detail.html +++ b/src/data/templates/view_repository_detail.html @@ -52,6 +52,7 @@
  • Internet
  • Notes
  • References
  • +
  • History
  • {% address_table repository user action "/address/add/repository/%s" repository.handle %} @@ -65,6 +66,9 @@
    {% repository_reference_table repository user action %}
    +
    + {% history_table repository user action %} +
    {% if user.is_superuser %} diff --git a/src/data/templates/view_source_detail.html b/src/data/templates/view_source_detail.html index e278de513..6e16ea33c 100644 --- a/src/data/templates/view_source_detail.html +++ b/src/data/templates/view_source_detail.html @@ -58,6 +58,7 @@
  • Data
  • Repositories
  • References
  • +
  • History
  • {% note_table source user action "/note/$act/source/%s" source.handle %} @@ -74,6 +75,9 @@
    {% source_reference_table source user action %}
    +
    + {% history_table source user action %} +
    {% if user.is_superuser %} diff --git a/src/webapp/utils.py b/src/webapp/utils.py index cc8940e4a..c2cbda0ca 100644 --- a/src/webapp/utils.py +++ b/src/webapp/utils.py @@ -80,6 +80,7 @@ util_tags = [ 'render_name', "get_person_from_handle", "event_table", + "history_table", "name_table", "surname_table", "citation_table", @@ -325,6 +326,31 @@ def event_table(obj, user, action, url, args): retval += nbsp("") # to keep tabs same height return retval +def history_table(obj, user, action): + retval = "" + table = Table("history_table") + table.columns( + _("Action"), + _("Comment"), + ) + if user.is_authenticated(): + obj_type = ContentType.objects.get_for_model(obj) + for entry in models.Log.objects.filter( + object_id=obj.id, + object_type=obj_type): + table.row( + "%s on %s by %s" % (entry.log_type, + entry.last_changed, + entry.last_changed_by), + entry.reason) + table.row( + "Latest on %s by %s" % (obj.last_changed, + obj.last_changed_by), + "Current status") + retval += table.get_html() + retval += nbsp("") # to keep tabs same height + return retval + def name_table(obj, user, action, url=None, *args): retval = "" table = Table("name_table") From 7fe31877f0063c999404207746b65c92e7a61656 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 20 Jun 2012 11:13:11 +0000 Subject: [PATCH 20/68] Need jHTMLArea for notes; border was on too many things; made width a bit wider svn: r19887 --- src/data/templates/gramps-base.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/templates/gramps-base.html b/src/data/templates/gramps-base.html index bbb247687..eee2d2520 100644 --- a/src/data/templates/gramps-base.html +++ b/src/data/templates/gramps-base.html @@ -15,7 +15,8 @@ - + + {% endblock %} @@ -27,7 +28,6 @@ background: none; } .content { - border: 1px solid; padding: 0px 0px 10px; } .browsecell { @@ -69,7 +69,7 @@ border: 1px solid #7D5925; color: #7D5925; float: left; - width: 97%; + width: 98%; } .ui-widget-content a { color: #7D5925; From 1194f5afcdc57fa86d18bff31ef4fea982653ad0 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 20 Jun 2012 12:14:01 +0000 Subject: [PATCH 21/68] Support sorting on handles for get_*_handles() methods svn: r19888 --- src/webapp/dbdjango.py | 66 ++++++++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/src/webapp/dbdjango.py b/src/webapp/dbdjango.py index 227c38c7f..c7cd1e37c 100644 --- a/src/webapp/dbdjango.py +++ b/src/webapp/dbdjango.py @@ -492,35 +492,59 @@ class DbDjango(DbWriteBase, DbReadBase): obj = gen.lib.Researcher() return obj - def get_person_handles(self): - return [item.handle for item in self.dji.Person.all()] + def get_person_handles(self, sort_handles=False): + if sort_handles: + return [item.handle for item in self.dji.Person.all().order_by("handle")] + else: + return [item.handle for item in self.dji.Person.all()] - def get_family_handles(self): - return [item.handle for item in self.dji.Family.all()] + def get_family_handles(self, sort_handles=False): + if sort_handles: + return [item.handle for item in self.dji.Family.all().order_by("handle")] + else: + return [item.handle for item in self.dji.Family.all()] - def get_event_handles(self): - return [item.handle for item in self.dji.Event.all()] + def get_event_handles(self, sort_handles=False): + if sort_handles: + return [item.handle for item in self.dji.Event.all().order_by("handle")] + else: + return [item.handle for item in self.dji.Event.all()] - def get_citation_handles(self): - return [item.handle for item in self.dji.Citation.all()] + def get_citation_handles(self, sort_handles=False): + if sort_handles: + return [item.handle for item in self.dji.Citation.all().order_by("handle")] + else: + return [item.handle for item in self.dji.Citation.all()] - def get_source_handles(self): - return [item.handle for item in self.dji.Source.all()] + def get_source_handles(self, sort_handles=False): + if sort_handles: + return [item.handle for item in self.dji.Source.all().order_by("handle")] + else: + return [item.handle for item in self.dji.Source.all()] - def get_place_handles(self): - return [item.handle for item in self.dji.Place.all()] + def get_place_handles(self, sort_handles=False): + if sort_handles: + return [item.handle for item in self.dji.Place.all().order_by("handle")] + else: + return [item.handle for item in self.dji.Place.all()] - def get_repository_handles(self): - return [item.handle for item in self.dji.Repository.all()] + def get_repository_handles(self, sort_handles=False): + if sort_handles: + return [item.handle for item in self.dji.Repository.all().order_by("handle")] + else: + return [item.handle for item in self.dji.Repository.all()] - def get_media_object_handles(self): - return [item.handle for item in self.dji.Media.all()] + def get_media_object_handles(self, sort_handles=False): + if sort_handles: + return [item.handle for item in self.dji.Media.all().order_by("handle")] + else: + return [item.handle for item in self.dji.Media.all()] - def get_note_handles(self): - return [item.handle for item in self.dji.Note.all()] - - def get_tag_handles(self, sort_handles=False): - return [] + def get_note_handles(self, sort_handles=False): + if sort_handles: + return [item.handle for item in self.dji.Note.all().order_by("handle")] + else: + return [item.handle for item in self.dji.Note.all()] def get_event_from_handle(self, handle): if handle in self.import_cache: From 6527b43defdeca9325fdfd2101fc30454ad9715f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Thu, 21 Jun 2012 09:17:44 +0000 Subject: [PATCH 22/68] 5794: Birthday list report has invalid code svn: r19889 --- src/plugins/textreport/BirthdayReport.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/textreport/BirthdayReport.py b/src/plugins/textreport/BirthdayReport.py index 5a0a01ace..7493d16fe 100644 --- a/src/plugins/textreport/BirthdayReport.py +++ b/src/plugins/textreport/BirthdayReport.py @@ -39,7 +39,7 @@ import datetime, time #------------------------------------------------------------------------ from gen.display.name import displayer as global_name_display from gen.errors import ReportError -from gen.lib import NameType, EventType, Name, Date, Person +from gen.lib import NameType, EventType, Name, Date, Person, Surname from gen.relationship import get_relationship_calculator from gen.plug.docgen import (FontStyle, ParagraphStyle, GraphicsStyle, FONT_SERIF, PARA_ALIGN_RIGHT, @@ -257,7 +257,7 @@ class CalendarReport(Report): if father is not None: primary_name = father.get_primary_name() if primary_name: - father_lastname = primary_name.get_primary_surname() + father_lastname = Surname.get_surname(primary_name.get_primary_surname()) short_name = self.get_name(person, father_lastname) From d1bef0513005d3354e9cc06ea5a9664f6cbfd9ea Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Thu, 21 Jun 2012 14:26:05 +0000 Subject: [PATCH 23/68] base fix for feature request 5483 svn: r19892 --- src/plugins/lib/libcairodoc.py | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/plugins/lib/libcairodoc.py b/src/plugins/lib/libcairodoc.py index db4aa8b6b..0191b64ed 100644 --- a/src/plugins/lib/libcairodoc.py +++ b/src/plugins/lib/libcairodoc.py @@ -1229,13 +1229,17 @@ class GtkDocText(GtkDocBaseElement): # line spacing is not defined in ParagraphStyle spacingfractionfont = 0.2 - def __init__(self, style, vertical_alignment, text, x, y, angle=0): + def __init__(self, style, vertical_alignment, text, x, y, + angle=0, mark=None): GtkDocBaseElement.__init__(self, style) self._align_y = vertical_alignment self._text = text self._x = x self._y = y self._angle = angle + self._marklist = [] + if mark: + self._marklist = [mark] def draw(self, cr, layout, width, dpi_x, dpi_y): text_x = self._x * dpi_x / 2.54 @@ -1297,6 +1301,12 @@ class GtkDocText(GtkDocBaseElement): return layout_height + def get_marks(self): + """ + Return the index mark for this text + """ + return self._marklist + #------------------------------------------------------------------------ # # CairoDoc class @@ -1557,7 +1567,7 @@ links (like ODF) and write PDF from that format. new_polygon = GtkDocPolygon(style, path) self._active_element.add_child(new_polygon) - def draw_box(self, style_name, text, x, y, w, h): + def draw_box(self, style_name, text, x, y, w, h, mark=None): # we handle the box and... style_sheet = self.get_style_sheet() style = style_sheet.get_draw_style(style_name) @@ -1580,10 +1590,10 @@ links (like ODF) and write PDF from that format. new_text = GtkDocText(paragraph_style, 'center', self.__markup(text), - x + x_offset , y + h / 2, angle=0) + x + x_offset , y + h / 2, angle=0, mark=mark) self._active_element.add_child(new_text) - def draw_text(self, style_name, text, x, y): + def draw_text(self, style_name, text, x, y, mark=None): style_sheet = self.get_style_sheet() style = style_sheet.get_draw_style(style_name) paragraph_style_name = style.get_paragraph_style() @@ -1591,10 +1601,10 @@ links (like ODF) and write PDF from that format. paragraph_style.set_alignment(PARA_ALIGN_LEFT) new_text = GtkDocText(paragraph_style, 'top', - self.__markup(text), x, y, angle=0) + self.__markup(text), x, y, angle=0, mark=mark) self._active_element.add_child(new_text) - def center_text(self, style_name, text, x, y): + def center_text(self, style_name, text, x, y, mark=None): style_sheet = self.get_style_sheet() style = style_sheet.get_draw_style(style_name) paragraph_style_name = style.get_paragraph_style() @@ -1602,10 +1612,10 @@ links (like ODF) and write PDF from that format. paragraph_style.set_alignment(PARA_ALIGN_CENTER) new_text = GtkDocText(paragraph_style, 'top', - self.__markup(text), x, y, angle=0) + self.__markup(text), x, y, angle=0, mark=mark) self._active_element.add_child(new_text) - def rotate_text(self, style_name, text, x, y, angle): + def rotate_text(self, style_name, text, x, y, angle, mark=None): style_sheet = self.get_style_sheet() style = style_sheet.get_draw_style(style_name) paragraph_style_name = style.get_paragraph_style() @@ -1613,7 +1623,7 @@ links (like ODF) and write PDF from that format. paragraph_style.set_alignment(PARA_ALIGN_CENTER) new_text = GtkDocText(paragraph_style, 'center', - self.__markup([text]), x, y, angle) + self.__markup(text), x, y, angle, mark=mark) self._active_element.add_child(new_text) # paginating and drawing interface From e0193098a01a65d9dc6f45cb7ad2c6f880b2bf4e Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Thu, 21 Jun 2012 20:50:55 +0000 Subject: [PATCH 24/68] revert to 19873 svn: r19894 --- src/plugins/lib/libcairodoc.py | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/src/plugins/lib/libcairodoc.py b/src/plugins/lib/libcairodoc.py index 0191b64ed..7638e5c61 100644 --- a/src/plugins/lib/libcairodoc.py +++ b/src/plugins/lib/libcairodoc.py @@ -1229,17 +1229,13 @@ class GtkDocText(GtkDocBaseElement): # line spacing is not defined in ParagraphStyle spacingfractionfont = 0.2 - def __init__(self, style, vertical_alignment, text, x, y, - angle=0, mark=None): + def __init__(self, style, vertical_alignment, text, x, y, angle=0): GtkDocBaseElement.__init__(self, style) self._align_y = vertical_alignment self._text = text self._x = x self._y = y self._angle = angle - self._marklist = [] - if mark: - self._marklist = [mark] def draw(self, cr, layout, width, dpi_x, dpi_y): text_x = self._x * dpi_x / 2.54 @@ -1301,12 +1297,6 @@ class GtkDocText(GtkDocBaseElement): return layout_height - def get_marks(self): - """ - Return the index mark for this text - """ - return self._marklist - #------------------------------------------------------------------------ # # CairoDoc class @@ -1567,7 +1557,7 @@ links (like ODF) and write PDF from that format. new_polygon = GtkDocPolygon(style, path) self._active_element.add_child(new_polygon) - def draw_box(self, style_name, text, x, y, w, h, mark=None): + def draw_box(self, style_name, text, x, y, w, h): # we handle the box and... style_sheet = self.get_style_sheet() style = style_sheet.get_draw_style(style_name) @@ -1590,10 +1580,10 @@ links (like ODF) and write PDF from that format. new_text = GtkDocText(paragraph_style, 'center', self.__markup(text), - x + x_offset , y + h / 2, angle=0, mark=mark) + x + x_offset , y + h / 2, angle=0) self._active_element.add_child(new_text) - def draw_text(self, style_name, text, x, y, mark=None): + def draw_text(self, style_name, text, x, y): style_sheet = self.get_style_sheet() style = style_sheet.get_draw_style(style_name) paragraph_style_name = style.get_paragraph_style() @@ -1601,10 +1591,10 @@ links (like ODF) and write PDF from that format. paragraph_style.set_alignment(PARA_ALIGN_LEFT) new_text = GtkDocText(paragraph_style, 'top', - self.__markup(text), x, y, angle=0, mark=mark) + self.__markup(text), x, y, angle=0) self._active_element.add_child(new_text) - def center_text(self, style_name, text, x, y, mark=None): + def center_text(self, style_name, text, x, y): style_sheet = self.get_style_sheet() style = style_sheet.get_draw_style(style_name) paragraph_style_name = style.get_paragraph_style() @@ -1612,10 +1602,10 @@ links (like ODF) and write PDF from that format. paragraph_style.set_alignment(PARA_ALIGN_CENTER) new_text = GtkDocText(paragraph_style, 'top', - self.__markup(text), x, y, angle=0, mark=mark) + self.__markup(text), x, y, angle=0) self._active_element.add_child(new_text) - def rotate_text(self, style_name, text, x, y, angle, mark=None): + def rotate_text(self, style_name, text, x, y, angle): style_sheet = self.get_style_sheet() style = style_sheet.get_draw_style(style_name) paragraph_style_name = style.get_paragraph_style() @@ -1623,7 +1613,7 @@ links (like ODF) and write PDF from that format. paragraph_style.set_alignment(PARA_ALIGN_CENTER) new_text = GtkDocText(paragraph_style, 'center', - self.__markup(text), x, y, angle, mark=mark) + self.__markup([text]), x, y, angle) self._active_element.add_child(new_text) # paginating and drawing interface @@ -1696,3 +1686,4 @@ links (like ODF) and write PDF from that format. self._pages[page_nr].draw(cr, layout, width, dpi_x, dpi_y) + From d3c412512b17c7f7be4165c78bd50ec09600904c Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Thu, 21 Jun 2012 20:52:19 +0000 Subject: [PATCH 25/68] fix for 5851 (part 4) svn: r19895 --- src/plugins/lib/libcairodoc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/lib/libcairodoc.py b/src/plugins/lib/libcairodoc.py index 7638e5c61..ba94b4005 100644 --- a/src/plugins/lib/libcairodoc.py +++ b/src/plugins/lib/libcairodoc.py @@ -1439,7 +1439,8 @@ class CairoDoc(BaseDoc, TextDoc, DrawDoc): # calls. This way we save the markup created by the report # The markup in the note editor is not in the text so is not # considered. It must be added by pango too - return self._backend.ESCAPE_FUNC()(text) + text = self._backend.ESCAPE_FUNC()(text) + return text def __write_text(self, text, mark=None, markup=False, links=False): """ From 3a82d5883842146298c141bdb2fdd662f6460db5 Mon Sep 17 00:00:00 2001 From: "Craig J. Anderson" Date: Thu, 21 Jun 2012 21:01:38 +0000 Subject: [PATCH 26/68] fixed a reacurring error that was in 19873 svn: r19896 --- src/plugins/lib/libcairodoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/lib/libcairodoc.py b/src/plugins/lib/libcairodoc.py index ba94b4005..8b121451e 100644 --- a/src/plugins/lib/libcairodoc.py +++ b/src/plugins/lib/libcairodoc.py @@ -1614,7 +1614,7 @@ links (like ODF) and write PDF from that format. paragraph_style.set_alignment(PARA_ALIGN_CENTER) new_text = GtkDocText(paragraph_style, 'center', - self.__markup([text]), x, y, angle) + self.__markup(text), x, y, angle) self._active_element.add_child(new_text) # paginating and drawing interface From 4f1cfd2718c6db7658fbc9ef86b54cb8fcb2ce85 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Fri, 22 Jun 2012 23:59:45 +0000 Subject: [PATCH 27/68] GEPS008: Convert plugin filenames to lowercase svn: r19898 --- src/plugins/bookreport.gpr.py | 2 +- src/plugins/{BookReport.py => bookreport.py} | 0 .../docgen/{AsciiDoc.py => asciidoc.py} | 0 src/plugins/docgen/docgen.gpr.py | 18 +-- .../docgen/{GtkPrint.py => gtkprint.py} | 0 src/plugins/docgen/{HtmlDoc.py => htmldoc.py} | 0 .../docgen/{LaTeXDoc.py => latexdoc.py} | 0 src/plugins/docgen/{ODFDoc.py => odfdoc.py} | 0 src/plugins/docgen/{PdfDoc.py => pdfdoc.py} | 0 .../docgen/{PSDrawDoc.py => psdrawdoc.py} | 0 src/plugins/docgen/{RTFDoc.py => rtfdoc.py} | 0 .../docgen/{SvgDrawDoc.py => svgdrawdoc.py} | 0 .../{AncestorTree.py => ancestortree.py} | 0 .../drawreport/{Calendar.py => calendar.py} | 0 .../{DescendTree.py => descendtree.py} | 0 src/plugins/drawreport/drawplugins.gpr.py | 20 +-- .../drawreport/{FanChart.py => fanchart.py} | 0 ...{StatisticsChart.py => statisticschart.py} | 0 .../drawreport/{TimeLine.py => timeline.py} | 0 src/plugins/export/export.gpr.py | 16 +- .../export/{ExportCsv.py => exportcsv.py} | 0 .../export/{ExportFtree.py => exportftree.py} | 0 .../{ExportGedcom.py => exportgedcom.py} | 0 .../{ExportGeneWeb.py => exportgeneweb.py} | 0 .../export/{ExportPkg.py => exportpkg.py} | 0 ...{ExportVCalendar.py => exportvcalendar.py} | 0 .../export/{ExportVCard.py => exportvcard.py} | 0 .../export/{ExportXml.py => exportxml.py} | 0 ...OnDateGramplet.py => ageondategramplet.py} | 0 .../gramplet/{AgeStats.py => agestats.py} | 0 .../gramplet/{Attributes.py => attributes.py} | 0 ...butesGramplet.py => attributesgramplet.py} | 0 .../gramplet/{Backlinks.py => backlinks.py} | 0 ...alendarGramplet.py => calendargramplet.py} | 0 .../gramplet/{Children.py => children.py} | 0 .../gramplet/{Citations.py => citations.py} | 0 ...{DescendGramplet.py => descendgramplet.py} | 0 ...ditExifMetadata.py => editexifmetadata.py} | 0 src/plugins/gramplet/{Events.py => events.py} | 0 ...anChartGramplet.py => fanchartgramplet.py} | 0 .../{FaqGramplet.py => faqgramplet.py} | 0 src/plugins/gramplet/{Filter.py => filter.py} | 0 .../gramplet/{Gallery.py => gallery.py} | 0 ...enNameGramplet.py => givennamegramplet.py} | 0 src/plugins/gramplet/gramplet.gpr.py | 142 +++++++++--------- .../{MediaPreview.py => mediapreview.py} | 0 .../{MetadataViewer.py => metadataviewer.py} | 0 src/plugins/gramplet/{Notes.py => notes.py} | 0 ...edigreeGramplet.py => pedigreegramplet.py} | 0 .../{PersonDetails.py => persondetails.py} | 0 ...{PersonResidence.py => personresidence.py} | 0 .../{PlaceDetails.py => placedetails.py} | 0 ...erGramplet.py => pluginmanagergramplet.py} | 0 ...ckViewGramplet.py => quickviewgramplet.py} | 0 ...elativeGramplet.py => relativegramplet.py} | 0 ...ositoryDetails.py => repositorydetails.py} | 0 ...onLogGramplet.py => sessionloggramplet.py} | 0 .../{StatsGramplet.py => statsgramplet.py} | 0 ...oudGramplet.py => surnamecloudgramplet.py} | 0 .../{ToDoGramplet.py => todogramplet.py} | 0 ...amesGramplet.py => topsurnamesgramplet.py} | 0 ...{WelcomeGramplet.py => welcomegramplet.py} | 0 .../gramplet/{WhatsNext.py => whatsnext.py} | 0 src/plugins/graph/graphplugins.gpr.py | 6 +- .../{GVFamilyLines.py => gvfamilylines.py} | 0 .../graph/{GVHourGlass.py => gvhourglass.py} | 0 .../graph/{GVRelGraph.py => gvrelgraph.py} | 0 src/plugins/import/import.gpr.py | 16 +- .../import/{ImportCsv.py => importcsv.py} | 0 .../{ImportGedcom.py => importgedcom.py} | 0 .../{ImportGeneWeb.py => importgeneweb.py} | 0 .../import/{ImportGpkg.py => importgpkg.py} | 0 .../import/{ImportGrdb.py => importgrdb.py} | 0 .../{ImportProGen.py => importprogen.py} | 0 .../import/{ImportVCard.py => importvcard.py} | 0 .../import/{ImportXml.py => importxml.py} | 0 .../quickview/{AgeOnDate.py => ageondate.py} | 0 .../{AttributeMatch.py => attributematch.py} | 0 .../{FilterByName.py => filterbyname.py} | 0 .../{LinkReferences.py => linkreferences.py} | 0 .../quickview/{OnThisDay.py => onthisday.py} | 0 src/plugins/quickview/quickview.gpr.py | 20 +-- .../{References.py => references.py} | 0 .../quickview/{Reporef.py => reporef.py} | 0 .../{SameSurnames.py => samesurnames.py} | 0 src/plugins/records.gpr.py | 4 +- src/plugins/{Records.py => records.py} | 0 ...habeticalIndex.py => alphabeticalindex.py} | 0 .../{AncestorReport.py => ancestorreport.py} | 0 .../{BirthdayReport.py => birthdayreport.py} | 0 .../{CustomBookText.py => custombooktext.py} | 0 .../{DescendReport.py => descendreport.py} | 0 ...cestralReport.py => detancestralreport.py} | 0 ...endantReport.py => detdescendantreport.py} | 0 ...{EndOfLineReport.py => endoflinereport.py} | 0 .../{FamilyGroup.py => familygroup.py} | 0 .../{IndivComplete.py => indivcomplete.py} | 0 .../{KinshipReport.py => kinshipreport.py} | 0 ...rsReport.py => numberofancestorsreport.py} | 0 .../{PlaceReport.py => placereport.py} | 0 ...{SimpleBookTitle.py => simplebooktitle.py} | 0 .../textreport/{Summary.py => summary.py} | 0 ...{TableOfContents.py => tableofcontents.py} | 0 .../textreport/{TagReport.py => tagreport.py} | 0 src/plugins/textreport/textplugins.gpr.py | 34 ++--- .../tool/{ChangeNames.py => changenames.py} | 0 .../tool/{ChangeTypes.py => changetypes.py} | 0 src/plugins/tool/{Check.py => check.py} | 0 ...isplayTest.py => dateparserdisplaytest.py} | 0 .../tool/{Desbrowser.py => desbrowser.py} | 0 ...{DumpGenderStats.py => dumpgenderstats.py} | 0 src/plugins/tool/{Eval.py => eval.py} | 0 src/plugins/tool/{EventCmp.py => eventcmp.py} | 0 .../tool/{EventNames.py => eventnames.py} | 0 .../tool/{ExtractCity.py => extractcity.py} | 0 .../tool/{FindDupes.py => finddupes.py} | 0 src/plugins/tool/{Leak.py => leak.py} | 0 .../tool/{MediaManager.py => mediamanager.py} | 0 .../{MergeCitations.py => mergecitations.py} | 0 .../tool/{NotRelated.py => notrelated.py} | 0 .../tool/{OwnerEditor.py => ownereditor.py} | 0 .../tool/{PatchNames.py => patchnames.py} | 0 ...iewConnector.py => phpgedviewconnector.py} | 0 ...{PopulateSources.py => populatesources.py} | 0 src/plugins/tool/{Rebuild.py => rebuild.py} | 0 .../{RebuildRefMap.py => rebuildrefmap.py} | 0 src/plugins/tool/{RelCalc.py => relcalc.py} | 0 .../tool/{RemoveUnused.py => removeunused.py} | 0 .../tool/{ReorderIds.py => reorderids.py} | 0 .../tool/{SortEvents.py => sortevents.py} | 0 src/plugins/tool/{SoundGen.py => soundgen.py} | 0 ...tcaseGenerator.py => testcasegenerator.py} | 0 src/plugins/tool/tools.gpr.py | 46 +++--- src/plugins/tool/toolsdebug.gpr.py | 8 +- src/plugins/tool/{Verify.py => verify.py} | 0 .../{NarrativeWeb.py => narrativeweb.py} | 0 .../webreport/{WebCal.py => webcal.py} | 0 src/plugins/webreport/webplugins.gpr.py | 4 +- 138 files changed, 168 insertions(+), 168 deletions(-) rename src/plugins/{BookReport.py => bookreport.py} (100%) rename src/plugins/docgen/{AsciiDoc.py => asciidoc.py} (100%) rename src/plugins/docgen/{GtkPrint.py => gtkprint.py} (100%) rename src/plugins/docgen/{HtmlDoc.py => htmldoc.py} (100%) rename src/plugins/docgen/{LaTeXDoc.py => latexdoc.py} (100%) rename src/plugins/docgen/{ODFDoc.py => odfdoc.py} (100%) rename src/plugins/docgen/{PdfDoc.py => pdfdoc.py} (100%) rename src/plugins/docgen/{PSDrawDoc.py => psdrawdoc.py} (100%) rename src/plugins/docgen/{RTFDoc.py => rtfdoc.py} (100%) rename src/plugins/docgen/{SvgDrawDoc.py => svgdrawdoc.py} (100%) rename src/plugins/drawreport/{AncestorTree.py => ancestortree.py} (100%) rename src/plugins/drawreport/{Calendar.py => calendar.py} (100%) rename src/plugins/drawreport/{DescendTree.py => descendtree.py} (100%) rename src/plugins/drawreport/{FanChart.py => fanchart.py} (100%) rename src/plugins/drawreport/{StatisticsChart.py => statisticschart.py} (100%) rename src/plugins/drawreport/{TimeLine.py => timeline.py} (100%) rename src/plugins/export/{ExportCsv.py => exportcsv.py} (100%) rename src/plugins/export/{ExportFtree.py => exportftree.py} (100%) rename src/plugins/export/{ExportGedcom.py => exportgedcom.py} (100%) rename src/plugins/export/{ExportGeneWeb.py => exportgeneweb.py} (100%) rename src/plugins/export/{ExportPkg.py => exportpkg.py} (100%) rename src/plugins/export/{ExportVCalendar.py => exportvcalendar.py} (100%) rename src/plugins/export/{ExportVCard.py => exportvcard.py} (100%) rename src/plugins/export/{ExportXml.py => exportxml.py} (100%) rename src/plugins/gramplet/{AgeOnDateGramplet.py => ageondategramplet.py} (100%) rename src/plugins/gramplet/{AgeStats.py => agestats.py} (100%) rename src/plugins/gramplet/{Attributes.py => attributes.py} (100%) rename src/plugins/gramplet/{AttributesGramplet.py => attributesgramplet.py} (100%) rename src/plugins/gramplet/{Backlinks.py => backlinks.py} (100%) rename src/plugins/gramplet/{CalendarGramplet.py => calendargramplet.py} (100%) rename src/plugins/gramplet/{Children.py => children.py} (100%) rename src/plugins/gramplet/{Citations.py => citations.py} (100%) rename src/plugins/gramplet/{DescendGramplet.py => descendgramplet.py} (100%) rename src/plugins/gramplet/{EditExifMetadata.py => editexifmetadata.py} (100%) rename src/plugins/gramplet/{Events.py => events.py} (100%) rename src/plugins/gramplet/{FanChartGramplet.py => fanchartgramplet.py} (100%) rename src/plugins/gramplet/{FaqGramplet.py => faqgramplet.py} (100%) rename src/plugins/gramplet/{Filter.py => filter.py} (100%) rename src/plugins/gramplet/{Gallery.py => gallery.py} (100%) rename src/plugins/gramplet/{GivenNameGramplet.py => givennamegramplet.py} (100%) rename src/plugins/gramplet/{MediaPreview.py => mediapreview.py} (100%) rename src/plugins/gramplet/{MetadataViewer.py => metadataviewer.py} (100%) rename src/plugins/gramplet/{Notes.py => notes.py} (100%) rename src/plugins/gramplet/{PedigreeGramplet.py => pedigreegramplet.py} (100%) rename src/plugins/gramplet/{PersonDetails.py => persondetails.py} (100%) rename src/plugins/gramplet/{PersonResidence.py => personresidence.py} (100%) rename src/plugins/gramplet/{PlaceDetails.py => placedetails.py} (100%) rename src/plugins/gramplet/{PluginManagerGramplet.py => pluginmanagergramplet.py} (100%) rename src/plugins/gramplet/{QuickViewGramplet.py => quickviewgramplet.py} (100%) rename src/plugins/gramplet/{RelativeGramplet.py => relativegramplet.py} (100%) rename src/plugins/gramplet/{RepositoryDetails.py => repositorydetails.py} (100%) rename src/plugins/gramplet/{SessionLogGramplet.py => sessionloggramplet.py} (100%) rename src/plugins/gramplet/{StatsGramplet.py => statsgramplet.py} (100%) rename src/plugins/gramplet/{SurnameCloudGramplet.py => surnamecloudgramplet.py} (100%) rename src/plugins/gramplet/{ToDoGramplet.py => todogramplet.py} (100%) rename src/plugins/gramplet/{TopSurnamesGramplet.py => topsurnamesgramplet.py} (100%) rename src/plugins/gramplet/{WelcomeGramplet.py => welcomegramplet.py} (100%) rename src/plugins/gramplet/{WhatsNext.py => whatsnext.py} (100%) rename src/plugins/graph/{GVFamilyLines.py => gvfamilylines.py} (100%) rename src/plugins/graph/{GVHourGlass.py => gvhourglass.py} (100%) rename src/plugins/graph/{GVRelGraph.py => gvrelgraph.py} (100%) rename src/plugins/import/{ImportCsv.py => importcsv.py} (100%) rename src/plugins/import/{ImportGedcom.py => importgedcom.py} (100%) rename src/plugins/import/{ImportGeneWeb.py => importgeneweb.py} (100%) rename src/plugins/import/{ImportGpkg.py => importgpkg.py} (100%) rename src/plugins/import/{ImportGrdb.py => importgrdb.py} (100%) rename src/plugins/import/{ImportProGen.py => importprogen.py} (100%) rename src/plugins/import/{ImportVCard.py => importvcard.py} (100%) rename src/plugins/import/{ImportXml.py => importxml.py} (100%) rename src/plugins/quickview/{AgeOnDate.py => ageondate.py} (100%) rename src/plugins/quickview/{AttributeMatch.py => attributematch.py} (100%) rename src/plugins/quickview/{FilterByName.py => filterbyname.py} (100%) rename src/plugins/quickview/{LinkReferences.py => linkreferences.py} (100%) rename src/plugins/quickview/{OnThisDay.py => onthisday.py} (100%) rename src/plugins/quickview/{References.py => references.py} (100%) rename src/plugins/quickview/{Reporef.py => reporef.py} (100%) rename src/plugins/quickview/{SameSurnames.py => samesurnames.py} (100%) rename src/plugins/{Records.py => records.py} (100%) rename src/plugins/textreport/{AlphabeticalIndex.py => alphabeticalindex.py} (100%) rename src/plugins/textreport/{AncestorReport.py => ancestorreport.py} (100%) rename src/plugins/textreport/{BirthdayReport.py => birthdayreport.py} (100%) rename src/plugins/textreport/{CustomBookText.py => custombooktext.py} (100%) rename src/plugins/textreport/{DescendReport.py => descendreport.py} (100%) rename src/plugins/textreport/{DetAncestralReport.py => detancestralreport.py} (100%) rename src/plugins/textreport/{DetDescendantReport.py => detdescendantreport.py} (100%) rename src/plugins/textreport/{EndOfLineReport.py => endoflinereport.py} (100%) rename src/plugins/textreport/{FamilyGroup.py => familygroup.py} (100%) rename src/plugins/textreport/{IndivComplete.py => indivcomplete.py} (100%) rename src/plugins/textreport/{KinshipReport.py => kinshipreport.py} (100%) rename src/plugins/textreport/{NumberOfAncestorsReport.py => numberofancestorsreport.py} (100%) rename src/plugins/textreport/{PlaceReport.py => placereport.py} (100%) rename src/plugins/textreport/{SimpleBookTitle.py => simplebooktitle.py} (100%) rename src/plugins/textreport/{Summary.py => summary.py} (100%) rename src/plugins/textreport/{TableOfContents.py => tableofcontents.py} (100%) rename src/plugins/textreport/{TagReport.py => tagreport.py} (100%) rename src/plugins/tool/{ChangeNames.py => changenames.py} (100%) rename src/plugins/tool/{ChangeTypes.py => changetypes.py} (100%) rename src/plugins/tool/{Check.py => check.py} (100%) rename src/plugins/tool/{DateParserDisplayTest.py => dateparserdisplaytest.py} (100%) rename src/plugins/tool/{Desbrowser.py => desbrowser.py} (100%) rename src/plugins/tool/{DumpGenderStats.py => dumpgenderstats.py} (100%) rename src/plugins/tool/{Eval.py => eval.py} (100%) rename src/plugins/tool/{EventCmp.py => eventcmp.py} (100%) rename src/plugins/tool/{EventNames.py => eventnames.py} (100%) rename src/plugins/tool/{ExtractCity.py => extractcity.py} (100%) rename src/plugins/tool/{FindDupes.py => finddupes.py} (100%) rename src/plugins/tool/{Leak.py => leak.py} (100%) rename src/plugins/tool/{MediaManager.py => mediamanager.py} (100%) rename src/plugins/tool/{MergeCitations.py => mergecitations.py} (100%) rename src/plugins/tool/{NotRelated.py => notrelated.py} (100%) rename src/plugins/tool/{OwnerEditor.py => ownereditor.py} (100%) rename src/plugins/tool/{PatchNames.py => patchnames.py} (100%) rename src/plugins/tool/{PHPGedViewConnector.py => phpgedviewconnector.py} (100%) rename src/plugins/tool/{PopulateSources.py => populatesources.py} (100%) rename src/plugins/tool/{Rebuild.py => rebuild.py} (100%) rename src/plugins/tool/{RebuildRefMap.py => rebuildrefmap.py} (100%) rename src/plugins/tool/{RelCalc.py => relcalc.py} (100%) rename src/plugins/tool/{RemoveUnused.py => removeunused.py} (100%) rename src/plugins/tool/{ReorderIds.py => reorderids.py} (100%) rename src/plugins/tool/{SortEvents.py => sortevents.py} (100%) rename src/plugins/tool/{SoundGen.py => soundgen.py} (100%) rename src/plugins/tool/{TestcaseGenerator.py => testcasegenerator.py} (100%) rename src/plugins/tool/{Verify.py => verify.py} (100%) rename src/plugins/webreport/{NarrativeWeb.py => narrativeweb.py} (100%) rename src/plugins/webreport/{WebCal.py => webcal.py} (100%) diff --git a/src/plugins/bookreport.gpr.py b/src/plugins/bookreport.gpr.py index e1791297b..4c7273562 100644 --- a/src/plugins/bookreport.gpr.py +++ b/src/plugins/bookreport.gpr.py @@ -33,7 +33,7 @@ description = _("Produces a book containing several reports."), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'BookReport.py', +fname = 'bookreport.py', authors = ["Alex Roitman"], authors_email = ["shura@gramps-project.org"], category = CATEGORY_BOOK, diff --git a/src/plugins/BookReport.py b/src/plugins/bookreport.py similarity index 100% rename from src/plugins/BookReport.py rename to src/plugins/bookreport.py diff --git a/src/plugins/docgen/AsciiDoc.py b/src/plugins/docgen/asciidoc.py similarity index 100% rename from src/plugins/docgen/AsciiDoc.py rename to src/plugins/docgen/asciidoc.py diff --git a/src/plugins/docgen/docgen.gpr.py b/src/plugins/docgen/docgen.gpr.py index bf751c3eb..cf86deb2f 100644 --- a/src/plugins/docgen/docgen.gpr.py +++ b/src/plugins/docgen/docgen.gpr.py @@ -33,7 +33,7 @@ plg.description = _("Generates documents in plain text format (.txt).") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'AsciiDoc.py' +plg.fname = 'asciidoc.py' plg.ptype = DOCGEN plg.basedocclass = 'AsciiDoc' plg.paper = True @@ -53,7 +53,7 @@ plg.description = _("Generates documents and prints them directly.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'GtkPrint.py' +plg.fname = 'gtkprint.py' plg.ptype = DOCGEN plg.basedocclass = 'GtkPrint' plg.paper = True @@ -73,7 +73,7 @@ plg.description = _("Generates documents in HTML format.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'HtmlDoc.py' +plg.fname = 'htmldoc.py' plg.ptype = DOCGEN plg.basedocclass = 'HtmlDoc' plg.paper = False @@ -93,7 +93,7 @@ plg.description = _("Generates documents in LaTeX format.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'LaTeXDoc.py' +plg.fname = 'latexdoc.py' plg.ptype = DOCGEN plg.basedocclass = 'LaTeXDoc' plg.paper = True @@ -114,7 +114,7 @@ plg.description = _("Generates documents in OpenDocument " plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ODFDoc.py' +plg.fname = 'odfdoc.py' plg.ptype = DOCGEN plg.basedocclass = 'ODFDoc' plg.paper = True @@ -134,7 +134,7 @@ plg.description = _("Generates documents in PDF format (.pdf).") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'PdfDoc.py' +plg.fname = 'pdfdoc.py' plg.ptype = DOCGEN plg.basedocclass = 'PdfDoc' plg.paper = True @@ -154,7 +154,7 @@ plg.description = _("Generates documents in PostScript format (.ps).") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'PSDrawDoc.py' +plg.fname = 'psdrawdoc.py' plg.ptype = DOCGEN plg.basedocclass = 'PSDrawDoc' plg.paper = True @@ -174,7 +174,7 @@ plg.description = _("Generates documents in Rich Text format (.rtf).") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'RTFDoc.py' +plg.fname = 'rtfdoc.py' plg.ptype = DOCGEN plg.basedocclass = 'RTFDoc' plg.paper = True @@ -195,7 +195,7 @@ plg.description = _("Generates documents in Scalable " plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'SvgDrawDoc.py' +plg.fname = 'svgdrawdoc.py' plg.ptype = DOCGEN plg.basedocclass = 'SvgDrawDoc' plg.paper = True diff --git a/src/plugins/docgen/GtkPrint.py b/src/plugins/docgen/gtkprint.py similarity index 100% rename from src/plugins/docgen/GtkPrint.py rename to src/plugins/docgen/gtkprint.py diff --git a/src/plugins/docgen/HtmlDoc.py b/src/plugins/docgen/htmldoc.py similarity index 100% rename from src/plugins/docgen/HtmlDoc.py rename to src/plugins/docgen/htmldoc.py diff --git a/src/plugins/docgen/LaTeXDoc.py b/src/plugins/docgen/latexdoc.py similarity index 100% rename from src/plugins/docgen/LaTeXDoc.py rename to src/plugins/docgen/latexdoc.py diff --git a/src/plugins/docgen/ODFDoc.py b/src/plugins/docgen/odfdoc.py similarity index 100% rename from src/plugins/docgen/ODFDoc.py rename to src/plugins/docgen/odfdoc.py diff --git a/src/plugins/docgen/PdfDoc.py b/src/plugins/docgen/pdfdoc.py similarity index 100% rename from src/plugins/docgen/PdfDoc.py rename to src/plugins/docgen/pdfdoc.py diff --git a/src/plugins/docgen/PSDrawDoc.py b/src/plugins/docgen/psdrawdoc.py similarity index 100% rename from src/plugins/docgen/PSDrawDoc.py rename to src/plugins/docgen/psdrawdoc.py diff --git a/src/plugins/docgen/RTFDoc.py b/src/plugins/docgen/rtfdoc.py similarity index 100% rename from src/plugins/docgen/RTFDoc.py rename to src/plugins/docgen/rtfdoc.py diff --git a/src/plugins/docgen/SvgDrawDoc.py b/src/plugins/docgen/svgdrawdoc.py similarity index 100% rename from src/plugins/docgen/SvgDrawDoc.py rename to src/plugins/docgen/svgdrawdoc.py diff --git a/src/plugins/drawreport/AncestorTree.py b/src/plugins/drawreport/ancestortree.py similarity index 100% rename from src/plugins/drawreport/AncestorTree.py rename to src/plugins/drawreport/ancestortree.py diff --git a/src/plugins/drawreport/Calendar.py b/src/plugins/drawreport/calendar.py similarity index 100% rename from src/plugins/drawreport/Calendar.py rename to src/plugins/drawreport/calendar.py diff --git a/src/plugins/drawreport/DescendTree.py b/src/plugins/drawreport/descendtree.py similarity index 100% rename from src/plugins/drawreport/DescendTree.py rename to src/plugins/drawreport/descendtree.py diff --git a/src/plugins/drawreport/drawplugins.gpr.py b/src/plugins/drawreport/drawplugins.gpr.py index ee4c21bfb..cc48ea94e 100644 --- a/src/plugins/drawreport/drawplugins.gpr.py +++ b/src/plugins/drawreport/drawplugins.gpr.py @@ -34,7 +34,7 @@ plg.description = _("Produces a graphical ancestral chart") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'AncestorTree.py' +plg.fname = 'ancestortree.py' plg.ptype = REPORT plg.authors = ["Craig J. Anderson"] plg.authors_email = ["ander882@hotmail.com"] @@ -50,7 +50,7 @@ plg.description = _("Produces a graphical ancestral tree") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'AncestorTree.py' +plg.fname = 'ancestortree.py' plg.ptype = REPORT plg.authors = ["Craig J. Anderson"] plg.authors_email = ["ander882@hotmail.com"] @@ -72,7 +72,7 @@ plg.description = _("Produces a graphical calendar") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'Calendar.py' +plg.fname = 'calendar.py' plg.ptype = REPORT plg.authors = ["Douglas S. Blank"] plg.authors_email = ["dblank@cs.brynmawr.edu"] @@ -94,7 +94,7 @@ plg.description = _("Produces a graphical descendant chart") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'DescendTree.py' +plg.fname = 'descendtree.py' plg.ptype = REPORT plg.authors = ["Craig J. Anderson"] plg.authors_email = ["ander882@hotmail.com"] @@ -110,7 +110,7 @@ plg.description = _("Produces a graphical descendant tree") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'DescendTree.py' +plg.fname = 'descendtree.py' plg.ptype = REPORT plg.authors = ["Craig J. Anderson"] plg.authors_email = ["ander882@hotmail.com"] @@ -131,7 +131,7 @@ plg.name = _("Family Descendant Chart") plg.description = _("Produces a graphical descendant chart around a family") plg.version = '1.0' plg.status = STABLE -plg.fname = 'DescendTree.py' +plg.fname = 'descendtree.py' plg.ptype = REPORT plg.category = CATEGORY_DRAW plg.gramps_target_version = '3.5' @@ -148,7 +148,7 @@ plg.name = _("Family Descendant Tree") plg.description = _("Produces a graphical descendant tree around a family") plg.version = '1.0' plg.status = STABLE -plg.fname = 'DescendTree.py' +plg.fname = 'descendtree.py' plg.ptype = REPORT plg.category = CATEGORY_DRAW plg.gramps_target_version = '3.5' @@ -172,7 +172,7 @@ plg.description = _("Produces fan charts") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'FanChart.py' +plg.fname = 'fanchart.py' plg.ptype = REPORT plg.authors = ["Donald N. Allingham"] plg.authors_email = ["don@gramps-project.org"] @@ -195,7 +195,7 @@ plg.description = _("Produces statistical bar and pie charts of the people " plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'StatisticsChart.py' +plg.fname = 'statisticschart.py' plg.ptype = REPORT plg.authors = ["Eero Tamminen"] plg.authors_email = [""] @@ -218,7 +218,7 @@ plg.description = _("Produces a timeline chart.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'TimeLine.py' +plg.fname = 'timeline.py' plg.ptype = REPORT plg.authors = ["Donald N. Allingham"] plg.authors_email = ["don@gramps-project.org"] diff --git a/src/plugins/drawreport/FanChart.py b/src/plugins/drawreport/fanchart.py similarity index 100% rename from src/plugins/drawreport/FanChart.py rename to src/plugins/drawreport/fanchart.py diff --git a/src/plugins/drawreport/StatisticsChart.py b/src/plugins/drawreport/statisticschart.py similarity index 100% rename from src/plugins/drawreport/StatisticsChart.py rename to src/plugins/drawreport/statisticschart.py diff --git a/src/plugins/drawreport/TimeLine.py b/src/plugins/drawreport/timeline.py similarity index 100% rename from src/plugins/drawreport/TimeLine.py rename to src/plugins/drawreport/timeline.py diff --git a/src/plugins/export/export.gpr.py b/src/plugins/export/export.gpr.py index 1c5e2fc80..c9a396329 100644 --- a/src/plugins/export/export.gpr.py +++ b/src/plugins/export/export.gpr.py @@ -34,7 +34,7 @@ plg.description = _("CSV is a common spreadsheet format.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ExportCsv.py' +plg.fname = 'exportcsv.py' plg.ptype = EXPORT plg.export_function = 'exportData' plg.export_options = 'CSVWriterOptionBox' @@ -55,7 +55,7 @@ plg.description = _("Web Family Tree format") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ExportFtree.py' +plg.fname = 'exportftree.py' plg.ptype = EXPORT plg.export_function = 'writeData' plg.export_options = 'WriterOptionBox' @@ -77,7 +77,7 @@ plg.description = _('GEDCOM is used to transfer data between genealogy programs plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ExportGedcom.py' +plg.fname = 'exportgedcom.py' plg.ptype = EXPORT plg.export_function = 'export_data' plg.export_options = 'WriterOptionBox' @@ -98,7 +98,7 @@ plg.description = _('GeneWeb is a web based genealogy program.') plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ExportGeneWeb.py' +plg.fname = 'exportgeneweb.py' plg.ptype = EXPORT plg.export_function = 'exportData' plg.export_options = 'WriterOptionBox' @@ -120,7 +120,7 @@ plg.description = _('Gramps package is an archived XML family tree together ' plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ExportPkg.py' +plg.fname = 'exportpkg.py' plg.ptype = EXPORT plg.export_function = 'writeData' plg.export_options = 'WriterOptionBox' @@ -143,7 +143,7 @@ plg.description = _('Gramps XML export is a complete archived XML backup of a' plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ExportXml.py' +plg.fname = 'exportxml.py' plg.ptype = EXPORT plg.export_function = 'export_data' plg.export_options = 'WriterOptionBox' @@ -164,7 +164,7 @@ plg.description = _('vCalendar is used in many calendaring and PIM applications plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ExportVCalendar.py' +plg.fname = 'exportvcalendar.py' plg.ptype = EXPORT plg.export_function = 'exportData' plg.export_options = 'WriterOptionBox' @@ -185,7 +185,7 @@ plg.description = _('vCard is used in many addressbook and pim applications.') plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ExportVCard.py' +plg.fname = 'exportvcard.py' plg.ptype = EXPORT plg.export_function = 'exportData' plg.export_options = 'WriterOptionBox' diff --git a/src/plugins/export/ExportCsv.py b/src/plugins/export/exportcsv.py similarity index 100% rename from src/plugins/export/ExportCsv.py rename to src/plugins/export/exportcsv.py diff --git a/src/plugins/export/ExportFtree.py b/src/plugins/export/exportftree.py similarity index 100% rename from src/plugins/export/ExportFtree.py rename to src/plugins/export/exportftree.py diff --git a/src/plugins/export/ExportGedcom.py b/src/plugins/export/exportgedcom.py similarity index 100% rename from src/plugins/export/ExportGedcom.py rename to src/plugins/export/exportgedcom.py diff --git a/src/plugins/export/ExportGeneWeb.py b/src/plugins/export/exportgeneweb.py similarity index 100% rename from src/plugins/export/ExportGeneWeb.py rename to src/plugins/export/exportgeneweb.py diff --git a/src/plugins/export/ExportPkg.py b/src/plugins/export/exportpkg.py similarity index 100% rename from src/plugins/export/ExportPkg.py rename to src/plugins/export/exportpkg.py diff --git a/src/plugins/export/ExportVCalendar.py b/src/plugins/export/exportvcalendar.py similarity index 100% rename from src/plugins/export/ExportVCalendar.py rename to src/plugins/export/exportvcalendar.py diff --git a/src/plugins/export/ExportVCard.py b/src/plugins/export/exportvcard.py similarity index 100% rename from src/plugins/export/ExportVCard.py rename to src/plugins/export/exportvcard.py diff --git a/src/plugins/export/ExportXml.py b/src/plugins/export/exportxml.py similarity index 100% rename from src/plugins/export/ExportXml.py rename to src/plugins/export/exportxml.py diff --git a/src/plugins/gramplet/AgeOnDateGramplet.py b/src/plugins/gramplet/ageondategramplet.py similarity index 100% rename from src/plugins/gramplet/AgeOnDateGramplet.py rename to src/plugins/gramplet/ageondategramplet.py diff --git a/src/plugins/gramplet/AgeStats.py b/src/plugins/gramplet/agestats.py similarity index 100% rename from src/plugins/gramplet/AgeStats.py rename to src/plugins/gramplet/agestats.py diff --git a/src/plugins/gramplet/Attributes.py b/src/plugins/gramplet/attributes.py similarity index 100% rename from src/plugins/gramplet/Attributes.py rename to src/plugins/gramplet/attributes.py diff --git a/src/plugins/gramplet/AttributesGramplet.py b/src/plugins/gramplet/attributesgramplet.py similarity index 100% rename from src/plugins/gramplet/AttributesGramplet.py rename to src/plugins/gramplet/attributesgramplet.py diff --git a/src/plugins/gramplet/Backlinks.py b/src/plugins/gramplet/backlinks.py similarity index 100% rename from src/plugins/gramplet/Backlinks.py rename to src/plugins/gramplet/backlinks.py diff --git a/src/plugins/gramplet/CalendarGramplet.py b/src/plugins/gramplet/calendargramplet.py similarity index 100% rename from src/plugins/gramplet/CalendarGramplet.py rename to src/plugins/gramplet/calendargramplet.py diff --git a/src/plugins/gramplet/Children.py b/src/plugins/gramplet/children.py similarity index 100% rename from src/plugins/gramplet/Children.py rename to src/plugins/gramplet/children.py diff --git a/src/plugins/gramplet/Citations.py b/src/plugins/gramplet/citations.py similarity index 100% rename from src/plugins/gramplet/Citations.py rename to src/plugins/gramplet/citations.py diff --git a/src/plugins/gramplet/DescendGramplet.py b/src/plugins/gramplet/descendgramplet.py similarity index 100% rename from src/plugins/gramplet/DescendGramplet.py rename to src/plugins/gramplet/descendgramplet.py diff --git a/src/plugins/gramplet/EditExifMetadata.py b/src/plugins/gramplet/editexifmetadata.py similarity index 100% rename from src/plugins/gramplet/EditExifMetadata.py rename to src/plugins/gramplet/editexifmetadata.py diff --git a/src/plugins/gramplet/Events.py b/src/plugins/gramplet/events.py similarity index 100% rename from src/plugins/gramplet/Events.py rename to src/plugins/gramplet/events.py diff --git a/src/plugins/gramplet/FanChartGramplet.py b/src/plugins/gramplet/fanchartgramplet.py similarity index 100% rename from src/plugins/gramplet/FanChartGramplet.py rename to src/plugins/gramplet/fanchartgramplet.py diff --git a/src/plugins/gramplet/FaqGramplet.py b/src/plugins/gramplet/faqgramplet.py similarity index 100% rename from src/plugins/gramplet/FaqGramplet.py rename to src/plugins/gramplet/faqgramplet.py diff --git a/src/plugins/gramplet/Filter.py b/src/plugins/gramplet/filter.py similarity index 100% rename from src/plugins/gramplet/Filter.py rename to src/plugins/gramplet/filter.py diff --git a/src/plugins/gramplet/Gallery.py b/src/plugins/gramplet/gallery.py similarity index 100% rename from src/plugins/gramplet/Gallery.py rename to src/plugins/gramplet/gallery.py diff --git a/src/plugins/gramplet/GivenNameGramplet.py b/src/plugins/gramplet/givennamegramplet.py similarity index 100% rename from src/plugins/gramplet/GivenNameGramplet.py rename to src/plugins/gramplet/givennamegramplet.py diff --git a/src/plugins/gramplet/gramplet.gpr.py b/src/plugins/gramplet/gramplet.gpr.py index 16520cf0a..84aa76441 100644 --- a/src/plugins/gramplet/gramplet.gpr.py +++ b/src/plugins/gramplet/gramplet.gpr.py @@ -34,7 +34,7 @@ register(GRAMPLET, version="2.0.0", gramps_target_version="3.5", status = STABLE, - fname="AgeOnDateGramplet.py", + fname="ageondategramplet.py", height=200, gramplet = 'AgeOnDateGramplet', gramplet_title=_("Age on Date"), @@ -45,7 +45,7 @@ register(GRAMPLET, name = _("Age Stats"), description = _("Gramplet showing graphs of various ages"), status = STABLE, - fname="AgeStats.py", + fname="agestats.py", height=100, expand=True, gramplet = 'AgeStatsGramplet', @@ -61,7 +61,7 @@ register(GRAMPLET, name=_("Attributes"), description = _("Gramplet showing active person's attributes"), status = STABLE, - fname="AttributesGramplet.py", + fname="attributesgramplet.py", height=150, expand=True, gramplet = 'AttributesGramplet', @@ -78,7 +78,7 @@ register(GRAMPLET, name=_("Calendar"), description = _("Gramplet showing calendar and events on specific dates in history"), status = STABLE, - fname="CalendarGramplet.py", + fname="calendargramplet.py", height=200, gramplet = 'CalendarGramplet', gramplet_title=_("Calendar"), @@ -91,7 +91,7 @@ register(GRAMPLET, name=_("Descendant"), description = _("Gramplet showing active person's descendants"), status = STABLE, - fname="DescendGramplet.py", + fname="descendgramplet.py", height=100, expand=True, gramplet = 'DescendantGramplet', @@ -108,7 +108,7 @@ register(GRAMPLET, name=_("Fan Chart"), description = _("Gramplet showing active person's direct ancestors as a fanchart"), status = STABLE, - fname="FanChartGramplet.py", + fname="fanchartgramplet.py", height=430, expand=True, gramplet = 'FanChartGramplet', @@ -125,7 +125,7 @@ register(GRAMPLET, name=_("FAQ"), description = _("Gramplet showing frequently asked questions"), status = STABLE, - fname="FaqGramplet.py", + fname="faqgramplet.py", height=300, gramplet = 'FAQGramplet', gramplet_title=_("FAQ"), @@ -138,7 +138,7 @@ register(GRAMPLET, name=_("Given Name Cloud"), description = _("Gramplet showing all given names as a text cloud"), status = STABLE, - fname="GivenNameGramplet.py", + fname="givennamegramplet.py", height=300, expand=True, gramplet = 'GivenNameCloudGramplet', @@ -152,7 +152,7 @@ register(GRAMPLET, name=_("Pedigree"), description = _("Gramplet showing active person's ancestors"), status = STABLE, - fname="PedigreeGramplet.py", + fname="pedigreegramplet.py", height=300, gramplet = 'PedigreeGramplet', gramplet_title=_("Pedigree"), @@ -169,7 +169,7 @@ register(GRAMPLET, name=_("Plugin Manager"), description = _("Gramplet showing available third-party plugins (addons)"), status = STABLE, - fname="PluginManagerGramplet.py", + fname="pluginmanagergramplet.py", height=300, expand=True, gramplet = 'PluginManagerGramplet', @@ -183,7 +183,7 @@ register(GRAMPLET, name=_("Quick View"), description = _("Gramplet showing an active item Quick View"), status = STABLE, - fname="QuickViewGramplet.py", + fname="quickviewgramplet.py", height=300, expand=True, gramplet = 'QuickViewGramplet', @@ -199,7 +199,7 @@ register(GRAMPLET, name=_("Relatives"), description = _("Gramplet showing active person's relatives"), status = STABLE, - fname="RelativeGramplet.py", + fname="relativegramplet.py", height=200, gramplet = 'RelativesGramplet', gramplet_title=_("Relatives"), @@ -215,7 +215,7 @@ register(GRAMPLET, name=_("Session Log"), description = _("Gramplet showing all activity for this session"), status = STABLE, - fname="SessionLogGramplet.py", + fname="sessionloggramplet.py", height=230, #data=['no'], gramplet = 'LogGramplet', @@ -229,7 +229,7 @@ register(GRAMPLET, name=_("Statistics"), description = _("Gramplet showing summary data of the family tree"), status = STABLE, - fname="StatsGramplet.py", + fname="statsgramplet.py", height=230, expand=True, gramplet = 'StatsGramplet', @@ -243,7 +243,7 @@ register(GRAMPLET, name=_("Surname Cloud"), description = _("Gramplet showing all surnames as a text cloud"), status = STABLE, - fname="SurnameCloudGramplet.py", + fname="surnamecloudgramplet.py", height=300, expand=True, gramplet = 'SurnameCloudGramplet', @@ -257,7 +257,7 @@ register(GRAMPLET, name=_("TODO"), description = _("Gramplet for generic notes"), status = STABLE, - fname="ToDoGramplet.py", + fname="todogramplet.py", height=300, expand=True, gramplet = 'TODOGramplet', @@ -271,7 +271,7 @@ register(GRAMPLET, name=_("Top Surnames"), description = _("Gramplet showing most frequent surnames in this tree"), status = STABLE, - fname="TopSurnamesGramplet.py", + fname="topsurnamesgramplet.py", height=230, gramplet = 'TopSurnamesGramplet', gramplet_title=_("Top Surnames"), @@ -284,7 +284,7 @@ register(GRAMPLET, name=_("Welcome"), description = _("Gramplet showing a welcome message"), status = STABLE, - fname="WelcomeGramplet.py", + fname="welcomegramplet.py", height=300, expand=True, gramplet = 'WelcomeGramplet', @@ -298,7 +298,7 @@ register(GRAMPLET, name =_("What's Next"), description = _("Gramplet suggesting items to research"), status = STABLE, - fname="WhatsNext.py", + fname="whatsnext.py", height = 230, expand = True, gramplet = 'WhatNextGramplet', @@ -323,7 +323,7 @@ register(GRAMPLET, version = '1.5.0', gramps_target_version = '3.5', status = STABLE, - fname = "EditExifMetadata.py", + fname = "editexifmetadata.py", help_url = "Edit Image Exif Metadata", authors = ['Rob G. Healey'], authors_email = ['robhealey1@gmail.com'], @@ -340,7 +340,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="PersonDetails.py", + fname="persondetails.py", height=200, gramplet = 'PersonDetails', gramplet_title=_("Details"), @@ -354,7 +354,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="RepositoryDetails.py", + fname="repositorydetails.py", height=200, gramplet = 'RepositoryDetails', gramplet_title=_("Details"), @@ -368,7 +368,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="PlaceDetails.py", + fname="placedetails.py", height=200, gramplet = 'PlaceDetails', gramplet_title=_("Details"), @@ -382,7 +382,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="MediaPreview.py", + fname="mediapreview.py", height=200, gramplet = 'MediaPreview', gramplet_title=_("Preview"), @@ -406,7 +406,7 @@ if available: version = "1.0.0", gramps_target_version = "3.5", status = STABLE, - fname = "MetadataViewer.py", + fname = "metadataviewer.py", height = 200, gramplet = 'MetadataViewer', gramplet_title = _("Image Metadata"), @@ -420,7 +420,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="PersonResidence.py", + fname="personresidence.py", height=200, gramplet = 'PersonResidence', gramplet_title=_("Residence"), @@ -434,7 +434,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Events.py", + fname="events.py", height=200, gramplet = 'PersonEvents', gramplet_title=_("Events"), @@ -448,7 +448,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Events.py", + fname="events.py", height=200, gramplet = 'FamilyEvents', gramplet_title=_("Events"), @@ -462,7 +462,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Gallery.py", + fname="gallery.py", height=200, gramplet = 'PersonGallery', gramplet_title=_("Gallery"), @@ -476,7 +476,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Gallery.py", + fname="gallery.py", height=200, gramplet = 'FamilyGallery', gramplet_title=_("Gallery"), @@ -490,7 +490,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Gallery.py", + fname="gallery.py", height=200, gramplet = 'EventGallery', gramplet_title=_("Gallery"), @@ -504,7 +504,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Gallery.py", + fname="gallery.py", height=200, gramplet = 'PlaceGallery', gramplet_title=_("Gallery"), @@ -518,7 +518,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Gallery.py", + fname="gallery.py", height=200, gramplet = 'SourceGallery', gramplet_title=_("Gallery"), @@ -532,7 +532,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Gallery.py", + fname="gallery.py", height=200, gramplet = 'CitationGallery', gramplet_title=_("Gallery"), @@ -546,7 +546,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Attributes.py", + fname="attributes.py", height=200, gramplet = 'PersonAttributes', gramplet_title=_("Attributes"), @@ -560,7 +560,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Attributes.py", + fname="attributes.py", height=200, gramplet = 'EventAttributes', gramplet_title=_("Attributes"), @@ -574,7 +574,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Attributes.py", + fname="attributes.py", height=200, gramplet = 'FamilyAttributes', gramplet_title=_("Attributes"), @@ -588,7 +588,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Attributes.py", + fname="attributes.py", height=200, gramplet = 'MediaAttributes', gramplet_title=_("Attributes"), @@ -602,7 +602,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Notes.py", + fname="notes.py", height=200, gramplet = 'PersonNotes', gramplet_title=_("Notes"), @@ -616,7 +616,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Notes.py", + fname="notes.py", height=200, gramplet = 'EventNotes', gramplet_title=_("Notes"), @@ -630,7 +630,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Notes.py", + fname="notes.py", height=200, gramplet = 'FamilyNotes', gramplet_title=_("Notes"), @@ -644,7 +644,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Notes.py", + fname="notes.py", height=200, gramplet = 'PlaceNotes', gramplet_title=_("Notes"), @@ -658,7 +658,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Notes.py", + fname="notes.py", height=200, gramplet = 'SourceNotes', gramplet_title=_("Notes"), @@ -672,7 +672,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Notes.py", + fname="notes.py", height=200, gramplet = 'CitationNotes', gramplet_title=_("Notes"), @@ -686,7 +686,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Notes.py", + fname="notes.py", height=200, gramplet = 'RepositoryNotes', gramplet_title=_("Notes"), @@ -700,7 +700,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Notes.py", + fname="notes.py", height=200, gramplet = 'MediaNotes', gramplet_title=_("Notes"), @@ -714,7 +714,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Citations.py", + fname="citations.py", height=200, gramplet = 'PersonCitations', gramplet_title=_("Citations"), @@ -728,7 +728,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Citations.py", + fname="citations.py", height=200, gramplet = 'EventCitations', gramplet_title=_("Citations"), @@ -742,7 +742,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Citations.py", + fname="citations.py", height=200, gramplet = 'FamilyCitations', gramplet_title=_("Citations"), @@ -756,7 +756,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Citations.py", + fname="citations.py", height=200, gramplet = 'PlaceCitations', gramplet_title=_("Citations"), @@ -770,7 +770,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Citations.py", + fname="citations.py", height=200, gramplet = 'MediaCitations', gramplet_title=_("Citations"), @@ -784,7 +784,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Children.py", + fname="children.py", height=200, gramplet = 'PersonChildren', gramplet_title=_("Children"), @@ -798,7 +798,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Children.py", + fname="children.py", height=200, gramplet = 'FamilyChildren', gramplet_title=_("Children"), @@ -812,7 +812,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Backlinks.py", + fname="backlinks.py", height=200, gramplet = 'PersonBacklinks', gramplet_title=_("References"), @@ -826,7 +826,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Backlinks.py", + fname="backlinks.py", height=200, gramplet = 'EventBacklinks', gramplet_title=_("References"), @@ -840,7 +840,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Backlinks.py", + fname="backlinks.py", height=200, gramplet = 'FamilyBacklinks', gramplet_title=_("References"), @@ -854,7 +854,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Backlinks.py", + fname="backlinks.py", height=200, gramplet = 'PlaceBacklinks', gramplet_title=_("References"), @@ -868,7 +868,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Backlinks.py", + fname="backlinks.py", height=200, gramplet = 'SourceBacklinks', gramplet_title=_("References"), @@ -882,7 +882,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Backlinks.py", + fname="backlinks.py", height=200, gramplet = 'CitationBacklinks', gramplet_title=_("References"), @@ -896,7 +896,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Backlinks.py", + fname="backlinks.py", height=200, gramplet = 'RepositoryBacklinks', gramplet_title=_("References"), @@ -910,7 +910,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Backlinks.py", + fname="backlinks.py", height=200, gramplet = 'MediaBacklinks', gramplet_title=_("References"), @@ -924,7 +924,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Backlinks.py", + fname="backlinks.py", height=200, gramplet = 'NoteBacklinks', gramplet_title=_("References"), @@ -938,7 +938,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Filter.py", + fname="filter.py", height=200, gramplet = 'PersonFilter', gramplet_title=_("Filter"), @@ -952,7 +952,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Filter.py", + fname="filter.py", height=200, gramplet = 'FamilyFilter', gramplet_title=_("Filter"), @@ -966,7 +966,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Filter.py", + fname="filter.py", height=200, gramplet = 'EventFilter', gramplet_title=_("Filter"), @@ -980,7 +980,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Filter.py", + fname="filter.py", height=200, gramplet = 'SourceFilter', gramplet_title=_("Filter"), @@ -994,7 +994,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Filter.py", + fname="filter.py", height=200, gramplet = 'CitationFilter', gramplet_title=_("Filter"), @@ -1008,7 +1008,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Filter.py", + fname="filter.py", height=200, gramplet = 'PlaceFilter', gramplet_title=_("Filter"), @@ -1022,7 +1022,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Filter.py", + fname="filter.py", height=200, gramplet = 'MediaFilter', gramplet_title=_("Filter"), @@ -1036,7 +1036,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Filter.py", + fname="filter.py", height=200, gramplet = 'RepositoryFilter', gramplet_title=_("Filter"), @@ -1050,7 +1050,7 @@ register(GRAMPLET, version="1.0.0", gramps_target_version="3.5", status = STABLE, - fname="Filter.py", + fname="filter.py", height=200, gramplet = 'NoteFilter', gramplet_title=_("Filter"), diff --git a/src/plugins/gramplet/MediaPreview.py b/src/plugins/gramplet/mediapreview.py similarity index 100% rename from src/plugins/gramplet/MediaPreview.py rename to src/plugins/gramplet/mediapreview.py diff --git a/src/plugins/gramplet/MetadataViewer.py b/src/plugins/gramplet/metadataviewer.py similarity index 100% rename from src/plugins/gramplet/MetadataViewer.py rename to src/plugins/gramplet/metadataviewer.py diff --git a/src/plugins/gramplet/Notes.py b/src/plugins/gramplet/notes.py similarity index 100% rename from src/plugins/gramplet/Notes.py rename to src/plugins/gramplet/notes.py diff --git a/src/plugins/gramplet/PedigreeGramplet.py b/src/plugins/gramplet/pedigreegramplet.py similarity index 100% rename from src/plugins/gramplet/PedigreeGramplet.py rename to src/plugins/gramplet/pedigreegramplet.py diff --git a/src/plugins/gramplet/PersonDetails.py b/src/plugins/gramplet/persondetails.py similarity index 100% rename from src/plugins/gramplet/PersonDetails.py rename to src/plugins/gramplet/persondetails.py diff --git a/src/plugins/gramplet/PersonResidence.py b/src/plugins/gramplet/personresidence.py similarity index 100% rename from src/plugins/gramplet/PersonResidence.py rename to src/plugins/gramplet/personresidence.py diff --git a/src/plugins/gramplet/PlaceDetails.py b/src/plugins/gramplet/placedetails.py similarity index 100% rename from src/plugins/gramplet/PlaceDetails.py rename to src/plugins/gramplet/placedetails.py diff --git a/src/plugins/gramplet/PluginManagerGramplet.py b/src/plugins/gramplet/pluginmanagergramplet.py similarity index 100% rename from src/plugins/gramplet/PluginManagerGramplet.py rename to src/plugins/gramplet/pluginmanagergramplet.py diff --git a/src/plugins/gramplet/QuickViewGramplet.py b/src/plugins/gramplet/quickviewgramplet.py similarity index 100% rename from src/plugins/gramplet/QuickViewGramplet.py rename to src/plugins/gramplet/quickviewgramplet.py diff --git a/src/plugins/gramplet/RelativeGramplet.py b/src/plugins/gramplet/relativegramplet.py similarity index 100% rename from src/plugins/gramplet/RelativeGramplet.py rename to src/plugins/gramplet/relativegramplet.py diff --git a/src/plugins/gramplet/RepositoryDetails.py b/src/plugins/gramplet/repositorydetails.py similarity index 100% rename from src/plugins/gramplet/RepositoryDetails.py rename to src/plugins/gramplet/repositorydetails.py diff --git a/src/plugins/gramplet/SessionLogGramplet.py b/src/plugins/gramplet/sessionloggramplet.py similarity index 100% rename from src/plugins/gramplet/SessionLogGramplet.py rename to src/plugins/gramplet/sessionloggramplet.py diff --git a/src/plugins/gramplet/StatsGramplet.py b/src/plugins/gramplet/statsgramplet.py similarity index 100% rename from src/plugins/gramplet/StatsGramplet.py rename to src/plugins/gramplet/statsgramplet.py diff --git a/src/plugins/gramplet/SurnameCloudGramplet.py b/src/plugins/gramplet/surnamecloudgramplet.py similarity index 100% rename from src/plugins/gramplet/SurnameCloudGramplet.py rename to src/plugins/gramplet/surnamecloudgramplet.py diff --git a/src/plugins/gramplet/ToDoGramplet.py b/src/plugins/gramplet/todogramplet.py similarity index 100% rename from src/plugins/gramplet/ToDoGramplet.py rename to src/plugins/gramplet/todogramplet.py diff --git a/src/plugins/gramplet/TopSurnamesGramplet.py b/src/plugins/gramplet/topsurnamesgramplet.py similarity index 100% rename from src/plugins/gramplet/TopSurnamesGramplet.py rename to src/plugins/gramplet/topsurnamesgramplet.py diff --git a/src/plugins/gramplet/WelcomeGramplet.py b/src/plugins/gramplet/welcomegramplet.py similarity index 100% rename from src/plugins/gramplet/WelcomeGramplet.py rename to src/plugins/gramplet/welcomegramplet.py diff --git a/src/plugins/gramplet/WhatsNext.py b/src/plugins/gramplet/whatsnext.py similarity index 100% rename from src/plugins/gramplet/WhatsNext.py rename to src/plugins/gramplet/whatsnext.py diff --git a/src/plugins/graph/graphplugins.gpr.py b/src/plugins/graph/graphplugins.gpr.py index f5ca8a4e7..a7eddfe82 100644 --- a/src/plugins/graph/graphplugins.gpr.py +++ b/src/plugins/graph/graphplugins.gpr.py @@ -33,7 +33,7 @@ plg.description = _("Produces family line graphs using GraphViz.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'GVFamilyLines.py' +plg.fname = 'gvfamilylines.py' plg.ptype = REPORT plg.authors = ["Stephane Charette"] plg.authors_email = ["stephanecharette@gmail.com"] @@ -56,7 +56,7 @@ plg.description = _("Produces an hourglass graph using Graphviz.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'GVHourGlass.py' +plg.fname = 'gvhourglass.py' plg.ptype = REPORT plg.authors = ["Brian G. Matherly"] plg.authors_email = ["brian@gramps-project.org"] @@ -78,7 +78,7 @@ plg.description = _("Produces relationship graphs using Graphviz.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'GVRelGraph.py' +plg.fname = 'gvrelgraph.py' plg.ptype = REPORT plg.authors = ["Brian G. Matherly"] plg.authors_email = ["brian@gramps-project.org"] diff --git a/src/plugins/graph/GVFamilyLines.py b/src/plugins/graph/gvfamilylines.py similarity index 100% rename from src/plugins/graph/GVFamilyLines.py rename to src/plugins/graph/gvfamilylines.py diff --git a/src/plugins/graph/GVHourGlass.py b/src/plugins/graph/gvhourglass.py similarity index 100% rename from src/plugins/graph/GVHourGlass.py rename to src/plugins/graph/gvhourglass.py diff --git a/src/plugins/graph/GVRelGraph.py b/src/plugins/graph/gvrelgraph.py similarity index 100% rename from src/plugins/graph/GVRelGraph.py rename to src/plugins/graph/gvrelgraph.py diff --git a/src/plugins/import/import.gpr.py b/src/plugins/import/import.gpr.py index ef57e3885..6fe31680e 100644 --- a/src/plugins/import/import.gpr.py +++ b/src/plugins/import/import.gpr.py @@ -35,7 +35,7 @@ plg.description = _("Import data from CSV files") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ImportCsv.py' +plg.fname = 'importcsv.py' plg.ptype = IMPORT plg.import_function = 'importData' plg.extension = "csv" @@ -54,7 +54,7 @@ plg.description = _('GEDCOM is used to transfer data between genealogy programs plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ImportGedcom.py' +plg.fname = 'importgedcom.py' plg.ptype = IMPORT plg.import_function = 'importData' plg.extension = "ged" @@ -72,7 +72,7 @@ plg.description = _('Import data from GeneWeb files') plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ImportGeneWeb.py' +plg.fname = 'importgeneweb.py' plg.ptype = IMPORT plg.import_function = 'importData' plg.extension = "gw" @@ -91,7 +91,7 @@ plg.description = _('Import data from a Gramps package (an archived XML ' plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ImportGpkg.py' +plg.fname = 'importgpkg.py' plg.ptype = IMPORT plg.import_function = 'impData' plg.extension = "gpkg" @@ -112,7 +112,7 @@ plg.description = _('The Gramps XML format is a text ' plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ImportXml.py' +plg.fname = 'importxml.py' plg.ptype = IMPORT plg.import_function = 'importData' plg.extension = "gramps" @@ -130,7 +130,7 @@ plg.description = _('Import data from Gramps 2.x database files') plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ImportGrdb.py' +plg.fname = 'importgrdb.py' plg.ptype = IMPORT plg.import_function = 'importData' plg.extension = "grdb" @@ -148,7 +148,7 @@ plg.description = _('Import data from Pro-Gen files') plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ImportProGen.py' +plg.fname = 'importprogen.py' plg.ptype = IMPORT plg.import_function = '_importData' plg.extension = "def" @@ -166,7 +166,7 @@ plg.description = _('Import data from vCard files') plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'ImportVCard.py' +plg.fname = 'importvcard.py' plg.ptype = IMPORT plg.import_function = 'importData' plg.extension = "vcf" diff --git a/src/plugins/import/ImportCsv.py b/src/plugins/import/importcsv.py similarity index 100% rename from src/plugins/import/ImportCsv.py rename to src/plugins/import/importcsv.py diff --git a/src/plugins/import/ImportGedcom.py b/src/plugins/import/importgedcom.py similarity index 100% rename from src/plugins/import/ImportGedcom.py rename to src/plugins/import/importgedcom.py diff --git a/src/plugins/import/ImportGeneWeb.py b/src/plugins/import/importgeneweb.py similarity index 100% rename from src/plugins/import/ImportGeneWeb.py rename to src/plugins/import/importgeneweb.py diff --git a/src/plugins/import/ImportGpkg.py b/src/plugins/import/importgpkg.py similarity index 100% rename from src/plugins/import/ImportGpkg.py rename to src/plugins/import/importgpkg.py diff --git a/src/plugins/import/ImportGrdb.py b/src/plugins/import/importgrdb.py similarity index 100% rename from src/plugins/import/ImportGrdb.py rename to src/plugins/import/importgrdb.py diff --git a/src/plugins/import/ImportProGen.py b/src/plugins/import/importprogen.py similarity index 100% rename from src/plugins/import/ImportProGen.py rename to src/plugins/import/importprogen.py diff --git a/src/plugins/import/ImportVCard.py b/src/plugins/import/importvcard.py similarity index 100% rename from src/plugins/import/ImportVCard.py rename to src/plugins/import/importvcard.py diff --git a/src/plugins/import/ImportXml.py b/src/plugins/import/importxml.py similarity index 100% rename from src/plugins/import/ImportXml.py rename to src/plugins/import/importxml.py diff --git a/src/plugins/quickview/AgeOnDate.py b/src/plugins/quickview/ageondate.py similarity index 100% rename from src/plugins/quickview/AgeOnDate.py rename to src/plugins/quickview/ageondate.py diff --git a/src/plugins/quickview/AttributeMatch.py b/src/plugins/quickview/attributematch.py similarity index 100% rename from src/plugins/quickview/AttributeMatch.py rename to src/plugins/quickview/attributematch.py diff --git a/src/plugins/quickview/FilterByName.py b/src/plugins/quickview/filterbyname.py similarity index 100% rename from src/plugins/quickview/FilterByName.py rename to src/plugins/quickview/filterbyname.py diff --git a/src/plugins/quickview/LinkReferences.py b/src/plugins/quickview/linkreferences.py similarity index 100% rename from src/plugins/quickview/LinkReferences.py rename to src/plugins/quickview/linkreferences.py diff --git a/src/plugins/quickview/OnThisDay.py b/src/plugins/quickview/onthisday.py similarity index 100% rename from src/plugins/quickview/OnThisDay.py rename to src/plugins/quickview/onthisday.py diff --git a/src/plugins/quickview/quickview.gpr.py b/src/plugins/quickview/quickview.gpr.py index f788853fd..3b46e4582 100644 --- a/src/plugins/quickview/quickview.gpr.py +++ b/src/plugins/quickview/quickview.gpr.py @@ -34,7 +34,7 @@ description = _("Display people and ages on a particular date"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'AgeOnDate.py', +fname = 'ageondate.py', authors = ["Douglas Blank"], authors_email = ["dblank@cs.brynmawr.edu"], category = CATEGORY_QR_DATE, @@ -54,7 +54,7 @@ description = _("Display people with same attribute."), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'AttributeMatch.py', +fname = 'attributematch.py', authors = ["Douglas Blank"], authors_email = ["dblank@cs.brynmawr.edu"], category = CATEGORY_QR_MISC, @@ -129,7 +129,7 @@ description = _("Display filtered data"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'FilterByName.py', +fname = 'filterbyname.py', authors = ["Douglas Blank"], authors_email = ["dblank@cs.brynmawr.edu"], category = CATEGORY_QR_MISC, @@ -183,7 +183,7 @@ description = _("Display events on a particular day"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'OnThisDay.py', +fname = 'onthisday.py', authors = ["Douglas Blank"], authors_email = ["dblank@cs.brynmawr.edu"], category = CATEGORY_QR_EVENT, @@ -216,7 +216,7 @@ for (category, item, trans) in refitems: version = '1.0', gramps_target_version = '3.5', status = STABLE, - fname = 'References.py', + fname = 'references.py', authors = ["Douglas Blank"], authors_email = ["dblank@cs.brynmawr.edu"], category = category, @@ -230,7 +230,7 @@ register(QUICKREPORT, version = '1.0', gramps_target_version = '3.5', status = STABLE, - fname = 'LinkReferences.py', + fname = 'linkreferences.py', authors = ["Douglas Blank"], authors_email = ["doug.blank@gmail.com"], category = CATEGORY_QR_NOTE, @@ -251,7 +251,7 @@ description = _("Display the repository reference for sources related to" version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'Reporef.py', +fname = 'reporef.py', authors = ["Jerome Rapinat"], authors_email = ["romjerome@yahoo.fr"], category = CATEGORY_QR_REPOSITORY, @@ -271,7 +271,7 @@ description = _("Display people with the same surname as a person."), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'SameSurnames.py', +fname = 'samesurnames.py', authors = ["Douglas Blank"], authors_email = ["dblank@cs.brynmawr.edu"], category = CATEGORY_QR_PERSON, @@ -285,7 +285,7 @@ description = _("Display people with the same given name as a person."), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'SameSurnames.py', +fname = 'samesurnames.py', authors = ["Douglas Blank"], authors_email = ["dblank@cs.brynmawr.edu"], category = CATEGORY_QR_PERSON, @@ -299,7 +299,7 @@ description = _("Display people with the same given name as a person."), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'SameSurnames.py', +fname = 'samesurnames.py', authors = ["Douglas Blank"], authors_email = ["dblank@cs.brynmawr.edu"], category = CATEGORY_QR_MISC, diff --git a/src/plugins/quickview/References.py b/src/plugins/quickview/references.py similarity index 100% rename from src/plugins/quickview/References.py rename to src/plugins/quickview/references.py diff --git a/src/plugins/quickview/Reporef.py b/src/plugins/quickview/reporef.py similarity index 100% rename from src/plugins/quickview/Reporef.py rename to src/plugins/quickview/reporef.py diff --git a/src/plugins/quickview/SameSurnames.py b/src/plugins/quickview/samesurnames.py similarity index 100% rename from src/plugins/quickview/SameSurnames.py rename to src/plugins/quickview/samesurnames.py diff --git a/src/plugins/records.gpr.py b/src/plugins/records.gpr.py index bf4387a4a..750102b8b 100644 --- a/src/plugins/records.gpr.py +++ b/src/plugins/records.gpr.py @@ -34,7 +34,7 @@ description = _("Shows some interesting records about people and families"), version = '1.1', gramps_target_version = '3.5', status = STABLE, -fname = 'Records.py', +fname = 'records.py', authors = [u"Reinhard Müller"], authors_email = ["reinhard.mueller@bytewise.at"], category = CATEGORY_TEXT, @@ -50,7 +50,7 @@ description = _("Shows some interesting records about people and families"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'Records.py', +fname = 'records.py', authors = [u"Reinhard Müller"], authors_email = ["reinhard.mueller@bytewise.at"], gramplet = 'RecordsGramplet', diff --git a/src/plugins/Records.py b/src/plugins/records.py similarity index 100% rename from src/plugins/Records.py rename to src/plugins/records.py diff --git a/src/plugins/textreport/AlphabeticalIndex.py b/src/plugins/textreport/alphabeticalindex.py similarity index 100% rename from src/plugins/textreport/AlphabeticalIndex.py rename to src/plugins/textreport/alphabeticalindex.py diff --git a/src/plugins/textreport/AncestorReport.py b/src/plugins/textreport/ancestorreport.py similarity index 100% rename from src/plugins/textreport/AncestorReport.py rename to src/plugins/textreport/ancestorreport.py diff --git a/src/plugins/textreport/BirthdayReport.py b/src/plugins/textreport/birthdayreport.py similarity index 100% rename from src/plugins/textreport/BirthdayReport.py rename to src/plugins/textreport/birthdayreport.py diff --git a/src/plugins/textreport/CustomBookText.py b/src/plugins/textreport/custombooktext.py similarity index 100% rename from src/plugins/textreport/CustomBookText.py rename to src/plugins/textreport/custombooktext.py diff --git a/src/plugins/textreport/DescendReport.py b/src/plugins/textreport/descendreport.py similarity index 100% rename from src/plugins/textreport/DescendReport.py rename to src/plugins/textreport/descendreport.py diff --git a/src/plugins/textreport/DetAncestralReport.py b/src/plugins/textreport/detancestralreport.py similarity index 100% rename from src/plugins/textreport/DetAncestralReport.py rename to src/plugins/textreport/detancestralreport.py diff --git a/src/plugins/textreport/DetDescendantReport.py b/src/plugins/textreport/detdescendantreport.py similarity index 100% rename from src/plugins/textreport/DetDescendantReport.py rename to src/plugins/textreport/detdescendantreport.py diff --git a/src/plugins/textreport/EndOfLineReport.py b/src/plugins/textreport/endoflinereport.py similarity index 100% rename from src/plugins/textreport/EndOfLineReport.py rename to src/plugins/textreport/endoflinereport.py diff --git a/src/plugins/textreport/FamilyGroup.py b/src/plugins/textreport/familygroup.py similarity index 100% rename from src/plugins/textreport/FamilyGroup.py rename to src/plugins/textreport/familygroup.py diff --git a/src/plugins/textreport/IndivComplete.py b/src/plugins/textreport/indivcomplete.py similarity index 100% rename from src/plugins/textreport/IndivComplete.py rename to src/plugins/textreport/indivcomplete.py diff --git a/src/plugins/textreport/KinshipReport.py b/src/plugins/textreport/kinshipreport.py similarity index 100% rename from src/plugins/textreport/KinshipReport.py rename to src/plugins/textreport/kinshipreport.py diff --git a/src/plugins/textreport/NumberOfAncestorsReport.py b/src/plugins/textreport/numberofancestorsreport.py similarity index 100% rename from src/plugins/textreport/NumberOfAncestorsReport.py rename to src/plugins/textreport/numberofancestorsreport.py diff --git a/src/plugins/textreport/PlaceReport.py b/src/plugins/textreport/placereport.py similarity index 100% rename from src/plugins/textreport/PlaceReport.py rename to src/plugins/textreport/placereport.py diff --git a/src/plugins/textreport/SimpleBookTitle.py b/src/plugins/textreport/simplebooktitle.py similarity index 100% rename from src/plugins/textreport/SimpleBookTitle.py rename to src/plugins/textreport/simplebooktitle.py diff --git a/src/plugins/textreport/Summary.py b/src/plugins/textreport/summary.py similarity index 100% rename from src/plugins/textreport/Summary.py rename to src/plugins/textreport/summary.py diff --git a/src/plugins/textreport/TableOfContents.py b/src/plugins/textreport/tableofcontents.py similarity index 100% rename from src/plugins/textreport/TableOfContents.py rename to src/plugins/textreport/tableofcontents.py diff --git a/src/plugins/textreport/TagReport.py b/src/plugins/textreport/tagreport.py similarity index 100% rename from src/plugins/textreport/TagReport.py rename to src/plugins/textreport/tagreport.py diff --git a/src/plugins/textreport/textplugins.gpr.py b/src/plugins/textreport/textplugins.gpr.py index e1b72d722..40537cee8 100644 --- a/src/plugins/textreport/textplugins.gpr.py +++ b/src/plugins/textreport/textplugins.gpr.py @@ -33,7 +33,7 @@ plg.description = _("Produces a textual ancestral report") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'AncestorReport.py' +plg.fname = 'ancestorreport.py' plg.ptype = REPORT plg.authors = ["Donald N. Allingham"] plg.authors_email = ["don@gramps-project.org"] @@ -55,7 +55,7 @@ plg.description = _("Produces a report of birthdays and anniversaries") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'BirthdayReport.py' +plg.fname = 'birthdayreport.py' plg.ptype = REPORT plg.authors = ["Douglas S. Blank"] plg.authors_email = ["dblank@cs.brynmawr.edu"] @@ -77,7 +77,7 @@ plg.description = _("Add custom text to the book report") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'CustomBookText.py' +plg.fname = 'custombooktext.py' plg.ptype = REPORT plg.authors = ["The Gramps Project"] plg.authors_email = [""] @@ -99,7 +99,7 @@ plg.description = _("Produces a list of descendants of the active person") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'DescendReport.py' +plg.fname = 'descendreport.py' plg.ptype = REPORT plg.authors = ["Donald N. Allingham"] plg.authors_email = ["don@gramps-project.org"] @@ -121,7 +121,7 @@ plg.description = _("Produces a detailed ancestral report") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'DetAncestralReport.py' +plg.fname = 'detancestralreport.py' plg.ptype = REPORT plg.authors = ["Bruce DeGrasse"] plg.authors_email = ["bdegrasse1@attbi.com"] @@ -143,7 +143,7 @@ plg.description = _("Produces a detailed descendant report") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'DetDescendantReport.py' +plg.fname = 'detdescendantreport.py' plg.ptype = REPORT plg.authors = ["Bruce DeGrasse"] plg.authors_email = ["bdegrasse1@attbi.com"] @@ -165,7 +165,7 @@ plg.description = _("Produces a textual end of line report") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'EndOfLineReport.py' +plg.fname = 'endoflinereport.py' plg.ptype = REPORT plg.authors = ["Brian G. Matherly"] plg.authors_email = ["brian@gramps-project.org"] @@ -188,7 +188,7 @@ plg.description = _("Produces a family group report showing information " plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'FamilyGroup.py' +plg.fname = 'familygroup.py' plg.ptype = REPORT plg.authors = ["Donald N. Allingham"] plg.authors_email = ["don@gramps-project.org"] @@ -210,7 +210,7 @@ plg.description = _("Produces a complete report on the selected people") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'IndivComplete.py' +plg.fname = 'indivcomplete.py' plg.ptype = REPORT plg.authors = ["Donald N. Allingham"] plg.authors_email = ["don@gramps-project.org"] @@ -232,7 +232,7 @@ plg.description = _("Produces a textual report of kinship for a given person") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'KinshipReport.py' +plg.fname = 'kinshipreport.py' plg.ptype = REPORT plg.authors = ["Brian G. Matherly"] plg.authors_email = ["brian@gramps-project.org"] @@ -254,7 +254,7 @@ plg.description = _("Produces a list of people with a specified tag") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'TagReport.py' +plg.fname = 'tagreport.py' plg.ptype = REPORT plg.authors = ["Brian G. Matherly"] plg.authors_email = ["brian@gramps-project.org"] @@ -277,7 +277,7 @@ plg.description = _("Counts number of ancestors of selected person") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'NumberOfAncestorsReport.py' +plg.fname = 'numberofancestorsreport.py' plg.ptype = REPORT plg.authors = ["Brian G. Matherly"] plg.authors_email = ["brian@gramps-project.org"] @@ -299,7 +299,7 @@ plg.description = _("Produces a textual place report") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'PlaceReport.py' +plg.fname = 'placereport.py' plg.ptype = REPORT plg.authors = ["Gary Burton"] plg.authors_email = ["gary.burton@zen.co.uk"] @@ -322,7 +322,7 @@ plg.description = _("Produces a title page for book reports.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'SimpleBookTitle.py' +plg.fname = 'simplebooktitle.py' plg.ptype = REPORT plg.authors = ["Brian G. Matherly"] plg.authors_email = ["brian@gramps-project.org"] @@ -344,7 +344,7 @@ plg.description = _("Provides a summary of the current database") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'Summary.py' +plg.fname = 'summary.py' plg.ptype = REPORT plg.authors = ["Brian G. Matherly"] plg.authors_email = ["brian@gramps-project.org"] @@ -367,7 +367,7 @@ plg.description = _("Produces a table of contents for book reports.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'TableOfContents.py' +plg.fname = 'tableofcontents.py' plg.ptype = REPORT plg.authors = ["Nick Hall"] plg.authors_email = ["nick__hall@hotmail.com"] @@ -389,7 +389,7 @@ plg.description = _("Produces an alphabetical index for book reports.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'AlphabeticalIndex.py' +plg.fname = 'alphabeticalindex.py' plg.ptype = REPORT plg.authors = ["Nick Hall"] plg.authors_email = ["nick__hall@hotmail.com"] diff --git a/src/plugins/tool/ChangeNames.py b/src/plugins/tool/changenames.py similarity index 100% rename from src/plugins/tool/ChangeNames.py rename to src/plugins/tool/changenames.py diff --git a/src/plugins/tool/ChangeTypes.py b/src/plugins/tool/changetypes.py similarity index 100% rename from src/plugins/tool/ChangeTypes.py rename to src/plugins/tool/changetypes.py diff --git a/src/plugins/tool/Check.py b/src/plugins/tool/check.py similarity index 100% rename from src/plugins/tool/Check.py rename to src/plugins/tool/check.py diff --git a/src/plugins/tool/DateParserDisplayTest.py b/src/plugins/tool/dateparserdisplaytest.py similarity index 100% rename from src/plugins/tool/DateParserDisplayTest.py rename to src/plugins/tool/dateparserdisplaytest.py diff --git a/src/plugins/tool/Desbrowser.py b/src/plugins/tool/desbrowser.py similarity index 100% rename from src/plugins/tool/Desbrowser.py rename to src/plugins/tool/desbrowser.py diff --git a/src/plugins/tool/DumpGenderStats.py b/src/plugins/tool/dumpgenderstats.py similarity index 100% rename from src/plugins/tool/DumpGenderStats.py rename to src/plugins/tool/dumpgenderstats.py diff --git a/src/plugins/tool/Eval.py b/src/plugins/tool/eval.py similarity index 100% rename from src/plugins/tool/Eval.py rename to src/plugins/tool/eval.py diff --git a/src/plugins/tool/EventCmp.py b/src/plugins/tool/eventcmp.py similarity index 100% rename from src/plugins/tool/EventCmp.py rename to src/plugins/tool/eventcmp.py diff --git a/src/plugins/tool/EventNames.py b/src/plugins/tool/eventnames.py similarity index 100% rename from src/plugins/tool/EventNames.py rename to src/plugins/tool/eventnames.py diff --git a/src/plugins/tool/ExtractCity.py b/src/plugins/tool/extractcity.py similarity index 100% rename from src/plugins/tool/ExtractCity.py rename to src/plugins/tool/extractcity.py diff --git a/src/plugins/tool/FindDupes.py b/src/plugins/tool/finddupes.py similarity index 100% rename from src/plugins/tool/FindDupes.py rename to src/plugins/tool/finddupes.py diff --git a/src/plugins/tool/Leak.py b/src/plugins/tool/leak.py similarity index 100% rename from src/plugins/tool/Leak.py rename to src/plugins/tool/leak.py diff --git a/src/plugins/tool/MediaManager.py b/src/plugins/tool/mediamanager.py similarity index 100% rename from src/plugins/tool/MediaManager.py rename to src/plugins/tool/mediamanager.py diff --git a/src/plugins/tool/MergeCitations.py b/src/plugins/tool/mergecitations.py similarity index 100% rename from src/plugins/tool/MergeCitations.py rename to src/plugins/tool/mergecitations.py diff --git a/src/plugins/tool/NotRelated.py b/src/plugins/tool/notrelated.py similarity index 100% rename from src/plugins/tool/NotRelated.py rename to src/plugins/tool/notrelated.py diff --git a/src/plugins/tool/OwnerEditor.py b/src/plugins/tool/ownereditor.py similarity index 100% rename from src/plugins/tool/OwnerEditor.py rename to src/plugins/tool/ownereditor.py diff --git a/src/plugins/tool/PatchNames.py b/src/plugins/tool/patchnames.py similarity index 100% rename from src/plugins/tool/PatchNames.py rename to src/plugins/tool/patchnames.py diff --git a/src/plugins/tool/PHPGedViewConnector.py b/src/plugins/tool/phpgedviewconnector.py similarity index 100% rename from src/plugins/tool/PHPGedViewConnector.py rename to src/plugins/tool/phpgedviewconnector.py diff --git a/src/plugins/tool/PopulateSources.py b/src/plugins/tool/populatesources.py similarity index 100% rename from src/plugins/tool/PopulateSources.py rename to src/plugins/tool/populatesources.py diff --git a/src/plugins/tool/Rebuild.py b/src/plugins/tool/rebuild.py similarity index 100% rename from src/plugins/tool/Rebuild.py rename to src/plugins/tool/rebuild.py diff --git a/src/plugins/tool/RebuildRefMap.py b/src/plugins/tool/rebuildrefmap.py similarity index 100% rename from src/plugins/tool/RebuildRefMap.py rename to src/plugins/tool/rebuildrefmap.py diff --git a/src/plugins/tool/RelCalc.py b/src/plugins/tool/relcalc.py similarity index 100% rename from src/plugins/tool/RelCalc.py rename to src/plugins/tool/relcalc.py diff --git a/src/plugins/tool/RemoveUnused.py b/src/plugins/tool/removeunused.py similarity index 100% rename from src/plugins/tool/RemoveUnused.py rename to src/plugins/tool/removeunused.py diff --git a/src/plugins/tool/ReorderIds.py b/src/plugins/tool/reorderids.py similarity index 100% rename from src/plugins/tool/ReorderIds.py rename to src/plugins/tool/reorderids.py diff --git a/src/plugins/tool/SortEvents.py b/src/plugins/tool/sortevents.py similarity index 100% rename from src/plugins/tool/SortEvents.py rename to src/plugins/tool/sortevents.py diff --git a/src/plugins/tool/SoundGen.py b/src/plugins/tool/soundgen.py similarity index 100% rename from src/plugins/tool/SoundGen.py rename to src/plugins/tool/soundgen.py diff --git a/src/plugins/tool/TestcaseGenerator.py b/src/plugins/tool/testcasegenerator.py similarity index 100% rename from src/plugins/tool/TestcaseGenerator.py rename to src/plugins/tool/testcasegenerator.py diff --git a/src/plugins/tool/tools.gpr.py b/src/plugins/tool/tools.gpr.py index 239af8125..66b216348 100644 --- a/src/plugins/tool/tools.gpr.py +++ b/src/plugins/tool/tools.gpr.py @@ -38,7 +38,7 @@ description = _("Searches the entire database and attempts to " version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'ChangeNames.py', +fname = 'changenames.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DBPROC, @@ -61,7 +61,7 @@ description = _("Allows all the events of a certain name " version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'ChangeTypes.py', +fname = 'changetypes.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DBPROC, @@ -84,7 +84,7 @@ description = _("Checks the database for integrity problems, fixing the " version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'Check.py', +fname = 'check.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DBFIX, @@ -106,7 +106,7 @@ description = _("Provides a browsable hierarchy based on the active person"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'Desbrowser.py', +fname = 'desbrowser.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_ANAL, @@ -129,7 +129,7 @@ description = "Provides a window that can evaluate python code", version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'Eval.py', +fname = 'eval.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DEBUG, @@ -153,7 +153,7 @@ description = _("Aids in the analysis of data by allowing the " version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'EventCmp.py', +fname = 'eventcmp.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_ANAL, @@ -175,7 +175,7 @@ description = _("Extracts event descriptions from the event data"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'EventNames.py', +fname = 'eventnames.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DBPROC, @@ -198,7 +198,7 @@ description = _("Attempts to extract city and state/province " version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'ExtractCity.py', +fname = 'extractcity.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DBPROC, @@ -221,7 +221,7 @@ description = _("Searches the entire database, looking for " version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'FindDupes.py', +fname = 'finddupes.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DBPROC, @@ -243,7 +243,7 @@ description = "Provide a window listing all uncollected objects", version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'Leak.py', +fname = 'leak.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DEBUG, @@ -265,7 +265,7 @@ description = _("Manages batch operations on media files"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'MediaManager.py', +fname = 'mediamanager.py', authors = ["Alex Roitman"], authors_email = ["shura@gramps-project.org"], category = TOOL_UTILS, @@ -288,7 +288,7 @@ description = _("Find people who are not in any way related to the " version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'NotRelated.py', +fname = 'notrelated.py', authors = ["Stephane Charette"], authors_email = ["stephanecharette@gmail.com"], category = TOOL_UTILS, @@ -310,7 +310,7 @@ description = _("Allow editing database owner information."), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'OwnerEditor.py', +fname = 'ownereditor.py', authors = ["Zsolt Foldvari"], authors_email = ["zfoldvar@users.sourceforge.net"], category = TOOL_DBPROC, @@ -332,7 +332,7 @@ description = _("Extract titles, prefixes and compound surnames from given name version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'PatchNames.py', +fname = 'patchnames.py', authors = ["Donald N. Allingham", "Benny Malengier"], authors_email = ["don@gramps-project.org"], category = TOOL_DBPROC, @@ -354,7 +354,7 @@ description = _("Rebuilds secondary indexes"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'Rebuild.py', +fname = 'rebuild.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DBFIX, @@ -376,7 +376,7 @@ description = _("Rebuilds reference maps"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'RebuildRefMap.py', +fname = 'rebuildrefmap.py', authors = ["Alex Roitman"], authors_email = ["shura@gramps-project.org"], category = TOOL_DBFIX, @@ -398,7 +398,7 @@ description = _("Calculates the relationship between two people"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'RelCalc.py', +fname = 'relcalc.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_UTILS, @@ -420,7 +420,7 @@ description = _("Removes unused objects from the database"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'RemoveUnused.py', +fname = 'removeunused.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DBFIX, @@ -443,7 +443,7 @@ description = _("Reorders the Gramps IDs " version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'ReorderIds.py', +fname = 'reorderids.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_DBPROC, @@ -465,7 +465,7 @@ description = _("Sorts events"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'SortEvents.py', +fname = 'sortevents.py', authors = ["Gary Burton"], authors_email = ["gary.burton@zen.co.uk"], category = TOOL_DBPROC, @@ -487,7 +487,7 @@ description = _("Generates SoundEx codes for names"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'SoundGen.py', +fname = 'soundgen.py', authors = ["Donald N. Allingham"], authors_email = ["don@gramps-project.org"], category = TOOL_UTILS, @@ -509,7 +509,7 @@ description = _("Verifies the data against user-defined tests"), version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'Verify.py', +fname = 'verify.py', authors = ["Alex Roitman"], authors_email = ["shura@gramps-project.org"], category = TOOL_UTILS, @@ -532,7 +532,7 @@ description = _("Searches the entire database, looking for " version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'MergeCitations.py', +fname = 'mergecitations.py', authors = ["Tim G L Lyons"], authors_email = ["gramps-project.org"], category = TOOL_DBPROC, diff --git a/src/plugins/tool/toolsdebug.gpr.py b/src/plugins/tool/toolsdebug.gpr.py index 4ccdc6422..843be90f4 100644 --- a/src/plugins/tool/toolsdebug.gpr.py +++ b/src/plugins/tool/toolsdebug.gpr.py @@ -41,7 +41,7 @@ description = ("This test tool will create many people showing all" version = '1.0', gramps_target_version = '3.5', status = UNSTABLE, -fname = 'DateParserDisplayTest.py', +fname = 'dateparserdisplaytest.py', authors = ["Martin Hawlisch"], authors_email = ["martin@hawlisch.de"], category = TOOL_DEBUG, @@ -64,7 +64,7 @@ description = ("Will dump the statistics for the gender guessing " version = '1.0', gramps_target_version = '3.5', status = STABLE, -fname = 'DumpGenderStats.py', +fname = 'dumpgenderstats.py', authors = ["Donald N. Allingham", "Martin Hawlisch"], authors_email = ["don@gramps-project.org", "martin@hawlisch.de"], category = TOOL_DEBUG, @@ -88,7 +88,7 @@ description = ("The testcase generator will generate some persons " version = '1.0', gramps_target_version = '3.5', status = UNSTABLE, -fname = 'TestcaseGenerator.py', +fname = 'testcasegenerator.py', authors = ["Martin Hawlisch"], authors_email = ["martin@hawlisch.de"], category = TOOL_DEBUG, @@ -112,7 +112,7 @@ description = ("This tool generates sources and citations ofr each source in " version = '1.0', gramps_target_version = '3.5', status = UNSTABLE, -fname = 'PopulateSources.py', +fname = 'populatesources.py', authors = ["Tim Lyons"], authors_email = [""], category = TOOL_DEBUG, diff --git a/src/plugins/tool/Verify.py b/src/plugins/tool/verify.py similarity index 100% rename from src/plugins/tool/Verify.py rename to src/plugins/tool/verify.py diff --git a/src/plugins/webreport/NarrativeWeb.py b/src/plugins/webreport/narrativeweb.py similarity index 100% rename from src/plugins/webreport/NarrativeWeb.py rename to src/plugins/webreport/narrativeweb.py diff --git a/src/plugins/webreport/WebCal.py b/src/plugins/webreport/webcal.py similarity index 100% rename from src/plugins/webreport/WebCal.py rename to src/plugins/webreport/webcal.py diff --git a/src/plugins/webreport/webplugins.gpr.py b/src/plugins/webreport/webplugins.gpr.py index 91174220b..2b7ca1ee5 100644 --- a/src/plugins/webreport/webplugins.gpr.py +++ b/src/plugins/webreport/webplugins.gpr.py @@ -34,7 +34,7 @@ plg.description = _("Produces web (HTML) pages for individuals, or a set of " plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'NarrativeWeb.py' +plg.fname = 'narrativeweb.py' plg.ptype = REPORT plg.authors = ["Donald N. Allingham", "Rob G. Healey"] plg.authors_email = ["don@gramps-project.org", "robhealey1@gmail.com"] @@ -57,7 +57,7 @@ plg.description = _("Produces web (HTML) calendars.") plg.version = '1.0' plg.gramps_target_version = '3.5' plg.status = STABLE -plg.fname = 'WebCal.py' +plg.fname = 'webcal.py' plg.ptype = REPORT plg.authors = ["Thom Sturgill", "Rob G. Healey"] plg.authors_email = ["thsturgill@yahoo.com", "robhealey1@gmail.com"] From 010325c23b838e970e41df03573a51dc7ed4a8d9 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 23 Jun 2012 09:36:29 +0000 Subject: [PATCH 28/68] GEPS008: Change plugin Makefiles to lowercase svn: r19899 --- po/POTFILES.in | 239 ++++++++++++++--------------- po/POTFILES.skip | 38 ++--- src/plugins/Makefile.am | 4 +- src/plugins/docgen/Makefile.am | 18 +-- src/plugins/drawreport/Makefile.am | 12 +- src/plugins/export/Makefile.am | 16 +- src/plugins/gramplet/Makefile.am | 68 ++++---- src/plugins/graph/Makefile.am | 6 +- src/plugins/import/Makefile.am | 16 +- src/plugins/quickview/Makefile.am | 16 +- src/plugins/textreport/Makefile.am | 34 ++-- src/plugins/tool/Makefile.am | 52 +++---- src/plugins/webreport/Makefile.am | 4 +- 13 files changed, 260 insertions(+), 263 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index b8a8418b0..5517e0cb7 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -489,92 +489,92 @@ src/docgen/ODSTab.py src/docgen/TextBufDoc.py # plugins directory -src/plugins/BookReport.py +src/plugins/bookreport.py src/plugins/bookreport.gpr.py src/plugins/records.gpr.py -src/plugins/Records.py +src/plugins/records.py # plugins/docgen directory -src/plugins/docgen/AsciiDoc.py +src/plugins/docgen/asciidoc.py src/plugins/docgen/docgen.gpr.py -src/plugins/docgen/GtkPrint.py -src/plugins/docgen/HtmlDoc.py -src/plugins/docgen/LaTeXDoc.py -src/plugins/docgen/ODFDoc.py -src/plugins/docgen/PSDrawDoc.py -src/plugins/docgen/RTFDoc.py -src/plugins/docgen/SvgDrawDoc.py +src/plugins/docgen/gtkprint.py +src/plugins/docgen/htmldoc.py +src/plugins/docgen/latexdoc.py +src/plugins/docgen/odfdoc.py +src/plugins/docgen/psdrawdoc.py +src/plugins/docgen/rtfdoc.py +src/plugins/docgen/svgdrawdoc.py # plugins/drawreport directory -src/plugins/drawreport/AncestorTree.py -src/plugins/drawreport/Calendar.py -src/plugins/drawreport/DescendTree.py +src/plugins/drawreport/ancestortree.py +src/plugins/drawreport/calendar.py +src/plugins/drawreport/descendtree.py src/plugins/drawreport/drawplugins.gpr.py -src/plugins/drawreport/FanChart.py -src/plugins/drawreport/StatisticsChart.py -src/plugins/drawreport/TimeLine.py +src/plugins/drawreport/fanchart.py +src/plugins/drawreport/statisticschart.py +src/plugins/drawreport/timeline.py # plugins/export directory src/plugins/export/export.gpr.py -src/plugins/export/ExportCsv.py -src/plugins/export/ExportFtree.py -src/plugins/export/ExportGedcom.py -src/plugins/export/ExportGeneWeb.py -src/plugins/export/ExportPkg.py -#src/plugins/export/ExportSql.py -src/plugins/export/ExportVCalendar.py -src/plugins/export/ExportVCard.py -src/plugins/export/ExportXml.py +src/plugins/export/exportcsv.py +src/plugins/export/exportftree.py +src/plugins/export/exportgedcom.py +src/plugins/export/exportgeneweb.py +src/plugins/export/exportpkg.py +#src/plugins/export/exportsql.py +src/plugins/export/exportvcalendar.py +src/plugins/export/exportvcard.py +src/plugins/export/exportxml.py # plugins/gramplet directory -src/plugins/gramplet/AgeOnDateGramplet.py -src/plugins/gramplet/AgeStats.py -src/plugins/gramplet/Attributes.py -src/plugins/gramplet/AttributesGramplet.py -src/plugins/gramplet/Backlinks.py -src/plugins/gramplet/CalendarGramplet.py -src/plugins/gramplet/Children.py -src/plugins/gramplet/Citations.py -src/plugins/gramplet/DescendGramplet.py -src/plugins/gramplet/EditExifMetadata.py -src/plugins/gramplet/Events.py -src/plugins/gramplet/FanChartGramplet.py -src/plugins/gramplet/FaqGramplet.py -src/plugins/gramplet/GivenNameGramplet.py +src/plugins/gramplet/ageondategramplet.py +src/plugins/gramplet/agestats.py +src/plugins/gramplet/attributes.py +src/plugins/gramplet/attributesgramplet.py +src/plugins/gramplet/backlinks.py +src/plugins/gramplet/calendargramplet.py +src/plugins/gramplet/children.py +src/plugins/gramplet/citations.py +src/plugins/gramplet/descendgramplet.py +src/plugins/gramplet/editexifmetadata.py +src/plugins/gramplet/events.py +src/plugins/gramplet/fanchartgramplet.py +src/plugins/gramplet/faqgramplet.py +src/plugins/gramplet/givennamegramplet.py src/plugins/gramplet/gramplet.gpr.py -#src/plugins/gramplet/MetadataViewer.py -src/plugins/gramplet/Notes.py -src/plugins/gramplet/PedigreeGramplet.py -src/plugins/gramplet/PersonDetails.py -src/plugins/gramplet/PersonResidence.py -src/plugins/gramplet/PlaceDetails.py -src/plugins/gramplet/QuickViewGramplet.py -src/plugins/gramplet/RelativeGramplet.py -src/plugins/gramplet/RepositoryDetails.py -src/plugins/gramplet/SessionLogGramplet.py -src/plugins/gramplet/StatsGramplet.py -src/plugins/gramplet/SurnameCloudGramplet.py -src/plugins/gramplet/ToDoGramplet.py -src/plugins/gramplet/TopSurnamesGramplet.py -src/plugins/gramplet/WelcomeGramplet.py -src/plugins/gramplet/WhatsNext.py +#src/plugins/gramplet/metadataviewer.py +src/plugins/gramplet/notes.py +src/plugins/gramplet/pedigreegramplet.py +src/plugins/gramplet/persondetails.py +src/plugins/gramplet/personresidence.py +src/plugins/gramplet/placedetails.py +src/plugins/gramplet/quickviewgramplet.py +src/plugins/gramplet/relativegramplet.py +src/plugins/gramplet/repositorydetails.py +src/plugins/gramplet/sessionloggramplet.py +src/plugins/gramplet/statsgramplet.py +src/plugins/gramplet/surnamecloudgramplet.py +src/plugins/gramplet/todogramplet.py +src/plugins/gramplet/topsurnamesgramplet.py +src/plugins/gramplet/welcomegramplet.py +src/plugins/gramplet/whatsnext.py # plugins/graph directory src/plugins/graph/graphplugins.gpr.py -src/plugins/graph/GVFamilyLines.py -src/plugins/graph/GVHourGlass.py -src/plugins/graph/GVRelGraph.py +src/plugins/graph/gvfamilylines.py +src/plugins/graph/gvhourglass.py +src/plugins/graph/gvrelgraph.py # plugins/import directory src/plugins/import/import.gpr.py -src/plugins/import/ImportCsv.py -src/plugins/import/ImportGedcom.py -src/plugins/import/ImportGeneWeb.py -src/plugins/import/ImportGrdb.py -src/plugins/import/ImportProGen.py -src/plugins/import/ImportVCard.py -src/plugins/import/ImportGpkg.py -src/plugins/import/ImportXml.py +src/plugins/import/importcsv.py +src/plugins/import/importgedcom.py +src/plugins/import/importgeneweb.py +src/plugins/import/importgrdb.py +src/plugins/import/importprogen.py +src/plugins/import/importvcard.py +src/plugins/import/importgpkg.py +src/plugins/import/importxml.py # plugins/lib directory src/plugins/lib/libcairodoc.py @@ -591,7 +591,7 @@ src/plugins/lib/libtranslate.py src/plugins/lib/libtreebase.py src/plugins/lib/holidays.xml.in src/plugins/lib/maps/geography.py -src/plugins/lib/maps/osmGps.py +src/plugins/lib/maps/osmgps.py src/plugins/lib/maps/placeselection.py # plugins/mapservices directory @@ -601,19 +601,19 @@ src/plugins/mapservices/mapservice.gpr.py src/plugins/mapservices/openstreetmap.py # plugins/quickview directory -src/plugins/quickview/AgeOnDate.py +src/plugins/quickview/ageondate.py src/plugins/quickview/all_events.py src/plugins/quickview/all_relations.py -src/plugins/quickview/AttributeMatch.py -src/plugins/quickview/FilterByName.py +src/plugins/quickview/attributematch.py +src/plugins/quickview/filterbyname.py src/plugins/quickview/lineage.py -src/plugins/quickview/OnThisDay.py -#src/plugins/quickview/Query.py +src/plugins/quickview/onthisday.py +#src/plugins/quickview/query.py src/plugins/quickview/quickview.gpr.py -src/plugins/quickview/References.py -src/plugins/quickview/LinkReferences.py -src/plugins/quickview/Reporef.py -src/plugins/quickview/SameSurnames.py +src/plugins/quickview/references.py +src/plugins/quickview/linkreferences.py +src/plugins/quickview/reporef.py +src/plugins/quickview/samesurnames.py src/plugins/quickview/siblings.py # plugins/rel directory @@ -623,50 +623,50 @@ src/plugins/rel/relplugins.gpr.py src/plugins/sidebar/sidebar.gpr.py # plugins/textreport directory -src/plugins/textreport/AlphabeticalIndex.py -src/plugins/textreport/AncestorReport.py -src/plugins/textreport/BirthdayReport.py -src/plugins/textreport/CustomBookText.py -src/plugins/textreport/DescendReport.py -src/plugins/textreport/DetAncestralReport.py -src/plugins/textreport/DetDescendantReport.py -src/plugins/textreport/EndOfLineReport.py -src/plugins/textreport/FamilyGroup.py -src/plugins/textreport/IndivComplete.py -src/plugins/textreport/KinshipReport.py -src/plugins/textreport/NumberOfAncestorsReport.py -src/plugins/textreport/PlaceReport.py -src/plugins/textreport/SimpleBookTitle.py -src/plugins/textreport/Summary.py -src/plugins/textreport/TableOfContents.py -src/plugins/textreport/TagReport.py +src/plugins/textreport/alphabeticalindex.py +src/plugins/textreport/ancestorreport.py +src/plugins/textreport/birthdayreport.py +src/plugins/textreport/custombooktext.py +src/plugins/textreport/descendreport.py +src/plugins/textreport/detancestralreport.py +src/plugins/textreport/detdescendantreport.py +src/plugins/textreport/endoflinereport.py +src/plugins/textreport/familygroup.py +src/plugins/textreport/indivcomplete.py +src/plugins/textreport/kinshipreport.py +src/plugins/textreport/numberofancestorsreport.py +src/plugins/textreport/placereport.py +src/plugins/textreport/simplebooktitle.py +src/plugins/textreport/summary.py +src/plugins/textreport/tableofcontents.py +src/plugins/textreport/tagreport.py src/plugins/textreport/textplugins.gpr.py # plugins/tool directory -src/plugins/tool/ChangeNames.py -src/plugins/tool/ChangeTypes.py -src/plugins/tool/Check.py -src/plugins/tool/Desbrowser.py -src/plugins/tool/Eval.py -src/plugins/tool/EventCmp.py -src/plugins/tool/EventNames.py -src/plugins/tool/ExtractCity.py -src/plugins/tool/FindDupes.py -src/plugins/tool/Leak.py -src/plugins/tool/MediaManager.py -src/plugins/tool/MergeCitations.py -src/plugins/tool/NotRelated.py -src/plugins/tool/OwnerEditor.py -src/plugins/tool/PatchNames.py -src/plugins/tool/Rebuild.py -src/plugins/tool/RebuildRefMap.py -src/plugins/tool/RelCalc.py -src/plugins/tool/RemoveUnused.py -src/plugins/tool/ReorderIds.py -src/plugins/tool/SortEvents.py -src/plugins/tool/SoundGen.py +src/plugins/tool/changenames.py +src/plugins/tool/changetypes.py +src/plugins/tool/check.py +src/plugins/tool/desbrowser.py +src/plugins/tool/eval.py +src/plugins/tool/eventcmp.py +src/plugins/tool/eventnames.py +src/plugins/tool/extractcity.py +src/plugins/tool/finddupes.py +src/plugins/tool/leak.py +src/plugins/tool/mediamanager.py +src/plugins/tool/mergecitations.py +src/plugins/tool/notrelated.py +src/plugins/tool/ownereditor.py +src/plugins/tool/patchnames.py +src/plugins/tool/rebuild.py +src/plugins/tool/rebuildrefmap.py +src/plugins/tool/relcalc.py +src/plugins/tool/removeunused.py +src/plugins/tool/reorderids.py +src/plugins/tool/sortevents.py +src/plugins/tool/soundgen.py src/plugins/tool/tools.gpr.py -src/plugins/tool/Verify.py +src/plugins/tool/verify.py #plugins/view directory src/plugins/view/citationtreeview.py @@ -696,17 +696,14 @@ src/plugins/view/sourceview.py src/plugins/view/view.gpr.py # plugins/webreport directory -src/plugins/webreport/NarrativeWeb.py -src/plugins/webreport/WebCal.py +src/plugins/webreport/narrativeweb.py +src/plugins/webreport/webcal.py src/plugins/webreport/webplugins.gpr.py # plugins/webstuff directory src/plugins/webstuff/webstuff.gpr.py src/plugins/webstuff/webstuff.py -# Simple API -src/Simple/_SimpleAccess.py - # # Glade files # diff --git a/po/POTFILES.skip b/po/POTFILES.skip index d39209764..41696d6be 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -304,7 +304,7 @@ src/guiQML/views/dbman.py src/plugins/sidebar/sidebar.gpr.py # plugins/docgen directory -src/plugins/docgen/PdfDoc.py +src/plugins/docgen/pdfdoc.py # plugins/lib directory src/plugins/lib/libformatting.py @@ -316,32 +316,32 @@ src/plugins/lib/libodfbackend.py src/plugins/lib/libsubstkeyword.py # plugins/import directory -src/plugins/import/ImportSql.py +src/plugins/import/importsql.py # plugins/tool directory -src/plugins/tool/CalculateEstimatedDates.py -src/plugins/tool/DateParserDisplayTest.py -src/plugins/tool/DumpGenderStats.py -src/plugins/tool/PHPGedViewConnector.py -src/plugins/tool/TestcaseGenerator.py +src/plugins/tool/calculateestimateddates.py +src/plugins/tool/dateparserdisplaytest.py +src/plugins/tool/dumpgenderstats.py +src/plugins/tool/phpgedviewconnector.py +src/plugins/tool/testcasegenerator.py src/plugins/tool/phpgedview.glade src/plugins/tool/toolsdebug.gpr.py # plugins/gramplet directory -src/plugins/gramplet/DeepConnections.py -src/plugins/gramplet/Gallery.py -src/plugins/gramplet/HeadlineNewsGramplet.py -src/plugins/gramplet/MediaPreview.py -src/plugins/gramplet/MetadataViewer.py -src/plugins/gramplet/NoteGramplet.py -src/plugins/gramplet/PluginManagerGramplet.py -src/plugins/gramplet/PopulateGramplet.py -src/plugins/gramplet/PopulateGramplet.gpr.py -src/plugins/gramplet/PythonGramplet.py +src/plugins/gramplet/deepconnections.py +src/plugins/gramplet/gallery.py +src/plugins/gramplet/headlinenewsgramplet.py +src/plugins/gramplet/mediapreview.py +src/plugins/gramplet/metadataviewer.py +src/plugins/gramplet/notegramplet.py +src/plugins/gramplet/pluginmanagergramplet.py +src/plugins/gramplet/populategramplet.py +src/plugins/gramplet/populategramplet.gpr.py +src/plugins/gramplet/pythongramplet.py # plugins/quickview directory -src/plugins/quickview/AllNames.py -src/plugins/quickview/Query.py +src/plugins/quickview/allnames.py +src/plugins/quickview/query.py # plugins/rel directory src/plugins/rel/rel_cs.py diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index 713987caf..a42ca1e91 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -26,9 +26,9 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins pkgpython_PYTHON = \ bookreport.gpr.py\ - BookReport.py\ + bookreport.py\ records.gpr.py\ - Records.py + records.py pkgpyexecdir = @pkgpyexecdir@/plugins pkgpythondir = $(datadir)/@PACKAGE@/plugins diff --git a/src/plugins/docgen/Makefile.am b/src/plugins/docgen/Makefile.am index 806d4ae59..354ec1d47 100644 --- a/src/plugins/docgen/Makefile.am +++ b/src/plugins/docgen/Makefile.am @@ -7,16 +7,16 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/docgen pkgpython_PYTHON = \ - AsciiDoc.py \ + asciidoc.py \ docgen.gpr.py\ - GtkPrint.py \ - HtmlDoc.py \ - LaTeXDoc.py \ - ODFDoc.py \ - PdfDoc.py \ - PSDrawDoc.py \ - RTFDoc.py \ - SvgDrawDoc.py + gtkprint.py \ + htmldoc.py \ + latexdoc.py \ + odfdoc.py \ + pdfdoc.py \ + psdrawdoc.py \ + rtfdoc.py \ + svgdrawdoc.py pkgpyexecdir = @pkgpyexecdir@/plugins/docgen pkgpythondir = $(datadir)/@PACKAGE@/plugins/docgen diff --git a/src/plugins/drawreport/Makefile.am b/src/plugins/drawreport/Makefile.am index c5548230a..3a26d896c 100644 --- a/src/plugins/drawreport/Makefile.am +++ b/src/plugins/drawreport/Makefile.am @@ -7,13 +7,13 @@ pkgpythondir = $(datadir)/@PACKAGE@/plugins/drawreport pkgpython_PYTHON = \ - AncestorTree.py \ - Calendar.py\ - DescendTree.py \ + ancestortree.py \ + calendar.py\ + descendtree.py \ drawplugins.gpr.py\ - FanChart.py \ - StatisticsChart.py \ - TimeLine.py + fanchart.py \ + statisticschart.py \ + timeline.py pkgpyexecdir = @pkgpyexecdir@/plugins/drawreport diff --git a/src/plugins/export/Makefile.am b/src/plugins/export/Makefile.am index 349085781..53557b7ab 100644 --- a/src/plugins/export/Makefile.am +++ b/src/plugins/export/Makefile.am @@ -6,14 +6,14 @@ pkgpython_PYTHON = \ export.gpr.py \ - ExportCsv.py \ - ExportFtree.py \ - ExportGedcom.py \ - ExportGeneWeb.py \ - ExportPkg.py \ - ExportVCalendar.py \ - ExportVCard.py \ - ExportXml.py + exportcsv.py \ + exportftree.py \ + exportgedcom.py \ + exportgeneweb.py \ + exportpkg.py \ + exportvcalendar.py \ + exportvcard.py \ + exportxml.py pkgpyexecdir = @pkgpyexecdir@/plugins/export pkgpythondir = $(datadir)/@PACKAGE@/plugins/export diff --git a/src/plugins/gramplet/Makefile.am b/src/plugins/gramplet/Makefile.am index b58a74871..0a3df7274 100644 --- a/src/plugins/gramplet/Makefile.am +++ b/src/plugins/gramplet/Makefile.am @@ -7,41 +7,41 @@ pkgpythondir = $(datadir)/@PACKAGE@/plugins/gramplet pkgpython_PYTHON = \ - AgeOnDateGramplet.py \ - AgeStats.py \ - Attributes.py \ - AttributesGramplet.py \ - Backlinks.py \ - CalendarGramplet.py \ - Children.py \ - Citations.py \ - DescendGramplet.py \ - EditExifMetadata.py \ - Events.py \ - FanChartGramplet.py \ - FaqGramplet.py \ - Filter.py \ - Gallery.py \ - GivenNameGramplet.py \ + ageondategramplet.py \ + agestats.py \ + attributes.py \ + attributesgramplet.py \ + backlinks.py \ + calendargramplet.py \ + children.py \ + citations.py \ + descendgramplet.py \ + editexifmetadata.py \ + events.py \ + fanchartgramplet.py \ + faqgramplet.py \ + filter.py \ + gallery.py \ + givennamegramplet.py \ gramplet.gpr.py \ - MediaPreview.py \ - MetadataViewer.py \ - Notes.py \ - PedigreeGramplet.py \ - PersonDetails.py \ - PersonResidence.py \ - PlaceDetails.py \ - PluginManagerGramplet.py\ - QuickViewGramplet.py \ - RelativeGramplet.py \ - RepositoryDetails.py \ - SessionLogGramplet.py \ - StatsGramplet.py \ - SurnameCloudGramplet.py \ - ToDoGramplet.py \ - TopSurnamesGramplet.py \ - WelcomeGramplet.py \ - WhatsNext.py + mediapreview.py \ + metadataviewer.py \ + notes.py \ + pedigreegramplet.py \ + persondetails.py \ + personresidence.py \ + placedetails.py \ + pluginmanagergramplet.py\ + quickviewgramplet.py \ + relativegramplet.py \ + repositorydetails.py \ + sessionloggramplet.py \ + statsgramplet.py \ + surnamecloudgramplet.py \ + todogramplet.py \ + topsurnamesgramplet.py \ + welcomegramplet.py \ + whatsnext.py pkgpyexecdir = @pkgpyexecdir@/plugins/gramplet diff --git a/src/plugins/graph/Makefile.am b/src/plugins/graph/Makefile.am index 3da9dedd1..f305931c8 100644 --- a/src/plugins/graph/Makefile.am +++ b/src/plugins/graph/Makefile.am @@ -8,9 +8,9 @@ pkgpythondir = $(datadir)/@PACKAGE@/plugins/graph pkgpython_PYTHON = \ graphplugins.gpr.py\ - GVFamilyLines.py \ - GVHourGlass.py \ - GVRelGraph.py + gvfamilylines.py \ + gvhourglass.py \ + gvrelgraph.py pkgpyexecdir = @pkgpyexecdir@/plugins/graph diff --git a/src/plugins/import/Makefile.am b/src/plugins/import/Makefile.am index c9e8a0d63..d91241199 100644 --- a/src/plugins/import/Makefile.am +++ b/src/plugins/import/Makefile.am @@ -8,14 +8,14 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/import pkgpython_PYTHON = \ import.gpr.py \ - ImportCsv.py \ - ImportGedcom.py \ - ImportGeneWeb.py \ - ImportGpkg.py \ - ImportGrdb.py \ - ImportProGen.py \ - ImportVCard.py \ - ImportXml.py + importcsv.py \ + importgedcom.py \ + importgeneweb.py \ + importgpkg.py \ + importgrdb.py \ + importprogen.py \ + importvcard.py \ + importxml.py pkgpyexecdir = @pkgpyexecdir@/plugins/import pkgpythondir = $(datadir)/@PACKAGE@/plugins/import diff --git a/src/plugins/quickview/Makefile.am b/src/plugins/quickview/Makefile.am index 2f661ba0d..00636b27f 100644 --- a/src/plugins/quickview/Makefile.am +++ b/src/plugins/quickview/Makefile.am @@ -7,18 +7,18 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/quickview pkgpython_PYTHON = \ - AgeOnDate.py \ + ageondate.py \ all_events.py \ all_relations.py \ - AttributeMatch.py \ - FilterByName.py \ + attributematch.py \ + filterbyname.py \ lineage.py \ - OnThisDay.py \ + onthisday.py \ quickview.gpr.py \ - References.py \ - LinkReferences.py \ - Reporef.py \ - SameSurnames.py\ + references.py \ + linkreferences.py \ + reporef.py \ + samesurnames.py\ siblings.py pkgpyexecdir = @pkgpyexecdir@/plugins/quickview diff --git a/src/plugins/textreport/Makefile.am b/src/plugins/textreport/Makefile.am index f3dce7bef..82e71b7b3 100644 --- a/src/plugins/textreport/Makefile.am +++ b/src/plugins/textreport/Makefile.am @@ -7,23 +7,23 @@ pkgpythondir = $(datadir)/@PACKAGE@/plugins/textreport pkgpython_PYTHON = \ - AlphabeticalIndex.py\ - AncestorReport.py\ - BirthdayReport.py\ - CustomBookText.py\ - DescendReport.py\ - DetAncestralReport.py\ - DetDescendantReport.py\ - EndOfLineReport.py\ - FamilyGroup.py\ - IndivComplete.py\ - KinshipReport.py\ - NumberOfAncestorsReport.py\ - PlaceReport.py\ - SimpleBookTitle.py\ - Summary.py\ - TableOfContents.py\ - TagReport.py\ + alphabeticalindex.py\ + ancestorreport.py\ + birthdayreport.py\ + custombooktext.py\ + descendreport.py\ + detancestralreport.py\ + detdescendantreport.py\ + endoflinereport.py\ + familygroup.py\ + indivcomplete.py\ + kinshipreport.py\ + numberofancestorsreport.py\ + placereport.py\ + simplebooktitle.py\ + summary.py\ + tableofcontents.py\ + tagreport.py\ textplugins.gpr.py pkgpyexecdir = @pkgpyexecdir@/plugins/textreport diff --git a/src/plugins/tool/Makefile.am b/src/plugins/tool/Makefile.am index fc786f8c5..aa0065989 100644 --- a/src/plugins/tool/Makefile.am +++ b/src/plugins/tool/Makefile.am @@ -7,33 +7,33 @@ pkgdatadir = $(datadir)/@PACKAGE@/plugins/tool pkgpython_PYTHON = \ - ChangeNames.py \ - ChangeTypes.py \ - Check.py \ - Desbrowser.py \ - Eval.py \ - EventCmp.py \ - EventNames.py \ - ExtractCity.py \ - FindDupes.py \ - Leak.py \ - MediaManager.py \ - NotRelated.py \ - OwnerEditor.py \ - PatchNames.py \ - Rebuild.py \ - RebuildRefMap.py \ - RelCalc.py \ - RemoveUnused.py \ - ReorderIds.py \ - SortEvents.py \ - SoundGen.py \ + changenames.py \ + changetypes.py \ + check.py \ + desbrowser.py \ + eval.py \ + eventcmp.py \ + eventnames.py \ + extractcity.py \ + finddupes.py \ + leak.py \ + mediamanager.py \ + notrelated.py \ + ownereditor.py \ + patchnames.py \ + rebuild.py \ + rebuildrefmap.py \ + relcalc.py \ + removeunused.py \ + reorderids.py \ + sortevents.py \ + soundgen.py \ tools.gpr.py \ - Verify.py \ - MergeCitations.py -# DumpGenderStats.py \ -# PHPGedViewConnector.py \ -# TestcaseGenerator.py + verify.py \ + mergecitations.py +# dumpgenderstats.py \ +# phpgedviewconnector.py \ +# testcasegenerator.py pkgpyexecdir = @pkgpyexecdir@/plugins/tool pkgpythondir = $(datadir)/@PACKAGE@/plugins/tool diff --git a/src/plugins/webreport/Makefile.am b/src/plugins/webreport/Makefile.am index cfae3cacf..efc4b3680 100644 --- a/src/plugins/webreport/Makefile.am +++ b/src/plugins/webreport/Makefile.am @@ -7,8 +7,8 @@ pkgpythondir = $(datadir)/@PACKAGE@/plugins/webreport pkgpython_PYTHON = \ - NarrativeWeb.py\ - WebCal.py\ + narrativeweb.py\ + webcal.py\ webplugins.gpr.py pkgpyexecdir = @pkgpyexecdir@/plugins/webreport From 742c3d770e0a95a53937023d97a8b7531c068a46 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 23 Jun 2012 16:27:39 +0000 Subject: [PATCH 29/68] GEPS008: Moved ImgManip module svn: r19901 --- po/POTFILES.skip | 4 +--- src/Makefile.am | 1 - src/gen/utils/Makefile.am | 1 + src/{ImgManip.py => gen/utils/image.py} | 0 src/plugins/docgen/htmldoc.py | 4 ++-- src/plugins/docgen/odfdoc.py | 12 ++++++------ src/plugins/docgen/rtfdoc.py | 8 ++++---- src/plugins/lib/libcairodoc.py | 7 +++---- src/plugins/webreport/narrativeweb.py | 6 +++--- 9 files changed, 20 insertions(+), 23 deletions(-) rename src/{ImgManip.py => gen/utils/image.py} (100%) diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 41696d6be..cf677cd6a 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -3,9 +3,6 @@ # Python files # -#src -src/ImgManip.py - # cli src/cli/__init__.py src/cli/user.py @@ -214,6 +211,7 @@ src/gen/simple/_simpledoc.py src/gen/utils/__init__.py src/gen/utils/callback.py src/gen/utils/callman.py +src/gen/utils/image.py src/gen/utils/referent.py # gui - GUI code diff --git a/src/Makefile.am b/src/Makefile.am index 91c4615cc..d0463a8c3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,6 @@ gdirdir=$(prefix)/share/gramps gdir_PYTHON = \ const.py\ gramps.py\ - ImgManip.py\ LdsUtils.py \ MacTransUtils.py\ TransUtils.py\ diff --git a/src/gen/utils/Makefile.am b/src/gen/utils/Makefile.am index 0c02a176e..2368247c8 100644 --- a/src/gen/utils/Makefile.am +++ b/src/gen/utils/Makefile.am @@ -13,6 +13,7 @@ pkgpython_PYTHON = \ callman.py \ configmanager.py \ fallback.py \ + image.py \ place.py \ referent.py diff --git a/src/ImgManip.py b/src/gen/utils/image.py similarity index 100% rename from src/ImgManip.py rename to src/gen/utils/image.py diff --git a/src/plugins/docgen/htmldoc.py b/src/plugins/docgen/htmldoc.py index 978f42f26..c900eda07 100644 --- a/src/plugins/docgen/htmldoc.py +++ b/src/plugins/docgen/htmldoc.py @@ -46,7 +46,7 @@ from gen.ggettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------ -import ImgManip +from gen.utils.image import resize_to_jpeg import const from gen.plug.docgen import BaseDoc, TextDoc, FONT_SANS_SERIF, URL_PATTERN from libhtmlbackend import HtmlBackend, process_spaces @@ -549,7 +549,7 @@ class HtmlDoc(BaseDoc, TextDoc): imdir = self._backend.datadirfull() try: - ImgManip.resize_to_jpeg(name, imdir + os.sep + refname, size, size, crop=crop) + resize_to_jpeg(name, imdir + os.sep + refname, size, size, crop=crop) except: LOG.warn(_("Could not create jpeg version of image %(name)s") % {'name' : name}) diff --git a/src/plugins/docgen/odfdoc.py b/src/plugins/docgen/odfdoc.py index c4c12be7e..f25ae2664 100644 --- a/src/plugins/docgen/odfdoc.py +++ b/src/plugins/docgen/odfdoc.py @@ -88,7 +88,7 @@ from gen.plug.docgen.fontscale import string_width from libodfbackend import OdfBackend import const from gen.plug.report import utils as ReportUtils -import ImgManip +from gen.utils.image import image_size, image_dpi, image_actual_size from gen.errors import ReportError #------------------------------------------------------------------------- @@ -1007,7 +1007,7 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc): # try to open the image. If the open fails, it probably wasn't # a valid image (could be a PDF, or a non-image) - (x, y) = ImgManip.image_size(file_name) + (x, y) = image_size(file_name) if (x, y) == (0, 0): return @@ -1027,10 +1027,10 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc): pos = pos.title() if pos in ['left', 'right', 'single'] else 'Row' if crop: - dpi = ImgManip.image_dpi(file_name) + dpi = image_dpi(file_name) if dpi: - (act_width, act_height) = ImgManip.image_actual_size( + (act_width, act_height) = image_actual_size( x_cm, y_cm, crop[2] - crop[0], crop[3] - crop[1] ) @@ -1047,9 +1047,9 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc): pos += "_" + str(crop) else: - (act_width, act_height) = ImgManip.image_actual_size(x_cm, y_cm, x, y) + (act_width, act_height) = image_actual_size(x_cm, y_cm, x, y) else: - (act_width, act_height) = ImgManip.image_actual_size(x_cm, y_cm, x, y) + (act_width, act_height) = image_actual_size(x_cm, y_cm, x, y) if len(alt): self.cntnt.write( diff --git a/src/plugins/docgen/rtfdoc.py b/src/plugins/docgen/rtfdoc.py index 729395834..ac1f2d910 100644 --- a/src/plugins/docgen/rtfdoc.py +++ b/src/plugins/docgen/rtfdoc.py @@ -41,7 +41,7 @@ LOG = logging.getLogger(".rtfdoc") from gen.plug.docgen import (BaseDoc, TextDoc, FONT_SERIF, PARA_ALIGN_RIGHT, PARA_ALIGN_CENTER, PARA_ALIGN_JUSTIFY, URL_PATTERN) -import ImgManip +from gen.utils.image import image_size, image_actual_size, resize_to_jpeg_buffer from gen.errors import ReportError import Utils @@ -395,18 +395,18 @@ class RTFDoc(BaseDoc,TextDoc): #-------------------------------------------------------------------- def add_media_object(self, name, pos, x_cm, y_cm, alt='', style_name=None, crop=None): - nx, ny = ImgManip.image_size(name) + nx, ny = image_size(name) if (nx, ny) == (0,0): return - (act_width, act_height) = ImgManip.image_actual_size(x_cm, y_cm, nx, ny) + (act_width, act_height) = image_actual_size(x_cm, y_cm, nx, ny) act_width = twips(act_width) act_height = twips(act_height) size = [act_width, act_height] - buf = ImgManip.resize_to_jpeg_buffer(name, size, crop=crop) + buf = resize_to_jpeg_buffer(name, size, crop=crop) act_width = size[0] # In case it changed because of cropping or keeping the ratio act_height = size[1] diff --git a/src/plugins/lib/libcairodoc.py b/src/plugins/lib/libcairodoc.py index 8b121451e..fe6c2935e 100644 --- a/src/plugins/lib/libcairodoc.py +++ b/src/plugins/lib/libcairodoc.py @@ -49,7 +49,7 @@ from gen.plug.docgen import (BaseDoc, TextDoc, DrawDoc, ParagraphStyle, from gen.plug.report import utils as ReportUtils from gen.errors import PluginError from gen.plug.docbackend import CairoBackend -import ImgManip +from gen.utils.image import resize_to_buffer #------------------------------------------------------------------------ # @@ -1016,9 +1016,8 @@ class GtkDocPicture(GtkDocBaseElement): l_margin = 0 # load the image and get its extents - pixbuf = ImgManip.resize_to_buffer(self._filename, - [img_width, img_height], - self._crop) + pixbuf = resize_to_buffer(self._filename, [img_width, img_height], + self._crop) pixbuf_width = pixbuf.get_width() pixbuf_height = pixbuf.get_height() diff --git a/src/plugins/webreport/narrativeweb.py b/src/plugins/webreport/narrativeweb.py index 5a94547aa..f6a10d124 100644 --- a/src/plugins/webreport/narrativeweb.py +++ b/src/plugins/webreport/narrativeweb.py @@ -92,7 +92,7 @@ import Utils from gen.utils.referent import get_source_and_citation_referents from gen.constfunc import win from gui.thumbnails import get_thumbnail_path, run_thumbnailer -import ImgManip +from gen.utils.image import image_size, resize_to_jpeg_buffer import gen.mime from gen.display.name import displayer as _nd from gen.datehandler import displayer as _dd @@ -3942,7 +3942,7 @@ class MediaPage(BasePage): # have to await a large download unnecessarily. Either way, set # the display image size as requested. orig_image_path = Utils.media_path_full(self.dbase_, media.get_path()) - (width, height) = ImgManip.image_size(orig_image_path) + (width, height) = image_size(orig_image_path) max_width = self.report.options['maxinitialimagewidth'] max_height = self.report.options['maxinitialimageheight'] if width != 0 and height != 0: @@ -3960,7 +3960,7 @@ class MediaPage(BasePage): # scale factor is significant enough to warrant making a smaller image initial_image_path = '%s_init.jpg' % os.path.splitext(newpath)[0] size = [new_width, new_height] - initial_image_data = ImgManip.resize_to_jpeg_buffer(orig_image_path, size) + initial_image_data = resize_to_jpeg_buffer(orig_image_path, size) new_width = size[0] # In case it changed because of keeping the ratio new_height = size[1] if self.report.archive: From e2a80ded2a901cc907ddedbcbe00c0e2e9d58ca5 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 23 Jun 2012 16:44:40 +0000 Subject: [PATCH 30/68] GEPS008: Moved LdsUtils module svn: r19902 --- po/POTFILES.in | 2 +- src/Makefile.am | 1 - src/gen/utils/Makefile.am | 1 + src/{LdsUtils.py => gen/utils/lds.py} | 0 src/gui/editors/displaytabs/ldsmodel.py | 4 ++-- src/gui/editors/editldsord.py | 6 +++--- src/plugins/lib/libgedcom.py | 8 ++++---- src/plugins/tool/testcasegenerator.py | 4 ++-- 8 files changed, 13 insertions(+), 13 deletions(-) rename src/{LdsUtils.py => gen/utils/lds.py} (100%) diff --git a/po/POTFILES.in b/po/POTFILES.in index 5517e0cb7..09afb2779 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -4,7 +4,6 @@ # src/const.py src/gramps.py -src/LdsUtils.py src/TransUtils.py src/Utils.py @@ -325,6 +324,7 @@ src/gen/simple/_simpletable.py # gen.utils src/gen/utils/alive.py +src/gen/utils/lds.py src/gen/utils/place.py # gui - GUI code diff --git a/src/Makefile.am b/src/Makefile.am index d0463a8c3..18ddfc40c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,7 +15,6 @@ gdirdir=$(prefix)/share/gramps gdir_PYTHON = \ const.py\ gramps.py\ - LdsUtils.py \ MacTransUtils.py\ TransUtils.py\ Utils.py diff --git a/src/gen/utils/Makefile.am b/src/gen/utils/Makefile.am index 2368247c8..e109784cf 100644 --- a/src/gen/utils/Makefile.am +++ b/src/gen/utils/Makefile.am @@ -14,6 +14,7 @@ pkgpython_PYTHON = \ configmanager.py \ fallback.py \ image.py \ + lds.py \ place.py \ referent.py diff --git a/src/LdsUtils.py b/src/gen/utils/lds.py similarity index 100% rename from src/LdsUtils.py rename to src/gen/utils/lds.py diff --git a/src/gui/editors/displaytabs/ldsmodel.py b/src/gui/editors/displaytabs/ldsmodel.py index d8d31abf4..1c353a28b 100644 --- a/src/gui/editors/displaytabs/ldsmodel.py +++ b/src/gui/editors/displaytabs/ldsmodel.py @@ -39,7 +39,7 @@ import gtk # #------------------------------------------------------------------------- import gen.datehandler -import LdsUtils +from gen.utils.lds import TEMPLES #------------------------------------------------------------------------- # @@ -59,7 +59,7 @@ class LdsModel(gtk.ListStore): lds_ord.type2str(), gen.datehandler.get_date(lds_ord), lds_ord.status2str(), - LdsUtils.TEMPLES.name(lds_ord.get_temple()), + TEMPLES.name(lds_ord.get_temple()), self.column_place(lds_ord), lds_ord, ]) diff --git a/src/gui/editors/editldsord.py b/src/gui/editors/editldsord.py index d1a325cb3..153e4891c 100644 --- a/src/gui/editors/editldsord.py +++ b/src/gui/editors/editldsord.py @@ -47,7 +47,7 @@ import gtk #------------------------------------------------------------------------- import gen.lib from gen.display.name import displayer as name_displayer -import LdsUtils +from gen.utils.lds import TEMPLES from gui.glade import Glade from editsecondary import EditSecondary from objectentries import PlaceEntry @@ -205,7 +205,7 @@ class EditLdsOrd(EditSecondary): self.top.get_object('temple'), self.obj.set_temple, self.obj.get_temple, - LdsUtils.TEMPLES.name_code_data(), + TEMPLES.name_code_data(), self.db.readonly) self.track_ref_for_deletion('temple_menu') @@ -391,7 +391,7 @@ class EditFamilyLdsOrd(EditSecondary): self.top.get_object('temple'), self.obj.set_temple, self.obj.get_temple, - LdsUtils.TEMPLES.name_code_data(), + TEMPLES.name_code_data(), self.db.readonly) self.track_ref_for_deletion('temple_menu') diff --git a/src/plugins/lib/libgedcom.py b/src/plugins/lib/libgedcom.py index 069300952..2c6bc64d9 100644 --- a/src/plugins/lib/libgedcom.py +++ b/src/plugins/lib/libgedcom.py @@ -118,7 +118,7 @@ import gen.lib from gen.db import DbTxn from gen.updatecallback import UpdateCallback import gen.mime -import LdsUtils +from gen.utils.lds import TEMPLES import Utils from gen.datehandler._dateparser import DateParser from gen.db.dbconst import EVENT_KEY @@ -7136,10 +7136,10 @@ class GedcomParser(UpdateCallback): def __extract_temple(self, line): def get_code(code): - if LdsUtils.TEMPLES.is_valid_code(code): + if TEMPLES.is_valid_code(code): return code - elif LdsUtils.TEMPLES.is_valid_name(code): - return LdsUtils.TEMPLES.code(code) + elif TEMPLES.is_valid_name(code): + return TEMPLES.code(code) code = get_code(line.data) if code: diff --git a/src/plugins/tool/testcasegenerator.py b/src/plugins/tool/testcasegenerator.py index a7bd48705..c0233e11c 100644 --- a/src/plugins/tool/testcasegenerator.py +++ b/src/plugins/tool/testcasegenerator.py @@ -54,7 +54,7 @@ import gen.mime from gui.plug import tool import Utils from gui.utils import ProgressMeter -import LdsUtils +from gen.utils.lds import TEMPLES from gen.db.dbconst import * import const @@ -1535,7 +1535,7 @@ class TestcaseGenerator(tool.BatchTool): if isinstance(o,gen.lib.LdsOrd): if randint(0,1) == 1: - o.set_temple( choice( LdsUtils.TEMPLES.name_code_data())[1]) + o.set_temple( choice(TEMPLES.name_code_data())[1]) if issubclass(o.__class__,gen.lib.ldsordbase.LdsOrdBase): while randint(0,1) == 1: From b359b16a2152c020502a1d8962e5f1df69571992 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 23 Jun 2012 17:36:36 +0000 Subject: [PATCH 31/68] GEPS008: Moved translation utilities svn: r19903 --- po/POTFILES.in | 2 +- src/Makefile.am | 2 -- src/gen/plug/_pluginreg.py | 2 +- src/gen/utils/Makefile.am | 4 +++- .../utils/mactrans.py} | 0 src/{TransUtils.py => gen/utils/trans.py} | 6 +++--- src/gramps.py | 18 +++++++++--------- src/gui/clipboard.py | 2 +- src/gui/glade.py | 4 ++-- src/gui/plug/quick/_quicktable.py | 2 +- src/plugins/lib/libtranslate.py | 4 ++-- src/plugins/textreport/ancestorreport.py | 4 ++-- src/plugins/textreport/detancestralreport.py | 4 ++-- src/plugins/textreport/detdescendantreport.py | 4 ++-- 14 files changed, 29 insertions(+), 29 deletions(-) rename src/{MacTransUtils.py => gen/utils/mactrans.py} (100%) rename src/{TransUtils.py => gen/utils/trans.py} (99%) diff --git a/po/POTFILES.in b/po/POTFILES.in index 09afb2779..a89d42fa3 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -4,7 +4,6 @@ # src/const.py src/gramps.py -src/TransUtils.py src/Utils.py # cli @@ -326,6 +325,7 @@ src/gen/simple/_simpletable.py src/gen/utils/alive.py src/gen/utils/lds.py src/gen/utils/place.py +src/gen/utils/trans.py # gui - GUI code src/gui/aboutdialog.py diff --git a/src/Makefile.am b/src/Makefile.am index 18ddfc40c..4a7361c46 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,8 +15,6 @@ gdirdir=$(prefix)/share/gramps gdir_PYTHON = \ const.py\ gramps.py\ - MacTransUtils.py\ - TransUtils.py\ Utils.py # Clean up all the byte-compiled files diff --git a/src/gen/plug/_pluginreg.py b/src/gen/plug/_pluginreg.py index ac62a58ac..3424ecdb0 100644 --- a/src/gen/plug/_pluginreg.py +++ b/src/gen/plug/_pluginreg.py @@ -42,7 +42,7 @@ import traceback #------------------------------------------------------------------------- from const import VERSION as GRAMPSVERSION, VERSION_TUPLE from const import IMAGE_DIR -from TransUtils import get_addon_translator +from gen.utils.trans import get_addon_translator from gen.ggettext import gettext as _ #------------------------------------------------------------------------- diff --git a/src/gen/utils/Makefile.am b/src/gen/utils/Makefile.am index e109784cf..b469a146b 100644 --- a/src/gen/utils/Makefile.am +++ b/src/gen/utils/Makefile.am @@ -15,8 +15,10 @@ pkgpython_PYTHON = \ fallback.py \ image.py \ lds.py \ + mactrans.py \ place.py \ - referent.py + referent.py \ + trans.py pkgpyexecdir = @pkgpyexecdir@/gen/utils diff --git a/src/MacTransUtils.py b/src/gen/utils/mactrans.py similarity index 100% rename from src/MacTransUtils.py rename to src/gen/utils/mactrans.py diff --git a/src/TransUtils.py b/src/gen/utils/trans.py similarity index 99% rename from src/TransUtils.py rename to src/gen/utils/trans.py index 3c9455c49..be547c9a4 100644 --- a/src/TransUtils.py +++ b/src/gen/utils/trans.py @@ -65,8 +65,8 @@ else: LOCALEDOMAIN = 'gramps' if mac(): - import MacTransUtils - MacTransUtils.mac_setup_localization(LOCALEDIR, LOCALEDOMAIN) + import mactrans + mactrans.mac_setup_localization(LOCALEDIR, LOCALEDOMAIN) else: lang = ' ' try: @@ -102,7 +102,7 @@ def setup_gettext(): except ValueError: print 'Failed to bind text domain, gtk.Builder() has no translation' - #following installs _ as a python function, we avoid this as TransUtils is + #following installs _ as a python function, we avoid this as this module is #used sometimes: #gettext.install(LOCALEDOMAIN, LOCALEDIR, unicode=1) diff --git a/src/gramps.py b/src/gramps.py index 42c68992e..30098b81e 100644 --- a/src/gramps.py +++ b/src/gramps.py @@ -48,7 +48,7 @@ from subprocess import Popen, PIPE # #------------------------------------------------------------------------- from gen.mime import mime_type_is_defined -import TransUtils +from gen.utils.trans import LOCALEDOMAIN, LOCALEDIR, setup_windows_gettext from gen.constfunc import win #------------------------------------------------------------------------- # @@ -59,8 +59,8 @@ from gen.constfunc import win #the order in which bindtextdomain on gettext and on locale is called #appears important, so we refrain from doing first all gettext. # -#TransUtils.setup_gettext() -gettext.bindtextdomain(TransUtils.LOCALEDOMAIN, TransUtils.LOCALEDIR) +#setup_gettext() +gettext.bindtextdomain(LOCALEDOMAIN, LOCALEDIR) try: locale.setlocale(locale.LC_ALL,'') except: @@ -80,8 +80,8 @@ except: # if that doesn't break Gramps under Windows # raise -gettext.textdomain(TransUtils.LOCALEDOMAIN) -gettext.install(TransUtils.LOCALEDOMAIN, localedir=None, unicode=1) #None is sys default locale +gettext.textdomain(LOCALEDOMAIN) +gettext.install(LOCALEDOMAIN, localedir=None, unicode=1) #None is sys default locale if hasattr(os, "uname"): operating_system = os.uname()[0] @@ -89,18 +89,18 @@ else: operating_system = sys.platform if win(): # Windows - TransUtils.setup_windows_gettext() + setup_windows_gettext() elif operating_system == 'FreeBSD': try: - gettext.bindtextdomain(TransUtils.LOCALEDOMAIN, TransUtils.LOCALEDIR) + gettext.bindtextdomain(LOCALEDOMAIN, LOCALEDIR) except locale.Error: print 'No translation in some gtk.Builder strings, ' elif operating_system == 'OpenBSD': pass else: # normal case try: - locale.bindtextdomain(TransUtils.LOCALEDOMAIN, TransUtils.LOCALEDIR) - #locale.textdomain(TransUtils.LOCALEDOMAIN) + locale.bindtextdomain(LOCALEDOMAIN, LOCALEDIR) + #locale.textdomain(LOCALEDOMAIN) except locale.Error: print 'No translation in some gtk.Builder strings, ' diff --git a/src/gui/clipboard.py b/src/gui/clipboard.py index 6e3683584..4d674abff 100644 --- a/src/gui/clipboard.py +++ b/src/gui/clipboard.py @@ -51,7 +51,7 @@ import gen.datehandler from gui.display import display_help from gui.managedwindow import ManagedWindow from gen.ggettext import sgettext as _ -from TransUtils import trans_objclass +from gen.utils.trans import trans_objclass from gen.constfunc import mac from gui.glade import Glade from gui.ddtargets import DdTargets diff --git a/src/gui/glade.py b/src/gui/glade.py index 069f90748..a77be9e13 100644 --- a/src/gui/glade.py +++ b/src/gui/glade.py @@ -48,7 +48,7 @@ import gtk # #------------------------------------------------------------------------ import const -import TransUtils +from gen.utils.trans import LOCALEDOMAIN #------------------------------------------------------------------------ # @@ -80,7 +80,7 @@ class Glade(gtk.Builder): :returns: reference to the newly-created Glade instance """ gtk.Builder.__init__(self) - self.set_translation_domain(TransUtils.LOCALEDOMAIN) + self.set_translation_domain(LOCALEDOMAIN) filename_given = filename is not None dirname_given = dirname is not None diff --git a/src/gui/plug/quick/_quicktable.py b/src/gui/plug/quick/_quicktable.py index 431e60b10..f9101c7bf 100644 --- a/src/gui/plug/quick/_quicktable.py +++ b/src/gui/plug/quick/_quicktable.py @@ -48,7 +48,7 @@ from gtk.gdk import ACTION_COPY #------------------------------------------------------------------------- from gen.ggettext import sgettext as _ from gen.simple import SimpleTable -from TransUtils import trans_objclass +from gen.utils.trans import trans_objclass from gen.errors import WindowActiveError from gui.widgets.multitreeview import MultiTreeView from gui.ddtargets import DdTargets diff --git a/src/plugins/lib/libtranslate.py b/src/plugins/lib/libtranslate.py index 06501dc27..ae95ea3c7 100644 --- a/src/plugins/lib/libtranslate.py +++ b/src/plugins/lib/libtranslate.py @@ -37,7 +37,7 @@ _ = gettext.gettext # GRAMPS modules # #------------------------------------------------------------------------ -import TransUtils +from gen.utils.trans import get_localedomain import gen.datehandler from gen.config import config from gen.lib.grampstype import GrampsType @@ -143,7 +143,7 @@ class Translator: else: # fallback=True will cause the translator to use English if # lang = "en" or if something goes wrong. - self.__trans = gettext.translation(TransUtils.get_localedomain(), + self.__trans = gettext.translation(get_localedomain(), languages=[lang], fallback=True) val = config.get('preferences.date-format') diff --git a/src/plugins/textreport/ancestorreport.py b/src/plugins/textreport/ancestorreport.py index ca4199ea3..5a5bab0a9 100644 --- a/src/plugins/textreport/ancestorreport.py +++ b/src/plugins/textreport/ancestorreport.py @@ -49,7 +49,7 @@ from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, from gen.plug.report import Report from gen.plug.report import utils as ReportUtils from gen.plug.report import MenuReportOptions -import TransUtils +from gen.utils.trans import get_available_translations from libnarrate import Narrator from libtranslate import Translator, get_language_string @@ -295,7 +295,7 @@ class AncestorOptions(MenuReportOptions): trans = EnumeratedListOption(_("Translation"), Translator.DEFAULT_TRANSLATION_STR) trans.add_item(Translator.DEFAULT_TRANSLATION_STR, _("Default")) - for language in TransUtils.get_available_translations(): + for language in get_available_translations(): trans.add_item(language, get_language_string(language)) trans.set_help(_("The translation to be used for the report.")) menu.add_option(category_name, "trans", trans) diff --git a/src/plugins/textreport/detancestralreport.py b/src/plugins/textreport/detancestralreport.py index 5be343139..062fd9e74 100644 --- a/src/plugins/textreport/detancestralreport.py +++ b/src/plugins/textreport/detancestralreport.py @@ -57,7 +57,7 @@ from gen.plug.report import MenuReportOptions import gen.datehandler from libnarrate import Narrator -import TransUtils +from gen.utils.trans import get_available_translations from libtranslate import Translator, get_language_string #------------------------------------------------------------------------ @@ -756,7 +756,7 @@ class DetAncestorOptions(MenuReportOptions): trans = EnumeratedListOption(_("Translation"), Translator.DEFAULT_TRANSLATION_STR) trans.add_item(Translator.DEFAULT_TRANSLATION_STR, _("Default")) - for language in TransUtils.get_available_translations(): + for language in get_available_translations(): trans.add_item(language, get_language_string(language)) trans.set_help(_("The translation to be used for the report.")) addopt("trans", trans) diff --git a/src/plugins/textreport/detdescendantreport.py b/src/plugins/textreport/detdescendantreport.py index ac372dfc7..6e0cfd7ae 100644 --- a/src/plugins/textreport/detdescendantreport.py +++ b/src/plugins/textreport/detdescendantreport.py @@ -61,7 +61,7 @@ from gen.plug.report import MenuReportOptions import gen.datehandler from libnarrate import Narrator -import TransUtils +from gen.utils.trans import get_available_translations from libtranslate import Translator, get_language_string #------------------------------------------------------------------------ @@ -931,7 +931,7 @@ class DetDescendantOptions(MenuReportOptions): trans = EnumeratedListOption(_("Translation"), Translator.DEFAULT_TRANSLATION_STR) trans.add_item(Translator.DEFAULT_TRANSLATION_STR, _("Default")) - for language in TransUtils.get_available_translations(): + for language in get_available_translations(): trans.add_item(language, get_language_string(language)) trans.set_help(_("The translation to be used for the report.")) add_option("trans", trans) From 640e2036936831eded1abe09ec9954d6ad164459 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 23 Jun 2012 18:34:50 +0000 Subject: [PATCH 32/68] GEPS008: Move format_time into datehandler svn: r19904 --- src/Utils.py | 14 -------------- src/gen/datehandler/_dateutils.py | 17 +++++++++++++++++ src/gui/views/treemodels/citationbasemodel.py | 8 ++++---- src/gui/views/treemodels/eventmodel.py | 2 +- src/gui/views/treemodels/familymodel.py | 2 +- src/gui/views/treemodels/mediamodel.py | 3 +-- src/gui/views/treemodels/notemodel.py | 4 ++-- src/gui/views/treemodels/peoplemodel.py | 3 +-- src/gui/views/treemodels/placemodel.py | 4 ++-- src/gui/views/treemodels/repomodel.py | 4 ++-- src/gui/views/treemodels/sourcemodel.py | 4 ++-- 11 files changed, 33 insertions(+), 32 deletions(-) diff --git a/src/Utils.py b/src/Utils.py index 62f4a05b2..09c0d74a7 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -974,20 +974,6 @@ def navigation_label(db, nav_type, handle): return (label, obj) -#------------------------------------------------------------------------- -# -# Format the date and time displayed in the Last Changed column in views. -# -#------------------------------------------------------------------------- -def format_time(secs): - """ - Format a time in seconds as a date in the preferred date format and a - 24 hour time as hh:mm:ss. - """ - t = time.localtime(secs) - d = gen.lib.Date(t.tm_year, t.tm_mon, t.tm_mday) - return date_displayer.display(d) + time.strftime(' %X', t) - #------------------------------------------------------------------------- # # make_unknown diff --git a/src/gen/datehandler/_dateutils.py b/src/gen/datehandler/_dateutils.py index 66734d03c..3c4d94c6d 100644 --- a/src/gen/datehandler/_dateutils.py +++ b/src/gen/datehandler/_dateutils.py @@ -24,6 +24,14 @@ Class handling language-specific selection for date parser and displayer. """ +#------------------------------------------------------------------------- +# +# Python modules +# +#------------------------------------------------------------------------- +import time +from gen.lib import Date + #------------------------------------------------------------------------- # # GRAMPS modules @@ -80,3 +88,12 @@ def get_date(date_base) : def get_date_valid(date_base): date_obj = date_base.get_date_object() return date_obj.get_valid() + +def format_time(secs): + """ + Format a time in seconds as a date in the preferred date format and a + 24 hour time as hh:mm:ss. + """ + t = time.localtime(secs) + d = Date(t.tm_year, t.tm_mon, t.tm_mday) + return displayer.display(d) + time.strftime(' %X', t) diff --git a/src/gui/views/treemodels/citationbasemodel.py b/src/gui/views/treemodels/citationbasemodel.py index 62ecfffb0..9ef4b78e1 100644 --- a/src/gui/views/treemodels/citationbasemodel.py +++ b/src/gui/views/treemodels/citationbasemodel.py @@ -41,7 +41,7 @@ LOG = logging.getLogger(".citation") #------------------------------------------------------------------------- import gen.datehandler import gen.lib -from Utils import confidence, format_time +from Utils import confidence from gen.config import config #------------------------------------------------------------------------- @@ -116,7 +116,7 @@ class CitationBaseModel(object): return unicode(data[COLUMN_HANDLE]) def citation_change(self, data): - return format_time(data[COLUMN_CHANGE]) + return gen.datehandler.format_time(data[COLUMN_CHANGE]) def citation_sort_change(self, data): return "%012x" % data[COLUMN_CHANGE] @@ -168,7 +168,7 @@ class CitationBaseModel(object): source_handle = data[COLUMN_SOURCE] try: source = self.db.get_source_from_handle(source_handle) - return format_time(source.change) + return gen.datehandler.format_time(source.change) except: return u'' @@ -196,7 +196,7 @@ class CitationBaseModel(object): return unicode(data[COLUMN2_PUBINFO]) def source_src_chan(self, data): - return format_time(data[COLUMN2_CHANGE]) + return gen.datehandler.format_time(data[COLUMN2_CHANGE]) def source_sort2_change(self, data): return "%012x" % data[COLUMN2_CHANGE] diff --git a/src/gui/views/treemodels/eventmodel.py b/src/gui/views/treemodels/eventmodel.py index 5789021e3..72822cbf0 100644 --- a/src/gui/views/treemodels/eventmodel.py +++ b/src/gui/views/treemodels/eventmodel.py @@ -162,7 +162,7 @@ class EventModel(FlatBaseModel): return "%012x" % data[COLUMN_CHANGE] def column_change(self,data): - return Utils.format_time(data[COLUMN_CHANGE]) + return gen.datehandler.format_time(data[COLUMN_CHANGE]) def column_tooltip(self,data): return u'Event tooltip' diff --git a/src/gui/views/treemodels/familymodel.py b/src/gui/views/treemodels/familymodel.py index 764e97253..77a292b35 100644 --- a/src/gui/views/treemodels/familymodel.py +++ b/src/gui/views/treemodels/familymodel.py @@ -173,7 +173,7 @@ class FamilyModel(FlatBaseModel): return "%012x" % data[12] def column_change(self, data): - return Utils.format_time(data[12]) + return gen.datehandler.format_time(data[12]) def column_tooltip(self, data): return u'Family tooltip' diff --git a/src/gui/views/treemodels/mediamodel.py b/src/gui/views/treemodels/mediamodel.py index 56d84835e..21a2f1d7a 100644 --- a/src/gui/views/treemodels/mediamodel.py +++ b/src/gui/views/treemodels/mediamodel.py @@ -42,7 +42,6 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------- -import Utils import gen.datehandler import gen.lib from gui.views.treemodels.flatbasemodel import FlatBaseModel @@ -151,7 +150,7 @@ class MediaModel(FlatBaseModel): return "%012x" % data[8] def column_change(self,data): - return Utils.format_time(data[8]) + return gen.datehandler.format_time(data[8]) def column_tooltip(self,data): return u'Media tooltip' diff --git a/src/gui/views/treemodels/notemodel.py b/src/gui/views/treemodels/notemodel.py index 8575d3138..c7b5ef14c 100644 --- a/src/gui/views/treemodels/notemodel.py +++ b/src/gui/views/treemodels/notemodel.py @@ -41,7 +41,7 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------- -import Utils +import gen.datehandler from gui.views.treemodels.flatbasemodel import FlatBaseModel from gen.lib import (Note, NoteType, StyledText) @@ -129,7 +129,7 @@ class NoteModel(FlatBaseModel): return "%012x" % data[Note.POS_CHANGE] def column_change(self,data): - return Utils.format_time(data[Note.POS_CHANGE]) + return gen.datehandler.format_time(data[Note.POS_CHANGE]) def get_tag_name(self, tag_handle): """ diff --git a/src/gui/views/treemodels/peoplemodel.py b/src/gui/views/treemodels/peoplemodel.py index 4bbd685bd..60e5b294d 100644 --- a/src/gui/views/treemodels/peoplemodel.py +++ b/src/gui/views/treemodels/peoplemodel.py @@ -59,7 +59,6 @@ _LOG = logging.getLogger(".") from gen.lib import Name, EventRef, EventType, EventRoleType from gen.display.name import displayer as name_displayer import gen.datehandler -import Utils from lru import LRU from gui.views.treemodels.flatbasemodel import FlatBaseModel from gui.views.treemodels.treebasemodel import TreeBaseModel @@ -237,7 +236,7 @@ class PeopleBaseModel(object): return "%012x" % data[COLUMN_CHANGE] def column_change(self, data): - return Utils.format_time(data[COLUMN_CHANGE]) + return gen.datehandler.format_time(data[COLUMN_CHANGE]) def column_gender(self, data): return PeopleBaseModel._GENDER[data[COLUMN_GENDER]] diff --git a/src/gui/views/treemodels/placemodel.py b/src/gui/views/treemodels/placemodel.py index 04e06c702..1591fbedc 100644 --- a/src/gui/views/treemodels/placemodel.py +++ b/src/gui/views/treemodels/placemodel.py @@ -46,7 +46,7 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------- -import Utils +import gen.datehandler from gen.utils.place import conv_lat_lon from gui.views.treemodels.flatbasemodel import FlatBaseModel from gui.views.treemodels.treebasemodel import TreeBaseModel @@ -222,7 +222,7 @@ class PlaceBaseModel(object): return "%012x" % data[11] def column_change(self, data): - return Utils.format_time(data[11]) + return gen.datehandler.format_time(data[11]) def column_tooltip(self, data): return u'Place tooltip' diff --git a/src/gui/views/treemodels/repomodel.py b/src/gui/views/treemodels/repomodel.py index 70c30f694..21bf64fa7 100644 --- a/src/gui/views/treemodels/repomodel.py +++ b/src/gui/views/treemodels/repomodel.py @@ -40,7 +40,7 @@ import gtk # #------------------------------------------------------------------------- import gen.lib -import Utils +import gen.datehandler from gui.views.treemodels.flatbasemodel import FlatBaseModel #------------------------------------------------------------------------- @@ -231,4 +231,4 @@ class RepositoryModel(FlatBaseModel): return "%012x" % data[7] def column_change(self,data): - return Utils.format_time(data[7]) + return gen.datehandler.format_time(data[7]) diff --git a/src/gui/views/treemodels/sourcemodel.py b/src/gui/views/treemodels/sourcemodel.py index ca667a679..cfb8ce44b 100644 --- a/src/gui/views/treemodels/sourcemodel.py +++ b/src/gui/views/treemodels/sourcemodel.py @@ -39,7 +39,7 @@ import gtk # GRAMPS modules # #------------------------------------------------------------------------- -import Utils +import gen.datehandler from gui.views.treemodels.flatbasemodel import FlatBaseModel #------------------------------------------------------------------------- @@ -107,7 +107,7 @@ class SourceModel(FlatBaseModel): return unicode(data[4]) def column_change(self,data): - return Utils.format_time(data[8]) + return gen.datehandler.format_time(data[8]) def sort_change(self,data): return "%012x" % data[8] From 3ec4c0f80ce80b946a9fec6e477b0eea377f26f6 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 23 Jun 2012 19:43:18 +0000 Subject: [PATCH 33/68] GEPS008: Create new module for keyword translation svn: r19905 --- po/POTFILES.in | 1 + src/Utils.py | 82 ------------------------------ src/gen/utils/Makefile.am | 1 + src/gen/utils/keyword.py | 103 ++++++++++++++++++++++++++++++++++++++ src/gui/configure.py | 18 ++++--- src/test/utils_test.py | 9 ++-- 6 files changed, 120 insertions(+), 94 deletions(-) create mode 100644 src/gen/utils/keyword.py diff --git a/po/POTFILES.in b/po/POTFILES.in index a89d42fa3..f80004fef 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -323,6 +323,7 @@ src/gen/simple/_simpletable.py # gen.utils src/gen/utils/alive.py +src/gen/utils/keyword.py src/gen/utils/lds.py src/gen/utils/place.py src/gen/utils/trans.py diff --git a/src/Utils.py b/src/Utils.py index 09c0d74a7..000198f3e 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -656,88 +656,6 @@ def profile(func, *args): stats.print_stats(100) stats.print_callers(100) -#------------------------------------------------------------------------- -# -# Keyword translation interface -# -#------------------------------------------------------------------------- - -# keyword, code, translated standard, translated upper -# in gen.display.name.py we find: -# 't' : title = title -# 'f' : given = given (first names) -# 'l' : surname = full surname (lastname) -# 'c' : call = callname -# 'x' : common = nick name if existing, otherwise first first name (common name) -# 'i' : initials = initials of the first names -# 'm' : primary = primary surname (main) -# '0m': primary[pre]= prefix primary surname (main) -# '1m': primary[sur]= surname primary surname (main) -# '2m': primary[con]= connector primary surname (main) -# 'y' : patronymic = pa/matronymic surname (father/mother) - assumed unique -# '0y': patronymic[pre] = prefix " -# '1y': patronymic[sur] = surname " -# '2y': patronymic[con] = connector " -# 'o' : notpatronymic = surnames without pa/matronymic and primary -# 'r' : rest = non primary surnames -# 'p' : prefix = list of all prefixes -# 'q' : rawsurnames = surnames without prefixes and connectors -# 's' : suffix = suffix -# 'n' : nickname = nick name -# 'g' : familynick = family nick name - -KEYWORDS = [("title", "t", _("Person|Title"), _("Person|TITLE")), - ("given", "f", _("Given"), _("GIVEN")), - ("surname", "l", _("Surname"), _("SURNAME")), - ("call", "c", _("Name|Call"), _("Name|CALL")), - ("common", "x", _("Name|Common"), _("Name|COMMON")), - ("initials", "i", _("Initials"), _("INITIALS")), - ("suffix", "s", _("Suffix"), _("SUFFIX")), - ("primary", "m", _("Name|Primary"), _("PRIMARY")), - ("primary[pre]", "0m", _("Primary[pre]"), _("PRIMARY[PRE]")), - ("primary[sur]", "1m", _("Primary[sur]"), _("PRIMARY[SUR]")), - ("primary[con]", "2m", _("Primary[con]"), _("PRIMARY[CON]")), - ("patronymic", "y", _("Patronymic"), _("PATRONYMIC")), - ("patronymic[pre]", "0y", _("Patronymic[pre]"), _("PATRONYMIC[PRE]")), - ("patronymic[sur]", "1y", _("Patronymic[sur]"), _("PATRONYMIC[SUR]")), - ("patronymic[con]", "2y", _("Patronymic[con]"), _("PATRONYMIC[CON]")), - ("rawsurnames", "q", _("Rawsurnames"), _("RAWSURNAMES")), - ("notpatronymic", "o", _("Notpatronymic"),_("NOTPATRONYMIC")), - ("prefix", "p", _("Prefix"), _("PREFIX")), - ("nickname", "n", _("Nickname"), _("NICKNAME")), - ("familynick", "g", _("Familynick"), _("FAMILYNICK")), - ] -KEY_TO_TRANS = {} -TRANS_TO_KEY = {} -for (key, code, standard, upper) in KEYWORDS: - KEY_TO_TRANS[key] = standard - KEY_TO_TRANS[key.upper()] = upper - KEY_TO_TRANS["%" + ("%s" % code)] = standard - KEY_TO_TRANS["%" + ("%s" % code.upper())] = upper - TRANS_TO_KEY[standard.lower()] = key - TRANS_TO_KEY[standard] = key - TRANS_TO_KEY[upper] = key.upper() - -def get_translation_from_keyword(keyword): - """ Return the translation of keyword """ - return KEY_TO_TRANS.get(keyword, keyword) - -def get_keyword_from_translation(word): - """ Return the keyword of translation """ - return TRANS_TO_KEY.get(word, word) - -def get_keywords(): - """ Get all keywords, longest to shortest """ - keys = KEY_TO_TRANS.keys() - keys.sort(lambda a,b: -cmp(len(a), len(b))) - return keys - -def get_translations(): - """ Get all translations, longest to shortest """ - trans = TRANS_TO_KEY.keys() - trans.sort(lambda a,b: -cmp(len(a), len(b))) - return trans - #------------------------------------------------------------------------- # # Config-based functions diff --git a/src/gen/utils/Makefile.am b/src/gen/utils/Makefile.am index b469a146b..293fbf2f6 100644 --- a/src/gen/utils/Makefile.am +++ b/src/gen/utils/Makefile.am @@ -14,6 +14,7 @@ pkgpython_PYTHON = \ configmanager.py \ fallback.py \ image.py \ + keyword.py \ lds.py \ mactrans.py \ place.py \ diff --git a/src/gen/utils/keyword.py b/src/gen/utils/keyword.py new file mode 100644 index 000000000..4eeaf7fd7 --- /dev/null +++ b/src/gen/utils/keyword.py @@ -0,0 +1,103 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2000-2007 Donald N. Allingham +# Copyright (C) 2009 Gary Burton +# Copyright (C) 2011 Tim G L Lyons +# +# 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$ + +""" +Keyword translation interface +""" + +# keyword, code, translated standard, translated upper +# in gen.display.name.py we find: +# 't' : title = title +# 'f' : given = given (first names) +# 'l' : surname = full surname (lastname) +# 'c' : call = callname +# 'x' : common = nick name if existing, otherwise first first name (common name) +# 'i' : initials = initials of the first names +# 'm' : primary = primary surname (main) +# '0m': primary[pre]= prefix primary surname (main) +# '1m': primary[sur]= surname primary surname (main) +# '2m': primary[con]= connector primary surname (main) +# 'y' : patronymic = pa/matronymic surname (father/mother) - assumed unique +# '0y': patronymic[pre] = prefix " +# '1y': patronymic[sur] = surname " +# '2y': patronymic[con] = connector " +# 'o' : notpatronymic = surnames without pa/matronymic and primary +# 'r' : rest = non primary surnames +# 'p' : prefix = list of all prefixes +# 'q' : rawsurnames = surnames without prefixes and connectors +# 's' : suffix = suffix +# 'n' : nickname = nick name +# 'g' : familynick = family nick name + +KEYWORDS = [("title", "t", _("Person|Title"), _("Person|TITLE")), + ("given", "f", _("Given"), _("GIVEN")), + ("surname", "l", _("Surname"), _("SURNAME")), + ("call", "c", _("Name|Call"), _("Name|CALL")), + ("common", "x", _("Name|Common"), _("Name|COMMON")), + ("initials", "i", _("Initials"), _("INITIALS")), + ("suffix", "s", _("Suffix"), _("SUFFIX")), + ("primary", "m", _("Name|Primary"), _("PRIMARY")), + ("primary[pre]", "0m", _("Primary[pre]"), _("PRIMARY[PRE]")), + ("primary[sur]", "1m", _("Primary[sur]"), _("PRIMARY[SUR]")), + ("primary[con]", "2m", _("Primary[con]"), _("PRIMARY[CON]")), + ("patronymic", "y", _("Patronymic"), _("PATRONYMIC")), + ("patronymic[pre]", "0y", _("Patronymic[pre]"), _("PATRONYMIC[PRE]")), + ("patronymic[sur]", "1y", _("Patronymic[sur]"), _("PATRONYMIC[SUR]")), + ("patronymic[con]", "2y", _("Patronymic[con]"), _("PATRONYMIC[CON]")), + ("rawsurnames", "q", _("Rawsurnames"), _("RAWSURNAMES")), + ("notpatronymic", "o", _("Notpatronymic"),_("NOTPATRONYMIC")), + ("prefix", "p", _("Prefix"), _("PREFIX")), + ("nickname", "n", _("Nickname"), _("NICKNAME")), + ("familynick", "g", _("Familynick"), _("FAMILYNICK")), + ] +KEY_TO_TRANS = {} +TRANS_TO_KEY = {} +for (key, code, standard, upper) in KEYWORDS: + KEY_TO_TRANS[key] = standard + KEY_TO_TRANS[key.upper()] = upper + KEY_TO_TRANS["%" + ("%s" % code)] = standard + KEY_TO_TRANS["%" + ("%s" % code.upper())] = upper + TRANS_TO_KEY[standard.lower()] = key + TRANS_TO_KEY[standard] = key + TRANS_TO_KEY[upper] = key.upper() + +def get_translation_from_keyword(keyword): + """ Return the translation of keyword """ + return KEY_TO_TRANS.get(keyword, keyword) + +def get_keyword_from_translation(word): + """ Return the keyword of translation """ + return TRANS_TO_KEY.get(word, word) + +def get_keywords(): + """ Get all keywords, longest to shortest """ + keys = KEY_TO_TRANS.keys() + keys.sort(lambda a,b: -cmp(len(a), len(b))) + return keys + +def get_translations(): + """ Get all translations, longest to shortest """ + trans = TRANS_TO_KEY.keys() + trans.sort(lambda a,b: -cmp(len(a), len(b))) + return trans diff --git a/src/gui/configure.py b/src/gui/configure.py index ac37fc4ab..44961f4d5 100644 --- a/src/gui/configure.py +++ b/src/gui/configure.py @@ -51,8 +51,10 @@ import const import gen.datehandler from gen.display.name import displayer as _nd from gen.display.name import NameDisplayError -import Utils +from Utils import get_unicode_path_from_file_chooser from gen.utils.alive import update_constants +from gen.utils.keyword import (get_keywords, get_translation_from_keyword, + get_translations, get_keyword_from_translation) import gen.lib from gen.lib import Name, Surname, NameOriginType from gui.managedwindow import ManagedWindow @@ -528,9 +530,9 @@ class GrampsPreferences(ConfigureDialog): the_index = 0 for num, name, fmt_str, act in _nd.get_name_format(): translation = fmt_str - for key in Utils.get_keywords(): + for key in get_keywords(): if key in translation: - translation = translation.replace(key, Utils.get_translation_from_keyword(key)) + translation = translation.replace(key, get_translation_from_keyword(key)) self.examplename.set_display_as(num) name_format_model.append( row=[num, translation, fmt_str, _nd.display_name(self.examplename)]) @@ -662,9 +664,9 @@ class GrampsPreferences(ConfigureDialog): new_text[-1] == '"'): pass else: - for key in Utils.get_translations(): + for key in get_translations(): if key in pattern: - pattern = pattern.replace(key, Utils.get_keyword_from_translation(key)) + pattern = pattern.replace(key, get_keyword_from_translation(key)) # now build up a proper translation: translation = pattern if (len(new_text) > 2 and @@ -672,9 +674,9 @@ class GrampsPreferences(ConfigureDialog): new_text[-1] == '"'): pass else: - for key in Utils.get_keywords(): + for key in get_keywords(): if key in translation: - translation = translation.replace(key, Utils.get_translation_from_keyword(key)) + translation = translation.replace(key, get_translation_from_keyword(key)) num, name, fmt = self.selected_fmt[COL_NUM:COL_EXPL] node = self.fmt_model.get_iter(path) oldname = self.fmt_model.get_value(node, COL_NAME) @@ -1195,7 +1197,7 @@ class GrampsPreferences(ConfigureDialog): status = f.run() if status == gtk.RESPONSE_OK: - val = Utils.get_unicode_path_from_file_chooser(f.get_filename()) + val = get_unicode_path_from_file_chooser(f.get_filename()) if val: self.path_entry.set_text(val) f.destroy() diff --git a/src/test/utils_test.py b/src/test/utils_test.py index a1568a556..a97ce4482 100644 --- a/src/test/utils_test.py +++ b/src/test/utils_test.py @@ -25,7 +25,8 @@ import unittest from test import test_util test_util.path_append_parent() -import Utils +from gen.utils.keyword import (KEYWORDS, get_translation_from_keyword, + get_keyword_from_translation) class TestCase(unittest.TestCase): count = 1 @@ -38,11 +39,11 @@ class TestCase(unittest.TestCase): def helper(self, *args): method_name, test_type, item1, item2 = args if test_type == "keyword": - result = Utils.get_translation_from_keyword(item1) + result = get_translation_from_keyword(item1) self.assertTrue(result == item2, "get_translation_from_keyword('%s') returned '%s' rather than '%s'" % (item1, result, item2)) elif test_type == "translation": - result = Utils.get_keyword_from_translation(item1) + result = get_keyword_from_translation(item1) self.assertTrue(result == item2, "get_keyword_from_translation('%s') returned '%s' rather than '%s'" % (item1, result, item2)) else: @@ -52,7 +53,7 @@ def suite1(): """ """ suite = unittest.TestSuite() - for line in Utils.KEYWORDS: + for line in KEYWORDS: keyword, code, standard, upper = line suite.addTest(TestCase('keyword-%04d', 'keyword', keyword, standard)) suite.addTest(TestCase('translation-%04d', 'translation', standard, keyword)) From 2a0b009bdfeeacdc5e97a3db51d7d22b28b9e5fe Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 23 Jun 2012 22:13:23 +0000 Subject: [PATCH 34/68] GEPS008: Create new module for file utilities svn: r19906 --- po/POTFILES.skip | 1 + src/Utils.py | 234 +----------------- src/cli/arghandler.py | 13 +- src/cli/argparser.py | 6 +- src/gen/plug/docgen/graphdoc.py | 12 +- src/gen/plug/report/utils.py | 2 +- src/gen/plug/utils.py | 4 +- src/gen/utils/Makefile.am | 1 + src/gen/utils/file.py | 281 ++++++++++++++++++++++ src/gen/utils/image.py | 4 +- src/gen/utils/trans.py | 2 +- src/gui/configure.py | 2 +- src/gui/dbloader.py | 4 +- src/gui/dbman.py | 2 +- src/gui/editors/addmedia.py | 15 +- src/gui/editors/displaytabs/gallerytab.py | 9 +- src/gui/editors/editmedia.py | 15 +- src/gui/editors/editmediaref.py | 15 +- src/gui/editors/editperson.py | 6 +- src/gui/plug/_guioptions.py | 4 +- src/gui/plug/_windows.py | 4 +- src/gui/plug/export/_exportassistant.py | 13 +- src/gui/plug/report/_fileentry.py | 4 +- src/gui/plug/report/_reportdialog.py | 4 +- src/gui/selectors/selectobject.py | 2 +- src/gui/viewmanager.py | 11 +- src/gui/views/listview.py | 3 +- src/plugins/export/exportgedcom.py | 2 +- src/plugins/export/exportpkg.py | 6 +- src/plugins/gramplet/editexifmetadata.py | 10 +- src/plugins/gramplet/gallery.py | 4 +- src/plugins/gramplet/mediapreview.py | 4 +- src/plugins/gramplet/metadataviewer.py | 6 +- src/plugins/gramplet/persondetails.py | 4 +- src/plugins/gramplet/placedetails.py | 4 +- src/plugins/gramplet/statsgramplet.py | 2 +- src/plugins/graph/gvfamilylines.py | 4 +- src/plugins/graph/gvrelgraph.py | 6 +- src/plugins/import/importgpkg.py | 4 +- src/plugins/quickview/filterbyname.py | 2 +- src/plugins/textreport/indivcomplete.py | 2 +- src/plugins/textreport/simplebooktitle.py | 2 +- src/plugins/textreport/summary.py | 2 +- src/plugins/tool/check.py | 9 +- src/plugins/tool/eventcmp.py | 4 +- src/plugins/tool/mediamanager.py | 2 +- src/plugins/view/htmlrenderer.py | 6 +- src/plugins/view/mediaview.py | 9 +- src/plugins/view/pedigreeview.py | 4 +- src/plugins/view/relview.py | 2 +- src/plugins/webreport/narrativeweb.py | 11 +- 51 files changed, 424 insertions(+), 360 deletions(-) create mode 100644 src/gen/utils/file.py diff --git a/po/POTFILES.skip b/po/POTFILES.skip index cf677cd6a..5094f57a8 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -211,6 +211,7 @@ src/gen/simple/_simpledoc.py src/gen/utils/__init__.py src/gen/utils/callback.py src/gen/utils/callman.py +src/gen/utils/file.py src/gen/utils/image.py src/gen/utils/referent.py diff --git a/src/Utils.py b/src/Utils.py index 000198f3e..ce378ad04 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -36,7 +36,6 @@ import sys import locale import random import time -import shutil import uuid import logging LOG = logging.getLogger(".") @@ -51,7 +50,7 @@ import gen.lib from gen.errors import DatabaseError from gen.datehandler import displayer as date_displayer, codeset from gen.config import config -from const import TEMP_DIR, USER_HOME, GRAMPS_UUID, IMAGE_DIR +from const import GRAMPS_UUID, IMAGE_DIR from gen.constfunc import mac, win from gen.ggettext import sgettext as _ @@ -282,129 +281,6 @@ else: conv_utf8_tosrtkey_ongtk = lambda x: locale.strxfrm(x) conv_unicode_tosrtkey_ongtk = lambda x: locale.strxfrm(x) -#------------------------------------------------------------------------- -# -# -# -#------------------------------------------------------------------------- -def find_file( filename): - # try the filename we got - try: - fname = filename - if os.path.isfile( filename): - return( filename) - except: - pass - - # Build list of alternate encodings - encodings = set() - #Darwin returns "mac roman" for preferredencoding, but since it - #returns "UTF-8" for filesystemencoding, and that's first, this - #works. - for enc in [sys.getfilesystemencoding, locale.getpreferredencoding]: - try: - encodings.add(enc) - except: - pass - encodings.add('UTF-8') - encodings.add('ISO-8859-1') - - for enc in encodings: - try: - fname = filename.encode(enc) - if os.path.isfile( fname): - return fname - except: - pass - - # not found - return '' - -def find_folder( filename): - # try the filename we got - try: - fname = filename - if os.path.isdir( filename): - return( filename) - except: - pass - - # Build list of alternate encodings - try: - encodings = [sys.getfilesystemencoding(), - locale.getpreferredencoding(), - 'UTF-8', 'ISO-8859-1'] - except: - encodings = [sys.getfilesystemencoding(), 'UTF-8', 'ISO-8859-1'] - encodings = list(set(encodings)) - for enc in encodings: - try: - fname = filename.encode(enc) - if os.path.isdir( fname): - return fname - except: - pass - - # not found - return '' - -def get_unicode_path_from_file_chooser(path): - """ - Return the Unicode version of a path string. - - :type path: str - :param path: The path to be converted to Unicode - :rtype: unicode - :returns: The Unicode version of path. - """ - # make only unicode of path of type 'str' - if not (isinstance(path, str)): - return path - - if win(): - # in windows filechooser returns officially utf-8, not filesystemencoding - try: - return unicode(path) - except: - LOG.warn("Problem encountered converting string: %s." % path) - return unicode(path, sys.getfilesystemencoding(), errors='replace') - else: - try: - return unicode(path, sys.getfilesystemencoding()) - except: - LOG.warn("Problem encountered converting string: %s." % path) - return unicode(path, sys.getfilesystemencoding(), errors='replace') - -def get_unicode_path_from_env_var(path): - """ - Return the Unicode version of a path string. - - :type path: str - :param path: The path to be converted to Unicode - :rtype: unicode - :returns: The Unicode version of path. - """ - # make only unicode of path of type 'str' - if not (isinstance(path, str)): - return path - - if win(): - # In Windows path/filename returned from a environment variable is in filesystemencoding - try: - new_path = unicode(path, sys.getfilesystemencoding()) - return new_path - except: - LOG.warn("Problem encountered converting string: %s." % path) - return unicode(path, sys.getfilesystemencoding(), errors='replace') - else: - try: - return unicode(path) - except: - LOG.warn("Problem encountered converting string: %s." % path) - return unicode(path, sys.getfilesystemencoding(), errors='replace') - - - #------------------------------------------------------------------------- # # Iterate over ancestors. @@ -452,25 +328,6 @@ from warnings import warn def set_titles(window, title, t, msg=None): warn('The Utils.set_titles is deprecated. Use ManagedWindow methods') -def search_for(name): - if name.startswith( '"' ): - name = name.split('"')[1] - else: - name = name.split()[0] - if win(): - for i in os.environ['PATH'].split(';'): - fname = os.path.join(i, name) - if os.access(fname, os.X_OK) and not os.path.isdir(fname): - return 1 - if os.access(name, os.X_OK) and not os.path.isdir(name): - return 1 - else: - for i in os.environ['PATH'].split(':'): - fname = os.path.join(i, name) - if os.access(fname, os.X_OK) and not os.path.isdir(fname): - return 1 - return 0 - #------------------------------------------------------------------------- # # create_id @@ -495,35 +352,6 @@ def create_uid(self, handle=None): # # #------------------------------------------------------------------------- -_NEW_NAME_PATTERN = '%s%sUntitled_%d.%s' - -def get_new_filename(ext, folder='~/'): - ix = 1 - while os.path.isfile(os.path.expanduser(_NEW_NAME_PATTERN % - (folder, os.path.sep, ix, ext))): - ix = ix + 1 - return os.path.expanduser(_NEW_NAME_PATTERN % (folder, os.path.sep, ix, ext)) - -def get_empty_tempdir(dirname): - """ Return path to TEMP_DIR/dirname, a guaranteed empty directory - - makes intervening directories if required - fails if _file_ by that name already exists, - or for inadequate permissions to delete dir/files or create dir(s) - - """ - dirpath = os.path.join(TEMP_DIR,dirname) - if os.path.isdir(dirpath): - shutil.rmtree(dirpath) - os.makedirs(dirpath) - dirpath = get_unicode_path_from_env_var(dirpath) - return dirpath - -def rm_tempdir(path): - """Remove a tempdir created with get_empty_tempdir""" - if path.startswith(TEMP_DIR) and os.path.isdir(path): - shutil.rmtree(path) - def cast_to_bool(val): if val == str(True): return True @@ -580,66 +408,6 @@ def get_type_converter_by_name(val_str): return unicode return unicode -def relative_path(original, base): - """ - Calculate the relative path from base to original, with base a directory, - and original an absolute path - On problems, original is returned unchanged - """ - if not os.path.isdir(base): - return original - #original and base must be absolute paths - if not os.path.isabs(base): - return original - if not os.path.isabs(original): - return original - original = os.path.normpath(original) - base = os.path.normpath(base) - - # If the db_dir and obj_dir are on different drives (win only) - # then there cannot be a relative path. Return original obj_path - (base_drive, base) = os.path.splitdrive(base) - (orig_drive, orig_name) = os.path.splitdrive(original) - if base_drive.upper() != orig_drive.upper(): - return original - - # Starting from the filepath root, work out how much of the filepath is - # shared by base and target. - base_list = (base).split(os.sep) - target_list = (orig_name).split(os.sep) - # make sure '/home/person' and 'c:/home/person' both give - # list ['home', 'person'] - base_list = filter(None, base_list) - target_list = filter(None, target_list) - i = -1 - for i in range(min(len(base_list), len(target_list))): - if base_list[i] <> target_list[i]: break - else: - #if break did not happen we are here at end, and add 1. - i += 1 - rel_list = [os.pardir] * (len(base_list)-i) + target_list[i:] - return os.path.join(*rel_list) - -def media_path(db): - """ - Given a database, return the mediapath to use as basedir for media - """ - mpath = db.get_mediapath() - if mpath is None: - #use home dir - mpath = USER_HOME - return mpath - -def media_path_full(db, filename): - """ - Given a database and a filename of a media, return the media filename - is full form, eg 'graves/tomb.png' becomes '/home/me/genea/graves/tomb.png - """ - if os.path.isabs(filename): - return filename - mpath = media_path(db) - return os.path.join(mpath, filename) - def profile(func, *args): import hotshot.stats diff --git a/src/cli/arghandler.py b/src/cli/arghandler.py index 8e64481de..18d0deb95 100644 --- a/src/cli/arghandler.py +++ b/src/cli/arghandler.py @@ -46,7 +46,8 @@ from gen.ggettext import gettext as _ # #------------------------------------------------------------------------- from gen.recentfiles import recent_files -import Utils +from gen.utils.file import (rm_tempdir, get_empty_tempdir, + get_unicode_path_from_env_var) import gen from clidbman import CLIDbManager, NAME_FILE, find_locker_name @@ -207,7 +208,7 @@ class ArgHandler(object): """ if value is None: return None - value = Utils.get_unicode_path_from_env_var(value) + value = get_unicode_path_from_env_var(value) db_path = self.__deduce_db_path(value) if db_path: @@ -237,7 +238,7 @@ class ArgHandler(object): """ # Need to convert path/filename to unicode before opening # For non latin characters in Windows path/file/user names - value = Utils.get_unicode_path_from_env_var(value) + value = get_unicode_path_from_env_var(value) fname = value fullpath = os.path.abspath(os.path.expanduser(fname)) if fname != '-' and not os.path.exists(fullpath): @@ -274,7 +275,7 @@ class ArgHandler(object): return # Need to convert path/filename to unicode before opening # For non latin characters in Windows path/file/user names - value = Utils.get_unicode_path_from_env_var(value) + value = get_unicode_path_from_env_var(value) fname = value if fname == '-': fullpath = '-' @@ -450,7 +451,7 @@ class ArgHandler(object): # remove files in import db subdir after use self.dbstate.db.close() if self.imp_db_path: - Utils.rm_tempdir(self.imp_db_path) + rm_tempdir(self.imp_db_path) def __import_action(self): """ @@ -469,7 +470,7 @@ class ArgHandler(object): if self.gui: self.imp_db_path, title = self.dbman.create_new_db_cli() else: - self.imp_db_path = Utils.get_empty_tempdir("import_dbdir") \ + self.imp_db_path = get_empty_tempdir("import_dbdir") \ .encode(sys.getfilesystemencoding()) newdb = gen.db.DbBsddb() newdb.write_version(self.imp_db_path) diff --git a/src/cli/argparser.py b/src/cli/argparser.py index f55bb6e69..c975ac1ba 100644 --- a/src/cli/argparser.py +++ b/src/cli/argparser.py @@ -49,7 +49,7 @@ import logging import const from gen.config import config from gen.utils.configmanager import safe_eval -import Utils +from gen.utils.file import get_unicode_path_from_env_var # Note: Make sure to edit const.py.in POPT_TABLE too! _HELP = _(""" @@ -216,7 +216,7 @@ class ArgParser(object): # -Ärik is '-\xc3\x84rik' and getopt will respond : # option -\xc3 not recognized for arg in range(len(self.args) - 1): - self.args[arg+1] = Utils.get_unicode_path_from_env_var(self.args[arg + 1]) + self.args[arg+1] = get_unicode_path_from_env_var(self.args[arg + 1]) options, leftargs = getopt.getopt(self.args[1:], const.SHORTOPTS, const.LONGOPTS) except getopt.GetoptError, msg: @@ -350,7 +350,7 @@ class ArgParser(object): # but not for non-latin characters in list elements cliargs = "[ " for arg in range(len(self.args) - 1): - cliargs += Utils.get_unicode_path_from_env_var(self.args[arg + 1]) + " " + cliargs += get_unicode_path_from_env_var(self.args[arg + 1]) + " " cliargs += "]" self.errors += [(_('Error parsing the arguments'), _("Error parsing the arguments: %s \n" diff --git a/src/gen/plug/docgen/graphdoc.py b/src/gen/plug/docgen/graphdoc.py index 8fcb78641..6ebb6bdca 100644 --- a/src/gen/plug/docgen/graphdoc.py +++ b/src/gen/plug/docgen/graphdoc.py @@ -43,7 +43,7 @@ import sys # #------------------------------------------------------------------------------- from gen.ggettext import gettext as _ -import Utils +from gen.utils.file import search_for from gen.plug.docgen import BaseDoc from gen.plug.menu import NumberOption, TextOption, EnumeratedListOption, \ BooleanOption @@ -88,18 +88,18 @@ _NOTELOC = [ { 'name' : _("Top"), 'value' : "t" }, { 'name' : _("Bottom"), 'value' : "b" }] if win(): - _DOT_FOUND = Utils.search_for("dot.exe") + _DOT_FOUND = search_for("dot.exe") - if Utils.search_for("gswin32c.exe") == 1: + if search_for("gswin32c.exe") == 1: _GS_CMD = "gswin32c.exe" - elif Utils.search_for("gswin32.exe") == 1: + elif search_for("gswin32.exe") == 1: _GS_CMD = "gswin32.exe" else: _GS_CMD = "" else: - _DOT_FOUND = Utils.search_for("dot") + _DOT_FOUND = search_for("dot") - if Utils.search_for("gs") == 1: + if search_for("gs") == 1: _GS_CMD = "gs" else: _GS_CMD = "" diff --git a/src/gen/plug/report/utils.py b/src/gen/plug/report/utils.py index 6722c42a5..5b20cda52 100644 --- a/src/gen/plug/report/utils.py +++ b/src/gen/plug/report/utils.py @@ -42,7 +42,7 @@ from gen.ggettext import gettext as _ # #------------------------------------------------------------------------ import gen.datehandler -from Utils import media_path_full +from gen.utils.file import media_path_full from gen.plug.docgen import IndexMark, INDEX_TYPE_ALP #------------------------------------------------------------------------- diff --git a/src/gen/plug/utils.py b/src/gen/plug/utils.py index 853e27f6f..f30ec1ac1 100644 --- a/src/gen/plug/utils.py +++ b/src/gen/plug/utils.py @@ -40,7 +40,7 @@ import os #------------------------------------------------------------------------- from gen.plug._pluginreg import make_environment import const -import Utils +from gen.utils.file import get_unicode_path_from_file_chooser from gen.ggettext import gettext as _ #------------------------------------------------------------------------- @@ -287,7 +287,7 @@ def load_addon_file(path, callback=None): gpr_files = set([os.path.split(os.path.join(const.USER_PLUGINS, name))[0] for name in good_gpr]) for gpr_file in gpr_files: - u_gpr_file = Utils.get_unicode_path_from_file_chooser(gpr_file) + u_gpr_file = get_unicode_path_from_file_chooser(gpr_file) if callback: callback(" " + (_("Registered '%s'") % u_gpr_file) + "\n") file_obj.close() diff --git a/src/gen/utils/Makefile.am b/src/gen/utils/Makefile.am index 293fbf2f6..609db3704 100644 --- a/src/gen/utils/Makefile.am +++ b/src/gen/utils/Makefile.am @@ -13,6 +13,7 @@ pkgpython_PYTHON = \ callman.py \ configmanager.py \ fallback.py \ + file.py \ image.py \ keyword.py \ lds.py \ diff --git a/src/gen/utils/file.py b/src/gen/utils/file.py new file mode 100644 index 000000000..e4b2904fa --- /dev/null +++ b/src/gen/utils/file.py @@ -0,0 +1,281 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2000-2007 Donald N. Allingham +# Copyright (C) 2009 Gary Burton +# Copyright (C) 2011 Tim G L Lyons +# +# 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$ + +""" +File and folder related utility functions +""" + +#------------------------------------------------------------------------- +# +# Python modules +# +#------------------------------------------------------------------------- +import os +import sys +import locale +import shutil +import logging +LOG = logging.getLogger(".gen.utils.file") + +#------------------------------------------------------------------------- +# +# Gramps modules +# +#------------------------------------------------------------------------- +from gen.constfunc import win +from const import TEMP_DIR, USER_HOME + +#------------------------------------------------------------------------- +# +# Constants +# +#------------------------------------------------------------------------- +_NEW_NAME_PATTERN = '%s%sUntitled_%d.%s' + +#------------------------------------------------------------------------- +# +# Functions +# +#------------------------------------------------------------------------- +def find_file( filename): + # try the filename we got + try: + fname = filename + if os.path.isfile( filename): + return( filename) + except: + pass + + # Build list of alternate encodings + encodings = set() + #Darwin returns "mac roman" for preferredencoding, but since it + #returns "UTF-8" for filesystemencoding, and that's first, this + #works. + for enc in [sys.getfilesystemencoding, locale.getpreferredencoding]: + try: + encodings.add(enc) + except: + pass + encodings.add('UTF-8') + encodings.add('ISO-8859-1') + + for enc in encodings: + try: + fname = filename.encode(enc) + if os.path.isfile( fname): + return fname + except: + pass + + # not found + return '' + +def find_folder( filename): + # try the filename we got + try: + fname = filename + if os.path.isdir( filename): + return( filename) + except: + pass + + # Build list of alternate encodings + try: + encodings = [sys.getfilesystemencoding(), + locale.getpreferredencoding(), + 'UTF-8', 'ISO-8859-1'] + except: + encodings = [sys.getfilesystemencoding(), 'UTF-8', 'ISO-8859-1'] + encodings = list(set(encodings)) + for enc in encodings: + try: + fname = filename.encode(enc) + if os.path.isdir( fname): + return fname + except: + pass + + # not found + return '' + +def get_unicode_path_from_file_chooser(path): + """ + Return the Unicode version of a path string. + + :type path: str + :param path: The path to be converted to Unicode + :rtype: unicode + :returns: The Unicode version of path. + """ + # make only unicode of path of type 'str' + if not (isinstance(path, str)): + return path + + if win(): + # in windows filechooser returns officially utf-8, not filesystemencoding + try: + return unicode(path) + except: + LOG.warn("Problem encountered converting string: %s." % path) + return unicode(path, sys.getfilesystemencoding(), errors='replace') + else: + try: + return unicode(path, sys.getfilesystemencoding()) + except: + LOG.warn("Problem encountered converting string: %s." % path) + return unicode(path, sys.getfilesystemencoding(), errors='replace') + +def get_unicode_path_from_env_var(path): + """ + Return the Unicode version of a path string. + + :type path: str + :param path: The path to be converted to Unicode + :rtype: unicode + :returns: The Unicode version of path. + """ + # make only unicode of path of type 'str' + if not (isinstance(path, str)): + return path + + if win(): + # In Windows path/filename returned from a environment variable is in filesystemencoding + try: + new_path = unicode(path, sys.getfilesystemencoding()) + return new_path + except: + LOG.warn("Problem encountered converting string: %s." % path) + return unicode(path, sys.getfilesystemencoding(), errors='replace') + else: + try: + return unicode(path) + except: + LOG.warn("Problem encountered converting string: %s." % path) + return unicode(path, sys.getfilesystemencoding(), errors='replace') + +def get_new_filename(ext, folder='~/'): + ix = 1 + while os.path.isfile(os.path.expanduser(_NEW_NAME_PATTERN % + (folder, os.path.sep, ix, ext))): + ix = ix + 1 + return os.path.expanduser(_NEW_NAME_PATTERN % (folder, os.path.sep, ix, ext)) + +def get_empty_tempdir(dirname): + """ Return path to TEMP_DIR/dirname, a guaranteed empty directory + + makes intervening directories if required + fails if _file_ by that name already exists, + or for inadequate permissions to delete dir/files or create dir(s) + + """ + dirpath = os.path.join(TEMP_DIR,dirname) + if os.path.isdir(dirpath): + shutil.rmtree(dirpath) + os.makedirs(dirpath) + dirpath = get_unicode_path_from_env_var(dirpath) + return dirpath + +def rm_tempdir(path): + """Remove a tempdir created with get_empty_tempdir""" + if path.startswith(TEMP_DIR) and os.path.isdir(path): + shutil.rmtree(path) + +def relative_path(original, base): + """ + Calculate the relative path from base to original, with base a directory, + and original an absolute path + On problems, original is returned unchanged + """ + if not os.path.isdir(base): + return original + #original and base must be absolute paths + if not os.path.isabs(base): + return original + if not os.path.isabs(original): + return original + original = os.path.normpath(original) + base = os.path.normpath(base) + + # If the db_dir and obj_dir are on different drives (win only) + # then there cannot be a relative path. Return original obj_path + (base_drive, base) = os.path.splitdrive(base) + (orig_drive, orig_name) = os.path.splitdrive(original) + if base_drive.upper() != orig_drive.upper(): + return original + + # Starting from the filepath root, work out how much of the filepath is + # shared by base and target. + base_list = (base).split(os.sep) + target_list = (orig_name).split(os.sep) + # make sure '/home/person' and 'c:/home/person' both give + # list ['home', 'person'] + base_list = filter(None, base_list) + target_list = filter(None, target_list) + i = -1 + for i in range(min(len(base_list), len(target_list))): + if base_list[i] <> target_list[i]: break + else: + #if break did not happen we are here at end, and add 1. + i += 1 + rel_list = [os.pardir] * (len(base_list)-i) + target_list[i:] + return os.path.join(*rel_list) + +def media_path(db): + """ + Given a database, return the mediapath to use as basedir for media + """ + mpath = db.get_mediapath() + if mpath is None: + #use home dir + mpath = USER_HOME + return mpath + +def media_path_full(db, filename): + """ + Given a database and a filename of a media, return the media filename + is full form, eg 'graves/tomb.png' becomes '/home/me/genea/graves/tomb.png + """ + if os.path.isabs(filename): + return filename + mpath = media_path(db) + return os.path.join(mpath, filename) + +def search_for(name): + if name.startswith( '"' ): + name = name.split('"')[1] + else: + name = name.split()[0] + if win(): + for i in os.environ['PATH'].split(';'): + fname = os.path.join(i, name) + if os.access(fname, os.X_OK) and not os.path.isdir(fname): + return 1 + if os.access(name, os.X_OK) and not os.path.isdir(name): + return 1 + else: + for i in os.environ['PATH'].split(':'): + fname = os.path.join(i, name) + if os.access(fname, os.X_OK) and not os.path.isdir(fname): + return 1 + return 0 diff --git a/src/gen/utils/image.py b/src/gen/utils/image.py index 0852bc184..035314ff3 100644 --- a/src/gen/utils/image.py +++ b/src/gen/utils/image.py @@ -44,7 +44,7 @@ import tempfile # Gramps modules # #------------------------------------------------------------------------- -import Utils +from gen.utils.file import get_unicode_path_from_env_var #------------------------------------------------------------------------- # @@ -257,7 +257,7 @@ def resize_to_jpeg_buffer(source, size, crop=None): scaled = img.scale_simple(int(size[0]), int(size[1]), gtk.gdk.INTERP_BILINEAR) os.close(filed) - dest = Utils.get_unicode_path_from_env_var(dest) + dest = get_unicode_path_from_env_var(dest) scaled.save(dest, 'jpeg') ofile = open(dest, mode='rb') data = ofile.read() diff --git a/src/gen/utils/trans.py b/src/gen/utils/trans.py index be547c9a4..be36849db 100644 --- a/src/gen/utils/trans.py +++ b/src/gen/utils/trans.py @@ -263,7 +263,7 @@ def get_addon_translator(filename=None, domain="addon", languages=None): # Check if path is of type str. Do import and conversion if so. # The import cannot be done at the top as that will conflict with the translation system. if type(path) == str: - from Utils import get_unicode_path_from_env_var + from gen.utils.file import get_unicode_path_from_env_var path = get_unicode_path_from_env_var(path) if languages: addon_translator = gettext.translation(domain, os.path.join(path,"locale"), diff --git a/src/gui/configure.py b/src/gui/configure.py index 44961f4d5..2ff4d802a 100644 --- a/src/gui/configure.py +++ b/src/gui/configure.py @@ -51,7 +51,7 @@ import const import gen.datehandler from gen.display.name import displayer as _nd from gen.display.name import NameDisplayError -from Utils import get_unicode_path_from_file_chooser +from gen.utils.file import get_unicode_path_from_file_chooser from gen.utils.alive import update_constants from gen.utils.keyword import (get_keywords, get_translation_from_keyword, get_translations, get_keyword_from_translation) diff --git a/src/gui/dbloader.py b/src/gui/dbloader.py index b2bb77883..1e4081fd5 100644 --- a/src/gui/dbloader.py +++ b/src/gui/dbloader.py @@ -57,7 +57,7 @@ import gobject from cli.grampscli import CLIDbLoader from gen.config import config import gen.db -import Utils +from gen.utils.file import get_unicode_path_from_file_chooser from gui.pluginmanager import GuiPluginManager from gui.dialog import (DBErrorDialog, ErrorDialog, QuestionDialog2, WarningDialog) @@ -162,7 +162,7 @@ class DbLoader(CLIDbLoader): if response == gtk.RESPONSE_CANCEL: break elif response == gtk.RESPONSE_OK: - filename = Utils.get_unicode_path_from_file_chooser(import_dialog.get_filename()) + filename = get_unicode_path_from_file_chooser(import_dialog.get_filename()) if self.check_errors(filename): # displays errors if any continue diff --git a/src/gui/dbman.py b/src/gui/dbman.py index ac7d05708..70871eba3 100644 --- a/src/gui/dbman.py +++ b/src/gui/dbman.py @@ -79,7 +79,7 @@ from gen.recentfiles import rename_filename, remove_filename from gui.glade import Glade from gen.db.backup import restore from gen.db.exceptions import DbException -from Utils import get_unicode_path_from_env_var +from gen.utils.file import get_unicode_path_from_env_var _RETURN = gtk.gdk.keyval_from_name("Return") diff --git a/src/gui/editors/addmedia.py b/src/gui/editors/addmedia.py index 30612f0ba..b15bcf506 100644 --- a/src/gui/editors/addmedia.py +++ b/src/gui/editors/addmedia.py @@ -52,7 +52,8 @@ import gtk #------------------------------------------------------------------------- import const from gen.config import config -import Utils +from gen.utils.file import (media_path_full, media_path, relative_path, + find_file, get_unicode_path_from_file_chooser) import gen.mime from gui.thumbnails import find_mime_type_pixbuf from gui.display import display_help @@ -101,7 +102,7 @@ class AddMediaObject(ManagedWindow): self.last_directory = const.USER_HOME #if existing path, use dir of path if not self.obj.get_path() == "": - fullname = Utils.media_path_full(self.dbase, self.obj.get_path()) + fullname = media_path_full(self.dbase, self.obj.get_path()) dir = os.path.dirname(fullname) if os.path.isdir(dir): self.last_directory = dir @@ -149,17 +150,17 @@ class AddMediaObject(ManagedWindow): ErrorDialog(msgstr, msgstr2) return - filename = Utils.get_unicode_path_from_file_chooser(self.file_text.get_filename()) + filename = get_unicode_path_from_file_chooser(self.file_text.get_filename()) full_file = filename if self.relpath.get_active(): - pname = unicode(Utils.media_path(self.dbase)) + pname = unicode(media_path(self.dbase)) if not os.path.exists(pname): msgstr = _("Cannot import %s") msgstr2 = _("Directory specified in preferences: Base path for relative media paths: %s does not exist. Change preferences or do not use relative path when importing") ErrorDialog(msgstr % filename, msgstr2 % pname) return - filename = Utils.relative_path(filename, pname) + filename = relative_path(filename, pname) mtype = gen.mime.get_type(full_file) @@ -186,7 +187,7 @@ class AddMediaObject(ManagedWindow): fname = self.file_text.get_filename() if not fname: return - filename = Utils.get_unicode_path_from_file_chooser(fname) + filename = get_unicode_path_from_file_chooser(fname) basename = os.path.basename(filename) (root, ext) = os.path.splitext(basename) old_title = unicode(self.description.get_text()) @@ -195,7 +196,7 @@ class AddMediaObject(ManagedWindow): self.description.set_text(root) self.temp_name = root - filename = Utils.find_file( filename) + filename = find_file( filename) if filename: mtype = gen.mime.get_type(filename) if mtype and mtype.startswith("image"): diff --git a/src/gui/editors/displaytabs/gallerytab.py b/src/gui/editors/displaytabs/gallerytab.py index f32958ff9..c620ff2b6 100644 --- a/src/gui/editors/displaytabs/gallerytab.py +++ b/src/gui/editors/displaytabs/gallerytab.py @@ -53,6 +53,7 @@ from gui.selectors import SelectorFactory import gen.lib from gen.db import DbTxn import Utils +from gen.utils.file import media_path_full, media_path, relative_path from gui.thumbnails import get_thumbnail_image from gen.errors import WindowActiveError import gen.mime @@ -131,7 +132,7 @@ class GalleryTab(ButtonTab, DbGUIElement): menu = gtk.Menu() ref_obj = self.dbstate.db.get_object_from_handle(obj.ref) - media_path = Utils.media_path_full(self.dbstate.db, ref_obj.get_path()) + media_path = media_path_full(self.dbstate.db, ref_obj.get_path()) if media_path: item = gtk.ImageMenuItem(_('View')) img = gtk.Image() @@ -251,7 +252,7 @@ class GalleryTab(ButtonTab, DbGUIElement): _('Non existing media found in the Gallery')) else : pixbuf = get_thumbnail_image( - Utils.media_path_full(self.dbstate.db, + media_path_full(self.dbstate.db, obj.get_path()), obj.get_mime_type(), ref.get_rectangle()) @@ -502,9 +503,9 @@ class GalleryTab(ButtonTab, DbGUIElement): if not gen.mime.is_valid_type(mime): return photo = gen.lib.MediaObject() - base_dir = unicode(Utils.media_path(self.dbstate.db)) + base_dir = unicode(media_path(self.dbstate.db)) if os.path.exists(base_dir): - name = Utils.relative_path(name, base_dir) + name = relative_path(name, base_dir) photo.set_path(name) photo.set_mime_type(mime) basename = os.path.basename(name) diff --git a/src/gui/editors/editmedia.py b/src/gui/editors/editmedia.py index 77f76109d..9679da5dc 100644 --- a/src/gui/editors/editmedia.py +++ b/src/gui/editors/editmedia.py @@ -47,7 +47,8 @@ import gen.lib from gen.db import DbTxn import gen.mime from gui.thumbnails import get_thumbnail_image, find_mime_type_pixbuf -import Utils +from gen.utils.file import (media_path_full, find_file, + get_unicode_path_from_file_chooser) from editprimary import EditPrimary from gui.widgets import (MonitoredDate, MonitoredEntry, PrivacyButton, MonitoredTagList) @@ -156,10 +157,10 @@ class EditMedia(EditPrimary): self.mimetext.set_text(descr) path = self.file_path.get_text() - path_full = Utils.media_path_full(self.db, path) + path_full = media_path_full(self.db, path) if path != self.obj.get_path() and path_full != self.obj.get_path(): #redetermine mime - mime = gen.mime.get_type(Utils.find_file(path_full)) + mime = gen.mime.get_type(find_file(path_full)) self.obj.set_mime_type(mime) descr = gen.mime.get_description(mime) if descr: @@ -174,7 +175,7 @@ class EditMedia(EditPrimary): mtype = self.obj.get_mime_type() if mtype: pb = get_thumbnail_image( - Utils.media_path_full(self.db, self.obj.get_path()), + media_path_full(self.db, self.obj.get_path()), mtype) self.pixmap.set_from_pixbuf(pb) else: @@ -238,14 +239,14 @@ class EditMedia(EditPrimary): ref_obj = self.dbstate.db.get_object_from_handle(self.obj.handle) if ref_obj: - media_path = Utils.media_path_full(self.dbstate.db, + media_path = media_path_full(self.dbstate.db, ref_obj.get_path()) open_file_with_default_application(media_path) def select_file(self, val): self.determine_mime() path = self.file_path.get_text() - self.obj.set_path(Utils.get_unicode_path_from_file_chooser(path)) + self.obj.set_path(get_unicode_path_from_file_chooser(path)) AddMediaObject(self.dbstate, self.uistate, self.track, self.obj, self._update_addmedia) @@ -289,7 +290,7 @@ class EditMedia(EditPrimary): path = self.file_path.get_text() self.determine_mime() - self.obj.set_path(Utils.get_unicode_path_from_file_chooser(path)) + self.obj.set_path(get_unicode_path_from_file_chooser(path)) with DbTxn('', self.db) as trans: if not self.obj.get_handle(): diff --git a/src/gui/editors/editmediaref.py b/src/gui/editors/editmediaref.py index c4d69b6da..3777bfafe 100644 --- a/src/gui/editors/editmediaref.py +++ b/src/gui/editors/editmediaref.py @@ -47,7 +47,8 @@ from gui.utils import open_file_with_default_application import const import gen.mime from gui.thumbnails import get_thumbnail_image, find_mime_type_pixbuf -import Utils +from gen.utils.file import (media_path_full, find_file, + get_unicode_path_from_file_chooser) from gen.lib import NoteType from gen.db import DbTxn from gui.glade import Glade @@ -118,10 +119,10 @@ class EditMediaRef(EditReference): self.mimetext.set_text(descr) path = self.file_path.get_text() - path_full = Utils.media_path_full(self.db, path) + path_full = media_path_full(self.db, path) if path != self.source.get_path() and path_full != self.source.get_path(): #redetermine mime - mime = gen.mime.get_type(Utils.find_file(path_full)) + mime = gen.mime.get_type(find_file(path_full)) self.source.set_mime_type(mime) descr = gen.mime.get_description(mime) if descr: @@ -139,7 +140,7 @@ class EditMediaRef(EditReference): """ mtype = self.source.get_mime_type() if mtype: - fullpath = Utils.media_path_full(self.db, self.source.get_path()) + fullpath = media_path_full(self.db, self.source.get_path()) pb = get_thumbnail_image(fullpath, mtype) self.pixmap.set_from_pixbuf(pb) subpix = get_thumbnail_image(fullpath, mtype, @@ -394,7 +395,7 @@ class EditMediaRef(EditReference): self.subpixmap.hide() else: try: - fullpath = Utils.media_path_full(self.db, path) + fullpath = media_path_full(self.db, path) pixbuf = gtk.gdk.pixbuf_new_from_file(fullpath) width = pixbuf.get_width() height = pixbuf.get_height() @@ -433,7 +434,7 @@ class EditMediaRef(EditReference): def button_press_event(self, obj, event): if event.button==1 and event.type == gtk.gdk._2BUTTON_PRESS: - photo_path = Utils.media_path_full(self.db, self.source.get_path()) + photo_path = media_path_full(self.db, self.source.get_path()) open_file_with_default_application(photo_path) def button_press_event_ref(self, widget, event): @@ -581,7 +582,7 @@ class EditMediaRef(EditReference): def select_file(self, val): self.determine_mime() path = self.file_path.get_text() - self.source.set_path(Utils.get_unicode_path_from_file_chooser(path)) + self.source.set_path(get_unicode_path_from_file_chooser(path)) AddMediaObject(self.dbstate, self.uistate, self.track, self.source, self._update_addmedia) diff --git a/src/gui/editors/editperson.py b/src/gui/editors/editperson.py index c27e48d5e..bc16ac950 100644 --- a/src/gui/editors/editperson.py +++ b/src/gui/editors/editperson.py @@ -49,7 +49,7 @@ import pango # gramps modules # #------------------------------------------------------------------------- -import Utils +from gen.utils.file import media_path_full from gui.thumbnails import get_thumbnail_image import gui.utils from gen.utils import get_birth_or_fallback @@ -636,7 +636,7 @@ class EditPerson(EditPrimary): photo = media_list[0] object_handle = photo.get_reference_handle() ref_obj = self.db.get_object_from_handle(object_handle) - photo_path = Utils.media_path_full(self.db, ref_obj.get_path()) + photo_path = media_path_full(self.db, ref_obj.get_path()) gui.utils.open_file_with_default_application(photo_path) def _popup_change_description(self, obj): @@ -940,7 +940,7 @@ class EditPerson(EditPrimary): Load the person's main photo using the Thumbnailer. """ pixbuf = get_thumbnail_image( - Utils.media_path_full(self.dbstate.db, + media_path_full(self.dbstate.db, obj.get_path()), obj.get_mime_type(), ref.get_rectangle()) diff --git a/src/gui/plug/_guioptions.py b/src/gui/plug/_guioptions.py index 37ead20bd..a78b775b7 100644 --- a/src/gui/plug/_guioptions.py +++ b/src/gui/plug/_guioptions.py @@ -50,7 +50,7 @@ import gobject # gramps modules # #------------------------------------------------------------------------- -import Utils +from gen.utils.file import get_unicode_path_from_file_chooser from gui.utils import ProgressMeter from gui.pluginmanager import GuiPluginManager from gui import widgets @@ -1688,7 +1688,7 @@ class GuiDestinationOption(gtk.HBox): status = fcd.run() if status == gtk.RESPONSE_OK: - path = Utils.get_unicode_path_from_file_chooser(fcd.get_filename()) + path = get_unicode_path_from_file_chooser(fcd.get_filename()) if path: if not self.__option.get_directory_entry() and \ not path.endswith(self.__option.get_extension()): diff --git a/src/gui/plug/_windows.py b/src/gui/plug/_windows.py index 459b24e6c..1278f462b 100644 --- a/src/gui/plug/_windows.py +++ b/src/gui/plug/_windows.py @@ -56,7 +56,7 @@ import tool from _guioptions import add_gui_options from gui.dialog import InfoDialog from gui.editors import EditPerson -import Utils +from gen.utils.file import get_unicode_path_from_file_chooser import const from gen.config import config @@ -432,7 +432,7 @@ class PluginStatus(ManagedWindow): status = fcd.run() if status == gtk.RESPONSE_OK: - path = Utils.get_unicode_path_from_file_chooser(fcd.get_filename()) + path = get_unicode_path_from_file_chooser(fcd.get_filename()) if path: self.install_addon_path.set_text(path) fcd.destroy() diff --git a/src/gui/plug/export/_exportassistant.py b/src/gui/plug/export/_exportassistant.py index 7a849a33d..215f7649c 100644 --- a/src/gui/plug/export/_exportassistant.py +++ b/src/gui/plug/export/_exportassistant.py @@ -58,7 +58,8 @@ import gtk import const from gen.config import config from gui.pluginmanager import GuiPluginManager -import Utils +from gen.utils.file import (find_folder, get_new_filename, + get_unicode_path_from_file_chooser) from gui.managedwindow import ManagedWindow from gui.dialog import ErrorDialog from gui.user import User @@ -358,8 +359,8 @@ class ExportAssistant(gtk.Assistant, ManagedWindow) : filename = filechooser.get_filename() folder = filechooser.get_current_folder() #the file must be valid, not a folder, and folder must be valid - if filename and filename.strip and Utils.find_folder(filename) == '' \ - and folder and Utils.find_folder(folder): + if filename and filename.strip and find_folder(filename) == '' \ + and folder and find_folder(folder): #this page of the assistant is complete self.set_page_complete(filechooser, True) ##workaround around bug http://bugzilla.gnome.org/show_bug.cgi?id=56070 @@ -488,7 +489,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow) : #Allow for exotic error: file is still not correct self.check_fileselect(self.chooser, show=False) if self.get_page_complete(self.chooser) : - filename = Utils.get_unicode_path_from_file_chooser(self.chooser.get_filename()) + filename = get_unicode_path_from_file_chooser(self.chooser.get_filename()) name = os.path.split(filename)[1] folder = os.path.split(filename)[0] confirm_text = _( @@ -611,7 +612,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow) : elif ext == 'burn': new_filename = os.path.basename(self.dbstate.db.get_save_path()) else: - new_filename = Utils.get_new_filename(ext,default_dir) + new_filename = get_new_filename(ext,default_dir) return (default_dir, os.path.split(new_filename)[1]) def save(self): @@ -625,7 +626,7 @@ class ExportAssistant(gtk.Assistant, ManagedWindow) : hasattr(self.option_box_instance, "no_fileselect")): filename = "" else: - filename = Utils.get_unicode_path_from_file_chooser(self.chooser.get_filename()) + filename = get_unicode_path_from_file_chooser(self.chooser.get_filename()) config.set('paths.recent-export-dir', os.path.split(filename)[0]) ix = self.get_selected_format_index() config.set('behavior.recent-export-type', ix) diff --git a/src/gui/plug/report/_fileentry.py b/src/gui/plug/report/_fileentry.py index cfabec0fb..caf2dcf9e 100644 --- a/src/gui/plug/report/_fileentry.py +++ b/src/gui/plug/report/_fileentry.py @@ -24,7 +24,7 @@ import os import gtk -import Utils +from gen.utils.file import get_unicode_path_from_file_chooser class FileEntry(gtk.HBox): """ A widget that allows the user to select a file from the file system """ @@ -74,7 +74,7 @@ class FileEntry(gtk.HBox): dialog.present() status = dialog.run() if status == gtk.RESPONSE_OK: - self.set_filename(Utils.get_unicode_path_from_file_chooser(dialog.get_filename())) + self.set_filename(get_unicode_path_from_file_chooser(dialog.get_filename())) dialog.destroy() def set_filename(self, path): diff --git a/src/gui/plug/report/_reportdialog.py b/src/gui/plug/report/_reportdialog.py index 1d7692352..6d5d7847e 100644 --- a/src/gui/plug/report/_reportdialog.py +++ b/src/gui/plug/report/_reportdialog.py @@ -64,7 +64,7 @@ from _stylecombobox import StyleComboBox from _styleeditor import StyleListDisplay from _fileentry import FileEntry from const import URL_MANUAL_PAGE -import Utils +from gen.utils.file import get_unicode_path_from_file_chooser #------------------------------------------------------------------------- # # Private Constants @@ -496,7 +496,7 @@ class ReportDialog(ManagedWindow): to tell the calling routine to give up. This function also saves the current directory so that any future reports will default to the most recently used directory.""" - self.target_path = Utils.get_unicode_path_from_file_chooser(self.target_fileentry.get_full_path(0)) + self.target_path = get_unicode_path_from_file_chooser(self.target_fileentry.get_full_path(0)) if not self.target_path: return None diff --git a/src/gui/selectors/selectobject.py b/src/gui/selectors/selectobject.py index eacefb128..abd26fcef 100644 --- a/src/gui/selectors/selectobject.py +++ b/src/gui/selectors/selectobject.py @@ -45,7 +45,7 @@ import gtk # #------------------------------------------------------------------------- import const -from Utils import media_path_full +from gen.utils.file import media_path_full from gui.thumbnails import get_thumbnail_image from gui.views.treemodels import MediaModel from baseselector import BaseSelector diff --git a/src/gui/viewmanager.py b/src/gui/viewmanager.py index a075d2a94..71f4dc4a5 100644 --- a/src/gui/viewmanager.py +++ b/src/gui/viewmanager.py @@ -86,7 +86,8 @@ from gui.dialog import (ErrorDialog, WarningDialog, QuestionDialog2, InfoDialog) from gui import widgets from gui.undohistory import UndoHistory -import Utils +from gen.utils.file import (media_path_full, get_unicode_path_from_env_var, + get_unicode_path_from_file_chooser) from gui.dbloader import DbLoader from gui.display import display_help, display_url from gui.widgets.progressdialog import ProgressMonitor, GtkProgressDialog @@ -1527,7 +1528,7 @@ class ViewManager(CLIManager): bytes = 0 mbytes = "0" for media in self.dbstate.db.iter_media_objects(): - fullname = Utils.media_path_full(self.dbstate.db, media.get_path()) + fullname = media_path_full(self.dbstate.db, media.get_path()) try: bytes += posixpath.getsize(fullname) length = len(str(bytes)) @@ -1559,7 +1560,7 @@ class ViewManager(CLIManager): filename = os.path.join(path_entry.get_text(), basefile) filename = filename.encode(sys.getfilesystemencoding()) if os.path.exists(filename): - sfilename = Utils.get_unicode_path_from_env_var(filename) + sfilename = get_unicode_path_from_env_var(filename) question = QuestionDialog2( _("Backup file already exists! Overwrite?"), _("The file '%s' exists.") % sfilename, @@ -1587,7 +1588,7 @@ class ViewManager(CLIManager): writer.write(filename) self.uistate.set_busy_cursor(0) self.uistate.progress.hide() - filename = Utils.get_unicode_path_from_env_var(filename) + filename = get_unicode_path_from_env_var(filename) self.uistate.push_message(self.dbstate, _("Backup saved to '%s'") % filename) config.set('paths.quick-backup-directory', path_entry.get_text()) else: @@ -1624,7 +1625,7 @@ class ViewManager(CLIManager): if status == gtk.RESPONSE_OK: filename = f.get_filename() if filename: - val = Utils.get_unicode_path_from_file_chooser(filename) + val = get_unicode_path_from_file_chooser(filename) if val: path_entry.set_text(val) f.destroy() diff --git a/src/gui/views/listview.py b/src/gui/views/listview.py index 96970d194..617ad8649 100644 --- a/src/gui/views/listview.py +++ b/src/gui/views/listview.py @@ -59,6 +59,7 @@ from gui.filters import SearchBar from gui.utils import add_menuitem import const import Utils +from gen.utils.file import get_unicode_path_from_file_chooser from gui.dialog import QuestionDialog, QuestionDialog2 from gui.editors import FilterEditor from gen.ggettext import sgettext as _ @@ -941,7 +942,7 @@ class ListView(NavigationView): while True: value = chooser.run() fn = chooser.get_filename() - fn = Utils.get_unicode_path_from_file_chooser(fn) + fn = get_unicode_path_from_file_chooser(fn) fl = combobox.get_active() if value == gtk.RESPONSE_OK: if fn: diff --git a/src/plugins/export/exportgedcom.py b/src/plugins/export/exportgedcom.py index 21e38d761..bf293db5b 100644 --- a/src/plugins/export/exportgedcom.py +++ b/src/plugins/export/exportgedcom.py @@ -48,7 +48,7 @@ import libgedcom from gen.errors import DatabaseError from gui.plug.export import WriterOptionBox from gen.updatecallback import UpdateCallback -from Utils import media_path_full +from gen.utils.file import media_path_full from gen.utils.place import conv_lat_lon #------------------------------------------------------------------------- diff --git a/src/plugins/export/exportpkg.py b/src/plugins/export/exportpkg.py index 6a56b0c74..78e6ca0eb 100644 --- a/src/plugins/export/exportpkg.py +++ b/src/plugins/export/exportpkg.py @@ -61,7 +61,7 @@ import gtk #------------------------------------------------------------------------- from gui.plug.export import WriterOptionBox from ExportXml import XmlWriter -import Utils +from gen.utils.file import media_path_full, get_unicode_path_from_file_chooser from gen.constfunc import win #------------------------------------------------------------------------- @@ -157,7 +157,7 @@ class PackageWriter(object): # pass # def fs_ok_clicked(obj): - # name = Utils.get_unicode_path_from_file_chooser(fs_top.get_filename()) + # name = get_unicode_path_from_file_chooser(fs_top.get_filename()) # if os.path.isfile(name): # archive.add(name) @@ -185,7 +185,7 @@ class PackageWriter(object): # during the process (i.e. when removing object) for m_id in self.db.get_media_object_handles(sort_handles=True): mobject = self.db.get_object_from_handle(m_id) - filename = Utils.media_path_full(self.db, mobject.get_path()) + filename = media_path_full(self.db, mobject.get_path()) archname = str(mobject.get_path()) if os.path.isfile(filename) and os.access(filename, os.R_OK): archive.add(filename, archname) diff --git a/src/plugins/gramplet/editexifmetadata.py b/src/plugins/gramplet/editexifmetadata.py index e5c5c72d1..6867ff42f 100644 --- a/src/plugins/gramplet/editexifmetadata.py +++ b/src/plugins/gramplet/editexifmetadata.py @@ -64,7 +64,7 @@ from gui.dialog import QuestionDialog, OptionDialog from gen.lib import Date import gen.mime -import Utils +from gen.utils.file import search_for, media_path_full from gen.utils.place import conv_lat_lon from gen.db import DbTxn @@ -82,9 +82,9 @@ else: # validate the exiv2 is installed and its executable system_platform = os.sys.platform if system_platform == "win32": - EXIV2_FOUND = "exiv2.exe" if Utils.search_for("exiv2.exe") else False + EXIV2_FOUND = "exiv2.exe" if search_for("exiv2.exe") else False else: - EXIV2_FOUND = "exiv2" if Utils.search_for("exiv2") else False + EXIV2_FOUND = "exiv2" if search_for("exiv2") else False if not EXIV2_FOUND: msg = 'You must have exiv2 and its development file installed.' raise SystemExit(msg) @@ -406,7 +406,7 @@ class EditExifMetadata(Gramplet): return # get file path and attempt to find it? - self.image_path =Utils.media_path_full(db, self.orig_image.get_path() ) + self.image_path = media_path_full(db, self.orig_image.get_path() ) if not os.path.isfile(self.image_path): self.set_has_data(False) return @@ -583,7 +583,7 @@ class EditExifMetadata(Gramplet): if media is None: return False - full_path = Utils.media_path_full(self.dbstate.db, media.get_path()) + full_path = media_path_full(self.dbstate.db, media.get_path()) return self.view.get_has_data(full_path) def __create_button(self, pos, text, callback =[], icon =False, sensitive =False): diff --git a/src/plugins/gramplet/gallery.py b/src/plugins/gramplet/gallery.py index a38c3ced8..5b79c9f87 100644 --- a/src/plugins/gramplet/gallery.py +++ b/src/plugins/gramplet/gallery.py @@ -22,7 +22,7 @@ from gen.plug import Gramplet from gui.widgets import Photo -import Utils +from gen.utils.file import media_path_full import gtk class Gallery(Gramplet): @@ -59,7 +59,7 @@ class Gallery(Gramplet): for media_ref in media_list: media_handle = media_ref.get_reference_handle() media = self.dbstate.db.get_object_from_handle(media_handle) - full_path = Utils.media_path_full(self.dbstate.db, media.get_path()) + full_path = media_path_full(self.dbstate.db, media.get_path()) mime_type = media.get_mime_type() if mime_type and mime_type.startswith("image"): photo = Photo(self.uistate.screen_height() < 1000) diff --git a/src/plugins/gramplet/mediapreview.py b/src/plugins/gramplet/mediapreview.py index e76d64aad..e70ecbf8f 100644 --- a/src/plugins/gramplet/mediapreview.py +++ b/src/plugins/gramplet/mediapreview.py @@ -21,7 +21,7 @@ from gen.plug import Gramplet from gui.widgets import Photo -import Utils +from gen.utils.file import media_path_full import gtk class MediaPreview(Gramplet): @@ -68,7 +68,7 @@ class MediaPreview(Gramplet): """ Load the primary image if it exists. """ - self.full_path = Utils.media_path_full(self.dbstate.db, + self.full_path = media_path_full(self.dbstate.db, media.get_path()) mime_type = media.get_mime_type() self.photo.set_image(self.full_path, mime_type) diff --git a/src/plugins/gramplet/metadataviewer.py b/src/plugins/gramplet/metadataviewer.py index bd7b914b2..3e0a9f4a9 100644 --- a/src/plugins/gramplet/metadataviewer.py +++ b/src/plugins/gramplet/metadataviewer.py @@ -24,7 +24,7 @@ from libmetadata import MetadataView from gen.plug import Gramplet -import Utils +from gen.utils.file import media_path_full class MetadataViewer(Gramplet): """ @@ -49,7 +49,7 @@ class MetadataViewer(Gramplet): media = self.dbstate.db.get_object_from_handle(active_handle) if media: - full_path = Utils.media_path_full(self.dbstate.db, media.get_path()) + full_path = media_path_full(self.dbstate.db, media.get_path()) has_data = self.view.display_exif_tags(full_path) self.set_has_data(has_data) else: @@ -67,5 +67,5 @@ class MetadataViewer(Gramplet): if media is None: return False - full_path = Utils.media_path_full(self.dbstate.db, media.get_path()) + full_path = media_path_full(self.dbstate.db, media.get_path()) return self.view.get_has_data(full_path) diff --git a/src/plugins/gramplet/persondetails.py b/src/plugins/gramplet/persondetails.py index 89edff4f4..c4aa4e661 100644 --- a/src/plugins/gramplet/persondetails.py +++ b/src/plugins/gramplet/persondetails.py @@ -25,7 +25,7 @@ from gui.widgets import Photo from gen.display.name import displayer as name_displayer from gen.ggettext import gettext as _ import gen.datehandler -import Utils +from gen.utils.file import media_path_full import gtk import pango @@ -223,7 +223,7 @@ class PersonDetails(Gramplet): media_ref = media_list[0] object_handle = media_ref.get_reference_handle() obj = self.dbstate.db.get_object_from_handle(object_handle) - full_path = Utils.media_path_full(self.dbstate.db, obj.get_path()) + full_path = media_path_full(self.dbstate.db, obj.get_path()) mime_type = obj.get_mime_type() if mime_type and mime_type.startswith("image"): self.photo.set_image(full_path, mime_type, diff --git a/src/plugins/gramplet/placedetails.py b/src/plugins/gramplet/placedetails.py index 7b68dd023..920dc978f 100644 --- a/src/plugins/gramplet/placedetails.py +++ b/src/plugins/gramplet/placedetails.py @@ -23,7 +23,7 @@ from gen.plug import Gramplet from gui.widgets import Photo from gen.ggettext import gettext as _ from gen.utils.place import conv_lat_lon -import Utils +from gen.utils.file import media_path_full import gtk import pango @@ -153,7 +153,7 @@ class PlaceDetails(Gramplet): media_ref = media_list[0] object_handle = media_ref.get_reference_handle() obj = self.dbstate.db.get_object_from_handle(object_handle) - full_path = Utils.media_path_full(self.dbstate.db, obj.get_path()) + full_path = media_path_full(self.dbstate.db, obj.get_path()) mime_type = obj.get_mime_type() if mime_type and mime_type.startswith("image"): self.photo.set_image(full_path, mime_type, diff --git a/src/plugins/gramplet/statsgramplet.py b/src/plugins/gramplet/statsgramplet.py index b2696068d..eb3ffbdff 100644 --- a/src/plugins/gramplet/statsgramplet.py +++ b/src/plugins/gramplet/statsgramplet.py @@ -32,7 +32,7 @@ import posixpath #------------------------------------------------------------------------ from gen.plug import Gramplet from gen.ggettext import sgettext as _ -from Utils import media_path_full +from gen.utils.file import media_path_full import gen.datehandler import gen diff --git a/src/plugins/graph/gvfamilylines.py b/src/plugins/graph/gvfamilylines.py index b2fd473c7..8ca2524f0 100644 --- a/src/plugins/graph/gvfamilylines.py +++ b/src/plugins/graph/gvfamilylines.py @@ -51,7 +51,7 @@ log = logging.getLogger(".FamilyLines") # #------------------------------------------------------------------------ import gen.lib -import Utils +from gen.utils.file import media_path_full from gui.thumbnails import get_thumbnail_path from gen.datehandler import displayer as _dd from gen.plug.report import Report @@ -797,7 +797,7 @@ class FamilyLinesReport(Report): mediaMimeType = media.get_mime_type() if mediaMimeType[0:5] == "image": imagePath = get_thumbnail_path( - Utils.media_path_full(self._db, + media_path_full(self._db, media.get_path()), rectangle=mediaList[0].get_rectangle()) diff --git a/src/plugins/graph/gvrelgraph.py b/src/plugins/graph/gvrelgraph.py index e41cb839d..b09042375 100644 --- a/src/plugins/graph/gvrelgraph.py +++ b/src/plugins/graph/gvrelgraph.py @@ -55,7 +55,7 @@ from gen.plug.report import MenuReportOptions from gen.display.name import displayer as name_displayer import gen.datehandler import gen.lib -import Utils +from gen.utils.file import media_path_full, find_file from gui.thumbnails import get_thumbnail_path from gen.utils import get_birth_or_fallback, get_death_or_fallback @@ -355,12 +355,12 @@ class RelGraphReport(Report): mediaMimeType = media.get_mime_type() if mediaMimeType[0:5] == "image": imagePath = get_thumbnail_path( - Utils.media_path_full(self.database, + media_path_full(self.database, media.get_path()), rectangle=mediaList[0].get_rectangle()) # test if thumbnail actually exists in thumbs # (import of data means media files might not be present - imagePath = Utils.find_file(imagePath) + imagePath = find_file(imagePath) label = u"" lineDelimiter = '\\n' diff --git a/src/plugins/import/importgpkg.py b/src/plugins/import/importgpkg.py index 6bedd9bd0..4be9deb43 100644 --- a/src/plugins/import/importgpkg.py +++ b/src/plugins/import/importgpkg.py @@ -48,7 +48,7 @@ log = logging.getLogger(".ReadPkg") #------------------------------------------------------------------------- import const import ImportXml -import Utils +from gen.utils.file import media_path #------------------------------------------------------------------------- # @@ -61,7 +61,7 @@ def impData(database, name, user): # in the mediapath dir of the family tree we import to oldmediapath = database.get_mediapath() #use home dir if no media path - media_path = Utils.media_path(database) + media_path = media_path(database) media_dir = "%s.media" % os.path.basename(name) tmpdir_path = os.path.join(media_path, media_dir) if not os.path.isdir(tmpdir_path): diff --git a/src/plugins/quickview/filterbyname.py b/src/plugins/quickview/filterbyname.py index f19a08b0e..e8b743c75 100644 --- a/src/plugins/quickview/filterbyname.py +++ b/src/plugins/quickview/filterbyname.py @@ -29,7 +29,7 @@ Display filtered data from gen.simple import SimpleAccess, SimpleDoc from gui.plug.quick import QuickTable -from Utils import media_path_full +from gen.utils.file import media_path_full from gui.plug.quick import run_quick_report_by_name_direct from gen.lib import Person import gen.datehandler diff --git a/src/plugins/textreport/indivcomplete.py b/src/plugins/textreport/indivcomplete.py index 2ee80c4ad..b3918859f 100644 --- a/src/plugins/textreport/indivcomplete.py +++ b/src/plugins/textreport/indivcomplete.py @@ -53,7 +53,7 @@ from gen.plug.report import MenuReportOptions from gen.plug.report import Bibliography from gen.plug.report import endnotes as Endnotes from gen.display.name import displayer as global_name_display -from Utils import media_path_full +from gen.utils.file import media_path_full #------------------------------------------------------------------------ # diff --git a/src/plugins/textreport/simplebooktitle.py b/src/plugins/textreport/simplebooktitle.py index 5621bf90a..9b7a81210 100644 --- a/src/plugins/textreport/simplebooktitle.py +++ b/src/plugins/textreport/simplebooktitle.py @@ -37,7 +37,7 @@ import os # #------------------------------------------------------------------------ from gen.plug.menu import StringOption, MediaOption, NumberOption -from Utils import media_path_full +from gen.utils.file import media_path_full from gen.plug.report import Report from gen.plug.report import MenuReportOptions from gen.plug.docgen import (FontStyle, ParagraphStyle, diff --git a/src/plugins/textreport/summary.py b/src/plugins/textreport/summary.py index c773b55c9..a0f18d287 100644 --- a/src/plugins/textreport/summary.py +++ b/src/plugins/textreport/summary.py @@ -45,7 +45,7 @@ from gen.plug.report import utils as ReportUtils from gen.plug.report import MenuReportOptions from gen.plug.docgen import (IndexMark, FontStyle, ParagraphStyle, FONT_SANS_SERIF, INDEX_TYPE_TOC, PARA_ALIGN_CENTER) -from Utils import media_path_full +from gen.utils.file import media_path_full import gen.datehandler diff --git a/src/plugins/tool/check.py b/src/plugins/tool/check.py index 108b2b4f0..0a3e2b39e 100644 --- a/src/plugins/tool/check.py +++ b/src/plugins/tool/check.py @@ -66,6 +66,9 @@ import gen.lib from gen.db import DbTxn from gen.config import config import Utils +from gen.utils.file import (get_unicode_path_from_file_chooser, + media_path_full, + find_file) from gui.utils import ProgressMeter from gui.managedwindow import ManagedWindow @@ -630,7 +633,7 @@ class CheckIntegrity(object): LOG(' FAIL: references to missing file kept') def fs_ok_clicked(obj): - name = Utils.get_unicode_path_from_file_chooser(fs_top.get_filename()) + name = get_unicode_path_from_file_chooser(fs_top.get_filename()) if os.path.isfile(name): obj = self.db.get_object_from_handle(ObjectId) obj.set_path(name) @@ -658,9 +661,9 @@ class CheckIntegrity(object): for ObjectId in self.db.get_media_object_handles(): obj = self.db.get_object_from_handle(ObjectId) - photo_name = Utils.media_path_full(self.db, obj.get_path()) + photo_name = media_path_full(self.db, obj.get_path()) photo_desc = obj.get_description() - if photo_name is not None and photo_name != "" and not Utils.find_file(photo_name): + if photo_name is not None and photo_name != "" and not find_file(photo_name): if cl: # Convert to file system encoding before prining fn = os.path.basename(photo_name).encode(sys.getfilesystemencoding()) diff --git a/src/plugins/tool/eventcmp.py b/src/plugins/tool/eventcmp.py index 61e0e6584..600cdcca6 100644 --- a/src/plugins/tool/eventcmp.py +++ b/src/plugins/tool/eventcmp.py @@ -47,7 +47,7 @@ import gtk from gen.filters import GenericFilter, rules from gui.filters import build_filter_model from gen.sort import Sort -import Utils +from gen.utils.file import get_unicode_path_from_file_chooser from gui.utils import ProgressMeter from docgen import ODSTab import const @@ -400,7 +400,7 @@ class DisplayChart(ManagedWindow): f.hide() if status == gtk.RESPONSE_OK: - name = Utils.get_unicode_path_from_file_chooser(f.get_filename()) + name = get_unicode_path_from_file_chooser(f.get_filename()) doc = ODSTab(len(self.row_data)) doc.creator(self.db.get_researcher().get_name()) diff --git a/src/plugins/tool/mediamanager.py b/src/plugins/tool/mediamanager.py index 16fcedc1f..26c79e329 100644 --- a/src/plugins/tool/mediamanager.py +++ b/src/plugins/tool/mediamanager.py @@ -55,7 +55,7 @@ from gen.lib import MediaObject from gen.db import DbTxn from gen.updatecallback import UpdateCallback from gui.plug import tool -from Utils import media_path_full, relative_path, media_path +from gen.utils.file import media_path_full, relative_path, media_path from gen.ggettext import sgettext as _ import gen.mime diff --git a/src/plugins/view/htmlrenderer.py b/src/plugins/view/htmlrenderer.py index 679ed55de..1fe20565e 100644 --- a/src/plugins/view/htmlrenderer.py +++ b/src/plugins/view/htmlrenderer.py @@ -59,7 +59,7 @@ import gtk #------------------------------------------------------------------------- from gui.views.navigationview import NavigationView from gui.views.bookmarks import PersonBookmarks -import Utils +from gen.utils.file import get_empty_tempdir from gen.constfunc import lin, mac, win from gen.config import config from const import TEMP_DIR @@ -92,8 +92,8 @@ def get_identity(): # I think we should set the two following variable in const.py # They are used only with gtkmozembed. MOZEMBED_PATH = TEMP_DIR -MOZEMBED_SUBPATH = Utils.get_empty_tempdir('mozembed_gramps') -GEOVIEW_SUBPATH = Utils.get_empty_tempdir('geoview') +MOZEMBED_SUBPATH = get_empty_tempdir('mozembed_gramps') +GEOVIEW_SUBPATH = get_empty_tempdir('geoview') NOWEB = 0 WEBKIT = 1 MOZILLA = 2 diff --git a/src/plugins/view/mediaview.py b/src/plugins/view/mediaview.py index 343a4e95e..058309cb3 100644 --- a/src/plugins/view/mediaview.py +++ b/src/plugins/view/mediaview.py @@ -56,6 +56,7 @@ import const from gen.constfunc import win from gen.config import config import Utils +from gen.utils.file import media_path, relative_path, media_path_full from gen.utils.referent import get_media_referents from gui.views.bookmarks import MediaBookmarks import gen.mime @@ -190,9 +191,9 @@ class MediaView(ListView): if not gen.mime.is_valid_type(mime): return photo = gen.lib.MediaObject() - base_dir = unicode(Utils.media_path(self.dbstate.db)) + base_dir = unicode(media_path(self.dbstate.db)) if os.path.exists(base_dir): - name = Utils.relative_path(name, base_dir) + name = relative_path(name, base_dir) photo.set_path(name) photo.set_mime_type(mime) basename = os.path.basename(name) @@ -249,7 +250,7 @@ class MediaView(ListView): """ for handle in self.selected_handles(): ref_obj = self.dbstate.db.get_object_from_handle(handle) - mpath = Utils.media_path_full(self.dbstate.db, ref_obj.get_path()) + mpath = media_path_full(self.dbstate.db, ref_obj.get_path()) open_file_with_default_application(mpath) def open_containing_folder(self, obj): @@ -258,7 +259,7 @@ class MediaView(ListView): """ for handle in self.selected_handles(): ref_obj = self.dbstate.db.get_object_from_handle(handle) - mpath = Utils.media_path_full(self.dbstate.db, ref_obj.get_path()) + mpath = media_path_full(self.dbstate.db, ref_obj.get_path()) if mpath: mfolder, mfile = os.path.split(mpath) open_file_with_default_application(mfolder) diff --git a/src/plugins/view/pedigreeview.py b/src/plugins/view/pedigreeview.py index dda5a553c..6b4786814 100644 --- a/src/plugins/view/pedigreeview.py +++ b/src/plugins/view/pedigreeview.py @@ -52,8 +52,8 @@ from gui.views.navigationview import NavigationView from gui.editors import FilterEditor from gen.display.name import displayer as name_displayer from gen.utils.alive import probably_alive -from Utils import (media_path_full, find_children, find_parents, - find_witnessed_people) +from gen.utils.file import media_path_full +from Utils import find_children, find_parents, find_witnessed_people from libformatting import FormattingHelper from gui.thumbnails import get_thumbnail_path from gen.errors import WindowActiveError diff --git a/src/plugins/view/relview.py b/src/plugins/view/relview.py index 07e3e1143..5c0e3a3ac 100644 --- a/src/plugins/view/relview.py +++ b/src/plugins/view/relview.py @@ -52,7 +52,7 @@ from gui.views.navigationview import NavigationView from gui.editors import EditPerson, EditFamily from gui.editors import FilterEditor from gen.display.name import displayer as name_displayer -from Utils import media_path_full +from gen.utils.file import media_path_full from gen.utils.alive import probably_alive from gui.utils import open_file_with_default_application import gen.datehandler diff --git a/src/plugins/webreport/narrativeweb.py b/src/plugins/webreport/narrativeweb.py index f6a10d124..8bc992782 100644 --- a/src/plugins/webreport/narrativeweb.py +++ b/src/plugins/webreport/narrativeweb.py @@ -89,6 +89,7 @@ from gen.plug.report import utils as ReportUtils from gen.plug.report import MenuReportOptions import Utils +from gen.utils.file import media_path_full from gen.utils.referent import get_source_and_citation_referents from gen.constfunc import win from gui.thumbnails import get_thumbnail_path, run_thumbnailer @@ -498,7 +499,7 @@ def copy_thumbnail(report, handle, photo, region=None): ) if photo.get_mime_type(): - from_path = get_thumbnail_path(Utils.media_path_full( + from_path = get_thumbnail_path(media_path_full( report.database, photo.get_path()), photo.get_mime_type(), @@ -1837,7 +1838,7 @@ class BasePage(object): try: newpath, thumb_path = self.report.prepare_copy_media(obj) - self.report.copy_file(Utils.media_path_full( + self.report.copy_file(media_path_full( self.report.database, obj.get_path()), newpath) # begin image @@ -3941,7 +3942,7 @@ class MediaPage(BasePage): # improve the site's responsiveness. We don't want the user to # have to await a large download unnecessarily. Either way, set # the display image size as requested. - orig_image_path = Utils.media_path_full(self.dbase_, media.get_path()) + orig_image_path = media_path_full(self.dbase_, media.get_path()) (width, height) = image_size(orig_image_path) max_width = self.report.options['maxinitialimagewidth'] max_height = self.report.options['maxinitialimageheight'] @@ -4008,7 +4009,7 @@ class MediaPage(BasePage): dirname = tempfile.mkdtemp() thmb_path = os.path.join(dirname, "document.png") if run_thumbnailer(mime_type, - Utils.media_path_full(self.dbase_, media.get_path()), + media_path_full(self.dbase_, media.get_path()), thmb_path, 320): try: path = self.report.build_path("preview", media.get_handle()) @@ -4130,7 +4131,7 @@ class MediaPage(BasePage): to_dir = self.report.build_path('images', handle) newpath = os.path.join(to_dir, handle) + ext - fullpath = Utils.media_path_full(self.dbase_, photo.get_path()) + fullpath = media_path_full(self.dbase_, photo.get_path()) if not os.path.isfile(fullpath): _WRONGMEDIAPATH.append([ photo.get_gramps_id(), fullpath]) return None From 5e1535e125f5fad6cf321c491c762df13c049165 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 23 Jun 2012 23:18:27 +0000 Subject: [PATCH 35/68] GEPS008: Create new module for make_unknown functions svn: r19907 --- po/POTFILES.in | 1 + src/Utils.py | 151 ------------------------- src/gen/utils/Makefile.am | 3 +- src/gen/utils/unknown.py | 193 ++++++++++++++++++++++++++++++++ src/plugins/import/importxml.py | 11 +- src/plugins/lib/libgedcom.py | 7 +- src/plugins/tool/check.py | 31 ++--- 7 files changed, 222 insertions(+), 175 deletions(-) create mode 100644 src/gen/utils/unknown.py diff --git a/po/POTFILES.in b/po/POTFILES.in index f80004fef..f6c23de2e 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -327,6 +327,7 @@ src/gen/utils/keyword.py src/gen/utils/lds.py src/gen/utils/place.py src/gen/utils/trans.py +src/gen/utils/unknown.py # gui - GUI code src/gui/aboutdialog.py diff --git a/src/Utils.py b/src/Utils.py index ce378ad04..ee11a1090 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -659,154 +659,3 @@ def navigation_label(db, nav_type, handle): label = '[%s] %s' % (obj.get_gramps_id(), label) return (label, obj) - -#------------------------------------------------------------------------- -# -# make_unknown -# -#------------------------------------------------------------------------- -def make_unknown(class_arg, explanation, class_func, commit_func, transaction, - **argv): - """ - Make a primary object and set some property so that it qualifies as - "Unknown". - - Some object types need extra parameters: - Family: db, Event: type (optional), - Citation: methods to create/store source. - - Some theoretical underpinning - This function exploits the fact that all import methods basically do the - same thing: Create an object of the right type, fill it with some - attributes, store it in the database. This function does the same, so - the observation is why not use the creation and storage methods that the - import routines use themselves, that makes nice reuse of code. To do this - formally correct we would need to specify a interface (in the OOP sence) - which the import methods would need to implement. For now, that is deemed - too restrictive and here we just slip through because of the similarity in - code of both GEDCOM and XML import methods. - - :param class_arg: The argument the class_func needs, typically a kind of id. - :type class_arg: unspecified - :param explanation: Handle of a note that explains the origin of primary obj - :type explanation: str - :param class_func: Method to create primary object. - :type class_func: method - :param commit_func: Method to store primary object in db. - :type commit_func: method - :param transactino: Database transaction handle - :type transaction: str - :param argv: Possible additional parameters - :type param: unspecified - :returns: List of newly created objects. - :rtype: list - """ - retval = [] - obj = class_func(class_arg) - if isinstance(obj, gen.lib.Person): - surname = gen.lib.Surname() - surname.set_surname('Unknown') - name = gen.lib.Name() - name.add_surname(surname) - name.set_type(gen.lib.NameType.UNKNOWN) - obj.set_primary_name(name) - elif isinstance(obj, gen.lib.Family): - obj.set_relationship(gen.lib.FamilyRelType.UNKNOWN) - handle = obj.handle - if getattr(argv['db'].transaction, 'no_magic', False): - backlinks = argv['db'].find_backlink_handles( - handle, [gen.lib.Person.__name__]) - for dummy, person_handle in backlinks: - person = argv['db'].get_person_from_handle(person_handle) - add_personref_to_family(obj, person) - else: - for person in argv['db'].iter_people(): - if person._has_handle_reference('Family', handle): - add_personref_to_family(obj, person) - elif isinstance(obj, gen.lib.Event): - if 'type' in argv: - obj.set_type(argv['type']) - else: - obj.set_type(gen.lib.EventType.UNKNOWN) - elif isinstance(obj, gen.lib.Place): - obj.set_title(_('Unknown')) - elif isinstance(obj, gen.lib.Source): - obj.set_title(_('Unknown')) - elif isinstance(obj, gen.lib.Citation): - #TODO create a new source for every citation? - obj2 = argv['source_class_func'](argv['source_class_arg']) - obj2.set_title(_('Unknown')) - obj2.add_note(explanation) - argv['source_commit_func'](obj2, transaction, time.time()) - retval.append(obj2) - obj.set_reference_handle(obj2.handle) - elif isinstance(obj, gen.lib.Repository): - obj.set_name(_('Unknown')) - obj.set_type(gen.lib.RepositoryType.UNKNOWN) - elif isinstance(obj, gen.lib.MediaObject): - obj.set_path(os.path.join(IMAGE_DIR, "image-missing.png")) - obj.set_mime_type('image/png') - obj.set_description(_('Unknown')) - elif isinstance(obj, gen.lib.Note): - obj.set_type(gen.lib.NoteType.UNKNOWN); - text = _('Unknown, created to replace a missing note object.') - link_start = text.index(',') + 2 - link_end = len(text) - 1 - tag = gen.lib.StyledTextTag(gen.lib.StyledTextTagType.LINK, - 'gramps://Note/handle/%s' % explanation, - [(link_start, link_end)]) - obj.set_styledtext(gen.lib.StyledText(text, [tag])) - elif isinstance(obj, gen.lib.Tag): - if not hasattr(make_unknown, 'count'): - make_unknown.count = 1 #primitive static variable - obj.set_name(_("Unknown, was missing %(time)s (%(count)d)") % { - 'time': time.strftime('%x %X', time.localtime()), - 'count': make_unknown.count}) - make_unknown.count += 1 - else: - raise TypeError("Object if of unsupported type") - - if hasattr(obj, 'add_note'): - obj.add_note(explanation) - commit_func(obj, transaction, time.time()) - retval.append(obj) - return retval - -def create_explanation_note(dbase): - """ - When creating objects to fill missing primary objects in imported files, - those objects of type "Unknown" need a explanatory note. This funcion - provides such a note for import methods. - """ - note = gen.lib.Note( _('Objects referenced by this note ' - 'were missing in a file imported on %s.') % - time.strftime('%x %X', time.localtime())) - note.set_handle(create_id()) - note.set_gramps_id(dbase.find_next_note_gramps_id()) - # Use defaults for privacy, format and type. - return note - -def add_personref_to_family(family, person): - """ - Given a family and person, set the parent/child references in the family, - that match the person. - """ - handle = family.handle - person_handle = person.handle - if handle in person.get_family_handle_list(): - if ((person.get_gender() == gen.lib.Person.FEMALE) and - (family.get_mother_handle() is None)): - family.set_mother_handle(person_handle) - else: - # This includes cases of gen.lib.Person.UNKNOWN - if family.get_father_handle() is None: - family.set_father_handle(person_handle) - else: - family.set_mother_handle(person_handle) - if handle in person.get_parent_family_handle_list(): - childref = gen.lib.ChildRef() - childref.set_reference_handle(person_handle) - childref.set_mother_relation(gen.lib.ChildRefType.UNKNOWN) - childref.set_father_relation(gen.lib.ChildRefType.UNKNOWN) - family.add_child_ref(childref) - diff --git a/src/gen/utils/Makefile.am b/src/gen/utils/Makefile.am index 609db3704..b4ceea376 100644 --- a/src/gen/utils/Makefile.am +++ b/src/gen/utils/Makefile.am @@ -20,7 +20,8 @@ pkgpython_PYTHON = \ mactrans.py \ place.py \ referent.py \ - trans.py + trans.py \ + unknown.py pkgpyexecdir = @pkgpyexecdir@/gen/utils diff --git a/src/gen/utils/unknown.py b/src/gen/utils/unknown.py new file mode 100644 index 000000000..e35ad7af9 --- /dev/null +++ b/src/gen/utils/unknown.py @@ -0,0 +1,193 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2000-2007 Donald N. Allingham +# Copyright (C) 2009 Gary Burton +# Copyright (C) 2011 Tim G L Lyons +# +# 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$ + +""" +Make an 'Unknown' primary object +""" + +#------------------------------------------------------------------------- +# +# Python modules +# +#------------------------------------------------------------------------- +import time + +#------------------------------------------------------------------------- +# +# Gramps modules +# +#------------------------------------------------------------------------- +import gen.lib +from Utils import create_id +from gen.ggettext import sgettext as _ + +#------------------------------------------------------------------------- +# +# make_unknown +# +#------------------------------------------------------------------------- +def make_unknown(class_arg, explanation, class_func, commit_func, transaction, + **argv): + """ + Make a primary object and set some property so that it qualifies as + "Unknown". + + Some object types need extra parameters: + Family: db, Event: type (optional), + Citation: methods to create/store source. + + Some theoretical underpinning + This function exploits the fact that all import methods basically do the + same thing: Create an object of the right type, fill it with some + attributes, store it in the database. This function does the same, so + the observation is why not use the creation and storage methods that the + import routines use themselves, that makes nice reuse of code. To do this + formally correct we would need to specify a interface (in the OOP sence) + which the import methods would need to implement. For now, that is deemed + too restrictive and here we just slip through because of the similarity in + code of both GEDCOM and XML import methods. + + :param class_arg: The argument the class_func needs, typically a kind of id. + :type class_arg: unspecified + :param explanation: Handle of a note that explains the origin of primary obj + :type explanation: str + :param class_func: Method to create primary object. + :type class_func: method + :param commit_func: Method to store primary object in db. + :type commit_func: method + :param transactino: Database transaction handle + :type transaction: str + :param argv: Possible additional parameters + :type param: unspecified + :returns: List of newly created objects. + :rtype: list + """ + retval = [] + obj = class_func(class_arg) + if isinstance(obj, gen.lib.Person): + surname = gen.lib.Surname() + surname.set_surname('Unknown') + name = gen.lib.Name() + name.add_surname(surname) + name.set_type(gen.lib.NameType.UNKNOWN) + obj.set_primary_name(name) + elif isinstance(obj, gen.lib.Family): + obj.set_relationship(gen.lib.FamilyRelType.UNKNOWN) + handle = obj.handle + if getattr(argv['db'].transaction, 'no_magic', False): + backlinks = argv['db'].find_backlink_handles( + handle, [gen.lib.Person.__name__]) + for dummy, person_handle in backlinks: + person = argv['db'].get_person_from_handle(person_handle) + add_personref_to_family(obj, person) + else: + for person in argv['db'].iter_people(): + if person._has_handle_reference('Family', handle): + add_personref_to_family(obj, person) + elif isinstance(obj, gen.lib.Event): + if 'type' in argv: + obj.set_type(argv['type']) + else: + obj.set_type(gen.lib.EventType.UNKNOWN) + elif isinstance(obj, gen.lib.Place): + obj.set_title(_('Unknown')) + elif isinstance(obj, gen.lib.Source): + obj.set_title(_('Unknown')) + elif isinstance(obj, gen.lib.Citation): + #TODO create a new source for every citation? + obj2 = argv['source_class_func'](argv['source_class_arg']) + obj2.set_title(_('Unknown')) + obj2.add_note(explanation) + argv['source_commit_func'](obj2, transaction, time.time()) + retval.append(obj2) + obj.set_reference_handle(obj2.handle) + elif isinstance(obj, gen.lib.Repository): + obj.set_name(_('Unknown')) + obj.set_type(gen.lib.RepositoryType.UNKNOWN) + elif isinstance(obj, gen.lib.MediaObject): + obj.set_path(os.path.join(IMAGE_DIR, "image-missing.png")) + obj.set_mime_type('image/png') + obj.set_description(_('Unknown')) + elif isinstance(obj, gen.lib.Note): + obj.set_type(gen.lib.NoteType.UNKNOWN); + text = _('Unknown, created to replace a missing note object.') + link_start = text.index(',') + 2 + link_end = len(text) - 1 + tag = gen.lib.StyledTextTag(gen.lib.StyledTextTagType.LINK, + 'gramps://Note/handle/%s' % explanation, + [(link_start, link_end)]) + obj.set_styledtext(gen.lib.StyledText(text, [tag])) + elif isinstance(obj, gen.lib.Tag): + if not hasattr(make_unknown, 'count'): + make_unknown.count = 1 #primitive static variable + obj.set_name(_("Unknown, was missing %(time)s (%(count)d)") % { + 'time': time.strftime('%x %X', time.localtime()), + 'count': make_unknown.count}) + make_unknown.count += 1 + else: + raise TypeError("Object if of unsupported type") + + if hasattr(obj, 'add_note'): + obj.add_note(explanation) + commit_func(obj, transaction, time.time()) + retval.append(obj) + return retval + +def create_explanation_note(dbase): + """ + When creating objects to fill missing primary objects in imported files, + those objects of type "Unknown" need a explanatory note. This funcion + provides such a note for import methods. + """ + note = gen.lib.Note( _('Objects referenced by this note ' + 'were missing in a file imported on %s.') % + time.strftime('%x %X', time.localtime())) + note.set_handle(create_id()) + note.set_gramps_id(dbase.find_next_note_gramps_id()) + # Use defaults for privacy, format and type. + return note + +def add_personref_to_family(family, person): + """ + Given a family and person, set the parent/child references in the family, + that match the person. + """ + handle = family.handle + person_handle = person.handle + if handle in person.get_family_handle_list(): + if ((person.get_gender() == gen.lib.Person.FEMALE) and + (family.get_mother_handle() is None)): + family.set_mother_handle(person_handle) + else: + # This includes cases of gen.lib.Person.UNKNOWN + if family.get_father_handle() is None: + family.set_father_handle(person_handle) + else: + family.set_mother_handle(person_handle) + if handle in person.get_parent_family_handle_list(): + childref = gen.lib.ChildRef() + childref.set_reference_handle(person_handle) + childref.set_mother_relation(gen.lib.ChildRefType.UNKNOWN) + childref.set_father_relation(gen.lib.ChildRefType.UNKNOWN) + family.add_child_ref(childref) diff --git a/src/plugins/import/importxml.py b/src/plugins/import/importxml.py index 33047f5f6..e342a779b 100644 --- a/src/plugins/import/importxml.py +++ b/src/plugins/import/importxml.py @@ -49,6 +49,7 @@ from gen.db import DbTxn from gen.db.write import CLASS_TO_KEY_MAP from gen.errors import GrampsImportError import Utils +from gen.utils.unknown import make_unknown, create_explanation_note import gen.datehandler from gen.display.name import displayer as name_displayer from gen.db.dbconst import (PERSON_KEY, FAMILY_KEY, SOURCE_KEY, EVENT_KEY, @@ -2921,24 +2922,24 @@ class GrampsParser(UpdateCallback): [target for target in self.import_handles[orig_handle].keys() if not self.import_handles[orig_handle][target][INSTANTIATED]]] if uninstantiated: - expl_note = Utils.create_explanation_note(self.db) + expl_note = create_explanation_note(self.db) self.db.commit_note(expl_note, self.trans, time.time()) self.info.expl_note = expl_note.get_gramps_id() for orig_handle, target in uninstantiated: class_arg = {'handle': orig_handle, 'id': None, 'priv': False} if target == 'family': - objs = Utils.make_unknown(class_arg, expl_note.handle, + objs = make_unknown(class_arg, expl_note.handle, self.func_map[target][0], self.func_map[target][1], self.trans, db=self.db) elif target == 'citation': - objs = Utils.make_unknown(class_arg, expl_note.handle, + objs = make_unknown(class_arg, expl_note.handle, self.func_map[target][0], self.func_map[target][1], self.trans, source_class_func=self.func_map['source'][0], source_commit_func=self.func_map['source'][1], source_class_arg={'handle':Utils.create_id(), 'id':None, 'priv':False}) elif target == 'note': - objs = Utils.make_unknown(class_arg, expl_note.handle, + objs = make_unknown(class_arg, expl_note.handle, self.func_map[target][0], self.stop_note_asothers, self.trans) else: @@ -2946,7 +2947,7 @@ class GrampsParser(UpdateCallback): target = 'placeobj' elif target == 'media': target = 'object' - objs = Utils.make_unknown(class_arg, expl_note.handle, + objs = make_unknown(class_arg, expl_note.handle, self.func_map[target][0], self.func_map[target][1], self.trans) for obj in objs: diff --git a/src/plugins/lib/libgedcom.py b/src/plugins/lib/libgedcom.py index 2c6bc64d9..d5a9165ef 100644 --- a/src/plugins/lib/libgedcom.py +++ b/src/plugins/lib/libgedcom.py @@ -119,6 +119,7 @@ from gen.db import DbTxn from gen.updatecallback import UpdateCallback import gen.mime from gen.utils.lds import TEMPLES +from gen.utils.unknown import make_unknown, create_explanation_note import Utils from gen.datehandler._dateparser import DateParser from gen.db.dbconst import EVENT_KEY @@ -2924,7 +2925,7 @@ class GedcomParser(UpdateCallback): handle = self.__find_from_handle(gramps_id, gramps_id2handle) if msg == "FAM": - Utils.make_unknown(gramps_id, self.explanation.handle, + make_unknown(gramps_id, self.explanation.handle, class_func, commit_func, self.trans, db=self.dbase) self.__add_msg(_("Error: %(msg)s '%(gramps_id)s'" @@ -2933,7 +2934,7 @@ class GedcomParser(UpdateCallback): {'msg' : msg, 'gramps_id' : gramps_id, 'xref' : input_id}) else: - Utils.make_unknown(gramps_id, self.explanation.handle, + make_unknown(gramps_id, self.explanation.handle, class_func, commit_func, self.trans) self.missing_references +=1 self.__add_msg(_("Error: %(msg)s '%(gramps_id)s'" @@ -2943,7 +2944,7 @@ class GedcomParser(UpdateCallback): {'msg' : msg, 'gramps_id' : gramps_id, 'xref' : input_id}) - self.explanation = Utils.create_explanation_note(self.dbase) + self.explanation = create_explanation_note(self.dbase) self.missing_references = 0 previous_errors = self.number_of_errors diff --git a/src/plugins/tool/check.py b/src/plugins/tool/check.py index 0a3e2b39e..302b4aba5 100644 --- a/src/plugins/tool/check.py +++ b/src/plugins/tool/check.py @@ -66,6 +66,7 @@ import gen.lib from gen.db import DbTxn from gen.config import config import Utils +from gen.utils.unknown import make_unknown from gen.utils.file import (get_unicode_path_from_file_chooser, media_path_full, find_file) @@ -945,7 +946,7 @@ class CheckIntegrity(object): # The birth event referenced by the birth handle # does not exist in the database # This is tested by TestcaseGenerator person "Broken11" - Utils.make_unknown(birth_handle, self.explanation.handle, + make_unknown(birth_handle, self.explanation.handle, self.class_event, self.commit_event, self.trans, type=gen.lib.EventType.BIRTH) LOG(' FAIL: the person "%s" refers to a birth event' @@ -982,7 +983,7 @@ class CheckIntegrity(object): LOG(' FAIL: the person "%s" refers to a death event' ' "%s" which does not exist in the database' % (person.gramps_id, death_handle)) - Utils.make_unknown(death_handle, self.explanation.handle, + make_unknown(death_handle, self.explanation.handle, self.class_event, self.commit_event, self.trans, type=gen.lib.EventType.DEATH) self.invalid_events.add(key) @@ -1020,7 +1021,7 @@ class CheckIntegrity(object): LOG(' FAIL: the person "%s" refers to an event' ' "%s" which does not exist in the database' % (person.gramps_id, event_handle)) - Utils.make_unknown(event_handle, + make_unknown(event_handle, self.explanation.handle, self.class_event, self.commit_event, self.trans) self.invalid_events.add(key) @@ -1054,7 +1055,7 @@ class CheckIntegrity(object): LOG(' FAIL: the family "%s" refers to an event' ' "%s" which does not exist in the database' % (family.gramps_id, event_handle)) - Utils.make_unknown(event_handle, self.explanation, + make_unknown(event_handle, self.explanation, self.class_event, self.commit_event, self.trans) self.invalid_events.add(key) if none_handle: @@ -1092,7 +1093,7 @@ class CheckIntegrity(object): p = self.db.get_person_from_handle( pref.ref) if not p: # The referenced person does not exist in the database - Utils.make_unknown(pref.ref, self.explanation.handle, + make_unknown(pref.ref, self.explanation.handle, self.class_person, self.commit_person, self.trans) self.invalid_person_references.add(key) if none_handle: @@ -1118,7 +1119,7 @@ class CheckIntegrity(object): family = self.db.get_family_from_handle(family_handle) if not family: # The referenced family does not exist in the database - Utils.make_unknown(family_handle, + make_unknown(family_handle, self.explanation.handle, self.class_family, self.commit_family, self.trans, db=self.db) self.invalid_family_references.add(key) @@ -1146,7 +1147,7 @@ class CheckIntegrity(object): r = self.db.get_repository_from_handle(reporef.ref) if not r: # The referenced repository does not exist in the database - Utils.make_unknown(reporef.ref, self.explanation.handle, + make_unknown(reporef.ref, self.explanation.handle, self.class_repo, self.commit_repo, self.trans) self.invalid_repo_references.add(key) if none_handle: @@ -1176,7 +1177,7 @@ class CheckIntegrity(object): # The referenced place does not exist in the database # This is tested by TestcaseGenerator person "Broken17" # This is tested by TestcaseGenerator person "Broken18" - Utils.make_unknown(place_handle, + make_unknown(place_handle, self.explanation.handle, self.class_place, self.commit_place, self.trans) LOG(' FAIL: the person "%s" refers to an LdsOrd' @@ -1193,7 +1194,7 @@ class CheckIntegrity(object): place = self.db.get_place_from_handle(place_handle) if not place: # The referenced place does not exist in the database - Utils.make_unknown(place_handle, + make_unknown(place_handle, self.explanation.handle, self.class_place, self.commit_place, self.trans) LOG(' FAIL: the family "%s" refers to an LdsOrd' @@ -1209,7 +1210,7 @@ class CheckIntegrity(object): place = self.db.get_place_from_handle(place_handle) if not place: # The referenced place does not exist in the database - Utils.make_unknown(place_handle, + make_unknown(place_handle, self.explanation.handle, self.class_place, self.commit_place, self.trans) LOG(' FAIL: the event "%s" refers to an LdsOrd place' @@ -1351,7 +1352,7 @@ class CheckIntegrity(object): self.invalid_citation_references.add(item[1]) for bad_handle in self.invalid_citation_references: - created = Utils.make_unknown(bad_handle, self.explanation.handle, + created = make_unknown(bad_handle, self.explanation.handle, self.class_citation, self.commit_citation, self.trans, source_class_func=self.class_source, source_commit_func=self.commit_source, @@ -1379,7 +1380,7 @@ class CheckIntegrity(object): source = self.db.get_source_from_handle(source_handle) if not source: # The referenced source does not exist in the database - Utils.make_unknown(source_handle, self.explanation.handle, + make_unknown(source_handle, self.explanation.handle, self.class_source, self.commit_source, self.trans) LOG(' FAIL: the citation "%s" refers to source ' ' "%s" which does not exist in the database' % @@ -1501,7 +1502,7 @@ class CheckIntegrity(object): self.invalid_media_references.add(item[1]) for bad_handle in self.invalid_media_references: - Utils.make_unknown(bad_handle, self.explanation.handle, + make_unknown(bad_handle, self.explanation.handle, self.class_object, self.commit_object, self.trans) if len (self.invalid_media_references) == 0: @@ -1669,7 +1670,7 @@ class CheckIntegrity(object): self.invalid_note_references.add(item[1]) for bad_handle in self.invalid_note_references: - Utils.make_unknown(bad_handle, self.explanation.handle, + make_unknown(bad_handle, self.explanation.handle, self.class_note, self.commit_note, self.trans) if len (self.invalid_note_references) == 0: @@ -1757,7 +1758,7 @@ class CheckIntegrity(object): self.invalid_tag_references.add(item[1]) for bad_handle in self.invalid_tag_references: - Utils.make_unknown(bad_handle, None, self.class_tag, + make_unknown(bad_handle, None, self.class_tag, self.commit_tag, self.trans) if len(self.invalid_tag_references) == 0: From e484d54bd8237e34836fd43419e533ff29723acb Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 23 Jun 2012 23:37:30 +0000 Subject: [PATCH 36/68] GEPS008: Create new module for tree utilities svn: r19908 --- po/POTFILES.skip | 1 + src/Utils.py | 102 -------------- .../rules/person/_hascommonancestorwith.py | 2 +- .../_hascommonancestorwithfiltermatch.py | 2 +- src/gen/utils/Makefile.am | 1 + src/gen/utils/tree.py | 130 ++++++++++++++++++ src/plugins/gramplet/fanchartgramplet.py | 2 +- src/plugins/view/fanchartview.py | 2 +- src/plugins/view/pedigreeview.py | 2 +- 9 files changed, 137 insertions(+), 107 deletions(-) create mode 100644 src/gen/utils/tree.py diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 5094f57a8..5e462466e 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -214,6 +214,7 @@ src/gen/utils/callman.py src/gen/utils/file.py src/gen/utils/image.py src/gen/utils/referent.py +src/gen/utils/tree.py # gui - GUI code src/gui/__init__.py diff --git a/src/Utils.py b/src/Utils.py index ee11a1090..779d83cd8 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -281,40 +281,6 @@ else: conv_utf8_tosrtkey_ongtk = lambda x: locale.strxfrm(x) conv_unicode_tosrtkey_ongtk = lambda x: locale.strxfrm(x) -#------------------------------------------------------------------------- -# -# Iterate over ancestors. -# -#------------------------------------------------------------------------- -def for_each_ancestor(db, start, func, data): - """ - Recursively iterate (breadth-first) over ancestors of - people listed in start. - Call func(data, pid) for the Id of each person encountered. - Exit and return 1, as soon as func returns true. - Return 0 otherwise. - """ - todo = start - done_ids = set() - while len(todo): - p_handle = todo.pop() - p = db.get_person_from_handle(p_handle) - # Don't process the same handle twice. This can happen - # if there is a cycle in the database, or if the - # initial list contains X and some of X's ancestors. - if p_handle in done_ids: - continue - done_ids.add(p_handle) - if func(data, p_handle): - return 1 - for fam_handle in p.get_parent_family_handle_list(): - fam = db.get_family_from_handle(fam_handle) - if fam: - f_handle = fam.get_father_handle() - m_handle = fam.get_mother_handle() - if f_handle: todo.append(f_handle) - if m_handle: todo.append(m_handle) - return 0 def title(n): return '%s' % n @@ -517,74 +483,6 @@ def get_participant_from_event(db, event_handle, all_=False): else: return participant -#------------------------------------------------------------------------- -# -# Function to return children's list of a person -# -#------------------------------------------------------------------------- -def find_children(db,p): - """ - Return the list of all children's IDs for a person. - """ - childlist = [] - for family_handle in p.get_family_handle_list(): - family = db.get_family_from_handle(family_handle) - for child_ref in family.get_child_ref_list(): - childlist.append(child_ref.ref) - return childlist - -#------------------------------------------------------------------------- -# -# Function to return parent's list of a person -# -#------------------------------------------------------------------------- -def find_parents(db,p): - """ - Return the unique list of all parents' IDs for a person. - """ - parentlist = [] - for f in p.get_parent_family_handle_list(): - family = db.get_family_from_handle(f) - father_handle = family.get_father_handle() - mother_handle = family.get_mother_handle() - if father_handle not in parentlist: - parentlist.append(father_handle) - if mother_handle not in parentlist: - parentlist.append(mother_handle) - return parentlist - -#------------------------------------------------------------------------- -# -# Function to return persons, that share the same event. -# This for example links witnesses to the tree -# -#------------------------------------------------------------------------- -def find_witnessed_people(db,p): - people = [] - for event_ref in p.get_event_ref_list(): - for l in db.find_backlink_handles( event_ref.ref): - if l[0] == 'Person' and l[1] != p.get_handle() and l[1] not in people: - people.append(l[1]) - if l[0] == 'Family': - fam = db.get_family_from_handle(l[1]) - if fam: - father_handle = fam.get_father_handle() - if father_handle and father_handle != p.get_handle() and father_handle not in people: - people.append(father_handle) - mother_handle = fam.get_mother_handle() - if mother_handle and mother_handle != p.get_handle() and mother_handle not in people: - people.append(mother_handle) - for f in p.get_family_handle_list(): - family = db.get_family_from_handle(f) - for event_ref in family.get_event_ref_list(): - for l in db.find_backlink_handles( event_ref.ref): - if l[0] == 'Person' and l[1] != p.get_handle() and l[1] not in people: - people.append(l[1]) - for pref in p.get_person_ref_list(): - if pref.ref != p.get_handle and pref.ref not in people: - people.append(pref.ref) - return people - #------------------------------------------------------------------------- # # Function to return a label to display the active object in the status bar diff --git a/src/gen/filters/rules/person/_hascommonancestorwith.py b/src/gen/filters/rules/person/_hascommonancestorwith.py index ebecd124b..2f07c1680 100644 --- a/src/gen/filters/rules/person/_hascommonancestorwith.py +++ b/src/gen/filters/rules/person/_hascommonancestorwith.py @@ -32,7 +32,7 @@ from gen.ggettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------- -from Utils import for_each_ancestor +from gen.utils.tree import for_each_ancestor from gen.filters.rules import Rule #------------------------------------------------------------------------- diff --git a/src/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py b/src/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py index bb2e9488d..c20cb89dd 100644 --- a/src/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py +++ b/src/gen/filters/rules/person/_hascommonancestorwithfiltermatch.py @@ -32,7 +32,7 @@ from gen.ggettext import gettext as _ # GRAMPS modules # #------------------------------------------------------------------------- -from Utils import for_each_ancestor +from gen.utils.tree import for_each_ancestor from _hascommonancestorwith import HasCommonAncestorWith from _matchesfilter import MatchesFilter diff --git a/src/gen/utils/Makefile.am b/src/gen/utils/Makefile.am index b4ceea376..866d036e3 100644 --- a/src/gen/utils/Makefile.am +++ b/src/gen/utils/Makefile.am @@ -21,6 +21,7 @@ pkgpython_PYTHON = \ place.py \ referent.py \ trans.py \ + tree.py \ unknown.py pkgpyexecdir = @pkgpyexecdir@/gen/utils diff --git a/src/gen/utils/tree.py b/src/gen/utils/tree.py new file mode 100644 index 000000000..d674d530a --- /dev/null +++ b/src/gen/utils/tree.py @@ -0,0 +1,130 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2000-2007 Donald N. Allingham +# Copyright (C) 2009 Gary Burton +# Copyright (C) 2011 Tim G L Lyons +# +# 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$ + +""" +Tree related utility functions +""" + +#------------------------------------------------------------------------- +# +# Function to return children's list of a person +# +#------------------------------------------------------------------------- +def find_children(db,p): + """ + Return the list of all children's IDs for a person. + """ + childlist = [] + for family_handle in p.get_family_handle_list(): + family = db.get_family_from_handle(family_handle) + for child_ref in family.get_child_ref_list(): + childlist.append(child_ref.ref) + return childlist + +#------------------------------------------------------------------------- +# +# Function to return parent's list of a person +# +#------------------------------------------------------------------------- +def find_parents(db,p): + """ + Return the unique list of all parents' IDs for a person. + """ + parentlist = [] + for f in p.get_parent_family_handle_list(): + family = db.get_family_from_handle(f) + father_handle = family.get_father_handle() + mother_handle = family.get_mother_handle() + if father_handle not in parentlist: + parentlist.append(father_handle) + if mother_handle not in parentlist: + parentlist.append(mother_handle) + return parentlist + +#------------------------------------------------------------------------- +# +# Function to return persons, that share the same event. +# This for example links witnesses to the tree +# +#------------------------------------------------------------------------- +def find_witnessed_people(db,p): + people = [] + for event_ref in p.get_event_ref_list(): + for l in db.find_backlink_handles( event_ref.ref): + if l[0] == 'Person' and l[1] != p.get_handle() and l[1] not in people: + people.append(l[1]) + if l[0] == 'Family': + fam = db.get_family_from_handle(l[1]) + if fam: + father_handle = fam.get_father_handle() + if father_handle and father_handle != p.get_handle() and father_handle not in people: + people.append(father_handle) + mother_handle = fam.get_mother_handle() + if mother_handle and mother_handle != p.get_handle() and mother_handle not in people: + people.append(mother_handle) + for f in p.get_family_handle_list(): + family = db.get_family_from_handle(f) + for event_ref in family.get_event_ref_list(): + for l in db.find_backlink_handles( event_ref.ref): + if l[0] == 'Person' and l[1] != p.get_handle() and l[1] not in people: + people.append(l[1]) + for pref in p.get_person_ref_list(): + if pref.ref != p.get_handle and pref.ref not in people: + people.append(pref.ref) + return people + +#------------------------------------------------------------------------- +# +# Iterate over ancestors. +# +#------------------------------------------------------------------------- +def for_each_ancestor(db, start, func, data): + """ + Recursively iterate (breadth-first) over ancestors of + people listed in start. + Call func(data, pid) for the Id of each person encountered. + Exit and return 1, as soon as func returns true. + Return 0 otherwise. + """ + todo = start + done_ids = set() + while len(todo): + p_handle = todo.pop() + p = db.get_person_from_handle(p_handle) + # Don't process the same handle twice. This can happen + # if there is a cycle in the database, or if the + # initial list contains X and some of X's ancestors. + if p_handle in done_ids: + continue + done_ids.add(p_handle) + if func(data, p_handle): + return 1 + for fam_handle in p.get_parent_family_handle_list(): + fam = db.get_family_from_handle(fam_handle) + if fam: + f_handle = fam.get_father_handle() + m_handle = fam.get_mother_handle() + if f_handle: todo.append(f_handle) + if m_handle: todo.append(m_handle) + return 0 diff --git a/src/plugins/gramplet/fanchartgramplet.py b/src/plugins/gramplet/fanchartgramplet.py index f550d07a6..7eb2cf23b 100644 --- a/src/plugins/gramplet/fanchartgramplet.py +++ b/src/plugins/gramplet/fanchartgramplet.py @@ -55,7 +55,7 @@ if gtk.pygtk_version < (2,3,93): from gen.display.name import displayer as name_displayer from gen.ggettext import gettext as _ from gen.plug import Gramplet -from Utils import (find_children, find_parents, find_witnessed_people) +from gen.utils.tree import (find_children, find_parents, find_witnessed_people) from libformatting import FormattingHelper import gen.lib from gen.errors import WindowActiveError diff --git a/src/plugins/view/fanchartview.py b/src/plugins/view/fanchartview.py index d2151a5be..c9e41ad21 100644 --- a/src/plugins/view/fanchartview.py +++ b/src/plugins/view/fanchartview.py @@ -54,7 +54,7 @@ if gtk.pygtk_version < (2,3,93): # #------------------------------------------------------------------------- from gen.display.name import displayer as name_displayer -from Utils import (find_children, find_parents, find_witnessed_people) +from gen.utils.tree import (find_children, find_parents, find_witnessed_people) from libformatting import FormattingHelper import gen.lib from gui.views.navigationview import NavigationView diff --git a/src/plugins/view/pedigreeview.py b/src/plugins/view/pedigreeview.py index 6b4786814..a86a481b1 100644 --- a/src/plugins/view/pedigreeview.py +++ b/src/plugins/view/pedigreeview.py @@ -53,7 +53,7 @@ from gui.editors import FilterEditor from gen.display.name import displayer as name_displayer from gen.utils.alive import probably_alive from gen.utils.file import media_path_full -from Utils import find_children, find_parents, find_witnessed_people +from gen.utils.tree import find_children, find_parents, find_witnessed_people from libformatting import FormattingHelper from gui.thumbnails import get_thumbnail_path from gen.errors import WindowActiveError From 8b297167b1592c102d7d176721d7f06b96d02635 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sun, 24 Jun 2012 00:15:17 +0000 Subject: [PATCH 37/68] GEPS008: Create new module for name utilities svn: r19909 --- po/POTFILES.in | 1 + src/Utils.py | 78 +------------- src/gen/utils/Makefile.am | 1 + src/gen/utils/name.py | 112 ++++++++++++++++++++ src/gui/editors/displaytabs/backrefmodel.py | 3 +- src/gui/editors/editfamily.py | 4 +- src/gui/editors/filtereditor.py | 7 +- src/plugins/export/exportvcalendar.py | 5 +- src/plugins/gramplet/sessionloggramplet.py | 2 +- src/plugins/import/importxml.py | 3 +- src/plugins/tool/check.py | 7 +- src/plugins/tool/eventnames.py | 4 +- src/plugins/tool/verify.py | 4 +- src/plugins/view/persontreeview.py | 2 +- src/plugins/view/relview.py | 2 +- 15 files changed, 138 insertions(+), 97 deletions(-) create mode 100644 src/gen/utils/name.py diff --git a/po/POTFILES.in b/po/POTFILES.in index f6c23de2e..dde5061cc 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -325,6 +325,7 @@ src/gen/simple/_simpletable.py src/gen/utils/alive.py src/gen/utils/keyword.py src/gen/utils/lds.py +src/gen/utils/name.py src/gen/utils/place.py src/gen/utils/trans.py src/gen/utils/unknown.py diff --git a/src/Utils.py b/src/Utils.py index 779d83cd8..da921e199 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -53,6 +53,7 @@ from gen.config import config from const import GRAMPS_UUID, IMAGE_DIR from gen.constfunc import mac, win from gen.ggettext import sgettext as _ +from gen.utils.name import family_name #------------------------------------------------------------------------- # @@ -156,83 +157,6 @@ def clearHistory_broken(): def wasHistory_broken(): return _history_brokenFlag -#------------------------------------------------------------------------- -# -# Preset a name with a name of family member -# -#------------------------------------------------------------------------- - -def preset_name(basepers, name, sibling=False): - """Fill up name with all family common names of basepers. - If sibling=True, pa/matronymics are retained. - """ - surnlist = [] - primname = basepers.get_primary_name() - prim = False - for surn in primname.get_surname_list(): - if (not sibling) and (surn.get_origintype().value in - [gen.lib.NameOriginType.PATRONYMIC, - gen.lib.NameOriginType.MATRONYMIC]): - continue - surnlist.append(gen.lib.Surname(source=surn)) - if surn.primary: - prim=True - if not surnlist: - surnlist = [gen.lib.Surname()] - name.set_surname_list(surnlist) - if not prim: - name.set_primary_surname(0) - name.set_family_nick_name(primname.get_family_nick_name()) - name.set_group_as(primname.get_group_as()) - name.set_sort_as(primname.get_sort_as()) - -#------------------------------------------------------------------------- -# -# Short hand function to return either the person's name, or an empty -# string if the person is None -# -#------------------------------------------------------------------------- - -def family_name(family, db, noname=_("unknown")): - """Builds a name for the family from the parents names""" - - father_handle = family.get_father_handle() - mother_handle = family.get_mother_handle() - father = db.get_person_from_handle(father_handle) - mother = db.get_person_from_handle(mother_handle) - if father and mother: - fname = name_displayer.display(father) - mname = name_displayer.display(mother) - name = _("%(father)s and %(mother)s") % { - "father" : fname, - "mother" : mname} - elif father: - name = name_displayer.display(father) - elif mother: - name = name_displayer.display(mother) - else: - name = noname - return name - -def family_upper_name(family, db): - """Builds a name for the family from the parents names""" - father_handle = family.get_father_handle() - mother_handle = family.get_mother_handle() - father = db.get_person_from_handle(father_handle) - mother = db.get_person_from_handle(mother_handle) - if father and mother: - fname = father.get_primary_name().get_upper_name() - mname = mother.get_primary_name().get_upper_name() - name = _("%(father)s and %(mother)s") % { - 'father' : fname, - 'mother' : mname - } - elif father: - name = father.get_primary_name().get_upper_name() - else: - name = mother.get_primary_name().get_upper_name() - return name - #------------------------------------------------------------------------- # # String Encoding functions diff --git a/src/gen/utils/Makefile.am b/src/gen/utils/Makefile.am index 866d036e3..8928a1db9 100644 --- a/src/gen/utils/Makefile.am +++ b/src/gen/utils/Makefile.am @@ -17,6 +17,7 @@ pkgpython_PYTHON = \ image.py \ keyword.py \ lds.py \ + name.py \ mactrans.py \ place.py \ referent.py \ diff --git a/src/gen/utils/name.py b/src/gen/utils/name.py new file mode 100644 index 000000000..fa7e2e591 --- /dev/null +++ b/src/gen/utils/name.py @@ -0,0 +1,112 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2000-2007 Donald N. Allingham +# Copyright (C) 2009 Gary Burton +# Copyright (C) 2011 Tim G L Lyons +# +# 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$ + +""" +Name related utility functions +""" +#------------------------------------------------------------------------- +# +# Gramps modules +# +#------------------------------------------------------------------------- +import gen.lib +from gen.display.name import displayer as name_displayer +from gen.ggettext import sgettext as _ + +#------------------------------------------------------------------------- +# +# Preset a name with a name of family member +# +#------------------------------------------------------------------------- + +def preset_name(basepers, name, sibling=False): + """Fill up name with all family common names of basepers. + If sibling=True, pa/matronymics are retained. + """ + surnlist = [] + primname = basepers.get_primary_name() + prim = False + for surn in primname.get_surname_list(): + if (not sibling) and (surn.get_origintype().value in + [gen.lib.NameOriginType.PATRONYMIC, + gen.lib.NameOriginType.MATRONYMIC]): + continue + surnlist.append(gen.lib.Surname(source=surn)) + if surn.primary: + prim=True + if not surnlist: + surnlist = [gen.lib.Surname()] + name.set_surname_list(surnlist) + if not prim: + name.set_primary_surname(0) + name.set_family_nick_name(primname.get_family_nick_name()) + name.set_group_as(primname.get_group_as()) + name.set_sort_as(primname.get_sort_as()) + +#------------------------------------------------------------------------- +# +# Short hand function to return either the person's name, or an empty +# string if the person is None +# +#------------------------------------------------------------------------- + +def family_name(family, db, noname=_("unknown")): + """Builds a name for the family from the parents names""" + + father_handle = family.get_father_handle() + mother_handle = family.get_mother_handle() + father = db.get_person_from_handle(father_handle) + mother = db.get_person_from_handle(mother_handle) + if father and mother: + fname = name_displayer.display(father) + mname = name_displayer.display(mother) + name = _("%(father)s and %(mother)s") % { + "father" : fname, + "mother" : mname} + elif father: + name = name_displayer.display(father) + elif mother: + name = name_displayer.display(mother) + else: + name = noname + return name + +def family_upper_name(family, db): + """Builds a name for the family from the parents names""" + father_handle = family.get_father_handle() + mother_handle = family.get_mother_handle() + father = db.get_person_from_handle(father_handle) + mother = db.get_person_from_handle(mother_handle) + if father and mother: + fname = father.get_primary_name().get_upper_name() + mname = mother.get_primary_name().get_upper_name() + name = _("%(father)s and %(mother)s") % { + 'father' : fname, + 'mother' : mname + } + elif father: + name = father.get_primary_name().get_upper_name() + else: + name = mother.get_primary_name().get_upper_name() + return name diff --git a/src/gui/editors/displaytabs/backrefmodel.py b/src/gui/editors/displaytabs/backrefmodel.py index 8adc510d7..d544a14af 100644 --- a/src/gui/editors/displaytabs/backrefmodel.py +++ b/src/gui/editors/displaytabs/backrefmodel.py @@ -37,6 +37,7 @@ from gen.ggettext import gettext as _ # #------------------------------------------------------------------------- from gen.display.name import displayer as name_displayer +from gen.utils.name import family_name import Utils #------------------------------------------------------------------------- @@ -84,7 +85,7 @@ class BackRefModel(gtk.ListStore): continue gid = p.gramps_id handle = p.handle - name = Utils.family_name(p, self.db) + name = family_name(p, self.db) elif dtype == 'Source': p = self.db.get_source_from_handle(ref[1]) if not p: diff --git a/src/gui/editors/editfamily.py b/src/gui/editors/editfamily.py index ac9cdd279..a73598b13 100644 --- a/src/gui/editors/editfamily.py +++ b/src/gui/editors/editfamily.py @@ -83,7 +83,7 @@ from gui.dialog import (ErrorDialog, RunDatabaseRepair, WarningDialog, MessageHideDialog) from gen.utils import get_birth_or_fallback, get_death_or_fallback from gui.selectors import SelectorFactory -from Utils import preset_name +from gen.utils.name import preset_name, family_name SelectPerson = SelectorFactory('Person') @@ -484,7 +484,7 @@ class EditFamily(EditPrimary): def get_menu_title(self): if self.obj and self.obj.get_handle(): - dialog_title = Utils.family_name(self.obj, self.db, _("New Family")) + dialog_title = family_name(self.obj, self.db, _("New Family")) dialog_title = _("Family") + ': ' + dialog_title else: dialog_title = _("New Family") diff --git a/src/gui/editors/filtereditor.py b/src/gui/editors/filtereditor.py index e549fc8cb..d43a28071 100644 --- a/src/gui/editors/filtereditor.py +++ b/src/gui/editors/filtereditor.py @@ -68,6 +68,7 @@ from gen.filters import rules from gui.autocomp import StandardCustomSelector, fill_entry from gui.selectors import SelectorFactory from gen.display.name import displayer as _nd +from gen.utils.name import family_name import Utils #------------------------------------------------------------------------- @@ -339,7 +340,7 @@ class MyID(gtk.HBox): name = _nd.display_name(person.get_primary_name()) elif self.namespace == 'Family': family = self.db.get_family_from_gramps_id(gramps_id) - name = Utils.family_name(family, self.db) + name = family_name(family, self.db) elif self.namespace == 'Event': event = self.db.get_event_from_gramps_id(gramps_id) name = str(event.get_type) @@ -918,7 +919,7 @@ class ShowResults(ManagedWindow): gid = person.get_gramps_id() elif self.namespace == 'Family': family = self.db.get_family_from_handle(handle) - name = Utils.family_name(family, self.db) + name = family_name(family, self.db) gid = family.get_gramps_id() elif self.namespace == 'Event': event = self.db.get_event_from_handle(handle) @@ -957,7 +958,7 @@ class ShowResults(ManagedWindow): name = self.db.get_person_from_handle(handle).get_primary_name() sortname = _nd.sort_string(name) elif self.namespace == 'Family': - sortname = Utils.family_name( + sortname = family_name( self.db.get_family_from_handle(handle),self.db) elif self.namespace == 'Event': sortname = self.db.get_event_from_handle(handle).get_description() diff --git a/src/plugins/export/exportvcalendar.py b/src/plugins/export/exportvcalendar.py index fa1e41219..5cc5a4c3f 100644 --- a/src/plugins/export/exportvcalendar.py +++ b/src/plugins/export/exportvcalendar.py @@ -48,7 +48,7 @@ log = logging.getLogger(".ExportVCal") # #------------------------------------------------------------------------- from gui.plug.export import WriterOptionBox -import Utils +from gen.utils.name import family_name from gen.lib import Date, EventType from gui.glade import Glade @@ -133,8 +133,7 @@ class CalendarWriter(object): m_date = event.get_date_object() place_handle = event.get_place_handle() # feature requests 2356, 1657: avoid genitive form - text = _("Marriage of %s") % Utils.family_name(family, - self.db) + text = _("Marriage of %s") % family_name(family, self.db) if place_handle: place = self.db.get_place_from_handle(place_handle) self.write_vevent( text, m_date, place.get_title()) diff --git a/src/plugins/gramplet/sessionloggramplet.py b/src/plugins/gramplet/sessionloggramplet.py index 658b705d4..3903b1d65 100644 --- a/src/plugins/gramplet/sessionloggramplet.py +++ b/src/plugins/gramplet/sessionloggramplet.py @@ -30,7 +30,7 @@ from gen.db import PERSON_KEY, FAMILY_KEY, TXNDEL from gen.plug import Gramplet from gen.ggettext import sgettext as _ from gen.display.name import displayer as name_displayer -from Utils import family_name +from gen.utils.name import family_name #------------------------------------------------------------------------ # diff --git a/src/plugins/import/importxml.py b/src/plugins/import/importxml.py index e342a779b..9f9d0b574 100644 --- a/src/plugins/import/importxml.py +++ b/src/plugins/import/importxml.py @@ -49,6 +49,7 @@ from gen.db import DbTxn from gen.db.write import CLASS_TO_KEY_MAP from gen.errors import GrampsImportError import Utils +from gen.utils.name import family_name from gen.utils.unknown import make_unknown, create_explanation_note import gen.datehandler from gen.display.name import displayer as name_displayer @@ -2434,7 +2435,7 @@ class GrampsParser(UpdateCallback): if self.family: text = EVENT_FAMILY_STR % { 'event_name' : str(self.event.get_type()), - 'family' : Utils.family_name(self.family, self.db), + 'family' : family_name(self.family, self.db), } elif self.person: text = EVENT_PERSON_STR % { diff --git a/src/plugins/tool/check.py b/src/plugins/tool/check.py index 302b4aba5..8580d4452 100644 --- a/src/plugins/tool/check.py +++ b/src/plugins/tool/check.py @@ -66,6 +66,7 @@ import gen.lib from gen.db import DbTxn from gen.config import config import Utils +from gen.utils.name import family_name from gen.utils.unknown import make_unknown from gen.utils.file import (get_unicode_path_from_file_chooser, media_path_full, @@ -1904,7 +1905,7 @@ class CheckIntegrity(object): cn = _("Non existing child") try: family = self.db.get_family_from_handle(family_handle) - pn = Utils.family_name(family, self.db) + pn = family_name(family, self.db) except: pn = _("Unknown") self.text.write('\t') @@ -1927,7 +1928,7 @@ class CheckIntegrity(object): cn = _("Non existing person") family = self.db.get_family_from_handle(family_handle) if family: - pn = Utils.family_name(family, self.db) + pn = family_name(family, self.db) else: pn = family_handle self.text.write('\t') @@ -1950,7 +1951,7 @@ class CheckIntegrity(object): cn = _("Non existing person") family = self.db.get_family_from_handle(family_handle) if family: - pn = Utils.family_name(family, self.db) + pn = family_name(family, self.db) else: pn = _("None") self.text.write('\t') diff --git a/src/plugins/tool/eventnames.py b/src/plugins/tool/eventnames.py index 99b76991a..8302b2784 100644 --- a/src/plugins/tool/eventnames.py +++ b/src/plugins/tool/eventnames.py @@ -46,7 +46,7 @@ from gen.ggettext import ngettext from gui.managedwindow import ManagedWindow import gen.lib from gen.db import DbTxn -import Utils +from gen.utils.name import family_name from gui.plug import tool from gen.display.name import displayer as name_displayer @@ -146,7 +146,7 @@ def family_event_name(event, family, dbase): if not event.get_description(): text = EVENT_FAMILY_STR % { 'event_name' : str(event.get_type()), - 'family' : Utils.family_name(family, dbase), + 'family' : family_name(family, dbase), } event.set_description(text) diff --git a/src/plugins/tool/verify.py b/src/plugins/tool/verify.py index 400cb30f6..d8168a1e4 100644 --- a/src/plugins/tool/verify.py +++ b/src/plugins/tool/verify.py @@ -57,7 +57,7 @@ import gobject import const import gen.lib from gui.editors import EditPerson, EditFamily -import Utils +from gen.utils.name import family_name from gui.display import display_help from gui.managedwindow import ManagedWindow from gen.updatecallback import UpdateCallback @@ -830,7 +830,7 @@ class FamilyRule(Rule): """ TYPE = 'Family' def get_name(self): - return Utils.family_name(self.obj,self.db) + return family_name(self.obj,self.db) #------------------------------------------------------------------------- # diff --git a/src/plugins/view/persontreeview.py b/src/plugins/view/persontreeview.py index 6e12f7cf4..abec50e24 100644 --- a/src/plugins/view/persontreeview.py +++ b/src/plugins/view/persontreeview.py @@ -37,7 +37,7 @@ from gui.views.treemodels.peoplemodel import PersonTreeModel import gen.lib from gen.errors import WindowActiveError from gui.editors import EditPerson -from Utils import preset_name +from gen.utils.name import preset_name #------------------------------------------------------------------------- # diff --git a/src/plugins/view/relview.py b/src/plugins/view/relview.py index 5c0e3a3ac..17e7a0105 100644 --- a/src/plugins/view/relview.py +++ b/src/plugins/view/relview.py @@ -63,7 +63,7 @@ from gui.selectors import SelectorFactory from gen.errors import WindowActiveError from gui.views.bookmarks import PersonBookmarks import const -from Utils import preset_name +from gen.utils.name import preset_name from gen.utils import get_birth_or_fallback, get_death_or_fallback from gui.listmodel import ListModel from gui.managedwindow import ManagedWindow From ac133984a425287e02c3ef5331087f133e15dd7b Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sun, 24 Jun 2012 00:35:23 +0000 Subject: [PATCH 38/68] GEPS008: Create new module for utilities to cast types svn: r19910 --- po/POTFILES.skip | 1 + src/Utils.py | 56 -------------------------- src/gen/plug/_options.py | 4 +- src/gen/utils/Makefile.am | 1 + src/gen/utils/cast.py | 83 +++++++++++++++++++++++++++++++++++++++ src/plugins/bookreport.py | 11 +++--- 6 files changed, 92 insertions(+), 64 deletions(-) create mode 100644 src/gen/utils/cast.py diff --git a/po/POTFILES.skip b/po/POTFILES.skip index 5e462466e..f3b998238 100644 --- a/po/POTFILES.skip +++ b/po/POTFILES.skip @@ -211,6 +211,7 @@ src/gen/simple/_simpledoc.py src/gen/utils/__init__.py src/gen/utils/callback.py src/gen/utils/callman.py +src/gen/utils/cast.py src/gen/utils/file.py src/gen/utils/image.py src/gen/utils/referent.py diff --git a/src/Utils.py b/src/Utils.py index da921e199..9f9e91396 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -242,62 +242,6 @@ def create_uid(self, handle=None): # # #------------------------------------------------------------------------- -def cast_to_bool(val): - if val == str(True): - return True - return False - -def get_type_converter(val): - """ - Return function that converts strings into the type of val. - """ - val_type = type(val) - if val_type in (str, unicode): - return unicode - elif val_type == int: - return int - elif val_type == float: - return float - elif val_type == bool: - return cast_to_bool - elif val_type in (list, tuple): - return list - -def type_name(val): - """ - Return the name the type of val. - - Only numbers and strings are supported. - The rest becomes strings (unicode). - """ - val_type = type(val) - if val_type == int: - return 'int' - elif val_type == float: - return 'float' - elif val_type == bool: - return 'bool' - elif val_type in (str, unicode): - return 'unicode' - return 'unicode' - -def get_type_converter_by_name(val_str): - """ - Return function that converts strings into the type given by val_str. - - Only numbers and strings are supported. - The rest becomes strings (unicode). - """ - if val_str == 'int': - return int - elif val_str == 'float': - return float - elif val_str == 'bool': - return cast_to_bool - elif val_str in ('str', 'unicode'): - return unicode - return unicode - def profile(func, *args): import hotshot.stats diff --git a/src/gen/plug/_options.py b/src/gen/plug/_options.py index 4ef41eb89..0657d3b55 100644 --- a/src/gen/plug/_options.py +++ b/src/gen/plug/_options.py @@ -51,7 +51,7 @@ except: # gramps modules # #------------------------------------------------------------------------- -import Utils +from gen.utils.cast import get_type_converter import gen #------------------------------------------------------------------------- @@ -346,7 +346,7 @@ class OptionHandler(object): bad_opts.append(option_name) continue try: - converter = Utils.get_type_converter(self.options_dict[option_name]) + converter = get_type_converter(self.options_dict[option_name]) self.options_dict[option_name] = converter(option_data) except ValueError: pass diff --git a/src/gen/utils/Makefile.am b/src/gen/utils/Makefile.am index 8928a1db9..fbb2a6fd3 100644 --- a/src/gen/utils/Makefile.am +++ b/src/gen/utils/Makefile.am @@ -11,6 +11,7 @@ pkgpython_PYTHON = \ alive.py \ callback.py \ callman.py \ + cast.py \ configmanager.py \ fallback.py \ file.py \ diff --git a/src/gen/utils/cast.py b/src/gen/utils/cast.py new file mode 100644 index 000000000..0b720590b --- /dev/null +++ b/src/gen/utils/cast.py @@ -0,0 +1,83 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2000-2007 Donald N. Allingham +# Copyright (C) 2009 Gary Burton +# Copyright (C) 2011 Tim G L Lyons +# +# 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$ + +""" +Utility functions to cast types +""" + +def cast_to_bool(val): + if val == str(True): + return True + return False + +def get_type_converter(val): + """ + Return function that converts strings into the type of val. + """ + val_type = type(val) + if val_type in (str, unicode): + return unicode + elif val_type == int: + return int + elif val_type == float: + return float + elif val_type == bool: + return cast_to_bool + elif val_type in (list, tuple): + return list + +def type_name(val): + """ + Return the name the type of val. + + Only numbers and strings are supported. + The rest becomes strings (unicode). + """ + val_type = type(val) + if val_type == int: + return 'int' + elif val_type == float: + return 'float' + elif val_type == bool: + return 'bool' + elif val_type in (str, unicode): + return 'unicode' + return 'unicode' + +def get_type_converter_by_name(val_str): + """ + Return function that converts strings into the type given by val_str. + + Only numbers and strings are supported. + The rest becomes strings (unicode). + """ + if val_str == 'int': + return int + elif val_str == 'float': + return float + elif val_str == 'bool': + return cast_to_bool + elif val_str in ('str', 'unicode'): + return unicode + return unicode diff --git a/src/plugins/bookreport.py b/src/plugins/bookreport.py index d442ab3fa..630fc6a0a 100644 --- a/src/plugins/bookreport.py +++ b/src/plugins/bookreport.py @@ -69,6 +69,7 @@ import gobject #------------------------------------------------------------------------- import const import Utils +from gen.utils.cast import get_type_converter_by_name, type_name from gui.listmodel import ListModel from gen.errors import FilterError, ReportError from gui.pluginmanager import GuiPluginManager @@ -461,9 +462,7 @@ class BookList(object): escape(option_name), len(options[option_name]) ) ) for list_index in range(len(option_value)): - option_type = Utils.type_name( - option_value[list_index] - ) + option_type = type_name(option_value[list_index]) value = escape(unicode(option_value[list_index])) value = value.replace('"', '"') f.write(' \n') else: - option_type = Utils.type_name(option_value) + option_type = type_name(option_value) value = escape(unicode(option_value)) value = value.replace('"', '"') f.write('