Modul:Authority control/bakpasir: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan
Tidak ada ringkasan suntingan
Baris 13:
local catName = ''
if namespace == 0 then
catName = 'ArtikelArticles Wikipedia dengan penandawith '..id..' identifiers'
elseif namespace == 2 and not title.isSubpage then
catName = 'HalamanUser penggunapages dengan penandawith '..id..' identifiers'
else
catName = 'HalamanMiscellaneous denganpages penandawith '..id..' identifiers'
end
return '[[KategoriCategory:'..catName..']]'..p.redCatLink(catName)
end
 
Baris 27:
mw.title.new(catName, 14).exists == false
then
return '[[KategoriCategory:HalamanPages denganwith kategorired-linked pengawasanauthority otoritascontrol belum dibuatcategories]]'
end
return ''
Baris 33:
 
function p.createRow( id, rawValues, link, links, withUid, specialCat, prefix)
local catName = 'ArtikelArticles Wikipediawith dengan kesalahan penandafaulty '..(specialCat or id)..' identifiers'
if links then -- all links[] use withUid = false; no check needed
local row = ''
if prefix then
row = row .. '*' .. prefix
end
for i, l in ipairs( links ) do
Baris 45:
row = row..'<span class="uid">'..l..'</span>'
else
row = row..'<span class="error">The '..id..' id '..rawValues[i]..' is not valid.</span>[[KategoriCategory:'..catName..']]'..p.redCatLink(catName)
end
end
Baris 56:
end
return '* <span class="error">The '..id..' id '..rawValues..' is not valid.</span>[[KategoriCategory:'..catName..']]'..p.redCatLink(catName)..'\n'
end
 
Baris 63:
--[[==========================================================================]]
 
-- If a link has a suitable entry in the global inter-wiki prefix table at [[:m:Interwiki_map]],
-- please consider routing through this prefix rather than as external link URL.
-- This will ease future maintenance as necessary updates to the link can be centrally carried out there rather than by updating this module.
-- The "external link" icon would disappear for such entries.
 
function p.aagLink( id, label)
Baris 95 ⟶ 98:
return false
end
return '[https://www.agsa.sa.gov.au/collection-publications/collection/creators/_/'..id..'/ '..(label or 'AustraliaSouth SelatanAustralia')..']'..p.getCatForId( 'AGSA' )
end
 
Baris 122 ⟶ 125:
return false
end
return '[https://authority.bibsys.no/authority/rest/authorities/html/'..id..' '..(label or 'NorwegiaNorway')..']'..p.getCatForId( 'BIBSYS' )
end
 
Baris 130 ⟶ 133:
return false
end
return '[https://www.bildindex.de/document/obj'..id..' '..(label or 'Bildindex (JermanGermany)')..']'..p.getCatForId( 'Bildindex' )
end
 
Baris 138 ⟶ 141:
return false
end
return '[http://www.bncatalogo.cl/F?func=direct&local_base=red10&doc_number='..id..' '..(label or 'ChiliChile')..']'..p.getCatForId( 'BNC' )
end
 
Baris 149 ⟶ 152:
return false
end
return '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id='..id..' '..(label or 'SpanyolSpain')..']'..p.getCatForId( 'BNE' ) --no https as of 9/2019
end
 
Baris 161 ⟶ 164:
id = 'cb'..id
end
return '[https://catalogue.bnf.fr/ark:/12148/'..id..' ' .. (label or 'PrancisFrance')..'] [https://data.bnf.fr/ark:/12148/'..id..' (data)]'..p.getCatForId( 'BNF' )
end
 
Baris 181 ⟶ 184:
return false
end
return '[http://www.biografischportaal.nl/en/persoon/'..id..' '..(label or 'BelandaNetherlands')..']'..p.getCatForId( 'BPN' ) --no https as of 9/2019
end
 
Baris 189 ⟶ 192:
return false
end
return '[http://cantic.bnc.cat/registres/CUCId/'..id..' '..(label or 'CatalunyaCatalonia')..']'..p.getCatForId( 'CANTIC' ) --no https as of 10/2019
end
 
Baris 197 ⟶ 200:
return false
end
return '[https://ci.nii.ac.jp/author/'..id..'?l=en '..(label or 'CiNii (JepangJapan)')..']'..p.getCatForId( 'CINII' )
end
 
Baris 206 ⟶ 209:
end
return '[https://www.cwgc.org/find-war-dead/casualty/'..id..'/ '..(label or 'Commonwealth War Graves Commission')..']'..p.getCatForId( 'CWGC' )
end
 
function p.emuLink( id, label )
--P4613's format regex: \d{1,6} (e.g. 15409 (or 015409))
if not id:match( '^%d%d?%d?%d?%d?%d?$' ) then
return false
end
return '[http://esu.com.ua/search_articles.php?id='..id..' '..(label or 'Ukraine')..']'..p.getCatForId( 'EMU' )
end
 
Baris 232 ⟶ 243:
return false
end
return '[https://dib.cambridge.org/viewReadPage.do?articleId='..id..' '..(label or 'IrlandiaIreland')..']'..p.getCatForId( 'DIB' )
end
 
Baris 268 ⟶ 279:
return false
end
return '[https://d-nb.info/gnd/'..id..' '..(label or 'Integrated Authority File (JermanGermany)')..']'..p.getCatForId( 'GND' )
end
 
