Modul:Authority control/bakpasir: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan
Uzume (bicara | kontrib)
 
(21 revisi perantara oleh satu pengguna lainnya tidak ditampilkan)
Baris 1:
require('Module:No globalsstrict')
 
local p = {}
Baris 13:
local catName = ''
if namespace == 0 then
catName = 'Artikel Wikipedia articlesdengan withpenanda '..id..' identifiers'
elseif namespace == 2 and not title.isSubpage then
catName = 'UserHalaman pagespengguna withdengan penanda '..id..' identifiers'
else
catName = 'MiscellaneousHalaman pagesdengan withpenanda '..id..' identifiers'
end
return '[[CategoryKategori:'..catName..']]'..p.redCatLink(catName)
end
 
Baris 27:
mw.title.new(catName, 14).exists == false
then
return '[[CategoryKategori:PagesHalaman withdengan red-linkedkategori authoritypengawasan controlotoritas categoriesbelum dibuat]]'
end
return ''
Baris 33:
 
function p.createRow( id, rawValues, link, links, withUid, specialCat, prefix)
local catName = 'Artikel Wikipedia articlesdengan withkesalahan faultypenanda '..(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>[[CategoryKategori:'..catName..']]'..p.redCatLink(catName)
end
end
Baris 56:
end
return '* <span class="error">The '..id..' id '..rawValues..' is not valid.</span>[[CategoryKategori:'..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 82 ⟶ 85:
 
function p.adbLink( id, label )
--P1907's format regex: [a-z][-a-z]+-([1-23]\d|[1-9])\d{0,3} (e.g. barton-sir-edmund-toby-71)
if not id:match( '^[a-z][-a-z]+-[1-23]%d%d?%d?%d?$' ) and
not id:match( '^[a-z][-a-z]+-[1-9]%d?%d?%d?$' ) then
return false
Baris 95 ⟶ 98:
return false
end
return '[https://www.agsa.sa.gov.au/collection-publications/collection/creators/_/'..id..'/ '..(label or 'South Australia Selatan')..']'..p.getCatForId( 'AGSA' )
end
 
Baris 113 ⟶ 116:
end
return '[http://www.womenaustralia.info/biogs/'..id..'.htm '..(label or 'Australian Women\'s Register')..']'..p.getCatForId( 'AWR' )
end
 
function p.balatLink( id, label )
--P3293's format regex: \d+ (e.g. 1)
if not id:match( '^%d+$' ) then
return false
end
return '[http://balat.kikirpa.be/object/104257'..id..' '..(label or 'BALaT (Belgium)')..']'..p.getCatForId( 'BALaT' ) --no https as of 9/2019
end
 
Baris 130 ⟶ 125:
return false
end
return '[https://authority.bibsys.no/authority/rest/authorities/html/'..id..' '..(label or 'NorwayNorwegia')..']'..p.getCatForId( 'BIBSYS' )
end
 
Baris 138 ⟶ 133:
return false
end
return '[https://www.bildindex.de/document/obj'..id..' '..(label or 'Bildindex (GermanyJerman)')..']'..p.getCatForId( 'Bildindex' )
end
 
Baris 146 ⟶ 141:
return false
end
return '[http://www.bncatalogo.cl/F?func=direct&local_base=red10&doc_number='..id..' '..(label or 'ChileChili')..']'..p.getCatForId( 'BNC' )
end
 
Baris 157 ⟶ 152:
return false
end
return '[http://catalogo.bne.es/uhtbin/authoritybrowse.cgi?action=display&authority_id='..id..' '..(label or 'SpainSpanyol')..']'..p.getCatForId( 'BNE' ) --no https as of 9/2019
end
 
Baris 169 ⟶ 164:
id = 'cb'..id
end
return '[https://catalogue.bnf.fr/ark:/12148/'..id..' ' .. (label or 'FrancePrancis')..'] [https://data.bnf.fr/ark:/12148/'..id..' (data)]'..p.getCatForId( 'BNF' )
end
 
Baris 189 ⟶ 184:
return false
end
return '[http://www.biografischportaal.nl/en/persoon/'..id..' '..(label or 'NetherlandsBelanda')..']'..p.getCatForId( 'BPN' ) --no https as of 9/2019
end
 
Baris 197 ⟶ 192:
return false
end
return '[http://cantic.bnc.cat/registres/CUCId/'..id..' '..(label or 'CataloniaCatalunya')..']'..p.getCatForId( 'CANTIC' ) --no https as of 10/2019
end
 
Baris 205 ⟶ 200:
return false
end
return '[https://ci.nii.ac.jp/author/'..id..'?l=en '..(label or 'CiNii (JapanJepang)')..']'..p.getCatForId( 'CINII' )
end
 
Baris 214 ⟶ 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 'Ukraina')..']'..p.getCatForId( 'EMU' )
end
 
