|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | +# |
| 3 | +# Gramps - a GTK+/GNOME based genealogy program |
| 4 | +# |
| 5 | +# Copyright (C) 2011 Doug Blank <[email protected]> |
| 6 | +# |
| 7 | +# This program is free software; you can redistribute it and/or modify |
| 8 | +# it under the terms of the GNU General Public License as published by |
| 9 | +# the Free Software Foundation; either version 2 of the License, or |
| 10 | +# (at your option) any later version. |
| 11 | +# |
| 12 | +# This program is distributed in the hope that it will be useful, |
| 13 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | +# GNU General Public License for more details. |
| 16 | +# |
| 17 | +# You should have received a copy of the GNU General Public License |
| 18 | +# along with this program; if not, write to the Free Software |
| 19 | +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 | +# |
| 21 | + |
| 22 | +# $Id$ |
| 23 | + |
| 24 | +from libwebconnect import * |
| 25 | +from gramps.gen.const import GRAMPS_LOCALE as glocale |
| 26 | +try: |
| 27 | + _trans = glocale.get_addon_translator(__file__) |
| 28 | +except ValueError: |
| 29 | + _trans = glocale.translation |
| 30 | +_ = _trans.gettext |
| 31 | + |
| 32 | +# Format: [[nav_type, id, name, url_pattern], ...] |
| 33 | + |
| 34 | +# http://gramps-project.org/wiki/index.php?title=Resources_and_related_sites#German_information_sites |
| 35 | + |
| 36 | +WEBSITES = [ |
| 37 | + ["Person", "Bielefeld Academic Search", _("Bielefeld Academic Search"), "http://www.base-search.net/Search/Results?lookfor=%(surname)s,+%(given)s&type=all&lem=0&lem=1&refid=dcbasde"], |
| 38 | + ["Person", "Geneanet", "Geneanet", "https://www.geneanet.org/fonds/individus/?u=km&nom=%(surname)s&ignore_each_patronyme=&prenom=%(given)s&go=1"], |
| 39 | + ["Person", "FamilySearch", _("FamilySearch.org"), "https://familysearch.org/search/record/results?count=20&query=%%2Bgivenname%%3A%(given)s~ %%2Bsurname%%3A%(surname)s~ %%2Bbirth_year%%3A%(birth)s-%(birth)s~ %%2Bdeath_year%%3A%(death)s-%(death)s~"], |
| 40 | + ["Person", "Archive.org", "Archive.org", '''http://www.archive.org/search.php?query="%(surname)s,+%(given)s"'''], |
| 41 | + ["Person", "GeneaBook", "GeneaBook", "http://www.geneabook.org/genealogie/1/ouvrages.php?nom=%(surname)s&x=20&y=1"], |
| 42 | + ["Person", "Google Archives", _("Google Archives"), "https://news.google.com/search?as_drrb=a&hl=sl&gl=SI&ceid=SI:sl&q=%(surname)s"], |
| 43 | + ["Person", "Google.si", _("SL Google"), '''http://www.google.si/#hl=sl&q="%(surname)s,+%(given)s"'''], |
| 44 | + ["Person", "Open Library", _("Open Library"), "http://openlibrary.org/search?q=%(surname)s, %(given)s"], |
| 45 | + ["Person", "Namensverbreitungskarte", _("Surname map (1890-1996)"), "https://nvk.genealogy.net/map/1890:%(surname)s,1996:%(surname)s"], |
| 46 | + ["Person", "Cobiss", _("Slovenian library catalog"),'''https://plus.cobiss.si/opac7/bib/search/expert?c=%22%(surname)s%2C+%(given)s%22&db=cobib&mat=allmaterials'''], |
| 47 | + ["Person", "dLib", _("Slovenian Digital Library"),'''http://www.dlib.si/results/?query=%27fts%3d%22%(given)s+%(surname)s%22%27&pageSize=25'''], |
| 48 | + ] |
| 49 | + |
| 50 | +def load_on_reg(dbstate, uistate, pdata): |
| 51 | + # do things at time of load |
| 52 | + # now return functions that take: |
| 53 | + # dbstate, uistate, nav_type, handle |
| 54 | + # and that returns a function that takes a widget |
| 55 | + return lambda nav_type: \ |
| 56 | + make_search_functions(nav_type, WEBSITES) |
| 57 | + |
0 commit comments