Baris 294 ⟶ 305:
return false
end
return '[https://opac.sbn.it/opacsbn/opac/iccu/scheda_authority.jsp?bid='..id..' '..(label or 'ItaliaItaly')..']'..p.getCatForId( 'ICCU' )
end
function p.iciaLink( id, label )
Baris 326 ⟶ 337:
return false
end
return '[https://www.pop.culture.gouv.fr/notice/joconde/'..id..' '..(label or 'Joconde (PrancisFrance)')..']'..p.getCatForId( 'Joconde' )
end
 
Baris 334 ⟶ 345:
return false
end
return '[http://kulturnav.org/'..id..' '..(label or 'KulturNav (NorwegiaNorway)')..']'..p.getCatForId( 'KULTURNAV' ) --no https as of 9/2019
end
 
Baris 344 ⟶ 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 'AmerikaUnited SerikatStates')..']'..p.getCatForId( 'LCCN' )
end
 
Baris 352 ⟶ 363:
return false
end
return '[http://www.e-lir.ch/e-LIR___Lexicon.'..id..'.450.0.html '..(label or 'Lexicon Istoric Retic (SwissSwitzerland)')..']'..p.getCatForId( 'LIR' ) --no https as of 9/2019
end
 
Baris 364 ⟶ 375:
 
function p.leonoreLink( id, label )
--P640's format regex: LH//\d{1,4}/\d{1,3}|19800035/\d{1,4}/\d{1,5}(Bis|Ter)?|C/0/\d{1,2} (e.g. LH//2064/18)
if not id:match( '^LH//%d%d?%d?%d?/%d%d?%d?$' ) and --IDs from LH//1/1 to LH//2794/54 (legionaries)
not id:match( '^19800035/%d%d?%d?%d?/%d%d?%d?%d?%d?$' ) and --IDs from 19800035/1/1 to 19800035/385/51670 (legionnaires who died 1954-1977 & some who died < 1954)
not id:match( '^C19800035/0%d%d?%d?%d?/%d%d?%d?%d?%d?Bis$' ) then and --IDs from C/0/1 to C/0/84 (84 famous legionaries)?
not id:match( '^19800035/%d%d?%d?%d?/%d%d?%d?%d?%d?Ter$' ) and --IDs from ?
not id:match( '^C/0/%d%d?$' ) then --IDs from C/0/1 to C/0/84 (84 famous legionaries)
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 (PrancisFrance)')..']'..p.getCatForId( 'Léonore' ) --no https as of 9/2019
end
 
Baris 391 ⟶ 404:
return '['..url..' '..label..']'..cat
else
return '[[MBA (identifier)|MusicBrainz]] [' .. url .. ' artist]' .. cat
end
end
Baris 405 ⟶ 418:
return '['..url..' '..label..']'..cat
else
return '[[MBAREA (identifier)|MusicBrainz]] [' .. url .. ' area]' .. cat
end
end
Baris 419 ⟶ 432:
return '['..url..' '..label..']'..cat
else
return '[[MBI (identifier)|MusicBrainz]] [' .. url .. ' instrument]' .. cat
end
end
Baris 433 ⟶ 446:
return '['..url..' '..label..']'..cat
else
return '[[MBL (identifier)|MusicBrainz]] [' .. url .. ' label]' .. cat
end
end
Baris 447 ⟶ 460:
return '['..url..' '..label..']'..cat
else
return '[[MBP (identifier)|MusicBrainz]] [' .. url .. ' place]' .. cat
end
end
Baris 461 ⟶ 474:
return '['..url..' '..label..']'..cat
else
return '[[MBRG (identifier)|MusicBrainz]] [' .. url .. ' release group]' .. cat
end
end
Baris 475 ⟶ 488:
return '['..url..' '..label..']'..cat
else
return '[[MBS (identifier)|MusicBrainz]] [' .. url .. ' series]' .. cat
end
end
Baris 490 ⟶ 503:
return '['..url..' '..label..']'..cat
else
return '[[MBW (identifier)|MusicBrainz]] [' .. url .. ' work]' .. cat
end
end
Baris 523 ⟶ 536:
return false
end
return '[https://id.ndl.go.jp/auth/ndlna/'..id..' '..(label or 'JepangJapan')..']'..p.getCatForId( 'NDL' )
end
 
Baris 539 ⟶ 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 'RepublikCzech CekoRepublic')..']'..p.getCatForId( 'NKC' )
end
 
Baris 555 ⟶ 568:
return false
end
return '[https://data.nlg.gr/resource/authority/record'..id..' '..(label or 'YunaniGreece')..']'..p.getCatForId( 'NLG' )
end
 
Baris 581 ⟶ 594:
return false
end
return '[https://tools.wmflabs.org/wikidata-externalid-url?p=1695&id='..id..' '..(label or 'PolandiaPoland')..']'..p.getCatForId( 'NLP' )
end
 
Baris 597 ⟶ 610:
return false
end
return '[http://katalog.nsk.hr/F/?func=direct&doc_number='..id..'&local_base=nsk10 '..(label or 'KroasiaCroatia')..']'..p.getCatForId( 'NSK' ) --no https as of 9/2019
end
 
Baris 605 ⟶ 618:
return false
end
return '[http://data.bibliotheken.nl/id/thes/p'..id..' '..(label or 'BelandaNetherlands')..']'..p.getCatForId( 'NTA' )
end
 
Baris 630 ⟶ 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 'PolandiaPoland')..']'..p.getCatForId( 'PLWABN' )
end
 
Baris 657 ⟶ 670:
return false
end
return '[https://opac.rism.info/search?id='..id..' '..(label or 'RISM (PrancisFrance)')..']'..p.getCatForId( 'RISM' )
end
 