Baris 240 ⟶ 243:
return false
end
return '[https://dib.cambridge.org/viewReadPage.do?articleId='..id..' '..(label or 'IrelandIrlandia')..']'..p.getCatForId( 'DIB' )
end
 
Baris 276 ⟶ 279:
return false
end
return '[https://d-nb.info/gnd/'..id..' '..(label or 'Integrated Authority File (Jerman)')..']'..p.getCatForId( 'GND' )
end
 
Baris 302 ⟶ 305:
return false
end
return '[https://opac.sbn.it/opacsbn/opac/iccu/scheda_authority.jsp?bid='..id..' '..(label or 'ItalyItalia')..']'..p.getCatForId( 'ICCU' )
end
function p.iciaLink( id, label )
Baris 334 ⟶ 337:
return false
end
return '[https://www.pop.culture.gouv.fr/notice/joconde/'..id..' '..(label or 'Joconde (FrancePrancis)')..']'..p.getCatForId( 'Joconde' )
end
 
Baris 352 ⟶ 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 'UnitedAmerika StatesSerikat')..']'..p.getCatForId( 'LCCN' )
end
 
Baris 360 ⟶ 363:
return false
end
return '[http://www.e-lir.ch/e-LIR___Lexicon.'..id..'.450.0.html '..(label or 'Lexicon Istoric Retic (SwitzerlandSwiss)')..']'..p.getCatForId( 'LIR' ) --no https as of 9/2019
end
 
Baris 372 ⟶ 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 (FrancePrancis)')..']'..p.getCatForId( 'Léonore' ) --no https as of 9/2019
end
 
function p.maLink( id, label )
--P6366's format regex: [1-9]\d{43,9} (e.g. 1498221862)
if not id:match( '^[1-9]%d%d%d%d?%d?%d?%d?%d?%d?$' ) then
return false
end
Baris 399 ⟶ 404:
return '['..url..' '..label..']'..cat
else
return '[[MBA (identifier)|MusicBrainz]] [' .. url .. ' artist]' .. cat
end
end
Baris 413 ⟶ 418:
return '['..url..' '..label..']'..cat
else
return '[[MBAREA (identifier)|MusicBrainz]] [' .. url .. ' area]' .. cat
end
end
Baris 427 ⟶ 432:
return '['..url..' '..label..']'..cat
else
return '[[MBI (identifier)|MusicBrainz]] [' .. url .. ' instrument]' .. cat
end
end
Baris 441 ⟶ 446:
return '['..url..' '..label..']'..cat
else
return '[[MBL (identifier)|MusicBrainz]] [' .. url .. ' label]' .. cat
end
end
Baris 455 ⟶ 460:
return '['..url..' '..label..']'..cat
else
return '[[MBP (identifier)|MusicBrainz]] [' .. url .. ' place]' .. cat
end
end
Baris 469 ⟶ 474:
return '['..url..' '..label..']'..cat
else
return '[[MBRG (identifier)|MusicBrainz]] [' .. url .. ' release group]' .. cat
end
end
Baris 483 ⟶ 488:
return '['..url..' '..label..']'..cat
else
return '[[MBS (identifier)|MusicBrainz]] [' .. url .. ' series]' .. cat
end
end
Baris 498 ⟶ 503:
return '['..url..' '..label..']'..cat
else
return '[[MBW (identifier)|MusicBrainz]] [' .. url .. ' work]' .. cat
end
end
Baris 531 ⟶ 536:
return false
end
return '[https://id.ndl.go.jp/auth/ndlna/'..id..' '..(label or 'JapanJepang')..']'..p.getCatForId( 'NDL' )
end
 
Baris 547 ⟶ 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 'CzechRepublik RepublicCeko')..']'..p.getCatForId( 'NKC' )
end
 
Baris 563 ⟶ 568:
return false
end
return '[https://data.nlg.gr/resource/authority/record'..id..' '..(label or 'GreeceYunani')..']'..p.getCatForId( 'NLG' )
end
 
Baris 589 ⟶ 594:
return false
end
return '[https://tools.wmflabs.org/wikidata-externalid-url?p=1695&id='..id..' '..(label or 'PolandPolandia')..']'..p.getCatForId( 'NLP' )
end
 
