|
| 1 | +# |
| 2 | +# Gramps - a GTK+/GNOME based genealogy program |
| 3 | +# |
| 4 | +# Copyright (C) 2025 Doug Blank <doug.blank@gmail.com> |
| 5 | +# |
| 6 | +# This program is free software; you can redistribute it and/or modify |
| 7 | +# it under the terms of the GNU General Public License as published by |
| 8 | +# the Free Software Foundation; either version 2 of the License, or |
| 9 | +# (at your option) any later version. |
| 10 | +# |
| 11 | +# This program is distributed in the hope that it will be useful, |
| 12 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | +# GNU General Public License for more details. |
| 15 | +# |
| 16 | +# You should have received a copy of the GNU General Public License |
| 17 | +# along with this program; if not, write to the Free Software |
| 18 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | +# |
| 20 | +"""Filter rules to match objects with a tag whose name contains a substring.""" |
| 21 | + |
| 22 | +register( |
| 23 | + RULE, |
| 24 | + id="PersonHasTagSubstr", |
| 25 | + name=_("People with a tag containing <substring>"), |
| 26 | + description=_("Matches people with a tag whose name contains the given substring"), |
| 27 | + version = '1.0.1', |
| 28 | + authors=["Doug Blank"], |
| 29 | + authors_email=["doug.blank@gmail.com"], |
| 30 | + gramps_target_version="6.1", |
| 31 | + status=STABLE, |
| 32 | + fname="hastagsubstr.py", |
| 33 | + ruleclass="PersonHasTagSubstr", |
| 34 | + namespace="Person", |
| 35 | +) |
| 36 | + |
| 37 | +register( |
| 38 | + RULE, |
| 39 | + id="FamilyHasTagSubstr", |
| 40 | + name=_("Families with a tag containing <substring>"), |
| 41 | + description=_( |
| 42 | + "Matches families with a tag whose name contains the given substring" |
| 43 | + ), |
| 44 | + version = '1.0.1', |
| 45 | + authors=["Doug Blank"], |
| 46 | + authors_email=["doug.blank@gmail.com"], |
| 47 | + gramps_target_version="6.1", |
| 48 | + status=STABLE, |
| 49 | + fname="hastagsubstr.py", |
| 50 | + ruleclass="FamilyHasTagSubstr", |
| 51 | + namespace="Family", |
| 52 | +) |
| 53 | + |
| 54 | +register( |
| 55 | + RULE, |
| 56 | + id="EventHasTagSubstr", |
| 57 | + name=_("Events with a tag containing <substring>"), |
| 58 | + description=_( |
| 59 | + "Matches events with a tag whose name contains the given substring" |
| 60 | + ), |
| 61 | + version = '1.0.1', |
| 62 | + authors=["Doug Blank"], |
| 63 | + authors_email=["doug.blank@gmail.com"], |
| 64 | + gramps_target_version="6.1", |
| 65 | + status=STABLE, |
| 66 | + fname="hastagsubstr.py", |
| 67 | + ruleclass="EventHasTagSubstr", |
| 68 | + namespace="Event", |
| 69 | +) |
| 70 | + |
| 71 | +register( |
| 72 | + RULE, |
| 73 | + id="PlaceHasTagSubstr", |
| 74 | + name=_("Places with a tag containing <substring>"), |
| 75 | + description=_( |
| 76 | + "Matches places with a tag whose name contains the given substring" |
| 77 | + ), |
| 78 | + version = '1.0.1', |
| 79 | + authors=["Doug Blank"], |
| 80 | + authors_email=["doug.blank@gmail.com"], |
| 81 | + gramps_target_version="6.1", |
| 82 | + status=STABLE, |
| 83 | + fname="hastagsubstr.py", |
| 84 | + ruleclass="PlaceHasTagSubstr", |
| 85 | + namespace="Place", |
| 86 | +) |
| 87 | + |
| 88 | +register( |
| 89 | + RULE, |
| 90 | + id="SourceHasTagSubstr", |
| 91 | + name=_("Sources with a tag containing <substring>"), |
| 92 | + description=_( |
| 93 | + "Matches sources with a tag whose name contains the given substring" |
| 94 | + ), |
| 95 | + version = '1.0.1', |
| 96 | + authors=["Doug Blank"], |
| 97 | + authors_email=["doug.blank@gmail.com"], |
| 98 | + gramps_target_version="6.1", |
| 99 | + status=STABLE, |
| 100 | + fname="hastagsubstr.py", |
| 101 | + ruleclass="SourceHasTagSubstr", |
| 102 | + namespace="Source", |
| 103 | +) |
| 104 | + |
| 105 | +register( |
| 106 | + RULE, |
| 107 | + id="CitationHasTagSubstr", |
| 108 | + name=_("Citations with a tag containing <substring>"), |
| 109 | + description=_( |
| 110 | + "Matches citations with a tag whose name contains the given substring" |
| 111 | + ), |
| 112 | + version = '1.0.1', |
| 113 | + authors=["Doug Blank"], |
| 114 | + authors_email=["doug.blank@gmail.com"], |
| 115 | + gramps_target_version="6.1", |
| 116 | + status=STABLE, |
| 117 | + fname="hastagsubstr.py", |
| 118 | + ruleclass="CitationHasTagSubstr", |
| 119 | + namespace="Citation", |
| 120 | +) |
| 121 | + |
| 122 | +register( |
| 123 | + RULE, |
| 124 | + id="RepositoryHasTagSubstr", |
| 125 | + name=_("Repositories with a tag containing <substring>"), |
| 126 | + description=_( |
| 127 | + "Matches repositories with a tag whose name contains the given substring" |
| 128 | + ), |
| 129 | + version = '1.0.1', |
| 130 | + authors=["Doug Blank"], |
| 131 | + authors_email=["doug.blank@gmail.com"], |
| 132 | + gramps_target_version="6.1", |
| 133 | + status=STABLE, |
| 134 | + fname="hastagsubstr.py", |
| 135 | + ruleclass="RepositoryHasTagSubstr", |
| 136 | + namespace="Repository", |
| 137 | +) |
| 138 | + |
| 139 | +register( |
| 140 | + RULE, |
| 141 | + id="MediaHasTagSubstr", |
| 142 | + name=_("Media objects with a tag containing <substring>"), |
| 143 | + description=_( |
| 144 | + "Matches media objects with a tag whose name contains the given substring" |
| 145 | + ), |
| 146 | + version = '1.0.1', |
| 147 | + authors=["Doug Blank"], |
| 148 | + authors_email=["doug.blank@gmail.com"], |
| 149 | + gramps_target_version="6.1", |
| 150 | + status=STABLE, |
| 151 | + fname="hastagsubstr.py", |
| 152 | + ruleclass="MediaHasTagSubstr", |
| 153 | + namespace="Media", |
| 154 | +) |
| 155 | + |
| 156 | +register( |
| 157 | + RULE, |
| 158 | + id="NoteHasTagSubstr", |
| 159 | + name=_("Notes with a tag containing <substring>"), |
| 160 | + description=_( |
| 161 | + "Matches notes with a tag whose name contains the given substring" |
| 162 | + ), |
| 163 | + version = '1.0.1', |
| 164 | + authors=["Doug Blank"], |
| 165 | + authors_email=["doug.blank@gmail.com"], |
| 166 | + gramps_target_version="6.1", |
| 167 | + status=STABLE, |
| 168 | + fname="hastagsubstr.py", |
| 169 | + ruleclass="NoteHasTagSubstr", |
| 170 | + namespace="Note", |
| 171 | +) |
0 commit comments