Baris 665 ⟶ 678:
return false
end
return '[http://data.rero.ch/'..id..' '..(label or 'RERO (SwissSwitzerland)')..']'..p.getCatForId( 'RERO' )
end
 
Baris 673 ⟶ 686:
return false
end
return '[https://rkd.nl/en/explore/artists/'..id..' '..(label or 'RKD Artists (BelandaNetherlands)')..']'..p.getCatForId( 'RKDartists' )
end
 
Baris 681 ⟶ 694:
return false
end
return '[https://rkd.nl/nl/explore/images/'..id..' '..(label or 'RKD ID (BelandaNetherlands)')..']'..p.getCatForId( 'RKDID' )
end
 
Baris 689 ⟶ 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 'RusiaRussia')..']'..p.getCatForId( 'RSL' ) --no https as of 9/2019
end
 
Baris 697 ⟶ 710:
return false
end
return '[https://libris.kb.se/auth/'..id..' '..(label or 'SwediaSweden')..']'..p.getCatForId( 'SELIBR' )
end
 
Baris 705 ⟶ 718:
return false
end
return '[http://www.sikart.ch/KuenstlerInnen.aspx?id='..id..'&lng=en '..(label or 'SIKART (SwissSwitzerland)')..']'..p.getCatForId( 'SIKART' ) --no https as of 9/2019
end
 
Baris 721 ⟶ 734:
return false
end
return '[https://www.idref.fr/'..id..' '..(label or 'SUDOC (PrancisFrance)')..']'..p.getCatForId( 'SUDOC' )
end
 
Baris 737 ⟶ 750:
return false
end
returnlocal longurl = '[http://tools.wmflabs.org/wikidata-externalid-url/?p=1323&url_prefix=https:%2F%2Fwww.unifr.ch%2Fifaa%2FPublic%2FEntryPage%2FTA98%20Tree%2FEntity%20TA98%20EN%2F&url_suffix=%20Entity%20TA98%20EN.htm&id='
return longurl..id..' '..(label or 'Terminologia Anatomica')..']'..p.getCatForId( 'TA98' )
end
 
Baris 747 ⟶ 761:
return '[https://islamansiklopedisi.org.tr/'..id..' '..(label or 'Encyclopedia of Islam')..']'..p.getCatForId( 'TDVİA' )
end
 
 
function p.tepapaLink( id, label )
Baris 753 ⟶ 768:
return false
end
return '[https://collections.tepapa.govt.nz/agent/'..id..' '..(label or 'Te Papa (SelandiaNew BaruZealand)')..']'..p.getCatForId( 'TePapa' )
end
 
Baris 760 ⟶ 775:
--P1362's format regex: \p{Lu}[\p{L}\d_',\.\-\(\)\*/–]{3,59} (e.g. Abcd)
local class = "[%a%d_',%.%-%(%)%*/–]"
local regex = "'^%u"'..string.rep(class, 3)..string.rep(class.."'?"', 56).."'$"'
if not mw.ustring.match( id, regex ) then
return false
end
return '[http://tls.theaterwissenschaft.ch/wiki/'..id..' '..(label or 'Theaterlexikon (SwissSwitzerland)')..']'..p.getCatForId( 'TLS' ) --no https as of 9/2019
end
 
Baris 805 ⟶ 820:
end
id = id:gsub('\/', '_')
return '[https://opac.vatlib.it/auth/detail/'..id..' '..(label or 'VatikanVatican')..']'..p.getCatForId( 'VcBA' )
end
 