Baris 605 ⟶ 610:
return false
end
return '[http://katalog.nsk.hr/F/?func=direct&doc_number='..id..'&local_base=nsk10 '..(label or 'CroatiaKroasia')..']'..p.getCatForId( 'NSK' ) --no https as of 9/2019
end
 
Baris 613 ⟶ 618:
return false
end
return '[http://data.bibliotheken.nl/id/thes/p'..id..' '..(label or 'NetherlandsBelanda')..']'..p.getCatForId( 'NTA' )
end
 
Baris 638 ⟶ 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 'PolandPolandia')..']'..p.getCatForId( 'PLWABN' )
end
 
Baris 665 ⟶ 670:
return false
end
return '[https://opac.rism.info/search?id='..id..' '..(label or 'RISM (FrancePrancis)')..']'..p.getCatForId( 'RISM' )
end
 
Baris 673 ⟶ 678:
return false
end
return '[http://data.rero.ch/'..id..' '..(label or 'RERO (SwitzerlandSwiss)')..']'..p.getCatForId( 'RERO' )
end
 
Baris 681 ⟶ 686:
return false
end
return '[https://rkd.nl/en/explore/artists/'..id..' '..(label or 'RKD Artists (NetherlandsBelanda)')..']'..p.getCatForId( 'RKDartists' )
end
 
Baris 689 ⟶ 694:
return false
end
return '[https://rkd.nl/nl/explore/images/'..id..' '..(label or 'RKD ID (NetherlandsBelanda)')..']'..p.getCatForId( 'RKDID' )
end
 
Baris 697 ⟶ 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 'RussiaRusia')..']'..p.getCatForId( 'RSL' ) --no https as of 9/2019
end
 
Baris 705 ⟶ 710:
return false
end
return '[https://libris.kb.se/auth/'..id..' '..(label or 'SwedenSwedia')..']'..p.getCatForId( 'SELIBR' )
end
 
Baris 713 ⟶ 718:
return false
end
return '[http://www.sikart.ch/KuenstlerInnen.aspx?id='..id..'&lng=en '..(label or 'SIKART (SwitzerlandSwiss)')..']'..p.getCatForId( 'SIKART' ) --no https as of 9/2019
end
 
Baris 729 ⟶ 734:
return false
end
return '[https://www.idref.fr/'..id..' '..(label or 'SUDOC (FrancePrancis)')..']'..p.getCatForId( 'SUDOC' )
end
 
Baris 745 ⟶ 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 756 ⟶ 762:
end
 
function p.teLink( id, label )
--P1693's format regex: E[1-8]\.\d{1,2}\.\d{1,2}\.\d{1,2}\.\d{1}\.\d{1}\.\d{1,3} (e.g. E1.23.45.67.8.9.0)
local e1, e2 = id:match( '^E([1-8])%.(%d%d?)%.%d%d?%.%d%d?%.%d%.%d%.%d%d?%d?$' )
if not e1 then
return false
end
local TEnum = 'TEe0'..e1 --no formatter URL in WD, probably due to this complexity
if e1 == '5' or e1 == '7' then
if #e2 == 1 then e2 = '0'..e2 end
TEnum = TEnum..e2
end
return '[http://www.unifr.ch/ifaa/Public/EntryPage/ViewTE/'..TEnum..'.html '..(label or 'Terminologia Embryologica')..']'..p.getCatForId( 'TE' )
end
 
function p.tepapaLink( id, label )
Baris 775 ⟶ 768:
return false
end
return '[https://collections.tepapa.govt.nz/agent/'..id..' '..(label or 'Te Papa (NewSelandia ZealandBaru)')..']'..p.getCatForId( 'TePapa' )
end
 
function p.thLink( id, label )
--P1694's format regex: H\d\.\d{2}\.\d{2}\.\d\.\d{5} (e.g. H1.23.45.6.78901)
local h1, h2 = id:match( '^H(%d)%.(%d%d)%.%d%d%.%d%.%d%d%d%d%d$' )
if not h1 then
return false
end
local THnum = 'THh'..h1..h2 --no formatter URL in WD, probably due to this complexity
return '[http://www.unifr.ch/ifaa/Public/EntryPage/ViewTH/'..THnum..'.html '..(label or 'Terminologia Histologica')..']'..p.getCatForId( 'TH' )
end
 
Baris 792 ⟶ 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 (SwitzerlandSwiss)')..']'..p.getCatForId( 'TLS' ) --no https as of 9/2019
end
 
Baris 837 ⟶ 820:
end
id = id:gsub('\/', '_')
return '[https://opac.vatlib.it/auth/detail/'..id..' '..(label or 'VaticanVatikan')..']'..p.getCatForId( 'VcBA' )
end
 
