Modul:Authority control/bakpasir: Perbedaan antara revisi
Konten dihapus Konten ditambahkan
Hidayatsrf (bicara | kontrib) Tidak ada ringkasan suntingan |
|||
(7 revisi perantara oleh satu pengguna lainnya tidak ditampilkan) | |||
Baris 1:
require('
local p = {}
Baris 13:
local catName = ''
if namespace == 0 then
catName = '
elseif namespace == 2 and not title.isSubpage then
catName = '
else
catName = '
end
return '[[
end
Baris 27:
mw.title.new(catName, 14).exists == false
then
return '[[
end
return ''
Baris 33:
function p.createRow( id, rawValues, link, links, withUid, specialCat, prefix)
local catName = '
if links then -- all links[] use withUid = false; no check needed
local row = ''
Baris 45:
row = row..'<span class="uid">'..l..'</span>'
else
row = row..'<span class="error">The '..id..' id '..rawValues[i]..' is not valid.</span>[[
end
end
Baris 56:
end
return '* <span class="error">The '..id..' id '..rawValues..' is not valid.</span>[[
end
Baris 98:
return false
end
return '[https://www.agsa.sa.gov.au/collection-publications/collection/creators/_/'..id..'/ '..(label or '
end
Baris 125:
return false
end
return '[https://authority.bibsys.no/authority/rest/authorities/html/'..id..' '..(label or '
end
Baris 133:
return false
end
return '[https://www.bildindex.de/document/obj'..id..' '..(label or 'Bildindex (
end
Baris 141:
return false
end
return '[http://www.bncatalogo.cl/F?func=direct&local_base=red10&doc_number='..id..' '..(label or '
end
Baris 152:
return false
end
return '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id='..id..' '..(label or '
end
Baris 164:
id = 'cb'..id
end
return '[https://catalogue.bnf.fr/ark:/12148/'..id..' '..(label or '
end
Baris 184:
return false
end
return '[http://www.biografischportaal.nl/en/persoon/'..id..' '..(label or '
end
Baris 192:
return false
end
return '[http://cantic.bnc.cat/registres/CUCId/'..id..' '..(label or '
end
Baris 200:
return false
end
return '[https://ci.nii.ac.jp/author/'..id..'?l=en '..(label or 'CiNii (
end
Baris 216:
return false
end
return '[http://esu.com.ua/search_articles.php?id='..id..' '..(label or '
end
Baris 243:
return false
end
return '[https://dib.cambridge.org/viewReadPage.do?articleId='..id..' '..(label or '
end
Baris 279:
return false
end
return '[https://d-nb.info/gnd/'..id..' '..(label or 'Integrated Authority File (
end
Baris 305:
return false
end
return '[https://opac.sbn.it/opacsbn/opac/iccu/scheda_authority.jsp?bid='..id..' '..(label or '
end
function p.iciaLink( id, label )
Baris 337:
return false
end
return '[https://www.pop.culture.gouv.fr/notice/joconde/'..id..' '..(label or 'Joconde (
end
Baris 355:
local lccnType = parts[1] ~= 'sh' and 'names' or 'subjects'
id = parts[1] .. parts[2] .. p.append( parts[3], '0', 6 )
return '[https://id.loc.gov/authorities/'..lccnType..'/'..id..' '..(label or '
end
Baris 363:
return false
end
return '[http://www.e-lir.ch/e-LIR___Lexicon.'..id..'.450.0.html '..(label or 'Lexicon Istoric Retic (
end
Baris 383:
return false
end
return '[http://www.culture.gouv.fr/public/mistral/leonore_fr?ACTION=CHERCHER&FIELD_1=COTE&VALUE_1='..id..' '..(label or 'Léonore (
end
Baris 536:
return false
end
return '[https://id.ndl.go.jp/auth/ndlna/'..id..' '..(label or '
end
Baris 552:
return false
end
return '[https://aleph.nkp.cz/F/?func=find-c&local_base=aut&ccl_term=ica='..id..'&CON_LNG=ENG '..(label or '
end
Baris 568:
return false
end
return '[https://data.nlg.gr/resource/authority/record'..id..' '..(label or '
end
Baris 594:
return false
end
return '[https://tools.wmflabs.org/wikidata-externalid-url?p=1695&id='..id..' '..(label or '
end
Baris 610:
return false
end
return '[http://katalog.nsk.hr/F/?func=direct&doc_number='..id..'&local_base=nsk10 '..(label or '
end
Baris 618:
return false
end
return '[http://data.bibliotheken.nl/id/thes/p'..id..' '..(label or '
end
Baris 643:
return false
end
return '[http://mak.bn.org.pl/cgi-bin/KHW/makwww.exe?BM=1&NU=1&IM=4&WI='..id..' '..(label or '
end
Baris 670:
return false
end
return '[https://opac.rism.info/search?id='..id..' '..(label or 'RISM (
end
Baris 678:
return false
end
return '[http://data.rero.ch/'..id..' '..(label or 'RERO (
end
Baris 686:
return false
end
return '[https://rkd.nl/en/explore/artists/'..id..' '..(label or 'RKD Artists (
end
Baris 694:
return false
end
return '[https://rkd.nl/nl/explore/images/'..id..' '..(label or 'RKD ID (
end
Baris 702:
return false
end
return '[http://aleph.rsl.ru/F?func=find-b&find_code=SYS&adjacent=Y&local_base=RSL11&request='..id..'&CON_LNG=ENG '..(label or '
end
Baris 710:
return false
end
return '[https://libris.kb.se/auth/'..id..' '..(label or '
end
Baris 718:
return false
end
return '[http://www.sikart.ch/KuenstlerInnen.aspx?id='..id..'&lng=en '..(label or 'SIKART (
end
Baris 734:
return false
end
return '[https://www.idref.fr/'..id..' '..(label or 'SUDOC (
end
Baris 768:
return false
end
return '[https://collections.tepapa.govt.nz/agent/'..id..' '..(label or 'Te Papa (
end
Baris 779:
return false
end
return '[http://tls.theaterwissenschaft.ch/wiki/'..id..' '..(label or 'Theaterlexikon (
end
Baris 820:
end
id = id:gsub('\/', '_')
return '[https://opac.vatlib.it/auth/detail/'..id..' '..(label or '
end
Baris 905:
local wikiTable = '{| class="wikitable sortable"\n'..
'! rowspan=2 | Parameter\n'..
'! rowspan=2 |
'! rowspan=2 |
'! rowspan=2; data-sort-type=number |
'! colspan=4 |
'|-\n'..
'! [[:
'! [[:
'! [[:
'! [[:
'|-\n'
local lang = mw.getContentLanguage()
Baris 933:
local wpl = frame:expandTemplate{ title = 'Wikidata property link', args = args }
--cats
local articleCat = '
local userCat = '
local miscCat = '
local faultyCat = '
--counts
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )
Baris 955:
'||'..appearsAs..
'||data-sort-value='..pid..'|'..wpl..
'||style="text-align: right;"|[[:
'||style="text-align: right;"|[[:
'||style="text-align: right;"|[[:
'||style="text-align: right;"|[[:
end
Baris 976:
'|-\n'..
'||'..'—'..
'||
'||'..appearsAs..
'||data-sort-value='..w..'|'..'—'..
'||style="text-align: right;"|[[:
'||style="text-align: right;"|—'..
'||style="text-align: right;"|—'..
Baris 988:
wikiTable = wikiTable..'\n'..
'|-\n'..
'! style="text-align: right;" colspan=3|
'||style="text-align: right;"|'..lang:formatNum(P)..
'||style="text-align: right;"|'..lang:formatNum(a)..
Baris 1.012:
-- prefix: to include a prefix (usually a wikilink explaining what the identifier is) before the external link itself
p.conf = {
{ 'AAG', 3372, p.aagLink, '
{ 'ACM-DL', 864, p.acmLink, '
{ 'ADB', 1907, p.adbLink,'
{ 'AGSA', 6804, p.agsaLink, '
{ 'autores.uy', 2558, p.autoresuyLink, '
{ 'AWR', 4186, p.awrLink, '
{ 'BIBSYS', 1015, p.bibsysLink, '
{ 'Bildindex', 2092, p.bildLink, '
{ 'BNC', 1890, p.bncLink, '
{ 'BNE', 950, p.bneLink, '
{ 'BNF', 268, p.bnfLink, '
{ 'Botanist', 428, p.botanistLink , '
{ 'BPN', 651, p.bpnLink , '
{ 'CANTIC', 1273, p.canticLink, '
{ 'CINII', 271, p.ciniiLink, '
{ 'CWGC', 1908, p.cwgcLink, '
{ 'DAAO', 1707, p.daaoLink, '
{ 'DBLP', 2456, p.dblpLink, '
{ 'DIB', 6829, p.dibLink, '
{ 'DSI', 2349, p.dsiLink, '
{ 'EMU', 4613, p.emuLink, '
{ 'FAST', 2163, p.fastLink, '
{ 'FNZA', 6792, p.fnzaLink, '
{ 'GND', 227, p.gndLink, '
{ 'HDS', 902, p.hdsLink, '
{ 'IAAF', 1146, p.iaafLink, '
{ 'ICCU', 396, p.iccuLink, '
{ 'ICIA', 1736, p.iciaLink, '
{ 'IEU', 9070, p.ieuLink, '
{ 'ISNI', 213, p.isniLink, '
{ 'Joconde', 347, p.jocondeLink, '
{ 'KULTURNAV', 1248, p.kulturnavLink, '
{ 'LCCN', 244, p.lccnLink, '
{ 'LIR', 886, p.lirLink, '
{ 'LNB', 1368, p.lnbLink, '
{ 'Léonore', 640, p.leonoreLink, '
{ 'MA', 6366, p.maLink, '
{ 'MBA', 434, p.mbaLink, '
{ 'MBAREA', 982, p.mbareaLink, '
{ 'MBI', 1330, p.mbiLink, '
{ 'MBL', 966, p.mblLink, '
{ 'MBP', 1004, p.mbpLink, '
{ 'MBRG', 436, p.mbrgLink, '
{ 'MBS', 1407, p.mbsLink, '
{ 'MBW', 435, p.mbwLink, '
{ 'MGP', 549, p.mgpLink, '
{ 'NARA', 1225, p.naraLink, '
{ 'NCL', 1048, p.nclLink, '
{ 'NDL', 349, p.ndlLink, '
{ 'NGV', 2041, p.ngvLink, '
{ 'NKC', 691, p.nkcLink, '
{ 'NLA', 409, p.nlaLink, '
{ 'NLG', 3348, p.nlgLink, '
{ 'NLI', 949, p.nliLink, '
{ 'NLK', 5034, p.nlkLink, '
{ 'NLP', 1695, p.nlpLink, '
{ 'NLR', 1003, p.nlrLink, '
{ 'NSK', 1375, p.nskLink, '
{ 'NTA', 1006, p.ntaLink, '
{ 'ORCID', 496, p.orcidLink, '
{ 'PIC', 2750, p.picLink, '
{ 'PLWABN', 7293, p.plwabnLink, '
{ 'Publons', 3829, p.publonsLink, '
{ 'RID', 1053, p.ridLink, '
{ 'RISM', 5504, p.rismLink, '
{ 'RERO', 3065, p.reroLink, '
{ 'RKDartists', 650, p.rkdartistsLink, '
{ 'RKDID', 350, p.rkdidLink, '
{ 'RSL', 947, p.rslLink, '
{ 'SELIBR', 906, p.selibrLink, '
{ 'SIKART', 781, p.sikartLink, '
{ 'SNAC-ID', 3430, p.snacLink, '
{ 'SUDOC', 269, p.sudocLink, '
{ 'S2AuthorId', 4012, p.s2authoridLink, '
{ 'TA98', 1323, p.ta98Link, '
{ 'TDVİA', 7314, p.tdviaLink, '
{ 'TePapa', 3544, p.tepapaLink, '
{ 'TLS', 1362, p.tlsLink, '
{ 'Trove', 1315, p.troveLink, '
{ 'UKPARL', 6213, p.ukparlLink, '
{ 'ULAN', 245, p.ulanLink, '
{ 'USCongress', 1157, p.uscongressLink, '
{ 'VcBA', 8034, p.vcbaLink, '
{ 'VIAF', 214, p.viafLink, '
{ 'WORLDCATID', 7859, nil, '
}
Baris 1.115:
}
-- Deprecated aliases to p.conf; tracked in [[
-- Format: { 'deprecated parameter name', 'replacement parameter name in p.conf' }
p.deprecated = {
Baris 1.158:
parentArgs[param] = parentArgs[dep]
if namespace == 0 then
deprecatedIdCat = '[[
end
end
Baris 1.187:
if val == '' and (namespace == 0 or testcases) then
suppressedIdCount = suppressedIdCount + 1
suppressedIdCat = '[[
else
parentArgs[params[1]] = wikidataIds[1] --add ID from WD
Baris 1.204:
end
if bMatch == false then
differentOnWDCat = '[[
end end end end end
if iMatches > 0 and iMatches == iParentArgs then
sameOnWDCat = '[[
end
if parentArgs['arts'] == 'arts' and suppressedIdCount > 0 then
Baris 1.214:
if suppressedIdCount == 1 then s = '' end
local sCat = 'ACArt with '..suppressedIdCount..' suppressed element'..s
suppressedIdCatArts = '[[
end
end
Baris 1.221:
--configure rows
local rct = 0
local sectionOrder = {'
'
'
local sections = {
['
['
['
['
['
['
['
}
--don't show NLP if PLWABN is present, since they both go to the National Library of Poland
Baris 1.271:
rct = rct + 1
if tval[2] then
multipleIdCat = p.getCatForId( '
end
end
Baris 1.280:
local worldcatId = parentArgs['worldcatid'] or parentArgs['WORLDCATID']
if worldcatId and worldcatId ~= '' then --if WORLDCATID present & unsuppressed
table.insert( sections['
worldcatCat = p.getCatForId( 'WORLDCATID' )
rct = rct + 1
Baris 1.287:
local lccnId = parentArgs['lccn'] or parentArgs['LCCN']
if viafId and viafId ~= '' and p.viafLink( viafId ) then --VIAF must be present, unsuppressed, & validated
table.insert( sections['
if namespace == 0 then
worldcatCat = '[[
end
rct = rct + 1
Baris 1.296:
if lccnParts and lccnParts[1] ~= 'sh' then
local lccnIdFmtd = lccnParts[1]..lccnParts[2]..'-'..lccnParts[3]
table.insert( sections['
if namespace == 0 then
worldcatCat = '[[
end
end
Baris 1.304:
end
elseif worldcatId == '' then --if WORLDCATID suppressed
suppressedIdCat = '[[
end
Baris 1.330:
end
if navboxArgs.group2 then
navboxArgs.title = '[[
else
local sect = navboxArgs.group1
if sect == '
-- Just say "Authority control" with no label if only general or only other IDs are present
-- since "general" is redundant and "other" is silly when there's nothing to contrast it with
navboxArgs.group1 = '[[
else
navboxArgs.group1 = '[[
end
end
Baris 1.347:
if rct == 0 or rct >= 25 then
if namespace == 0 or testcases then
local eCat = 'AC
elementsCat = '[[
end
end
Baris 1.354:
if namespace == 0 or testcases then
local sCat
if parentArgs.state == 'collapsed' then sCat = 'AC
elseif parentArgs.state == 'expanded' then sCat = 'AC
elseif parentArgs.state == 'autocollapse' then sCat = 'AC
else sCat = 'AC
end
stateCat = '[[
end
end
Baris 1.371:
outString = outString..auxCats
if namespace ~= 0 then
outString = mw.ustring.gsub(outString, '(%[%[)(Category:
end
|