Baris 814 ⟶ 829:
return false
end
-- If the "VIAF" entry at [[:m:Interwiki map]] would resolve to "https://viaf.org/viaf/$1" (rather than "http://viaf.org/viaf/$1", as it currently still does),
-- then the code below could change from '[https://viaf.org/viaf/'..id..' '..id..']' to '[[:VIAF:'..id..'|'..id..']]'.
return '[https://viaf.org/viaf/'..id..' '..(label or 'VIAF')..']'..p.getCatForId( 'VIAF' )
end
Baris 822 ⟶ 838:
function p.append(str, c, length)
while str:len() < length do
str = c .. str
end
return str
Baris 837 ⟶ 853:
local result = (12 - remainder) % 11
if result == 10 then
return "'X"'
end
return tostring( result )
Baris 889 ⟶ 905:
local wikiTable = '{| class="wikitable sortable"\n'..
'! rowspan=2 | Parameter\n'..
'! rowspan=2 | BagianSection\n'..
'! rowspan=2 | DitampikanAppears sebagaias\n'..
'! rowspan=2; data-sort-type=number | Properti Wikidata property\n'..
'! colspan=4 | KategoriTracking pelacakcategories danand jumlahpage halamancounts\n'..
'|-\n'..
'! [[:KategoriCategory:ArtikelArticles Wikipediawith denganauthority informasicontrol pengawasan otoritasinformation|'.. 'ArtikelArticles]]\n'..
'! [[:KategoriCategory:HalamanUser penggunapages denganwith informasiauthority pengawasancontrol otoritasinformation|'.. 'HalamanUser penggunapages]]\n'..
'! [[:KategoriCategory:HalamanMiscellaneous denganpages informasiwith pengawasanauthority otoritascontrol information|'.. 'HalamanMisc. lainpages]]\n'..
'! [[:KategoriCategory:ArtikelArticles Wikipediawith denganfaulty informasiauthority pengawasancontrol otoritas bermasalahinformation|'.. 'IDFaulty bermasalahIDs]]\n'..
'|-\n'
local lang = mw.getContentLanguage()
local a, u, m, f, P = 0, 0, 0, 0, 0 --cumulative sums
for _, conf in pairs( p.conf ) do
local param, pid, section = conf[1], conf[2], conf[4]
local appearsAs
if param == "'WORLDCATID"' then
-- WorldCat is special
appearsAs = "'[https://www.worldcat.org/identities/lccn-n78039510 WorldCat]"'
elseif conf.prefix then
appearsAs = conf.prefix
Baris 911 ⟶ 928:
appearsAs = conf[3](conf[5])
end
local link = conf.link or param .. ' (identifier)'
local category = conf.category or param
local args = { id = 'f', pid }
local wpl = frame:expandTemplate{ title = 'Wikidata property link', args = args }
--cats
local articleCat = 'ArtikelArticles Wikipedia dengan penandawith '..category..' identifiers'
local userCat = 'HalamanUser penggunapages dengan penandawith '..category..' identifiers'
local miscCat = 'HalamanMiscellaneous denganpages penandawith '..category..' identifiers'
local faultyCat = 'ArtikelArticles Wikipediawith dengan dengan penandafaulty '..category..' bermasalahidentifiers'
--counts
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )
Baris 925 ⟶ 942:
local miscCount = lang:formatNum( mw.site.stats.pagesInCategory(miscCat, 'pages') )
local faultyCount = lang:formatNum( mw.site.stats.pagesInCategory(faultyCat, 'pages') )
--calcs
P = P + 1 --property count
a = a + lang:parseFormattedNumber(articleCount)
u = u + lang:parseFormattedNumber(userCount)
m = m + lang:parseFormattedNumber(miscCount)
f = f + lang:parseFormattedNumber(faultyCount)
--concat
wikiTable = wikiTable..'\n'..
Baris 933 ⟶ 955:
'||'..appearsAs..
'||data-sort-value='..pid..'|'..wpl..
'||style="text-align: right;"|[[:KategoriCategory:'..articleCat..'|'..articleCount..']]'..
'||style="text-align: right;"|[[:KategoriCategory:'.. userCat..'|'.. userCount..']]'..
'||style="text-align: right;"|[[:KategoriCategory:'.. miscCat..'|'.. miscCount..']]'..
'||style="text-align: right;"|[[:KategoriCategory:'.. faultyCat..'|'.. faultyCount..']]'
end
Baris 942 ⟶ 964:
local wcd = { 'WorldCat-LCCN', 'WorldCat-VIAF' }
for _, w in pairs(wcd) do
local articleCat = 'ArtikelArticles Wikipedia dengan penandawith '..w..' identifiers'
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )
local appearsAs
if w == "'WorldCat-LCCN"' then
appearsAs = "'[https://www.worldcat.org/identities/lccn-n79-113947 WorldCat (via Library of Congress)]"'
else
appearsAs = "'[https://www.worldcat.org/identities/containsVIAFID/12345789 WorldCat (via VIAF)]"'
end
a = a + lang:parseFormattedNumber(articleCount)
wikiTable = wikiTable..'\n'..
'|-\n'..
'||'..'—'..
'||UmumGeneral'..
'||'..appearsAs..
'||data-sort-value='..w..'|'..'—'..
'||style="text-align: right;"|[[:KategoriCategory:'..articleCat..'|'..articleCount..']]'..
'||style="text-align: right;"|—'..
'||style="text-align: right;"|—'..
Baris 962 ⟶ 985:
end
--append sums
return require("Module:Suppress categories").main(wikiTable)..'\n|}'
wikiTable = wikiTable..'\n'..
'|-\n'..
'! style="text-align: right;" colspan=3|Totals'..
'||style="text-align: right;"|'..lang:formatNum(P)..
'||style="text-align: right;"|'..lang:formatNum(a)..
'||style="text-align: right;"|'..lang:formatNum(u)..
'||style="text-align: right;"|'..lang:formatNum(m)..
'||style="text-align: right;"|'..lang:formatNum(f)
return require('Module:Suppress categories').main(wikiTable)..'\n|}'
end
 
Baris 969 ⟶ 1.002:
--[[==========================================================================]]
 
-- IfPlease a specificuse "<parameter> (identifier) redirect" exists for an identifier, please route through this particular redirectredirects rather than linking directly to the target page. This reduces clutter in "What links here" and improves reverse lookup of articles where a manifestation of this particular identifier is used.
-- This reduces clutter in "What links here" on both the redirect and the target,
-- and improves reverse lookup of articles where a manifestation of each identifier is used.
 