Baris 846 ⟶ 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 854 ⟶ 838:
function p.append(str, c, length)
while str:len() < length do
str = c .. str
end
return str
Baris 869 ⟶ 853:
local result = (12 - remainder) % 11
if result == 10 then
return "'X"'
end
return tostring( result )
Baris 921 ⟶ 905:
local wikiTable = '{| class="wikitable sortable"\n'..
'! rowspan=2 | Parameter\n'..
'! rowspan=2 | SectionBagian\n'..
'! rowspan=2 | AppearsDitampilkan assebagai\n'..
'! rowspan=2; data-sort-type=number | WikidataAtribut propertyWikidata\n'..
'! colspan=4 | TrackingKategori categoriespelacak anddan pagejumlah countshalaman\n'..
'|-\n'..
'! [[:CategoryKategori:Artikel Wikipedia articlesdengan withinformasi authoritypengawasan control informationotoritas|'.. 'ArticlesArtikel]]\n'..
'! [[:CategoryKategori:UserHalaman pagespengguna withdengan authorityinformasi controlpengawasan informationotoritas|'.. 'UserHalaman pagespengguna]]\n'..
'! [[:CategoryKategori:MiscellaneousHalaman pagesdengan withinformasi authoritypengawasan control informationotoritas|'.. 'Misc.Halaman pageslain]]\n'..
'! [[:CategoryKategori:Artikel Wikipedia articlesdengan withinformasi faultypengawasan authorityotoritas control informationbermasalah|'.. 'FaultyID IDsbermasalah]]\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 943 ⟶ 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 = 'Artikel Wikipedia articlesdengan withpenanda '..category..' identifiers'
local userCat = 'UserHalaman pagespengguna withdengan penanda '..category..' identifiers'
local miscCat = 'MiscellaneousHalaman pagesdengan withpenanda '..category..' identifiers'
local faultyCat = 'Artikel Wikipedia articlesdengan withdengan faultypenanda '..category..' identifiersbermasalah'
--counts
local articleCount = lang:formatNum( mw.site.stats.pagesInCategory(articleCat, 'pages') )
Baris 957 ⟶ 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 965 ⟶ 955:
'||'..appearsAs..
'||data-sort-value='..pid..'|'..wpl..
'||style="text-align: right;"|[[:CategoryKategori:'..articleCat..'|'..articleCount..']]'..
'||style="text-align: right;"|[[:CategoryKategori:'.. userCat..'|'.. userCount..']]'..
'||style="text-align: right;"|[[:CategoryKategori:'.. miscCat..'|'.. miscCount..']]'..
'||style="text-align: right;"|[[:CategoryKategori:'.. faultyCat..'|'.. faultyCount..']]'
end
Baris 974 ⟶ 964:
local wcd = { 'WorldCat-LCCN', 'WorldCat-VIAF' }
for _, w in pairs(wcd) do
local articleCat = 'Wikipedia articlesArticles with '..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'..
'||'..'—'..
'||GeneralUmum'..
'||'..appearsAs..
'||data-sort-value='..w..'|'..'—'..
'||style="text-align: right;"|[[:Category:Kategori'..articleCat..'|'..articleCount..']]'..
'||style="text-align: right;"|—'..
'||style="text-align: right;"|—'..
Baris 994 ⟶ 985:
end
--append sums
return require("Module:Suppress categories").main(wikiTable)..'\n|}'
wikiTable = wikiTable..'\n'..
'|-\n'..
'! style="text-align: right;" colspan=3|Total'..
'||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 1.001 ⟶ 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, "Art'Galeri galleriesseni anddan museums"museum', "'1"' },
{ 'ACM-DL', 864, p.acmLink, "Scientific'Basis databases"data ilmiah', "'12345678901"', link =" 'ACM DL (identifier)"' },
{ 'ADB', 1907, p.adbLink,"Biographical'Kamus dictionaries"biografi', "'barton-sir-edmund-toby-71"' },
{ 'AGSA', 6804, p.agsaLink, "Art'Galeri galleriesseni anddan museums"museum', "'3625"' },
{ 'autores.uy', 2558, p.autoresuyLink, "Biographical'Kamus dictionaries"biografi', "'12345"' },
{ 'AWR', 41824186, p.awrLink, "Biographical'Kamus dictionaries"biografi', "'PR00768b"' },
{ 'BALaTBIBSYS', 32931015, p.balatLinkbibsysLink, "Art'Perpustakaan research institutes"nasional', "1"'1234567890123' },
{ 'BIBSYSBildindex', 10152092, p.bibsysLinkbildLink, "National'Lembaga libraries"penelitian seni', "1234567890123"'1' },
{ 'BildindexBNC', 20921890, p.bildLinkbncLink, "Art'Perpustakaan research institutes"nasional', "1"'123456789' },
{ 'BNCBNE', 1890950, p.bncLinkbneLink, "National'Perpustakaan libraries"nasional', "123456789"'XX1234567' },
{ 'BNEBNF', 950268, p.bneLinkbnfLink, "National'Perpustakaan libraries"nasional', "XX1234567"'123456789' },
{ 'BNFBotanist', 268428, p.bnfLinkbotanistLink , "National'Basis libraries"data ilmiah', "123456789"'L.' },
{ 'BotanistBPN', 428651, p.botanistLinkbpnLink , "Scientific'Kamus databases"biografi', "L."'12345678' },
{ 'BPNCANTIC', 6511273, p.bpnLink canticLink, "Biographical'Perpustakaan dictionaries"nasional', "12345678"'a12345678' },
{ 'CINII', 271, p.ciniiLink, 'Basis data ilmiah', 'DA12345678', link = 'CiNii (identifier)' },
{ 'CANTIC', 1273, p.canticLink, "National libraries", "a12345678"},
{ 'CWGC', 1908, p.cwgcLink, 'Lain-lain', '1234567' },
{ 'CINII', 271, p.ciniiLink, "Scientific databases", "DA12345678", link = "CiNii (identifier)"},
{ 'CWGCDAAO', 19081707, p.cwgcLinkdaaoLink, "Other"'Lembaga penelitian seni', "1234567"'rolf-harris' },
{ 'DAAODBLP', 17072456, p.daaoLinkdblpLink, "Art'Basis researchdata institutes"ilmiah', "rolf-harris"'123/123' },
{ 'DBLPDIB', 2456 6829, p.dblpLinkdibLink, "Scientific'Kamus databases"biografi', "123/123"'a1234' },
{ 'DIBDSI', 68292349, p.dibLinkdsiLink, "Biographical'Lembaga dictionaries"penelitian seni', "a1234"'1538' },
{ 'DSIEMU', 23494613, p.dsiLinkemuLink, "Art'Perpustakaan research institutes"nasional', "1538"'15409' },
{ 'FAST', 2163, p.fastLink, "Other"'Lain-lain', "'1"' },
{ 'FNZA', 6792, p.fnzaLink, "Art'Lembaga researchpenelitian institutes"seni', "'12"' },
{ 'GND', 227, p.gndLink, "General"'Umum', "'4079154-3"' },
{ 'HDS', 902, p.hdsLink, "Other"'Lain-lain', "'050123"' },
{ 'IAAF', 1146, p.iaafLink, "Other"'Lain-lain', "'123"' },
{ 'ICCU', 396, p.iccuLink, "National'Perpustakaan libraries"nasional', "'IT\\ICCU\\CFIV\\000163"' }, --formerly SBN
{ 'ICIA', 1736, p.iciaLink, "Art'Lembaga researchpenelitian institutes"seni', "'1"' },
{ 'IEU', 9070, p.ieuLink, "Other"'Lain-lain', "'N\\A\\NationalAcademyofArtandArchitecture"' },
{ 'ISNI', 213, p.isniLink, "General"'Umum', "'0000-0000-6653-4145"', prefix = '[[ISNI (identifier)|ISNI]]' },
{ 'Joconde', 347, p.jocondeLink, "Art'Lembaga researchpenelitian institutes"seni', "'12345678901"' },
{ 'KULTURNAV', 1248, p.kulturnavLink, "Art'Lembaga researchpenelitian institutes"seni', "'12345678-1234-1234-1234-1234567890AB"', link =" 'KulturNav (identifier)"' },
{ 'LCCN', 244, p.lccnLink, "National'Perpustakaan libraries"nasional', "'n78039510"' },
{ 'LIR', 886, p.lirLink, "Other"'Lain-lain', "'1"' },
{ 'LNB', 1368, p.lnbLink, "National'Perpustakaan libraries"nasional', "'123456789"' },
{ 'Léonore', 640, p.leonoreLink, "Other"'Lain-lain', "'LH//1/1"', prefix = "'[[Léonore (identifier)|Léonore (FrancePrancis)]]"' },
{ 'MA', 6366, p.maLink, "Other"'Lain-lain', "'123456789"' },
{ 'MBA', 434, p.mbaLink, "Other"'Lain-lain', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz' }, --special cat name
{ 'MBAREA', 982, p.mbareaLink, "Other"'Lain-lain', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz area' }, --special cat name
{ 'MBI', 1330, p.mbiLink, "Other"'Lain-lain', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz instrument' }, --special cat name
{ 'MBL', 966, p.mblLink, "Other"'Lain-lain', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz label' }, --special cat name
{ 'MBP', 1004, p.mbpLink, "Other"'Lain-lain', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz place' }, --special cat name
{ 'MBRG', 436, p.mbrgLink, "Other"'Lain-lain', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz release group' }, --special cat name
{ 'MBS', 1407, p.mbsLink, "Other"'Lain-lain', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz series' }, --special cat name
{ 'MBW', 435, p.mbwLink, "Other"'Lain-lain', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz work' }, --special cat name
{ 'MGP', 549, p.mgpLink, "Scientific'Basis databases"data ilmiah', "'123456"' },
{ 'NARA', 1225, p.naraLink, "Other"'Lain-lain', "'12345678"' },
{ 'NCL', 1048, p.nclLink, "National'Perpustakaan libraries"nasional', "'1081436"' },
{ 'NDL', 349, p.ndlLink, "National'Perpustakaan libraries"nasional', "'012345678"' },
{ 'NGV', 2041, p.ngvLink, "Art'Galeri galleriesseni anddan museums"museum', "'12354"' },
{ 'NKC', 691, p.nkcLink, "National'Perpustakaan libraries"nasional', "'abcd12345678901234"' },
{ 'NLA', 409, p.nlaLink, "National'Perpustakaan libraries"nasional', "'123456789012"' },
{ 'NLG', 3348, p.nlgLink, "National'Perpustakaan libraries"nasional', "'12345678"' },
{ 'NLI', 949, p.nliLink, "National'Perpustakaan libraries"nasional', "'123456789"' },
{ 'NLK', 5034, p.nlkLink, "National'Perpustakaan libraries"nasional', "'KAB197000000"' },
{ 'NLP', 1695, p.nlpLink, "National'Perpustakaan libraries"nasional', "'9810123456789012345"' },
{ 'NLR', 1003, p.nlrLink, "National'Perpustakaan libraries"nasional', "'123456789"' },
{ 'NSK', 1375, p.nskLink, "National'Perpustakaan libraries"nasional', "'123456789"' },
{ 'NTA', 1006, p.ntaLink, "National'Perpustakaan libraries"nasional', "'12345678X"' },
{ 'ORCID', 496, p.orcidLink, "General"'Umum', "'0000-0002-7398-5483"', prefix = '[[ORCID (identifier)|ORCID]]' },
{ 'PIC', 2750, p.picLink, "Art'Lembaga researchpenelitian institutes"seni', "'1"' },
{ 'PLWABN', 7293, p.plwabnLink, "National'Perpustakaan libraries"nasional', "'9812345678905606"' },
{ 'Publons', 3829, p.publonsLink, "Scientific'Basis databases"data ilmiah', "'2776255"' },
{ 'RID', 1053, p.ridLink, "Scientific'Basis databases"data ilmiah', "'A-1234-1934"' },
{ 'RISM', 5504, p.rismLink, "Other"'Lain-lain', "'pe1"', prefix = '[[RISM (identifier)|RISM (FrancePrancis)]]' },
{ 'RERO', 3065, p.reroLink, "Other"'Lain-lain', "'02-A012345678"', prefix = '[[RERO (identifier)|RERO (SwitzerlandSwiss)]]' },
{ 'RKDartists', 650, p.rkdartistsLink, "Art'Lembaga researchpenelitian institutes"seni', "'123456"' },
{ 'RKDID', 350, p.rkdidLink, "Art'Lembaga researchpenelitian institutes"seni', "'123456"' },
{ 'RSL', 947, p.rslLink, "National'Perpustakaan libraries"nasional', "'123456789"' },
{ 'SELIBR', 906, p.selibrLink, "National'Perpustakaan libraries"nasional', "'123456"' },
{ 'SIKART', 781, p.sikartLink, "Art'Lembaga researchpenelitian institutes"seni', '123456789' },
{ 'SNAC-ID', 3430, p.snacLink, "Other"'Lain-lain', "'A"' },
{ 'SUDOC', 269, p.sudocLink, "Other"'Lain-lain', "'026927608"', prefix = '[[SUDOC (identifier)|SUDOC (FrancePrancis)]]' },
{ 'S2AuthorId', 4012, p.s2authoridLink, "Scientific'Basis databases"data ilmiah', "'1796130"', category = 'Semantic Scholar author' }, --special cat name
{ 'TA98', 1323, p.ta98Link, "Scientific'Basis databases"data ilmiah', "'A12.3.45.678"' },
{ 'TDVİA', 7314, p.tdviaLink, "Other"'Lain-lain', "'asim-b-behdele"' },
{ 'TETePapa', 16933544, p.teLinktepapaLink, "Scientific'Galeri databases"seni dan museum', "E1.23.45.67.8.9.0"'1' },
{ 'TePapaTLS', 3544 1362, p.tepapaLinktlsLink, "Art galleries and museums"'Lain-lain', "1"'Abcd' },
{ 'Trove', 1315, p.troveLink, 'Lain-lain', '12345678', prefix = '[[Trove (identifier)|Trove (Australia)]]' }, --formerly NLA-person
{ 'TH', 1694, p.thLink, "Scientific databases", "H1.23.45.6.78901"},
{ 'TLSUKPARL', 13626213, p.tlsLinkukparlLink, "Other"'Lain-lain', "Abcd"'AQUupyiR' },
{ 'ULAN', 245, p.ulanLink, 'Lembaga penelitian seni', '500123456' },
{ 'Trove', 1315, p.troveLink, "Other", "12345678", prefix = '[[Trove (identifier)|Trove (Australia)]]'}, --formerly NLA-person
{ 'USCongress', 1157, p.uscongressLink, 'Lain-lain', 'A000123', link = 'US Congress (identifier)' },
{ 'UKPARL', 6213, p.ukparlLink, "Other", "AQUupyiR"},
{ 'ULANVcBA', 2458034, p.ulanLinkvcbaLink, "Art'Perpustakaan research institutes"nasional', "500123456"'494/9793' },
{ 'USCongressVIAF', 1157214, p.uscongressLinkviafLink, "Other"'Umum', "A000123"'123456789', linkprefix = "US Congress'[[VIAF (identifier)"|VIAF]]' },
{ 'WORLDCATID', 7859, nil, 'Umum', nil, link = 'WorldCat Identities (identifier)' },
{ 'VcBA', 8034, p.vcbaLink, "National libraries", "494/9793"},
{ 'VIAF', 214, p.viafLink, "General", "123456789", prefix = "[[VIAF (identifier)|VIAF]]"},
{ 'WORLDCATID', 7859, nil, "General", nil, link = "WorldCat Identities (identifier)"},
}
 
Baris 1.114 ⟶ 1.115:
}
 
-- Deprecated aliases to p.conf; tracked in [[CategoryKategori: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.130 ⟶ 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.148 ⟶ 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.154 ⟶ 1.158:
parentArgs[param] = parentArgs[dep]
if namespace == 0 then
deprecatedIdCat = '[[CategoryKategori:Wikipedia articlesArticles with deprecated authority control identifiers|'..dep..']]'
end
end
end
--Useuse QID= parameter for testing/example purposes only
local itemId = nil
if namespace ~= 0 then
Baris 1.173 ⟶ 1.177:
--Wikidata fallback if available
if itemId then
local suppressedIdCount = 0
local iMatches = 0
for _, params in ipairs( p.conf ) do
Baris 1.181 ⟶ 1.186:
if wikidataIds[1] then
if val == '' and (namespace == 0 or testcases) then
suppressedIdCount = suppressedIdCount + 1
suppressedIdCat = '[[Category:Wikipedia articles with suppressed authority control identifiers|'..params[1]..']]'
suppressedIdCat = '[[Kategori:Artikel Wikipedia dengan penanda pengawasan otoritas yang disembunyikan|'..params[1]..']]'
else
parentArgs[params[1]] = wikidataIds[1] --add ID from WD
Baris 1.198 ⟶ 1.204:
end
if bMatch == false then
differentOnWDCat = '[[CategoryKategori:PagesHalaman usingyang authoritymenggunakan controlpengawasan withotoritas parametersdengan differentparameter onberbeda dari Wikidata|'..params[1]..']]'
end end end end end
if iMatches > 0 and iMatches == iParentArgs then
sameOnWDCat = '[[CategoryKategori:PagesHalaman usingyang authoritymenggunakan controlpengawasan withotoritas parametersdengan allsemua matchingparameter cocok dengan 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 = '[[Kategori:'..sCat..']]'..p.redCatLink(sCat)
end
end
end
--Configured rows
--configure rows
local rct = 0
local sectionOrder = {"General"'Umum',"National'Perpustakaan libraries"nasional',"Art'Galeri galleriesseni anddan museums"museum',
'Lembaga penelitian seni','Kamus biografi','Basis data ilmiah',
"Art research institutes","Biographical dictionaries","Scientific databases",
"Other"'Lain-lain'}
local sections = {
["General"'Umum'] = {},
["National'Perpustakaan libraries"nasional'] = {},
["Art'Galeri galleriesseni anddan museums"museum'] = {},
["Art'Lembaga researchpenelitian institutes"seni'] = {},
["Biographical'Kamus dictionaries"biografi'] = {},
["Scientific'Basis databases"data ilmiah'] = {},
["Other"'Lain-lain'] = {}
}
-- Dondon't show NLP isif PLWABN is present, since they both go to the National Library of Poland
-- and the library has deprecated NLP IDs in favor of PLWABN IDs
if parentArgs.PLWABN or parentArgs.plwabn then
parentArgs.NLP = ''
Baris 1.230 ⟶ 1.245:
table.insert( tval, val )
if params.prefix then
table.insert( tlinks, params[3]( val, "'1"' ) )
else
table.insert( tlinks, params[3]( val ) )
Baris 1.256 ⟶ 1.271:
rct = rct + 1
if tval[2] then
multipleIdCat = p.getCatForId( 'multipleganda' )
end
end
 
end
Baris 1.265 ⟶ 1.280:
local worldcatId = parentArgs['worldcatid'] or parentArgs['WORLDCATID']
if worldcatId and worldcatId ~= '' then --if WORLDCATID present & unsuppressed
table.insert( sections["General"'Umum'], 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
elseif worldcatId == nil then --if WORLDCATID absent but unsuppressed
local viafId = parentArgs['viaf'] or parentArgs['VIAF']
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["General"'Umum'], p.createRow( 'VIAF', viafId, '[https://www.worldcat.org/identities/containsVIAFID/'..viafId..' WorldCat (via VIAF)]', nil, false ) )
if namespace == 0 then
worldcatCat = '[[CategoryKategori:Artikel Wikipedia articlesdengan withpenanda WorldCat-VIAF identifiers]]'
end
rct = rct + 1
elseif lccnId and lccnId ~= '' and p.lccnLink( lccnId ) then --LCCN must be present, unsuppressed, & validated
local lccnParts = p.splitLccn( lccnId )
if lccnParts and lccnParts[1] ~= 'sh' then
local lccnIdFmtd = lccnParts[1]..lccnParts[2]..'-'..lccnParts[3]
table.insert( sections["General"'Umum'], p.createRow( 'LCCN', lccnId, '[https://www.worldcat.org/identities/lccn-'..lccnIdFmtd..' WorldCat (via Library of Congress)]', nil, false ) )
if namespace == 0 then
worldcatCat = '[[CategoryKategori:Artikel Wikipedia articlesdengan withpenanda WorldCat-LCCN identifiers]]'
end
end
rct = rct + 1
end
elseif worldcatId == '' then --if WORLDCATID suppressed
suppressedIdCat = '[[CategoryKategori:Artikel Wikipedia articlesdengan withpenanda suppressedpengawasan authorityotoritas controlyang identifiersdisembunyikan|WORLDCATID]]'
end
local Navbox = require('Module:Navbox')
local elementsCat = ''
if rct == 0 or rct >= 25 then
local eCat = 'AC with '..rct..' elements'
elementsCat = '[[Category:'..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.311 ⟶ 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 = '[[Bantuan:Pengawasan otoritas|Pengawasan otoritas]]'..pencil
if rct >= 4 then
navboxArgs.title = "[[Help:Authority control|Authority control]]" .. pencil
else
navboxArgs.border = "child"
navboxArgs = {
group1 = "[[Help:Authority control|Authority control]]" .. pencil,
list1 = Navbox._navbox(navboxArgs)
}
end
else
local sect = navboxArgs.group1
if sect == "General"'Umum' or sect == "Other"'Lain-lain' then
-- 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 = "'[[HelpBantuan:AuthorityPengawasan controlotoritas|AuthorityPengawasan controlotoritas]]" '.. pencil
else
navboxArgs.group1 = "'[[HelpBantuan:AuthorityPengawasan controlotoritas|AuthorityPengawasan controlotoritas: " '.. sect .. "']] " '.. pencil
end
end
Baris 1.339 ⟶ 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 dengan '..rct..' elemen'
elementsCat = '[[Kategori:'..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 yang menggunakan parameter state: collapsed'
elseif parentArgs.state == 'expanded' then sCat = 'AC yang menggunakan parameter state: expanded'
elseif parentArgs.state == 'autocollapse' then sCat = 'AC yang menggunakan parameter state: autocollapse'
else sCat = 'AC yang menggunakan parameter state: other'
end
stateCat = '[[Kategori:'..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:WikipediaArtikel articlesWikipedia)', '%1:%2') --by definition
end