-
Notifications
You must be signed in to change notification settings - Fork 417
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new HasEvent and HasSource rules
- Loading branch information
Showing
5 changed files
with
112 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# | ||
# Gramps - a GTK+/GNOME based genealogy program | ||
# | ||
# Copyright (C) 2002-2006 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
|
||
""" | ||
Filter rule to match events with a particular value. | ||
""" | ||
# ------------------------------------------------------------------------- | ||
# | ||
# Standard Python modules | ||
# | ||
# ------------------------------------------------------------------------- | ||
from ....const import GRAMPS_LOCALE as glocale | ||
|
||
_ = glocale.translation.gettext | ||
|
||
# ------------------------------------------------------------------------- | ||
# | ||
# Gramps modules | ||
# | ||
# ------------------------------------------------------------------------- | ||
from .._haseventbase import HasEventBase | ||
|
||
|
||
# ------------------------------------------------------------------------- | ||
# | ||
# HasEvent | ||
# | ||
# ------------------------------------------------------------------------- | ||
class HasEvent(HasEventBase): | ||
"""Rule that checks for an event with a particular value""" | ||
|
||
labels = [ | ||
_("Event type:"), | ||
_("Date:"), | ||
_("Place:"), | ||
_("Description:"), | ||
_("Main Participants:"), | ||
] | ||
name = _("Events matching parameters") | ||
description = _("Matches events with particular parameters") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# | ||
# Gramps - a GTK+/GNOME based genealogy program | ||
# | ||
# Copyright (C) 2002-2006 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
# | ||
|
||
""" | ||
Filter rule to match sources with a particular value. | ||
""" | ||
# ------------------------------------------------------------------------- | ||
# | ||
# Standard Python modules | ||
# | ||
# ------------------------------------------------------------------------- | ||
from ....const import GRAMPS_LOCALE as glocale | ||
|
||
_ = glocale.translation.gettext | ||
|
||
# ------------------------------------------------------------------------- | ||
# | ||
# Gramps modules | ||
# | ||
# ------------------------------------------------------------------------- | ||
from .._hassourcebase import HasSourceBase | ||
|
||
|
||
# ------------------------------------------------------------------------- | ||
# | ||
# HasSource | ||
# | ||
# ------------------------------------------------------------------------- | ||
class HasSource(HasSourceBase): | ||
"""Rule that checks for a source with a particular value""" | ||
|
||
labels = [_("Title:"), _("Author:"), _("Abbreviation:"), _("Publication:")] | ||
name = _("Sources matching parameters") | ||
description = _("Matches sources with particular parameters") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters