def __init__(self): ''' the constructor ''' super(SpeciesInfoPage, self).__init__() filename = os.path.join(paths.lib_dir(), 'plugins', 'plants', 'infoboxes.glade') # load the widgets directly instead of using load_widgets() # because the caching that load_widgets() does can mess up # displaying the SpeciesInfoBox sometimes if you try to show # the infobox while having a vernacular names selected in # the search results and then a species name self.widgets = utils.BuilderWidgets(filename) self.general = GeneralSpeciesExpander(self.widgets) self.add_expander(self.general) self.vernacular = VernacularExpander(self.widgets) self.add_expander(self.vernacular) self.synonyms = SynonymsExpander(self.widgets) self.add_expander(self.synonyms) self.links = LinksExpander() self.add_expander(self.links) self.props = PropertiesExpander() self.add_expander(self.props) self.label = _('General') if 'GardenPlugin' not in pluginmgr.plugins: self.widgets.remove_parent('sp_nacc_label') self.widgets.remove_parent('sp_nacc_data') self.widgets.remove_parent('sp_nplants_label') self.widgets.remove_parent('sp_nplants_data')
def __init__(self): ''' ''' InfoBox.__init__(self) filename = os.path.join(paths.lib_dir(), "plugins", "garden", "loc_infobox.glade") self.widgets = utils.load_widgets(filename) self.general = GeneralLocationExpander(self.widgets) self.add_expander(self.general) self.description = DescriptionExpander(self.widgets) self.add_expander(self.description) self.props = PropertiesExpander() self.add_expander(self.props)
def __init__(self): InfoBox.__init__(self) filename = os.path.join(paths.lib_dir(), 'plugins', 'plants', 'infoboxes.glade') self.widgets = utils.load_widgets(filename) self.general = GeneralGenusExpander(self.widgets) self.add_expander(self.general) self.synonyms = SynonymsExpander(self.widgets) self.add_expander(self.synonyms) self.links = LinksExpander() self.add_expander(self.links) self.props = PropertiesExpander() self.add_expander(self.props) if 'GardenPlugin' not in pluginmgr.plugins: self.widgets.remove_parent('gen_nacc_label') self.widgets.remove_parent('gen_nacc_data') self.widgets.remove_parent('gen_nplants_label') self.widgets.remove_parent('gen_nplants_data')
def __init__(self): ''' ''' button_defs = [ { 'name': 'IPNIButton', '_base_uri': "http://www.ipni.org/ipni/advPlantNameSearch.do?find_family=%(family)s&find_isAPNIRecord=on& find_isGCIRecord=on&find_isIKRecord=on&output_format=normal", '_space': ' ', 'title': _("Search IPNI"), 'tooltip': _("Search the International Plant Names Index"), }, { 'name': 'GoogleButton', '_base_uri': "http://www.google.com/search?q=%s", '_space': '+', 'title': "Search Google", 'tooltip': None, }, { 'name': 'GBIFButton', '_base_uri': "http://www.gbif.org/species/search?q=%s", '_space': '+', 'title': _("Search GBIF"), 'tooltip': _("Search the Global Biodiversity Information Facility"), }, { 'name': 'ITISButton', '_base_uri': "http://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=Scientific_Name&search_value=%s&search_kingdom=Plant&search_span=containing&categories=All&source=html&search_credRating=All", '_space': '%20', 'title': _("Search ITIS"), 'tooltip': _("Search the Intergrated Taxonomic Information System"), }, { 'name': 'GRINButton', '_base_uri': "http://www.ars-grin.gov/cgi-bin/npgs/swish/accboth?query=%s&submit=Submit+Text+Query&si=0", '_space': '+', 'title': _("Search NPGS/GRIN"), 'tooltip': _('Search National Plant Germplasm System'), }, { 'name': 'ALAButton', '_base_uri': "http://bie.ala.org.au/search?q=%s", '_space': '+', 'title': _("Search ALA"), 'tooltip': _("Search the Atlas of Living Australia"), }, ] InfoBox.__init__(self) filename = os.path.join(paths.lib_dir(), 'plugins', 'plants', 'infoboxes.glade') self.widgets = utils.load_widgets(filename) self.general = GeneralFamilyExpander(self.widgets) self.add_expander(self.general) self.synonyms = SynonymsExpander(self.widgets) self.add_expander(self.synonyms) self.links = view.LinksExpander('notes', links=button_defs) self.add_expander(self.links) self.props = PropertiesExpander() self.add_expander(self.props) if 'GardenPlugin' not in pluginmgr.plugins: self.widgets.remove_parent('fam_nacc_label') self.widgets.remove_parent('fam_nacc_data') self.widgets.remove_parent('fam_nplants_label') self.widgets.remove_parent('fam_nplants_data')
def __init__(self): ''' the constructor ''' button_defs = [ { 'name': 'GoogleButton', '_base_uri': "http://www.google.com/search?q=%s", '_space': '+', 'title': "Search Google", 'tooltip': None, }, { 'name': 'GBIFButton', '_base_uri': "http://www.gbif.org/species/search?q=%s", '_space': '+', 'title': _("Search GBIF"), 'tooltip': _("Search the Global Biodiversity Information Facility"), }, { 'name': 'ITISButton', '_base_uri': "http://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=Scientific_Name&search_value=%s&search_kingdom=Plant&search_span=containing&categories=All&source=html&search_credRating=All", '_space': '%20', 'title': _("Search ITIS"), 'tooltip': _("Search the Intergrated Taxonomic Information System"), }, { 'name': 'GRINButton', '_base_uri': "http://www.ars-grin.gov/cgi-bin/npgs/swish/accboth?query=%s&submit=Submit+Text+Query&si=0", '_space': '+', 'title': _("Search NPGS/GRIN"), 'tooltip': _('Search National Plant Germplasm System'), }, { 'name': 'ALAButton', '_base_uri': "http://bie.ala.org.au/search?q=%s", '_space': '+', 'title': _("Search ALA"), 'tooltip': _("Search the Atlas of Living Australia"), }, { 'name': 'WikipediaButton', '_base_uri': "http://en.wikipedia.org/wiki/%(genus.epithet)s_%(sp)s", '_space': '+', 'title': _("Search Wikipedia"), 'tooltip': _("open the wikipedia page about this species"), }, { 'name': 'IPNIButton', '_base_uri': "http://www.ipni.org/ipni/advPlantNameSearch.do?find_genus=%(genus.epithet)s&find_species=%(sp)s&find_isAPNIRecord=on& find_isGCIRecord=on&find_isIKRecord=on&output_format=normal", '_space': ' ', 'title': _("Search IPNI"), 'tooltip': _("Search the International Plant Names Index"), }, { 'name': 'BGCIButton', '_base_uri': "http://www.bgci.org/plant_search.php?action=Find&ftrGenus=%(genus.epithet)s&ftrRedList=&ftrSpecies=%(sp)s&ftrRedList1997=&ftrEpithet=&ftrCWR=&x=0&y=0#results", '_space': ' ', 'title': _("Search BGCI"), 'tooltip': _("Search Botanic Gardens Conservation International"), }, { 'name': 'TPLButton', '_base_uri': "http://www.theplantlist.org/tpl1.1/search?q=%(genus.epithet)s+%(sp)s", '_space': '+', 'title': _("Search TPL"), 'tooltip': _("Search The Plant List online database"), }, { 'name': 'TropicosButton', '_base_uri': "http://tropicos.org/NameSearch.aspx?name=%(genus.epithet)s+%(sp)s", '_space': '+', 'title': _("Search Tropicos"), 'tooltip': _("Search Tropicos (MissouriBG) online database"), }, ] super(SpeciesInfoPage, self).__init__() filename = os.path.join(paths.lib_dir(), 'plugins', 'plants', 'infoboxes.glade') # load the widgets directly instead of using load_widgets() # because the caching that load_widgets() does can mess up # displaying the SpeciesInfoBox sometimes if you try to show # the infobox while having a vernacular names selected in # the search results and then a species name self.widgets = utils.BuilderWidgets(filename) self.general = GeneralSpeciesExpander(self.widgets) self.add_expander(self.general) self.vernacular = VernacularExpander(self.widgets) self.add_expander(self.vernacular) self.synonyms = SynonymsExpander(self.widgets) self.add_expander(self.synonyms) self.links = view.LinksExpander('notes', links=button_defs) self.add_expander(self.links) self.props = PropertiesExpander() self.add_expander(self.props) self.label = _('General') if 'GardenPlugin' not in pluginmgr.plugins: self.widgets.remove_parent('sp_nacc_label') self.widgets.remove_parent('sp_nacc_data') self.widgets.remove_parent('sp_nplants_label') self.widgets.remove_parent('sp_nplants_data')
def __init__(self): button_defs = [ { 'name': 'GoogleButton', '_base_uri': "http://www.google.com/search?q=%s", '_space': '+', 'title': "Search Google", 'tooltip': None, }, { 'name': 'GBIFButton', '_base_uri': "http://www.gbif.org/species/search?q=%s", '_space': '+', 'title': _("Search GBIF"), 'tooltip': _("Search the Global Biodiversity Information Facility"), }, { 'name': 'ITISButton', '_base_uri': "http://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=Scientific_Name&search_value=%s&search_kingdom=Plant&search_span=containing&categories=All&source=html&search_credRating=All", '_space': '%20', 'title': _("Search ITIS"), 'tooltip': _("Search the Intergrated Taxonomic Information System"), }, { 'name': 'GRINButton', '_base_uri': "http://www.ars-grin.gov/cgi-bin/npgs/swish/accboth?query=%s&submit=Submit+Text+Query&si=0", '_space': '+', 'title': _("Search NPGS/GRIN"), 'tooltip': _('Search National Plant Germplasm System'), }, { 'name': 'ALAButton', '_base_uri': "http://bie.ala.org.au/search?q=%s", '_space': '+', 'title': _("Search ALA"), 'tooltip': _("Search the Atlas of Living Australia"), }, { 'name': 'IPNIButton', '_base_uri': "http://www.ipni.org/ipni/advPlantNameSearch.do?find_genus=%(genus)s&find_isAPNIRecord=on& find_isGCIRecord=on&find_isIKRecord=on&output_format=normal", '_space': ' ', 'title': _("Search IPNI"), 'tooltip': _("Search the International Plant Names Index"), }, { 'name': 'BGCIButton', '_base_uri': "http://www.bgci.org/plant_search.php?action=Find&ftrGenus=%(genus)s&ftrRedList=&ftrRedList1997=&ftrEpithet=&ftrCWR=&x=0&y=0#results", '_space': ' ', 'title': _("Search BGCI"), 'tooltip': _("Search Botanic Gardens Conservation International"), }, { 'name': 'TPLButton', '_base_uri': "http://www.theplantlist.org/tpl1.1/search?q=%(genus)s", '_space': '+', 'title': _("Search TPL"), 'tooltip': _("Search The Plant List online database"), }, { 'name': 'TropicosButton', '_base_uri': "http://tropicos.org/NameSearch.aspx?name=%(genus)s", '_space': '+', 'title': _("Search Tropicos"), 'tooltip': _("Search Tropicos (MissouriBG) online database"), }, ] InfoBox.__init__(self) filename = os.path.join(paths.lib_dir(), 'plugins', 'plants', 'infoboxes.glade') self.widgets = utils.load_widgets(filename) self.general = GeneralGenusExpander(self.widgets) self.add_expander(self.general) self.synonyms = SynonymsExpander(self.widgets) self.add_expander(self.synonyms) self.links = view.LinksExpander('notes', button_defs) self.add_expander(self.links) self.props = PropertiesExpander() self.add_expander(self.props) if 'GardenPlugin' not in pluginmgr.plugins: self.widgets.remove_parent('gen_nacc_label') self.widgets.remove_parent('gen_nacc_data') self.widgets.remove_parent('gen_nplants_label') self.widgets.remove_parent('gen_nplants_data')