Modulo:Taxonbar/confdoc
Dokumentasion ti modulo
Agkamkammatalek daytoy a modulo kadagiti sumaganad a modulo: |
Panggep
urnosenDaytoy a modulo ket mangipalubos iti Module:Taxonbar/conf nga automatiko a mangpabaro ti bukodna a tabla ti dokumentasion kadagiti tagikua ti ID ti takson ti Wikidata iti Plantilia:Taxonbar/dok.
Panagusar
urnosen{{#invoke:Taxonbar/confdoc|confdoc}}
Miparuar
urnosen{{#invoke:Taxonbar/confdoc|confdoc}}
Parametro | ID ti Wikidata | Autoridad | Deskripsion |
---|---|---|---|
aba | P4526 | identifier for a bird taxon, issued by the American Birding Association | |
adw | P4024 | identifier for a taxon in the Animal Diversity Web database | |
afd | P6039 | identifier for a taxon on the Australian Faunal Directory website | |
afromoths | P6093 | identifier for a species on the AfroMoths website | |
algaebase | P1348 | URL for a taxon in AlgaeBase.org | |
amphibiaweb | P5036 | identifier for a species, in the AmphibiaWeb database | |
antweb | P5299 | identifier for a taxon in the AntWeb database | |
aoi | P5003 | identifier for a species of amphibian in the Amphibians of India database | |
aofp | P6159 | identifier for a species on the Atlas of Florida Plants website | |
apa | P6137 | identifier for a species on the Alabama Plant Atlas website | |
apdb | P2036 | identifier for a plant taxon, in the Conservatoire et Jardin botaniques de Genève's African Plant Database of scientific names | |
apni | P5984 | identifier for a plant, in the Australian Plant Name index | |
apsa | P2809 | identifier for a pollen or spore in the Australasian Pollen and Spore Atlas, managed by the Australian National University | |
araneae | P3594 | identifier for a taxon in araneae.nmbe.ch | |
arkive | P2833 | identifier for a taxon, in the ARKive database | |
asw | P5354 | identifier for a taxon in the Amphibian Species of the World database | |
atrf | P6904 | Australian Tropical Rainforest Plants | identifier for a plant taxon, in the Australian Tropical Rainforest plants database |
ausfungi | P9076 | identifier for a taxon (a fungus), in the Australian 'Fungi' database | |
auslichen | P9093 | identifier for a taxon (a lichen), in the Australian Lichen database | |
avibase | P2026 | identifier for a species, subspecies, or genus in the global bird database Avibase | |
bacdive | P2946 | identifier for a microorganism, in the BacDive database | |
bamona | P3398 | identifier for taxa in the "Butterflies and Moths of North America" database | |
bhl | P687 | Biodiversity Heritage Library | identifier for a page in the Biodiversity Heritage Library (BHL) |
biolib | P838 | identifier for a taxon in the biological encyclopedia BioLib | |
birdlife | P5257 | identifier for an avian taxon, in the BirdLife factsheet database | |
birdlife-australia | P6040 | identifier for a species on the BirdLife Australia website | |
bold | P3606 | identifier for a taxon in boldsystems.org | |
bto | P4798 | identifier for a bird species or sub-species in the BTO Birds of Britain/ BirdFacts database | |
bugguide | P2464 | identifier in BugGuide.net | |
butmoth | P3060 | identifier for a butterfly or moth genus in the UK Natural History Museum's 'Butterflies and Moths of the World' database | |
calflora | P3420 | identifier for a taxon in Calflora | |
cal-ipc | P6176 | identifier for a species on the California Invasive Plant Council website | |
col | P10585 | identifier of a taxon or synonym in the Catalogue of Life | |
center | P6003 | identifier for a taxon on the Center for Biological Diversity website | |
cms | P6033 | identifier for a taxon on the 'Convention on the Conservation of Migratory Species of Wild Animals' website | |
cnps | P4194 | identifier in the California Native Plant Society database | |
cockroach species file | P6052 | identifier for a taxon on the Cockroach Species File website (old archived version) | |
conifers | P1940 | identifier for a taxon in the conifers.org database | |
coreoidea species file | P6053 | identifier for a taxon on the Coreoidea Species File website | |
bow | P3444 | identifier for a species or subspecies, in the eBird database | |
ebird | P3444 | identifier for a species or subspecies, in the eBird database | |
ecocrop | P4753 | identifier of a plant used as an agricultural crop in the Ecocrop database | |
ecos | P6030 | identifier for a taxon on the United States' 'Environmental Conservation Online System' website | |
eflorasa | P6933 | identifier for a plant taxon, in the Australian 'South Australian electronic Flora' database | |
eol | P830 | numero ti reperensia ti banag ti eol.org | |
eppo | P3031 | identifier for a taxon in the EPPO Global Database | |
eunis | P6177 | identifier for a species on the European Nature Information System website | |
euring | P3459 | identifier for a species or subspecies, in the EURING database | |
faunaeuropaea | P1895 | identifier for a taxon in Fauna Europaea | |
faunaeuropaeanew | P4807 | identifier for a taxon at the Fauna Europaea portal launched end of 2016 | |
feis | P6044 | identifier for a taxon on the Fire Effects Information System website | |
fishbase | P938 | identifier for a species in FishBase | |
florabase | P3101 | identifier for a plant taxon, in the Government of Western Australia's FloraBase database | |
flow | P6096 | identifier for a species on the Fulgoromorpha Lists On the Web website | |
fna | P1727 | identifier for a taxon in the Flora of North America database | |
foao | P3100 | identifier for a plant taxon, in the Flora of Australia Online | |
foao2 | P6756 | identifier for a plant taxon, in an Australian Commonwealth database | |
foc | P1747 | Flora of China | identifier for a taxon in Flora of China (English-language revision of Flora Reipublicae Popularis Sinicae) |
foio | P3795 | identifier for a plant taxon or cultivar in the Flora of Israel Online database | |
fossilworks | P842 | identifier for an animal, plant, or microorganism in the Fossilworks database | |
fungorum | P1391 | Index Fungorum | identifier for a fungus taxon in Index Fungorum |
gbif | P846 | taxon identifier in GBIF | |
gisd | P5626 | identifier for a taxon in the IUCN's Global Invasive Species Database | |
gnab | P4715 | identifier for a bird taxon in the Guide to North American Birds on the National Audubon Society website | |
goniat | P5216 | identifier for a taxon, in the GONIAT database | |
grassbase | P1832 | identifier in GrassBase - The Online World Grass Flora | |
grin | P1421 | GRIN Taxonomy for Plants | URL for a taxon in the GRIN website |
ibc | P3099 | identifier for a species of bird, in the Internet Bird Collection database | |
inaturalist | P3151 | identifier in iNaturalist | |
ipa | P6161 | identifier for a species on the Invasive Plant Atlas of the United States website | |
ipni | P961 | numerical identifier for a plant name in the International Plant Names Index | |
irmng | P5055 | identifier of a scientific name, in the Interim Register of Marine and Nonmarine Genera (IRMNG) database | |
isc | P5698 | identifier for a taxon datasheet in the Invasive Species Compendium, produced by the Centre for Agriculture and Bioscience International | |
itis | P815 | identifier for a taxon in the Integrated Taxonomic Information System | |
iucn | P627 | identifier for a taxon in the International Union for Conservation of Nature database; source for conservation status (P141) | |
lepindex | P3064 | The Global Lepidoptera Names Index | identifier for a Lepidoptera taxon, in the UK Natural History Museum's 'Global Lepidoptera Names Index' |
lob | P5862 | identifier in the Catalogue of Lepidoptera of Belgium | |
lpsn | P1991 | LPSN | URL for the website List of Prokaryotic names with Standing in Nomenclature (LPSN) |
lygaeoidea species file | P11311 | Lygaeoidea Species File | identifier for a taxon on the Lygaeoidea Species File website |
mantodea species file | P6055 | identifier for a taxon on the Mantodea Species File website | |
michiganflora | P6103 | identifier for a species on the Michigan Flora website | |
mobotpf | P6034 | identifier for a taxon in Plant Finder, on the Missouri Botanical Garden website | |
mol | P6092 | identifier for a taxon on the Map of Life website | |
mnhn | P6046 | identifier for a taxon on the Muséum national d'histoire naturelle website | |
mona | P4758 | identifier for a Lepidoptera species, in the Hodges List (i.e. the "Check List of the Lepidoptera of America North of Mexico", with subsequent revisions) | |
msw | P959 | identifier from Mammal Species of the World database | |
mycobank | P962 | identifier per MycoBank - a database that provides an authoritative and comprehensive list of names of fungi | |
nas | P6163 | identifier for a species in the Nonindigenous Aquatic Species database, on the U.S. Geological Survey website | |
natureserve | P10243 | identifier of a species or ecosystem in the Americas in the NatureServe Explorer database | |
nbn | P3240 | identifier of a taxon in the National Biodiversity Network (UK) | |
ncbi | P685 | identifier for a taxon in the Taxonomy Database by the National Center for Biotechnology Information | |
neotropical | P6047 | identifier for a taxon on the Neotropical Birds website | |
noaa | P6049 | identifier for a species on the NOAA Fisheries website | |
nswflora | P3130 | identifier for a plant taxon, in the NSW Flora Online | |
ntflora | P5953 | identifier for a plant taxon, in the Northern Territory (Australia) 'NT Flora' database | |
nzbo | P6048 | identifier for a species on the New Zealand Birds Online website | |
nzor | P2752 | identifier for a taxon names in the New Zealand Organisms Register | |
nzpcn | P7496 | ID of a plant taxon held by the New Zealand Plant Conservation Network | |
odnr | P6289 | identifier for a taxon in the Species Guide Index of the Ohio Department of Natural Resources website | |
ottol | P9157 | Open Tree of Life | identifier for an entity in Open Tree of Life, a comprehensive, dynamic and digitally-available tree of life by synthesizing published phylogenetic trees along with taxonomic data |
orthoptera species file | P6050 | identifier for a taxon on the Orthoptera Species File Online website (old version now archived) | |
paldat | P4122 | identifier for a plant species in the Palynological Database (PalDat) for pollen of the University of Vienna | |
panartic | P2434 | identifier for a taxon in the Panarctic Flora | |
pfaf | P4301 | identifier for a plant taxon, in the Plants For A Future database of uses of plants and their parts | |
pfi | P6114 | identifier for a species on the Portal to the Flora of Italy website | |
phasmida species file | P4855 | identifier for a Phasmida taxon, in the Phasmida SpeciesFile website | |
ppe | P6061 | identifier for a taxon at the Plant Parasites of Europe database | |
plantlist | P1070 | identifier in The Plant List database from the Royal Botanic Gardens, Kew | |
plants | P1772 | identifier in the United States Department of Agriculture PLANTS Database | |
plazi | P1992 | identifier for a taxon treatment at Plazi.org | |
powo | P5037 | identifier of a (vascular) plant name in the Plants of the World online database | |
psocodea species file | P8145 | numerical identifier for a taxon on the Psocodea Species File project | |
rd | P5473 | identifier for all living reptile species in The Reptile Database | |
rhs | P8765 | identifier for plants listed on the Royal Horticultural Society website | |
sanbi | P6056 | identifier for a species on the Red List of South African Plants website | |
scc | P6057 | identifier for a taxon at the Systematic Catalog of Culicidae | |
sealifebase | P6018 | identifier for a taxon on the SeaLifeBase website | |
seinet | P6209 | identifier for a species on the SEINet website | |
species+ | P2040 | identifier for a taxon in the Species+ database (CITES) | |
sprat | P2455 | identifier from Species Profile and Threats Database managed by Australian Government Department of the Environment | |
steere | P6035 | identifier for a taxon on the Steere Herbarium website | |
tree of life | P5221 | identifier in the Tree of Life Web Project | |
tropicos | P960 | identifier for a taxon name in the Tropicos database | |
tsa | P5397 | identifier for a species in the Animal Sound Archive Berlin | |
ubio | P4728 | identifier for a taxon, in the uBio 'Namebank' database | |
vascan | P1745 | identifier for a taxon in the Database of Vascular Plants of Canada | |
vicflora | P5945 | identifier for a plant taxon, in the Australian 'Flora of Victoria' database | |
watson | P1761 | familyID in Watson & Dallwitz: The families of flowering plants | |
wio | P6285 | identifier for a taxon on the Weeds in Ontario website | |
wisflora | P6227 | identifier for a taxon on the Flora of Wisconsin website | |
woi | P3746 | identifier of a taxon in the Wildflowers of Israel database | |
wfo | P7715 | identifier for a plant in World Flora Online | |
worms | P850 | identifier in the World Register of Marine Species | |
wsc | P3288 | identifier of a taxon in the World Spider Catalog | |
xeno-canto | P2426 | identifier of a bird species in the Xeno-canto database | |
zoobank | P1746 | identifier for a name or nomenclatural act at ZooBank |
Pakaammo ti silpo ti Wikidata
urnosen{{#invoke:Taxonbar/confdoc|wikidataInfo
require('strict')
local conf = require( "Modulo:Taxonbar/conf" ) -- configuration module
local p = {}
function p.confdoc( frame )
local wikitable = mw.html.create('table')
wikitable:addClass('wikitable sortable')
:tag('caption')
:wikitext('Dagiti panangilasin ti takson babaen ti nagan ti parametro')
:done()
:tag('tr')
:tag('th')
:wikitext('Parametro')
:tag('th')
:attr('data-sort-type', 'number')
:css('white-space', 'nowrap')
:wikitext('ID ti Wikidata')
:tag('th')
:wikitext('Autoridad')
:tag('th')
:wikitext('Deskripsion')
local format = string.format
for _, db in pairs( conf.databases ) do
local prop = db[3]
if type(prop) == 'number' and prop > 0 then
local param = mw.ustring.lower(db[1])
local row = mw.html.create('tr')
row
:tag('td')
:wikitext(param)
:tag('td')
:attr('data-sort-value', prop)
:wikitext(format('[[d:Property:P%d|P%d]]', prop, prop))
-- {{#statements:P1629|from=P{{{1|}}}}}
:tag('td')
:wikitext(frame:callParserFunction{
name = '#statements:P1629',
args = { from = 'P' .. prop }
})
:tag('td')
:wikitext(mw.wikibase.getDescription('P' .. prop))
wikitable:node(row)
end
end
return wikitable
end
--[[ p.wikidataInfo( frame )
-function to show formatURL and id for taxonomic databases
]]
local COUNTER_MAX = 390
local counter = 0 --expensive parser function counter
function p.wikidataInfo( frame )
counter = frame.args['counter'] or COUNTER_MAX -- prevent too many expensive calls
local start = frame.args['start'] or "a"
local finish = frame.args['finish'] or "zzz"
local wikitable = '{| class="wikitable sortable"\n' ..
'|-\n' ..
'! Parametro !! ID ti Wikidata !! Database !! Dagiti wadan !! datatype !! formatterURL (wenno alternatibo) ken dgaiti wadan'
for _, db in pairs( conf.databases ) do
local param = mw.ustring.lower(db[1])
local link = db[2]
local prop = db[3]
local id = 'id'
local url = 'url'
local datatype = ""
local examples = ""
local links = ""
local formatterURL = ""
if type(prop) == 'number' and prop > 0 and param > start and param < finish then
local item = mw.wikibase.getEntity('P'..prop) --('P5354')
counter = counter - 1
if item and item ~= "" then
datatype = item.datatype
local statements = item:getBestStatements('P1630')[1]
if statements and statements.mainsnak and statements.mainsnak.datavalue and statements.mainsnak.datavalue.value then
formatterURL = statements.mainsnak.datavalue.value
url = formatterURL
else
url = "No formatter URL (P1630)."
if datatype == "url" then url = url .. " The id of the external database is the url." end
local subjectItem = item:getBestStatements('P1629')[1]
if subjectItem then
local officialWebsite = mw.wikibase.getEntity(subjectItem.mainsnak.datavalue.value.id):getBestStatements('P856')[1]
counter = counter - 1
if officialWebsite then
url = url .. '<br/>website: ' .. officialWebsite.mainsnak.datavalue.value
end
else
url = url .. ' or official website (P856) of wikidata item of this property (P1629)'
-- use third-party formatter URL. e.g for Euring number (P3459)
local statements = item:getBestStatements('P3459')[1]
if statements and statements.mainsnak and statements.mainsnak.datavalue and statements.mainsnak.datavalue.value then
local thirdPartyURL = statements.mainsnak.datavalue.value
url = url ..'<br/>use third party url: ' .. thirdPartyURL
else
url = url .. ' or third party formatter url (P3459) '
end
end
end
examples, links = p.getExamples( item, prop, formatterURL, datatype )
end
wikitable = wikitable .. '\n' .. '|-'
.. '\n|' .. param
.. '\n|' .. '[[:d:Property:P' .. prop .. '|P' .. prop .. ']]'
.. '\n|' .. link
.. '\n|' .. examples
.. '\n|' .. datatype
.. '\n|' .. url .. '\n{{smalldiv|1=' .. links .. '}}'
end
end
return wikitable .. '\n|}'
end
function p.getExamples( propItem , prop, formatterURL, datatype)
if counter < 0 then return "count exceeded" end
local examples = ""
local links = ""
local exampleStatements = propItem:getBestStatements('P1855')
local nExamples = 0
--local statement = statements[1]
for _, statement in pairs( exampleStatements ) do
if nExamples == 3 then break end -- don't show more than 3 examples
if statement.mainsnak and statement.mainsnak.datavalue and statement.mainsnak.datavalue.value then
local examplesValue = statement.mainsnak.datavalue.value
if examplesValue and examplesValue.id then
local exampleID = examplesValue.id
--examples = examples .. '\n*[[:d:' .. exampleID .. '|' .. exampleID ..']] '
local label = mw.wikibase.getLabel( exampleID )
examples = examples .. '\n*[[' .. label .. ']] ([[:d:' .. exampleID .. '|' .. exampleID ..']])'
-- get information form qualifiers
if statement.qualifiers then
local qualifiers = statement['qualifiers']
local value = qualifiers['P'..prop][1] --['datavalue']['value']
--mw.addWarning (mw.wikibase.formatValues( qualifiers ))
--mw.addWarning (mw.wikibase.renderSnaks( qualifiers ))
-- mw.addWarning (mw.wikibase.formatValue( value ))
--mw.addWarning ( mw.wikibase.renderSnak( value ))
local id = mw.wikibase.renderSnak( value )
examples = examples .. '<br/><small>id=<code>' .. id .. '</code></small>'
local link = formatterURL:gsub('$1', id)
if (datatype == "url") then link = id end
links = links .. '\n*' .. link .. ''
end
--[==[ -- this method is expensive as it calls getEntity
local item = mw.wikibase.getEntity(exampleID)
counter = counter - 1
nExamples = nExamples + 1
if item and item ~= "" then
--datatype = item.datatype
local statements = item:getBestStatements('P225')[1] -- taxon name
if statements and statements.mainsnak and statements.mainsnak.datavalue and statements.mainsnak.datavalue.value then
local taxon = statements.mainsnak.datavalue.value
examples = examples .. ' [[' .. taxon .. ']]'
end
local statements = item:getBestStatements('P'..prop)[1] -- the databas property
if statements and statements.mainsnak and statements.mainsnak.datavalue and statements.mainsnak.datavalue.value then
local id = statements.mainsnak.datavalue.value
local link = formatterURL:gsub('$1', id)
if (datatype == "url") then link = id end
examples = examples .. ' (' .. id .. ')'
links = links .. '\n*' .. link .. ''
end
end
]==]
else
examples = examples .. "No example"
end
else
examples = examples .. "No examples statements"
end
end
return examples, links
end
return p