* src/filters/*: removed

* src/plugins/WritePkg.py: brought up to date


svn: r3205
This commit is contained in:
Don Allingham
2004-06-12 04:39:45 +00:00
parent f0ca1ecf13
commit 02a0fc3072
35 changed files with 64 additions and 2044 deletions

View File

@@ -1,57 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People with an event after ..."
import Filter
import Date
from gettext import gettext as _
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
class EventAfter(Filter.Filter):
"People with an event after ..."
def __init__(self,text):
self.date = Date.Date()
self.date.set(text)
Filter.Filter.__init__(self,text)
def match(self,p):
for event in p.get_event_list() + [p.get_birth(), p.get_death()]:
if self.date.get_date() == "" or event.get_date() == "":
continue
if event.get_date_object().greater_than(self.date):
return 1
return 0
#--------------------------------------------------------------------
#
#
#
#--------------------------------------------------------------------
Filter.register_filter(EventAfter,
description=_("People with an event after ..."),
label=_("Date"),
qualifier=1)

View File

@@ -1,39 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People who were adopted"
import Filter
from gettext import gettext as _
class HaveAltFamilies(Filter.Filter):
"People who were adopted"
def match(self,person):
for vals in person.get_parent_family_id_list():
if vals[1] == "Adopted" or vals[2] == "Adopted":
return 1
return 0
Filter.register_filter(HaveAltFamilies,
description=_("People who were adopted"),
qualifier=0)

View File

@@ -1,57 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People with an event before ..."
import Filter
import Date
from gettext import gettext as _
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
class EventBefore(Filter.Filter):
"People with an event before ..."
def __init__(self,text):
self.date = Date.Date()
self.date.set(text)
Filter.Filter.__init__(self,text)
def match(self,p):
for event in p.get_event_list() + [p.get_birth(), p.get_death()]:
if self.date.get_date() == "" or event.get_date() == "":
continue
if event.get_date_object().less_than(self.date):
return 1
return 0
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(EventBefore,
description=_("People with an event before ..."),
label=_("Date"),
qualifier=1)

View File

@@ -1,42 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2003 Donald N. Allingham
#
# 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$
"People with complete information"
import Filter
from gettext import gettext as _
class IsComplete(Filter.Filter):
"People with complete information"
def match(self,person):
return person.get_complete() == 1
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(IsComplete,
description=_("People with complete information"),
qualifier=0)

View File

@@ -1,40 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"Disconnected individuals"
import Filter
from gettext import gettext as _
class Disconnected(Filter.Filter):
"Disconnected individuals"
def match(self,person):
return person.get_main_parents_family_id() == None and len(person.get_family_id_list()) == 0
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(Disconnected,
description= _("Disconnected individuals"),
qualifier=0)

View File

@@ -1,70 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People with an event location of ..."
import Filter
import re
from gettext import gettext as _
class EventPlace(Filter.Filter):
"""Finds people with a specfied event location in any field"""
def __init__(self,text):
self.ok = 1
try:
self.regexp = re.compile(text,re.IGNORECASE)
except:
self.ok = 0
Filter.Filter.__init__(self,text)
def match(self,person):
list = person.get_event_list()[:]
list.append(person.get_birth())
list.append(person.get_death())
for event in list:
if self.regexp.search(event.get_place_name()):
return 1
place = event.get_place_id()
if not place:
continue
locs = [place.get_main_location()] + place.get_alternate_locations()
for location in locs:
if self.regexp.search(location.get_city()):
return 1
if self.regexp.search(location.get_parish()):
return 1
if self.regexp.search(location.get_county()):
return 1
if self.regexp.search(location.get_state()):
return 1
if self.regexp.search(location.get_country()):
return 1
return 0
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(EventPlace,
description=_("People with an event location of ..."),
label=_("Place"),
qualifier=1)

View File

@@ -1,42 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People who have an event type of ..."
import Filter
from gettext import gettext as _
class EventType(Filter.Filter):
def match(self,person):
for event in person.get_event_list():
if event.get_name() == self.text:
return 1
return 0
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(EventType,
description=_("People who have an event type of ..."),
label=_("Event"),
qualifier=1)

View File

@@ -1,40 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"Females"
import Filter
import RelLib
from gettext import gettext as _
class Females(Filter.Filter):
"Females"
def match(self,person):
return person.get_gender() == RelLib.Person.female
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(Females,
description=_("Females"),
qualifier=0)

View File

@@ -1,40 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People who have images"
import Filter
from gettext import gettext as _
class HavePhotos(Filter.Filter):
"People who have images"
def match(self,person):
return len(person.get_media_list()) > 0
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(HavePhotos,
description=_("People who have images"),
qualifier=0)

View File

@@ -1,40 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People with incomplete names"
import Filter
from gettext import gettext as _
class IncompleteNames(Filter.Filter):
"People with incomplete names"
def match(self,person):
name = person.get_primary_name()
return name.get_first_name() == "" or name.get_surname() == ""
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(IncompleteNames,
description=_("People with incomplete names"),
qualifier=0)

View File

@@ -1,31 +0,0 @@
# This is the src/filters level Makefile for Gramps
# Use GNU make's ':=' syntax for nice wildcard use.
# If not using GNU make, then list all .py files individually
pkgpython_PYTHON = \
After.py\
AltFam.py\
Before.py\
Disconnected.py\
EventPlace.py\
EventType.py\
Females.py\
HavePhotos.py\
IncompleteNames.py\
Males.py\
MatchSndEx2.py\
MatchSndEx.py\
MutlipleMarriages.py\
NeverMarried.py\
NoBirthdate.py\
NoChildren.py\
RegExMatch.py\
SubString.py
pkgpyexecdir = @pkgpyexecdir@/filters
pkgpythondir = @pkgpythondir@/filters
GRAMPS_PY_MODPATH = "../"
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgpython_PYTHON));

View File

@@ -1,336 +0,0 @@
# Makefile.in generated by automake 1.8.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = ../..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = src/filters
DIST_COMMON = $(pkgpython_PYTHON) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(mkdir_p)
CONFIG_CLEAN_FILES =
SOURCES =
DIST_SOURCES =
am__installdirs = "$(DESTDIR)$(pkgpythondir)"
pkgpythonPYTHON_INSTALL = $(INSTALL_DATA)
py_compile = $(top_srcdir)/py-compile
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
BINSH = @BINSH@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
GNOMEHELP = @GNOMEHELP@
GPREFIX = @GPREFIX@
ICONV = @ICONV@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LANGUAGES = @LANGUAGES@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MOFILES = @MOFILES@
MSGCONV = @MSGCONV@
MSGFMT = @MSGFMT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
POFILES = @POFILES@
PYGTK_CFLAGS = @PYGTK_CFLAGS@
PYGTK_LIBS = @PYGTK_LIBS@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RELEASE = @RELEASE@
SCROLLKEEPER_BUILD_REQUIRED = @SCROLLKEEPER_BUILD_REQUIRED@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
SK_CONFIG = @SK_CONFIG@
STRIP = @STRIP@
VERSION = @VERSION@
VERSIONSTRING = @VERSIONSTRING@
ac_ct_STRIP = @ac_ct_STRIP@
am__leading_dot = @am__leading_dot@
bindir = @bindir@
build_alias = @build_alias@
datadir = @datadir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pkgpyexecdir = @pkgpyexecdir@/filters
pkgpythondir = @pkgpythondir@/filters
prefix = @prefix@
program_transform_name = @program_transform_name@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
# This is the src/filters level Makefile for Gramps
# Use GNU make's ':=' syntax for nice wildcard use.
# If not using GNU make, then list all .py files individually
pkgpython_PYTHON = \
After.py\
AltFam.py\
Before.py\
Disconnected.py\
EventPlace.py\
EventType.py\
Females.py\
HavePhotos.py\
IncompleteNames.py\
Males.py\
MatchSndEx2.py\
MatchSndEx.py\
MutlipleMarriages.py\
NeverMarried.py\
NoBirthdate.py\
NoChildren.py\
RegExMatch.py\
SubString.py
GRAMPS_PY_MODPATH = "../"
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/filters/Makefile'; \
cd $(top_srcdir) && \
$(AUTOMAKE) --gnu src/filters/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
uninstall-info-am:
install-pkgpythonPYTHON: $(pkgpython_PYTHON)
@$(NORMAL_INSTALL)
test -z "$(pkgpythondir)" || $(mkdir_p) "$(DESTDIR)$(pkgpythondir)"
@list='$(pkgpython_PYTHON)'; dlist=''; for p in $$list; do\
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
d=`echo $$p | sed -e 's,^.*/,,'`; \
dlist="$$dlist $$d"; \
echo " $(pkgpythonPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pkgpythondir)/$$d'"; \
$(pkgpythonPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pkgpythondir)/$$d"; \
else :; fi; \
done; \
test -z "$$dlist" || \
PYTHON=$(PYTHON) $(py_compile) --basedir "$(DESTDIR)$(pkgpythondir)" $$dlist
uninstall-pkgpythonPYTHON:
@$(NORMAL_UNINSTALL)
@list='$(pkgpython_PYTHON)'; dlist=''; for p in $$list; do\
d=`echo $$p | sed -e 's,^.*/,,'`; \
rm -f "$(DESTDIR)$(pkgpythondir)/$$d"; \
rm -f "$(DESTDIR)$(pkgpythondir)/$${d}c"; \
rm -f "$(DESTDIR)$(pkgpythondir)/$${d}o"; \
done
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
list='$(DISTFILES)'; for file in $$list; do \
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
esac; \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
dir="/$$dir"; \
$(mkdir_p) "$(distdir)$$dir"; \
else \
dir=''; \
fi; \
if test -d $$d/$$file; then \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
fi; \
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
else \
test -f $(distdir)/$$file \
|| cp -p $$d/$$file $(distdir)/$$file \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile
installdirs:
for dir in "$(DESTDIR)$(pkgpythondir)"; do \
test -z "$$dir" || $(mkdir_p) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
`test -z '$(STRIP)' || \
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
mostlyclean-generic:
clean-generic:
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
info: info-am
info-am:
install-data-am: install-pkgpythonPYTHON
install-exec-am:
install-info: install-info-am
install-man:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-info-am uninstall-pkgpythonPYTHON
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-exec \
install-exec-am install-info install-info-am install-man \
install-pkgpythonPYTHON install-strip installcheck \
installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
uninstall-pkgpythonPYTHON
pycheck:
(export PYTHONPATH=$(GRAMPS_PY_MODPATH); \
pychecker $(pkgpython_PYTHON));
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@@ -1,41 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"Males"
import Filter
import RelLib
from gettext import gettext as _
class Males(Filter.Filter):
"Males"
def match(self,person):
return person.get_gender() == RelLib.Person.male
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(Males,
description=_("Males"),
qualifier=0)

View File

@@ -1,45 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"Names with same SoundEx code as ..."
import Filter
import soundex
from gettext import gettext as _
class MatchSndEx(Filter.Filter):
"Names with same SoundEx code as ..."
def __init__(self,text):
self.sndex = soundex.soundex(text)
Filter.Filter.__init__(self,text)
def match(self,person):
return self.sndex == soundex.soundex(person.get_primary_name().get_surname())
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(MatchSndEx,
description=_("Names with same SoundEx code as ..."),
label=_("Surname"),
qualifier=1)

View File

@@ -1,43 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2003 Donald N. Allingham
#
# 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$
"Names with SoundEx code of ..."
import Filter
import soundex
from gettext import gettext as _
class MatchSndEx2(Filter.Filter):
"Names with SoundEx code of ..."
def match(self,person):
return self.text == soundex.soundex(person.get_primary_name().get_surname())
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(MatchSndEx2,
description=_("Names with the SoundEx code of ..."),
label=_("SoundEx Code"),
qualifier=1)

View File

@@ -1,39 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People with multiple marriage records"
import Filter
from gettext import gettext as _
class MultipleMarriages(Filter.Filter):
"People with multiple marriage records"
def match(self,person):
return len(person.get_family_id_list()) > 1
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(MultipleMarriages,
description=_("People with multiple marriage records"),
qualifier=0)

View File

@@ -1,40 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People with no marriage records"
import Filter
from gettext import gettext as _
class NeverMarried(Filter.Filter):
"People with no marriage records"
def match(self,person):
return len(person.get_family_id_list()) == 0
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(NeverMarried,
description=_("People with no marriage records"),
qualifier=0)

View File

@@ -1,40 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People without a birth date"
import Filter
from gettext import gettext as _
class NoBirthdate(Filter.Filter):
"People without a birth date"
def match(self,person):
return person.get_birth().get_date() == ""
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(NoBirthdate,
description=_("People without a birth date"),
qualifier=0)

View File

@@ -1,45 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000 Donald N. Allingham
#
# 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
#
"People with children"
import Filter
from gettext import gettext as _
class HaveChildren(Filter.Filter):
"People with children"
def match(self,person):
val = 0
for family in person.get_family_id_list():
if len(family.get_child_id_list()) > 0:
val = 1
break
return val
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(HaveChildren,
description=_("People with children"),
qualifier=0)

View File

@@ -1,60 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2003 Donald N. Allingham
#
# 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
#
"Names that match a regular expression of ..."
import Filter
import re
import Utils
from gettext import gettext as _
class RegExMatch(Filter.Filter):
"Names that match a regular expression of ..."
def __init__(self,text):
self.ok = 1
try:
self.regexp = re.compile(text,re.IGNORECASE)
except:
self.ok = 0
Filter.Filter.__init__(self,text)
def match(self,person):
if self.ok == 0:
return 0
else:
return self.regexp.search(Utils.phonebook_name(person))
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(RegExMatch,
description=_("Names that match a regular expression of ..."),
label=_("Text"),
qualifier=1)

View File

@@ -1,45 +0,0 @@
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2003 Donald N. Allingham
#
# 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
#
"Names that contain a substring of ..."
import Filter
import string
import Utils
from gettext import gettext as _
class SubString(Filter.Filter):
"Names that contain a substring of ..."
def match(self,person):
s1 = string.lower(Utils.phonebook_name(person))
s2 = string.lower(self.text)
return string.find(s1,s2) >= 0
#------------------------------------------------------------------------
#
#
#
#------------------------------------------------------------------------
Filter.register_filter(SubString,
description=_("Names that contain a substring of ..."),
label=_("Text"),
qualifier=1)