Модул:Wikidata/link — разлика између измена
Пређи на навигацију
Пређи на претрагу
Нема описа измене |
м (1 измена увезена) |
||
| Ред 1: | Ред 1: | ||
p = {} | p = {} | ||
function p.fromTemplate( frame ) | function p.fromTemplate( frame ) | ||
local args = frame.args; | local args = frame.args; | ||
local propertyId = args[1]; | |||
local id = args[2]; | |||
return p[propertyId]( nil, nil, id ); | |||
end | end | ||
function p. | function p.p163( context, options, id ) | ||
return | return '[[' .. id .. '|Флаг]]'; | ||
end | end | ||
function p. | function p.p212( context, options, id ) | ||
return '[[Special:Booksources/' .. id .. '|' .. id .. ']]'; | |||
end | |||
function p.p231( context, options, id ) | |||
return '[http://www.chemnet.com/cas/supplier.cgi?exact=dict&terms=' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p237( context, options, id ) | |||
return '[[' .. id .. '|Герб]]'; | |||
end | |||
return id | function p.p247( context, options, id ) | ||
return '[http://nssdc.gsfc.nasa.gov/nmc/spacecraftOrbit.do?id=' .. id .. ' ' .. id .. ']'; | |||
end | end | ||
function p. | function p.p267( context, options, id ) | ||
return | local frame = mw.getCurrentFrame() | ||
return frame:expandTemplate{ title = 'АТХ', args = { id } }; | |||
end | end | ||
function p. | function p.p296( context, options, id ) | ||
return '[http://osm.sbin.ru/esr/esr:' .. id .. ' ' .. id .. ']'; | |||
end | end | ||
function p. | function p.p345( context, options, id ) | ||
local number = string.sub( id, 3 ) | |||
local | local label = 'ID ' .. number | ||
if string.match( id, '^ch' ) then | |||
local label = ' | |||
if | |||
return '[[IMDbCharacter:' .. number .. '|' .. label .. ']]' | return '[[IMDbCharacter:' .. number .. '|' .. label .. ']]' | ||
end | end | ||
if | if string.match( id, '^co' ) then | ||
return '[[IMDbCompany:' .. number .. '|' .. label .. ']]' | return '[[IMDbCompany:' .. number .. '|' .. label .. ']]' | ||
end | end | ||
if | if string.match( id, '^nm' ) then | ||
return '[[IMDbName:' .. number .. '|' .. label .. ']]' | return '[[IMDbName:' .. number .. '|' .. label .. ']]' | ||
end | end | ||
if | if string.match( id, '^tt' ) then | ||
return '[[IMDbTitle:' .. number .. '|' .. label .. ']]' | return '[[IMDbTitle:' .. number .. '|' .. label .. ']]' | ||
end | end | ||
| Ред 64: | Ред 56: | ||
end | end | ||
function p. | function p.p377( context, options, id ) | ||
return '[http://www.n2yo.com/satellite/?s=' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p628( context, options, id ) | |||
return '[http://www.codexalimentarius.net/gsfaonline/additives/results.html?searchBy=ins&ins=' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p661( context, options, id ) | |||
return '[//www.chemspider.com/Chemical-Structure.' .. id .. '.html ' .. id .. ']'; | |||
end | |||
function p.p662( context, options, id ) | |||
return '[http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p685( context, options, id ) | |||
return '[http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p715( context, options, id ) | |||
return '[http://www.drugbank.ca/drugs/DB' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p721( context, options, id ) | |||
local label = ''; | local label = ''; | ||
for i = mw.ustring.len( id ), 1, -3 do | for i = mw.ustring.len( id ), 1, -3 do | ||
| Ред 79: | Ред 95: | ||
end | end | ||
function p. | function p.p764( context, options, id ) | ||
local label = ''; | local label = ''; | ||
for i = mw.ustring.len( id ), 1, -3 do | for i = mw.ustring.len( id ), 1, -3 do | ||
| Ред 94: | Ред 110: | ||
end | end | ||
function p. | function p.p815( context, options, id ) | ||
return '[http://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value=' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p830( context, options, id ) | |||
return '[http://www.eol.org/pages/' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p884( context, options, id ) | |||
return '[http://vwo.osm.rambler.ru/?page=findname&name=' .. id .. ' ' .. id .. ']'; | |||
end | end | ||
function p. | function p.p957( context, options, id ) | ||
return '[[Special:Booksources/' .. id .. '|' .. id .. ']]'; | return '[[Special:Booksources/' .. id .. '|' .. id .. ']]'; | ||
end | end | ||
function p. | function p.p961( context, options, id ) | ||
return '[http://www.ipni.org/ipni/idPlantNameSearch.do?id=' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p962( context, options, id ) | |||
return '[http://www.mycobank.org/Biolomics.aspx?Table=Mycobank&MycoBankNr_=' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p959( context, options, id ) | |||
end | return '[http://www.bucknell.edu/msw3/browse.asp?id=' .. id .. ' ' .. id .. ']'; | ||
return | end | ||
function p.p1070( context, options, id ) | |||
return '[http://www.theplantlist.org/tpl1.1/record/' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p1146( context, options, id ) | |||
return '[http://www.iaaf.org/athletes/athlete=' .. id .. '/ ' .. id .. ']'; | |||
end | |||
function p.p1258( context, options, id ) | |||
return '[http://www.rottentomatoes.com/' .. id .. '/ подробнее]'; | |||
end | |||
function p.p1483( context, options, id ) | |||
return '[http://kulturnoe-nasledie.ru/monuments.php?id=' .. id .. ' ' .. id .. ']'; | |||
end | |||
function p.p1883( context, options, id ) | |||
return '[http://declarator.org/person/' .. id .. '/ ' .. id .. ']'; | |||
end | end | ||
return p; | return p; | ||
Верзија на датум 1. новембар 2020. у 14:02
Документацију овог модула можете да направите на страници Модул:Wikidata/link/док
p = {}
function p.fromTemplate( frame )
local args = frame.args;
local propertyId = args[1];
local id = args[2];
return p[propertyId]( nil, nil, id );
end
function p.p163( context, options, id )
return '[[' .. id .. '|Флаг]]';
end
function p.p212( context, options, id )
return '[[Special:Booksources/' .. id .. '|' .. id .. ']]';
end
function p.p231( context, options, id )
return '[http://www.chemnet.com/cas/supplier.cgi?exact=dict&terms=' .. id .. ' ' .. id .. ']';
end
function p.p237( context, options, id )
return '[[' .. id .. '|Герб]]';
end
function p.p247( context, options, id )
return '[http://nssdc.gsfc.nasa.gov/nmc/spacecraftOrbit.do?id=' .. id .. ' ' .. id .. ']';
end
function p.p267( context, options, id )
local frame = mw.getCurrentFrame()
return frame:expandTemplate{ title = 'АТХ', args = { id } };
end
function p.p296( context, options, id )
return '[http://osm.sbin.ru/esr/esr:' .. id .. ' ' .. id .. ']';
end
function p.p345( context, options, id )
local number = string.sub( id, 3 )
local label = 'ID ' .. number
if string.match( id, '^ch' ) then
return '[[IMDbCharacter:' .. number .. '|' .. label .. ']]'
end
if string.match( id, '^co' ) then
return '[[IMDbCompany:' .. number .. '|' .. label .. ']]'
end
if string.match( id, '^nm' ) then
return '[[IMDbName:' .. number .. '|' .. label .. ']]'
end
if string.match( id, '^tt' ) then
return '[[IMDbTitle:' .. number .. '|' .. label .. ']]'
end
return id;
end
function p.p377( context, options, id )
return '[http://www.n2yo.com/satellite/?s=' .. id .. ' ' .. id .. ']';
end
function p.p628( context, options, id )
return '[http://www.codexalimentarius.net/gsfaonline/additives/results.html?searchBy=ins&ins=' .. id .. ' ' .. id .. ']';
end
function p.p661( context, options, id )
return '[//www.chemspider.com/Chemical-Structure.' .. id .. '.html ' .. id .. ']';
end
function p.p662( context, options, id )
return '[http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=' .. id .. ' ' .. id .. ']';
end
function p.p685( context, options, id )
return '[http://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=' .. id .. ' ' .. id .. ']';
end
function p.p715( context, options, id )
return '[http://www.drugbank.ca/drugs/DB' .. id .. ' ' .. id .. ']';
end
function p.p721( context, options, id )
local label = '';
for i = mw.ustring.len( id ), 1, -3 do
if ( i ~= mw.ustring.len( id ) ) then
label = ' ' .. label;
end
if ( i - 2 <= 0 ) then
label = mw.ustring.sub( id, 0, i ) .. label;
else
label = mw.ustring.sub( id, i - 2, i ) .. label;
end
end
return '[http://classif.spb.ru/classificators/view/okt.php?st=A&kr=1&kod=' .. id .. ' ' .. label .. ']';
end
function p.p764( context, options, id )
local label = '';
for i = mw.ustring.len( id ), 1, -3 do
if ( i ~= mw.ustring.len( id ) ) then
label = ' ' .. label;
end
if ( i - 2 <= 0 ) then
label = mw.ustring.sub( id, 0, i ) .. label;
else
label = mw.ustring.sub( id, i - 2, i ) .. label;
end
end
return '[http://classif.spb.ru/classificators/view/tma.php?st=A&kr=1&kod=' .. id .. ' ' .. label .. ']';
end
function p.p815( context, options, id )
return '[http://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value=' .. id .. ' ' .. id .. ']';
end
function p.p830( context, options, id )
return '[http://www.eol.org/pages/' .. id .. ' ' .. id .. ']';
end
function p.p884( context, options, id )
return '[http://vwo.osm.rambler.ru/?page=findname&name=' .. id .. ' ' .. id .. ']';
end
function p.p957( context, options, id )
return '[[Special:Booksources/' .. id .. '|' .. id .. ']]';
end
function p.p961( context, options, id )
return '[http://www.ipni.org/ipni/idPlantNameSearch.do?id=' .. id .. ' ' .. id .. ']';
end
function p.p962( context, options, id )
return '[http://www.mycobank.org/Biolomics.aspx?Table=Mycobank&MycoBankNr_=' .. id .. ' ' .. id .. ']';
end
function p.p959( context, options, id )
return '[http://www.bucknell.edu/msw3/browse.asp?id=' .. id .. ' ' .. id .. ']';
end
function p.p1070( context, options, id )
return '[http://www.theplantlist.org/tpl1.1/record/' .. id .. ' ' .. id .. ']';
end
function p.p1146( context, options, id )
return '[http://www.iaaf.org/athletes/athlete=' .. id .. '/ ' .. id .. ']';
end
function p.p1258( context, options, id )
return '[http://www.rottentomatoes.com/' .. id .. '/ подробнее]';
end
function p.p1483( context, options, id )
return '[http://kulturnoe-nasledie.ru/monuments.php?id=' .. id .. ' ' .. id .. ']';
end
function p.p1883( context, options, id )
return '[http://declarator.org/person/' .. id .. '/ ' .. id .. ']';
end
return p;