模組:Taxonbar/confdoc
外观
此模块使用Lua语言: |
相关页面 |
---|
About
[编辑]This module allows Module:Taxonbar/conf to automatically update its own documentation table of Wikidata taxon ID properties on Template:Taxonbar/doc.
Usage
[编辑]{{#invoke:Taxonbar/confdoc|confdoc}}
Output
[编辑]{{#invoke:Taxonbar/confdoc|confdoc}}
参数 | 维基数据ID | 数据库 | 说明 |
---|---|---|---|
aba | P4526 | identifier for a bird taxon, issued by the American Birding Association | |
adw | P4024 | 动物多样性网(ADW)上赋予各动物分类单元的识别码(标识符) | |
afd | P6039 | 澳大利亞動物名錄網站中賦予各動物分類單元的識別碼(標識符) | |
afromoths | P6093 | identifier for a species on the AfroMoths website | |
algaebase | P1348 | 網站AlgaeBase的連結網址 | |
amphibiaweb | P5036 | 两栖动物网数据库中赋予某个物种的识别码 | |
antweb | P5299 | AntWeb生物分类标识符 | |
aoi | P5003 | 在“印度两栖动物”数据库中,一种两栖类物种的标识符 | |
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 | 澳大利亚植物名称索引(APNI)中的植物标识符 | |
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 | ARKive 数据库中分类单元的标识符 | |
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 | 生物多样性历史文献图书馆 | 生物多样性历史文献图书馆(BHL)中赋予各文献页面的识别码 |
biolib | P838 | 生物分类学数据库BioLib中赋予各分类单元的识别码 | |
birdlife | P5257 | 国际鸟盟数据库为该鸟类分配的标识符 | |
birdlife-australia | P6040 | identifier for a species on the BirdLife Australia website | |
bold | P3606 | 在boldsystems.org 中分类单元的标识符 | |
bto | P4798 | identifier for a bird species or sub-species in the BTO Birds of Britain/ BirdFacts database | |
bugguide | P2464 | BugGuide数据库中赋予各分类单元的识别码 | |
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 | |
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) | |
col-taiwan | P3088 | 臺灣物種名錄 | 舊版臺灣物種名錄(taibnet.sinica.edu.tw)中賦予每個物種及種下分類單元的編號 |
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 | 网络生命大百科项目参考编号 | |
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 | 此物種或亞種在Euring數據庫的編號 | |
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 | 世界鱼类数据库(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 | 中国植物志英文版(Flora of China)中分类单元的标识符 |
foio | P3795 | identifier for a plant taxon or cultivar in the Flora of Israel Online database | |
fossilworks | P842 | Fossilworks数据库中赋予各分类单元的识别码 | |
fungorum | P1391 | Index Fungorum | Index Fungorum数据库中赋予各真菌分类单元的识别码(标识符) |
gbif | P846 | 全球生物多样性信息网络(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 | 在古生代菊石在线数据库系统中,一个分类群的标识符 | |
grassbase | P1832 | 草基地中的標識符 - 在線世界草地植物群 | |
grin | P1421 | GRIN 植物分类学 | 網站美國種質資源信息網絡的網址 |
ibc | P3099 | identifier for a species of bird, in the Internet Bird Collection database | |
ictv | P1076 | ||
inaturalist | P3151 | iNaturalist数据库中赋予各分类单元的识别码(标识符) | |
ipa | P6161 | identifier for a species on the Invasive Plant Atlas of the United States website | |
ipni | P961 | 国际植物名称索引数据库(IPNI)中赋予各植物分类单元的识别码 | |
irmng | P5055 | 海洋和非海洋属临时登记簿 (IRMNG) 数据库中的学名标识符 | |
isc | P5698 | identifier for a taxon datasheet in the Invasive Species Compendium, produced by the Centre for Agriculture and Bioscience International | |
itis | P815 | 整合分类学信息系统(ITIS)中赋予某个分类单元的识别码 | |
iucn | P627 | 國際自然保護聯盟數據庫中一個分類單元的標識符; 保護狀態來源 | |
lepindex | P3064 | 全球鳞翅目名称索引 | 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 | 原核生物标准命名列表 | URL for the website List of Prokaryotic names with Standing in Nomenclature (LPSN) |
mantodea species file | P6055 | identifier for a taxon on the Mantodea Species File website | |
michiganflora | P6103 | 密歇根州植物園網站上物種的標識符 | |
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 | 霍奇斯名录(即“墨西哥以北美洲鳞翅目核对名录”,以及随后的修订版)中的鳞翅目物种的标识符 | |
msw | P959 | 来自世界哺乳动物物种数据库的标识符 | |
mycobank | P962 | 提供权威和全面的真菌名称列表的 MycoBank 数据库给予的编号 | |
nas | P6163 | identifier for a species in the Nonindigenous Aquatic Species database, on the U.S. Geological Survey website | |
nbn | P3240 | identifier of a taxon in the National Biodiversity Network (UK) | |
ncbi | P685 | 美国国家生物技术信息中心生物分类编号 | |
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 | |
obis | P6754 | identifier for a taxon, in the Ocean Biogeographic Information System | |
odnr | P6289 | identifier for a taxon in the Species Guide Index of the Ohio Department of Natural Resources website | |
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 | 全球植物名录数据库(The Plant List)中赋予每个物种及种下分类单元的标识符(识别码) | |
plants | P1772 | 美国农业部植物数据库中的标识符 | |
plazi | P1992 | identifier for a taxon treatment at Plazi.org | |
powo | P5037 | 世界植物在线数据库(Plants of the World online)中赋予各植物分类单元的标识符(识别码) | |
rd | P5473 | 爬行动物数据库中所有现存爬行动物物种的标识符 | |
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 | Species+ 数据库中赋予某个分类单元的识别码 | |
sprat | P2455 | 澳大利亚政府环境部管理的物种概况和威胁数据库的标识符 | |
steere | P6035 | identifier for a taxon on the Steere Herbarium website | |
tree of life | P5221 | 生命之树网络项目赋予某个分类单元的识别码 | |
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 | 在uBio“Namebank”数据库中的分类群的标识符 | |
vascan | P1745 | identifier for a taxon in the Database of Vascular Plants of Canada | |
watson | P1761 | familyID in Watson & Dallwitz: The families of flowering plants | |
wcsp | P3591 | 世界选定植物科别目录中赋予某个分类单元的识别码 | |
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 | 世界在线植物志(World Flora Online)中赋予每个植物分类单元的标识符(识别码) | |
worms | P850 | 世界海洋物种目录数据库(WoRMS)中赋予各分类单元的标识符 | |
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 | 動物園銀行(ZooBank )上的名稱或命名行為的標識符 |
Wikidata link information
[编辑]{{#invoke:Taxonbar/confdoc|wikidataInfo
require('strict')
local conf = require( "Module:Taxonbar/conf" ) -- configuration module
local p = {}
function p.confdoc( frame )
local wikitable = mw.html.create('table')
wikitable:addClass('wikitable sortable')
:tag('caption')
:wikitext('按参数名称排列的分类单元识别码')
:done()
:tag('tr')
:tag('th')
:wikitext('参数')
:tag('th')
:attr('data-sort-type', 'number')
:css('white-space', 'nowrap')
:wikitext('维基数据ID')
:tag('th')
:wikitext('数据库')
:tag('th')
:wikitext('说明')
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' ..
'! 参数 !! 维基数据ID !! 数据库 !! 示例 !! 数据类型 !! 格式化URL(或等效字符串)及示例'
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 = "无格式化URL(P1630)。"
if datatype == "url" then url = url .. "外部数据库的ID即为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/>网站:' .. officialWebsite.mainsnak.datavalue.value
end
else
url = url .. '或该属性(P1629)的官方网站(P856)'
-- 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/>使用第三方URL:' .. thirdPartyURL
else
url = url .. '或第三方格式化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 "超出计数" 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 .. "无示例"
end
else
examples = examples .. "无示例陈述"
end
end
return examples, links
end
return p