data.POWO = {
citationArgs = {
website="Plants of the World Online",
publisher="Royal Botanic Gardens, Kew",
--postscript = '',
},
customArgs = { exclude = "id,authority,family,genus,species,1",
baseURL = "http://powo.science.kew.org/taxon/",
searchStr ="urn:lsid:ipni.org:names:",
defaultSuffix = "",
defaultTitle = "Plants of the World Online"
}
--id = function(id) return p.genericIdCitation (, title, url)
}
-- http://powo.science.kew.org/taxon/urn:lsid:ipni.org:names:30003057-2
data.POWO.id = function(id)
local id = data.POWO.getValidID
if not id then return data.POWO.error end
local title = id -- as default value
local url = data.POWO.customArgs['baseURL'] .. data.POWO.customArgs['searchStr'] .. id
return title, url
end
data.POWO.family = function(family)
local title = addAuthority(family)
local id = templateArgs['id']
if not id then return data.POWO.error end
local url = data.POWO.customArgs['baseURL'] .. data.POWO.customArgs['searchStr'] .. id
return title, url
end
data.POWO.genus = function(genus)
local title = addAuthority("*" .. genus .. "*")
local id = data.POWO.getValidID
if not id then return data.POWO.error end
local url = data.POWO.customArgs['baseURL'] .. data.POWO.customArgs['searchStr'] .. id
return title, url
end
data.POWO.species = function(genus,species)
local title = addAuthority("*" .. genus .. " " .. species .. "*")
local id = data.POWO.getValidID
if not id then return data.POWO.error end
local url = data.POWO.customArgs['baseURL'] .. data.POWO.customArgs['searchStr'] ..id
return title, url
end
data.POWO.getValidID = function
local id = templateArgs['id']
if id then
return string.gsub( id, "urn:lsid:ipni.org:names:", "") -- don't want this twice
end
return nil
end
data.POWO.error = function
return '<span>Requires id and one of title, family, genus or species parameters</span>'
end  
--Gouda, E.J., Butcher, D. & Gouda, C.S. (cont.updated)
Encyclopaedia of Bromeliads, Version 4. http://bromeliad.nl/encyclopedia/ Utrecht University Botanic Gardens  
data.bromeliad = {
citationArgs = {
last1="Gouda", first1="E.J.",
last2="Butcher", first2="D.",
last3="Gouda", first3="C.S",
website="Encyclopaedia of Bromeliads",
version="Version 4",
publisher="Utrecht University Botanic Gardens",
--postscript = '',
},
customArgs = { exclude = "id,authority,family,genus,species,list,1",
baseURL = "https://bromeliad.nl/",
searchStr ="encyclopedia/index.php?find=",
defaultSuffix = "",
defaultTitle = "Encyclopaedia of Bromeliads, Version 4"
}
--id = function(id) return p.genericIdCitation (, title, url)
}
-- https://bromeliad.nl/encyclopedia/index.php?find=Hylaeaicum
data.bromeliad.search = function(search)  
local title = search -- as default value
local url = data.bromeliad.customArgs['baseURL'] .. data.bromeliad.customArgs['searchStr'] .. search
return title, url
end
-- http://bromeliad.nl/species/Bromeliaceae
data.bromeliad.taxon = function(taxon)  
local title = addAuthority(taxon) -- as default value
local url = data.bromeliad.customArgs['baseURL'] .. "species/" .. taxon
return title, url
end
-- genus
data.bromeliad.genus = function(genus)  
local title = addAuthority("*" .. genus .. "*") -- as default value
local url = data.bromeliad.customArgs['baseURL'] .. "species/" .. genus
if templateArgs['list'] == "species" then
url = data.bromeliad.customArgs['baseURL'] .. "encyclopedia/brome.php?action=showSpeciesIndex&name=" .. genus .. "&flags="
end
return title, url
end
---
data.bromeliad.species = function(genus, species)  
local title = addAuthority("*" .. genus .. " " .. species .. "*") -- as default value
local url = data.bromeliad.customArgs['baseURL'] .. "species/" .. genus .. "/" .. species
return title, url
end  
-- https://bromeliad.nl/encyclopedia/brome.php?action=showTaxon&id=10093
data.bromeliad.id = function(id)  
local title = id -- as default value
local url = data.bromeliad.customArgs['baseURL'] .. "encyclopedia/brome.php?action=showTaxon&id=" .. id
return title, url
end  
--GRIN
Cite as: USDA, Agricultural Research Service, National Plant Germplasm System. 2021. Germplasm Resources Information Network (GRIN Taxonomy). National Germplasm Resources Laboratory, Beltsville, Maryland.
URL: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomyfamily?type=tribe&id=1571. Accessed 27 October 2021.
Family record: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomyfamily?id=440
Genus list: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomygenuslist?id=440&type=family
Subfamily record: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomyfamily?type=subfamily&id=1507
Genus list: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomygenuslist?id=3265&type=subfamily
Tribe record: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomyfamily?type=tribe&id=1551 (Millettieae)
Genus list: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomygenuslist?id=1551&type=tribe
Subtribe record: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomyfamily?type=subtribe&id=1507
Genus list: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomygenuslist?id=1507&type=subtribe
Genus record: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomygenus?id=191 (Genus Adenodolichos Harms)
Species list: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomyspecieslist?id=191&type=genus
Species record: https://npgsweb.ars-grin.gov/gringlobal/taxon/taxonomydetail?id=489203 ( Adenodolichos paniculatus)  
data.GRIN = {
citationArgs = {
website="Germplasm Resources Information Network (GRIN)",
publisher="Agricultural Research Service (ARS), United States Department of Agriculture (USDA)",
--postscript = '',
},
customArgs = { exclude = "id,authority,family,genus,species,1",
baseURL = "https://npgsweb.ars-grin.gov/gringlobal",
searchStr ="/taxon/taxonomydetail?", -- for species record
defaultSuffix = "",
defaultTitle = "GRIN-Global"
}
--id = function(id) return p.genericIdCitation (, title, url)
}
data.GRIN.id = function(id)
local title = data.GRIN.customArgs['defaultTitle'] .. ' ' .. id
local url = data.GRIN.customArgs['baseURL'] .. data.GRIN.customArgs['searchStr'] .. id
return title, url
end  
-- IPNI
--→ "Meconopsis Vig." International Plant Names Index (IPNI). Royal Botanic Gardens, Kew.
--- https://www.ipni.org/n/30149252-2
--- as  
data.IPNI = {
citationArgs = {
website="International Plant Names Index (IPNI)",
publisher="Royal Botanic Gardens, Kew",
--postscript = '',
},
customArgs = { exclude = "id,authority,family,genus,species,1",
baseURL = "https://www.ipni.org",
searchStr ="/n/",
defaultSuffix = "",
defaultTitle = "IPNI"
}
--id = function(id) return p.genericIdCitation (, title, url)
}
data.IPNI.id = function(id)
local title = id
local url = data.IPNI.customArgs['baseURL'] .. data.IPNI.customArgs['searchStr'] .. id
return title, url
end
data.IPNI.species = function(genus, species) return data.IPNI.taxon(genus .. " " .. species, "TITLE_ITALICS") end
data.IPNI.genus = function(genus) return data.IPNI.taxon(genus, "TITLE_ITALICS") end
data.IPNI.taxon = function(taxon, italics)
local title = taxon
if italics then title = "*" .. title .. "*" end
title = addAuthority(title)
--[[ if templateArgs['authority'] then
title = title .. " " .. templateArgs['authority']
title = string.gsub( title, "(.*%.)$", "((%1))") -- if authority ends in "." enclose ((title)) to prevent removal
end ]]
local url = data.IPNI.customArgs['baseURL'] .. data.IPNI.customArgs['searchStr'] .. templateArgs['id']
return title, url
end  
--World Flora Online
http://www.worldfloraonline.org/taxon/wfo-4000012284 -- id  
data.WFO = {
citationArgs = {
website="World Flora Online",
--publisher="Missouri Botanical Gardens",
--postscript = '',
},
customArgs = { exclude = "id,family,genus,species,authority,1",
baseURL = "http://www.worldfloraonline.org",
searchStr ="/taxon/wfo-", -- not strictly search string
defaultSuffix = "",
--defaultTitle = "World Flora Online"
defaultTitle = "An Online Flora of All Known Plants"
}  
}
data.WFO.id = function(id)