-- p.conf table basic format: { 'parameter name', propertyId # in Wikidata, formatting/validation function, section, example ID for documentation }
 
-- p.conf table optional named parameters:
-- Parameter format: { 'parameter name', propertyId # in Wikidata, formatting/validation function, section, example ID for documentation }
-- Optional named parameterslink: `link` to override the link in the documentation (defaults to "<parameter +> (identifer)"),
-- category: to override the ID in category names (defaults to "... with <parameter> identifiers"),
-- prefix: to include a prefix (usually a wikilink explaining what the identifier is) before the external link itself
p.conf = {
{ 'AAG', 3372, p.aagLink, "Galeri'Art senigalleries danand museum"museums', "'1"' },
{ 'ACM-DL', 864, p.acmLink, "Basis'Scientific data ilmiah"databases', "'12345678901"', link =" 'ACM DL (identifier)"' },
{ 'ADB', 1907, p.adbLink,"Kamus'Biographical biografi"dictionaries', "'barton-sir-edmund-toby-71"' },
{ 'AGSA', 6804, p.agsaLink, "Galeri'Art senigalleries danand museum"museums', "'3625"' },
{ 'autores.uy', 2558, p.autoresuyLink, "Kamus'Biographical biografi"dictionaries', "'12345"' },
{ 'AWR', 4186, p.awrLink, "Kamus'Biographical biografi"dictionaries', "'PR00768b"' },
{ 'BIBSYS', 1015, p.bibsysLink, "Perpustakaan'National nasional"libraries', "'1234567890123"' },
{ 'Bildindex', 2092, p.bildLink, "Lembaga'Art penelitianresearch seni"institutes', "'1"' },
{ 'BNC', 1890, p.bncLink, "Perpustakaan'National nasional"libraries', "'123456789"' },
{ 'BNE', 950, p.bneLink, "Perpustakaan'National nasional"libraries', "'XX1234567"' },
{ 'BNF', 268, p.bnfLink, "Perpustakaan'National nasional"libraries', "'123456789"' },
{ 'Botanist', 428, p.botanistLink , "Basis'Scientific data ilmiah"databases', "'L."' },
{ 'BPN', 651, p.bpnLink , "Kamus'Biographical biografi"dictionaries', "'12345678"' },
{ 'CANTIC', 1273, p.canticLink, "Perpustakaan'National nasional"libraries', "'a12345678"' },
{ 'CINII', 271, p.ciniiLink, "Basis'Scientific data ilmiah"databases', "'DA12345678"', link = "'CiNii (identifier)"' },
{ 'CWGC', 1908, p.cwgcLink, "Lain-lain"'Other', "'1234567"' },
{ 'DAAO', 1707, p.daaoLink, "Lembaga'Art penelitianresearch seni"institutes', "'rolf-harris"' },
{ 'DBLP', 2456, p.dblpLink, "Basis'Scientific data ilmiah"databases', "'123/123"' },
{ 'DIB', 6829, p.dibLink, "Kamus'Biographical biografi"dictionaries', "'a1234"' },
{ 'DSI', 2349, p.dsiLink, "Lembaga'Art penelitianresearch seni"institutes', "'1538"' },
{ 'FASTEMU', 21634613, p.fastLinkemuLink, "Lain-lain"'National libraries', "1"'15409' },
{ 'FNZAFAST', 67922163, p.fnzaLinkfastLink, "Lembaga penelitian seni"'Other', "12"'1' },
{ 'GNDFNZA', 2276792, p.gndLinkfnzaLink, "Umum"'Art research institutes', "4079154-3"'12' },
{ 'HDSGND', 902227, p.hdsLinkgndLink, "Lain-lain"'General', "050123"'4079154-3' },
{ 'IAAFHDS', 1146902, p.iaafLinkhdsLink, "Lain-lain"'Other', "123"'050123' },
{ 'IAAF', 1146, p.iaafLink, 'Other', '123' },
{ 'ICCU', 396, p.iccuLink, "Perpustakaan nasional", "IT\\ICCU\\CFIV\\000163"}, --formerly SBN
{ 'ICCU', 396, p.iccuLink, 'National libraries', 'IT\\ICCU\\CFIV\\000163' }, --formerly SBN
{ 'ICIA', 1736, p.iciaLink, "Lembaga penelitian seni", "1"},
{ 'ICIA', 1736, p.iciaLink, 'Art research institutes', '1' },
{ 'IEU', 9070, p.ieuLink, "Lain-lain", "N\\A\\NationalAcademyofArtandArchitecture"},
{ 'IEU', 9070, p.ieuLink, 'Other', 'N\\A\\NationalAcademyofArtandArchitecture' },
{ 'ISNI', 213, p.isniLink, "Umum", "0000-0000-6653-4145", prefix = '[[ISNI (identifier)|ISNI]]'},
{ 'ISNI', 213, p.isniLink, 'General', '0000-0000-6653-4145', prefix = '[[ISNI (identifier)|ISNI]]' },
{ 'Joconde', 347, p.jocondeLink, "Lembaga penelitian seni", "12345678901"},
{ 'Joconde', 347, p.jocondeLink, 'Art research institutes', '12345678901' },
{ 'KULTURNAV', 1248, p.kulturnavLink, "Lembaga penelitian seni", "12345678-1234-1234-1234-1234567890AB", link="KulturNav (identifier)"},
{ 'KULTURNAV', 1248, p.kulturnavLink, 'Art research institutes', '12345678-1234-1234-1234-1234567890AB', link = 'KulturNav (identifier)' },
{ 'LCCN', 244, p.lccnLink, "Perpustakaan nasional", "n78039510"},
{ 'LIRLCCN', 886244, p.lirLinklccnLink, "Lain-lain"'National libraries', "1"'n78039510' },
{ 'LNBLIR', 1368886, p.lnbLinklirLink, "Perpustakaan nasional"'Other', "123456789"'1' },
{ 'LNB', 1368, p.lnbLink, 'National libraries', '123456789' },
{ 'Léonore', 640, p.leonoreLink, "Lain-lain", "LH/1/1", prefix = "[[Léonore (identifier)|Léonore (Prancis)]]"},
{ 'Léonore', 640, p.leonoreLink, 'Other', 'LH//1/1', prefix = '[[Léonore (identifier)|Léonore (France)]]' },
{ 'MA', 6366, p.maLink, "Lain-lain", "123456789"},
{ 'MA', 6366, p.maLink, 'Other', '123456789' },
{ 'MBA', 434, p.mbaLink, "Lain-lain"'Other', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz' }, --special cat name
{ 'MBAREA', 982, p.mbareaLink, "Lain-lain"'Other', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz area' }, --special cat name
{ 'MBI', 1330, p.mbiLink, "Lain-lain"'Other', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz instrument' }, --special cat name
{ 'MBL', 966, p.mblLink, "Lain-lain"'Other', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz label' }, --special cat name
{ 'MBP', 1004, p.mbpLink, "Lain-lain"'Other', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz place' }, --special cat name
{ 'MBRG', 436, p.mbrgLink, "Lain-lain"'Other', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz release group' }, --special cat name
{ 'MBS', 1407, p.mbsLink, "Lain-lain"'Other', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz series' }, --special cat name
{ 'MBW', 435, p.mbwLink, "Lain-lain"'Other', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz work' }, --special cat name
{ 'MGP', 549, p.mgpLink, "Basis'Scientific data ilmiah"databases', "'123456"' },
{ 'NARA', 1225, p.naraLink, "Lain-lain"'Other', "'12345678"' },
{ 'NCL', 1048, p.nclLink, "Perpustakaan'National nasional"libraries', "'1081436"' },
{ 'NDL', 349, p.ndlLink, "Perpustakaan'National nasional"libraries', "'012345678"' },
{ 'NGV', 2041, p.ngvLink, "Galeri'Art senigalleries danand museum"museums', "'12354"' },
{ 'NKC', 691, p.nkcLink, "Perpustakaan'National nasional"libraries', "'abcd12345678901234"' },
{ 'NLA', 409, p.nlaLink, "Perpustakaan'National nasional"libraries', "'123456789012"' },
{ 'NLG', 3348, p.nlgLink, "Perpustakaan'National nasional"libraries', "'12345678"' },
{ 'NLI', 949, p.nliLink, "Perpustakaan'National nasional"libraries', "'123456789"' },
{ 'NLK', 5034, p.nlkLink, "Perpustakaan'National nasional"libraries', "'KAB197000000"' },
{ 'NLP', 1695, p.nlpLink, "Perpustakaan'National nasional"libraries', "'9810123456789012345"' },
{ 'NLR', 1003, p.nlrLink, "Perpustakaan'National nasional"libraries', "'123456789"' },
{ 'NSK', 1375, p.nskLink, "Perpustakaan'National nasional"libraries', "'123456789"' },
{ 'NTA', 1006, p.ntaLink, "Perpustakaan'National nasional"libraries', "'12345678X"' },
{ 'ORCID', 496, p.orcidLink, "Umum"'General', "'0000-0002-7398-5483"', prefix = '[[ORCID (identifier)|ORCID]]' },
{ 'PIC', 2750, p.picLink, "Lembaga'Art penelitianresearch seni"institutes', "'1"' },
{ 'PLWABN', 7293, p.plwabnLink, "Perpustakaan'National nasional"libraries', "'9812345678905606"' },
{ 'Publons', 3829, p.publonsLink, "Basis'Scientific data ilmiah"databases', "'2776255"' },
{ 'RID', 1053, p.ridLink, "Basis'Scientific data ilmiah"databases', "'A-1234-1934"' },
{ 'RISM', 5504, p.rismLink, "Lain-lain"'Other', "'pe1"', prefix = '[[RISM (identifier)|RISM (PrancisFrance)]]' },
{ 'RERO', 3065, p.reroLink, "Lain-lain"'Other', "'02-A012345678"', prefix = '[[RERO (identifier)|RERO (SwissSwitzerland)]]' },
{ 'RKDartists', 650, p.rkdartistsLink, "Lembaga'Art penelitianresearch seni"institutes', "'123456"' },
{ 'RKDID', 350, p.rkdidLink, "Lembaga'Art penelitianresearch seni"institutes', "'123456"' },
{ 'RSL', 947, p.rslLink, "Perpustakaan'National nasional"libraries', "'123456789"' },
{ 'SELIBR', 906, p.selibrLink, "Perpustakaan'National nasional"libraries', "'123456"' },
{ 'SIKART', 781, p.sikartLink, "Lembaga'Art penelitianresearch seni"institutes', '123456789' },
{ 'SNAC-ID', 3430, p.snacLink, "Lain-lain"'Other', "'A"' },
{ 'SUDOC', 269, p.sudocLink, "Lain-lain"'Other', "'026927608"', prefix = '[[SUDOC (identifier)|SUDOC (PrancisFrance)]]' },
{ 'S2AuthorId', 4012, p.s2authoridLink, "Basis'Scientific data ilmiah"databases', "'1796130"', category = 'Semantic Scholar author' }, --special cat name
{ 'TA98', 1323, p.ta98Link, "Basis'Scientific data ilmiah"databases', "'A12.3.45.678"' },
{ 'TDVİA', 7314, p.tdviaLink, "Lain-lain"'Other', "'asim-b-behdele"' },
{ 'TePapa', 3544, p.tepapaLink, "Galeri'Art senigalleries danand museum"museums', "'1"' },
{ 'TLS', 1362, p.tlsLink, "Lain-lain"'Other', "'Abcd"' },
{ 'Trove', 1315, p.troveLink, "Lain-lain"'Other', "'12345678"', prefix = '[[Trove (identifier)|Trove (Australia)]]' }, --formerly NLA-person
{ 'UKPARL', 6213, p.ukparlLink, "Lain-lain"'Other', "'AQUupyiR"' },
{ 'ULAN', 245, p.ulanLink, "Lembaga'Art penelitianresearch seni"institutes', "'500123456"' },
{ 'USCongress', 1157, p.uscongressLink, "Lain-lain"'Other', "'A000123"', link = "Kongres'US ASCongress (identifier)"' },
{ 'VcBA', 8034, p.vcbaLink, "Perpustakaan'National nasional"libraries', "'494/9793"' },
{ 'VIAF', 214, p.viafLink, "Umum"'General', "'123456789"', prefix = "'[[VIAF (identifier)|VIAF]]"' },
{ 'WORLDCATID', 7859, nil, "Umum"'General', nil, link = "'WorldCat Identities (identifier)"' },
}
 
Baris 1.079 ⟶ 1.115:
}
 
-- Deprecated aliases to p.conf; tracked in [[Category:Wikipedia articlesArticles with deprecated authority control identifiers]]
-- Format: { 'deprecated parameter name', 'replacement parameter name in p.conf' }
p.deprecated = {
{ 'GKD', 'GND' },
{ 'PND', 'GND' },
{ 'RLS', 'RSL' },
{ 'SWD', 'GND' },
{ 'NARA-organization', 'NARA' },
Baris 1.095 ⟶ 1.131:
 
function p.authorityControl( frame )
local resolveEntity = require( "'Module:ResolveEntityId"' )
local parentArgs = frame:getParent().args --WD IDs added here later
local iParentArgs = 0 --count original/manual parent args only later
local worldcatCat = ''
local elementsCat = ''
local multipleIdCat = ''
local suppressedIdCat = ''
local suppressedIdCatArts = ''
local deprecatedIdCat = ''
local differentOnWDCat = ''
local sameOnWDCat = ''
local stateCat = ''
--Redirectredirect aliases to proper parameter names
for _, a in pairs( p.aliases ) do
local alias, param = a[1], a[2]
Baris 1.113 ⟶ 1.152:
end
--Redirectredirect deprecated parameters to proper parameter names, and assign tracking cat
for _, d in pairs( p.deprecated ) do
local dep, param = d[1], d[2]
Baris 1.119 ⟶ 1.158:
parentArgs[param] = parentArgs[dep]
if namespace == 0 then
deprecatedIdCat = '[[KategoriCategory:ArtikelArticles Wikipediawith dengandeprecated penandaauthority pengawasancontrol otoritas usangidentifiers|'..dep..']]'
end
end
end
--Useuse QID= parameter for testing/example purposes only
local itemId = nil
if namespace ~= 0 then
Baris 1.138 ⟶ 1.177:
--Wikidata fallback if available
if itemId then
local suppressedIdCount = 0
local iMatches = 0
for _, params in ipairs( p.conf ) do
Baris 1.146 ⟶ 1.186:
if wikidataIds[1] then
if val == '' and (namespace == 0 or testcases) then
suppressedIdCount = suppressedIdCount + 1
suppressedIdCat = '[[Kategori:Artikel Wikipedia dengan penanda pengawasan otoritas yang disembunyikan|'..params[1]..']]'
suppressedIdCat = '[[Category:Articles with suppressed authority control identifiers|'..params[1]..']]'
else
parentArgs[params[1]] = wikidataIds[1] --add ID from WD
Baris 1.163 ⟶ 1.204:
end
if bMatch == false then
differentOnWDCat = '[[KategoriCategory:HalamanPages yangusing menggunakanauthority pengawasancontrol otoritaswith denganparameters parameterdifferent berbeda darion Wikidata|'..params[1]..']]'
end end end end end
if iMatches > 0 and iMatches == iParentArgs then
sameOnWDCat = '[[KategoriCategory:HalamanPages yangusing menggunakanauthority pengawasancontrol otoritaswith denganparameters semuaall parameter cocok denganmatching Wikidata]]'
end
if parentArgs['arts'] == 'arts' and suppressedIdCount > 0 then
if namespace == 0 or testcases then
local s = 's'
if suppressedIdCount == 1 then s = '' end
local sCat = 'ACArt with '..suppressedIdCount..' suppressed element'..s
suppressedIdCatArts = '[[Category:'..sCat..']]'..p.redCatLink(sCat)
end
end
end
--Configured rows
--configure rows
local rct = 0
local sectionOrder = {"Umum"'General',"Perpustakaan'National nasional"libraries',"Galeri'Art senigalleries danand museum"museums',
'Art research institutes','Biographical dictionaries','Scientific databases',
"Lembaga penelitian seni","Kamus biografi","Basis data ilmiah",
"Lain-lain"'Other'}
local sections = {
["Umum"'General'] = {},
["Perpustakaan'National nasional"libraries'] = {},
["Galeri'Art senigalleries danand museum"museums'] = {},
["Lembaga'Art penelitianresearch seni"institutes'] = {},
["Kamus'Biographical biografi"dictionaries'] = {},
["Basis'Scientific data ilmiah"databases'] = {},
["Lain-lain"'Other'] = {}
}
-- Dondon't show NLP isif PLWABN is present, since they both go to the National Library of PolandiaPoland
-- and the library has deprecated NLP IDs in favor of PLWABN IDs
if parentArgs.PLWABN or parentArgs.plwabn then
parentArgs.NLP = ''
Baris 1.195 ⟶ 1.245:
table.insert( tval, val )
if params.prefix then
table.insert( tlinks, params[3]( val, "'1"' ) )
else
table.insert( tlinks, params[3]( val ) )
end
end
--collect Lain-lainother unique vals (IDs) from WD, if present
if itemId and tval[1] then
local nextIdVal = 2
Baris 1.221 ⟶ 1.271:
rct = rct + 1
if tval[2] then
multipleIdCat = p.getCatForId( 'gandamultiple' )
end
end
 
end
Baris 1.230 ⟶ 1.280:
local worldcatId = parentArgs['worldcatid'] or parentArgs['WORLDCATID']
if worldcatId and worldcatId ~= '' then --if WORLDCATID present & unsuppressed
table.insert( sections["Umum"'General'], p.createRow( 'WORLDCATID', worldcatId, '[https://www.worldcat.org/identities/'..mw.uri.encode(worldcatId, 'PATH')..' WorldCat]', nil, false ) ) --Validation?
worldcatCat = p.getCatForId( 'WORLDCATID' )
rct = rct + 1
Baris 1.237 ⟶ 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["Umum"'General'], p.createRow( 'VIAF', viafId, '[https://www.worldcat.org/identities/containsVIAFID/'..viafId..' WorldCat (via VIAF)]', nil, false ) )
if namespace == 0 then
worldcatCat = '[[KategoriCategory:ArtikelArticles Wikipedia dengan penandawith WorldCat-VIAF identifiers]]'
end
rct = rct + 1
Baris 1.246 ⟶ 1.296:
if lccnParts and lccnParts[1] ~= 'sh' then
local lccnIdFmtd = lccnParts[1]..lccnParts[2]..'-'..lccnParts[3]
table.insert( sections["Umum"'General'], p.createRow( 'LCCN', lccnId, '[https://www.worldcat.org/identities/lccn-'..lccnIdFmtd..' WorldCat (via Library of Congress)]', nil, false ) )
if namespace == 0 then
worldcatCat = '[[KategoriCategory:ArtikelArticles Wikipedia dengan penandawith WorldCat-LCCN identifiers]]'
end
end
Baris 1.254 ⟶ 1.304:
end
elseif worldcatId == '' then --if WORLDCATID suppressed
suppressedIdCat = '[[KategoriCategory:ArtikelArticles Wikipediawith dengansuppressed penandaauthority pengawasancontrol otoritas yang disembunyikanidentifiers|WORLDCATID]]'
end
local Navbox = require('Module:Navbox')
local elementsCat = ''
if rct == 0 or rct >= 25 then
local eCat = 'AC dengan '..rct..' elemen'
elementsCat = '[[Kategori:'..eCat..']]'..p.redCatLink(eCat)
end
--configure Navbox
local outString = ''
if rct > 0 then
local Navbox = require('Module:Navbox')
local sectionID = 1
local args = { pid = 'identifiers' } -- #target the list of identifiers
Baris 1.271 ⟶ 1.316:
local pencil = frame:expandTemplate{ title = 'EditAtWikidata', args = args}
local navboxArgs = {
name = 'PengawasanAuthority otoritascontrol',
navboxclass = 'authority-control',
bodyclass = 'hlist',
Baris 1.279 ⟶ 1.324:
for _, sectName in ipairs(sectionOrder) do
if #sections[sectName] ~= 0 then
navboxArgs["'group" '.. sectionID] = sectName
navboxArgs["'list" '.. sectionID] = table.concat(sections[sectName])
sectionID = sectionID + 1
end
end
if navboxArgs.group2 then
navboxArgs.title = "'[[BantuanHelp:PengawasanAuthority otoritascontrol|PengawasanAuthority otoritascontrol]]" '.. pencil
else
local sect = navboxArgs.group1
if sect == "Umum"'General' or sect == "Lain-lain"'Other' then
-- Just say "Authority control" with no label if only Umumgeneral or only Lain-lainother IDs are present
-- since "Umumgeneral" is redundant and "Lain-lainother" is silly when there's nothing to contrast it with
navboxArgs.group1 = "'[[BantuanHelp:PengawasanAuthority otoritascontrol|PengawasanAuthority otoritascontrol]]" '.. pencil
else
navboxArgs.group1 = "'[[BantuanHelp:PengawasanAuthority otoritascontrol|PengawasanAuthority otoritascontrol: " '.. sect .. "']] " '.. pencil
end
end
Baris 1.299 ⟶ 1.344:
end
--auxCats
local auxCats = worldcatCat .. elementsCat .. multipleIdCat .. suppressedIdCat ..
if rct == 0 or rct >= 25 then
deprecatedIdCat .. differentOnWDCat .. sameOnWDCat
if namespace == 0 or testcases then
local eCat = 'AC with '..rct..' elements'
elementsCat = '[[Category:'..eCat..']]'..p.redCatLink(eCat)
end
end
if parentArgs.state then
if namespace == 0 or testcases then
local sCat
if parentArgs.state == 'collapsed' then sCat = 'AC using state parameter: collapsed'
elseif parentArgs.state == 'expanded' then sCat = 'AC using state parameter: expanded'
elseif parentArgs.state == 'autocollapse' then sCat = 'AC using state parameter: autocollapse'
else sCat = 'AC using state parameter: other'
end
stateCat = '[[Category:'..sCat..']]'..p.redCatLink(sCat)
end
end
local auxCats = worldcatCat..elementsCat..multipleIdCat..suppressedIdCat..suppressedIdCatArts..
deprecatedIdCat..differentOnWDCat..sameOnWDCat..stateCat
if testcases then
auxCats = mw.ustring.gsub(auxCats, '(%[%[)(Category)', '%1:%2') --for easier checking
end
outString = outString .. auxCats
--out
outString = outString..auxCats
if namespace ~= 0 then
outString = mw.ustring.gsub(outString, '(%[%[)(Category:Artikel WikipediaArticles)', '%1:%2') --by definition
end