Modul:Authority control/bakpasir: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Tidak ada ringkasan suntingan
Uzume (bicara | kontrib)
 
(16 revisi perantara oleh satu pengguna lainnya tidak ditampilkan)
Baris 1:
require('Module:No globalsstrict')
 
local p = {}
Baris 33:
 
function p.createRow( id, rawValues, link, links, withUid, specialCat, prefix)
local catName = 'Artikel Wikipedia dengan kesalahan penanda '..(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 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 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 (Belgia)')..']'..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 169 ⟶ 164:
id = 'cb'..id
end
return '[https://catalogue.bnf.fr/ark:/12148/'..id..' ' .. (label or 'Prancis')..'] [https://data.bnf.fr/ark:/12148/'..id..' (data)]'..p.getCatForId( 'BNF' )
end
 
Baris 197 ⟶ 192:
return false
end
return '[http://cantic.bnc.cat/registres/CUCId/'..id..' '..(label or 'KatalunyaCatalunya')..']'..p.getCatForId( 'CANTIC' ) --no https as of 10/2019
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 265 ⟶ 268:
return false
end
return '[https://findnzartists.org.nz/artist/'..id..'/ '..(label or 'SelandiaNew BaruZealand Artists')..']'..p.getCatForId( 'FNZA' )
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 284 ⟶ 287:
return false
end
return '[https://hls-dhs-dss.ch/fr/articles/'..id..' '..(label or 'Historical Dictionary of SwissSwitzerland')..']'..p.getCatForId( 'HDS' )
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
Baris 382 ⟶ 387:
 
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 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 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 776 ⟶ 769:
end
return '[https://collections.tepapa.govt.nz/agent/'..id..' '..(label or 'Te Papa (Selandia Baru)')..']'..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
Baris 812 ⟶ 795:
return false
end
return '[https://id.parliament.uk/'..id..' '..(label or 'ParlemenUK InggrisParliament')..']'..p.getCatForId( 'UKPARL' )
end
 
Baris 828 ⟶ 811:
return false
end
return '[http://bioguide.congress.gov/scripts/biodisplay.pl?index='..id..' '..(label or 'KongresUS ASCongress')..']'..p.getCatForId( 'USCongress' ) --no https as of 9/2019
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 922 ⟶ 906:
'! rowspan=2 | Parameter\n'..
'! rowspan=2 | Bagian\n'..
'! rowspan=2 | DitampikanDitampilkan sebagai\n'..
'! rowspan=2; data-sort-type=number | PropertiAtribut Wikidata\n'..
'! colspan=4 | Kategori pelacak dan jumlah halaman\n'..
'|-\n'..
'! [[:Kategori:Artikel Wikipedia dengan informasi pengawasan otoritas|'.. 'Artikel]]\n'..
'! [[:Kategori:Halaman pengguna dengan informasi pengawasan otoritas|'.. 'Halaman pengguna]]\n'..
'! [[:Kategori:Halaman lain dengan informasi pengawasan otoritas|'.. 'Halaman lain]]\n'..
'! [[:Kategori:Artikel Wikipedia dengan informasi pengawasan otoritas bermasalah|'.. 'ID bermasalah]]\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'..
Baris 988 ⟶ 979:
'||'..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, "'Galeri seni dan museum"', "'1"' },
{ 'ACM-DL', 864, p.acmLink, "'Basis data ilmiah"', "'12345678901"', link =" 'ACM DL (identifier)"' },
{ 'ADB', 1907, p.adbLink,"'Kamus biografi"', "'barton-sir-edmund-toby-71"' },
{ 'AGSA', 6804, p.agsaLink, "'Galeri seni dan museum"', "'3625"' },
{ 'autores.uy', 2558, p.autoresuyLink, "'Kamus biografi"', "'12345"' },
{ 'AWR', 41824186, p.awrLink, "'Kamus biografi"', "'PR00768b"' },
{ 'BALaTBIBSYS', 32931015, p.balatLinkbibsysLink, "Lembaga'Perpustakaan penelitian seni"nasional', "1"'1234567890123' },
{ 'BIBSYSBildindex', 10152092, p.bibsysLinkbildLink, "Perpustakaan'Lembaga nasional"penelitian seni', "1234567890123"'1' },
{ 'BildindexBNC', 20921890, p.bildLinkbncLink, "Lembaga'Perpustakaan penelitian seni"nasional', "1"'123456789' },
{ 'BNCBNE', 1890950, p.bncLinkbneLink, "'Perpustakaan nasional"', "123456789"'XX1234567' },
{ 'BNEBNF', 950268, p.bneLinkbnfLink, "'Perpustakaan nasional"', "XX1234567"'123456789' },
{ 'BNFBotanist', 268428, p.bnfLinkbotanistLink , "Perpustakaan'Basis nasional"data ilmiah', "123456789"'L.' },
{ 'BotanistBPN', 428651, p.botanistLinkbpnLink , "Basis'Kamus data ilmiah"biografi', "L."'12345678' },
{ 'BPNCANTIC', 6511273, p.bpnLink canticLink, "Kamus'Perpustakaan biografi"nasional', "12345678"'a12345678' },
{ 'CINII', 271, p.ciniiLink, 'Basis data ilmiah', 'DA12345678', link = 'CiNii (identifier)' },
{ 'CANTIC', 1273, p.canticLink, "Perpustakaan nasional", "a12345678"},
{ 'CWGC', 1908, p.cwgcLink, 'Lain-lain', '1234567' },
{ 'CINII', 271, p.ciniiLink, "Basis data ilmiah", "DA12345678", link = "CiNii (identifier)"},
{ 'CWGCDAAO', 19081707, p.cwgcLinkdaaoLink, "Lain-lain"'Lembaga penelitian seni', "1234567"'rolf-harris' },
{ 'DAAODBLP', 17072456, p.daaoLinkdblpLink, "Lembaga'Basis penelitiandata seni"ilmiah', "rolf-harris"'123/123' },
{ 'DBLPDIB', 2456 6829, p.dblpLinkdibLink, "Basis'Kamus data ilmiah"biografi', "123/123"'a1234' },
{ 'DIBDSI', 68292349, p.dibLinkdsiLink, "Kamus'Lembaga biografi"penelitian seni', "a1234"'1538' },
{ 'DSIEMU', 23494613, p.dsiLinkemuLink, "Lembaga'Perpustakaan penelitian seni"nasional', "1538"'15409' },
{ 'FAST', 2163, p.fastLink, "'Lain-lain"', "'1"' },
{ 'FNZA', 6792, p.fnzaLink, "'Lembaga penelitian seni"', "'12"' },
{ 'GND', 227, p.gndLink, "'Umum"', "'4079154-3"' },
{ 'HDS', 902, p.hdsLink, "'Lain-lain"', "'050123"' },
{ 'IAAF', 1146, p.iaafLink, "'Lain-lain"', "'123"' },
{ 'ICCU', 396, p.iccuLink, "'Perpustakaan nasional"', "'IT\\ICCU\\CFIV\\000163"' }, --formerly SBN
{ 'ICIA', 1736, p.iciaLink, "'Lembaga penelitian seni"', "'1"' },
{ 'IEU', 9070, p.ieuLink, "'Lain-lain"', "'N\\A\\NationalAcademyofArtandArchitecture"' },
{ 'ISNI', 213, p.isniLink, "'Umum"', "'0000-0000-6653-4145"', prefix = '[[ISNI (identifier)|ISNI]]' },
{ 'Joconde', 347, p.jocondeLink, "'Lembaga penelitian seni"', "'12345678901"' },
{ 'KULTURNAV', 1248, p.kulturnavLink, "'Lembaga penelitian seni"', "'12345678-1234-1234-1234-1234567890AB"', link =" 'KulturNav (identifier)"' },
{ 'LCCN', 244, p.lccnLink, "'Perpustakaan nasional"', "'n78039510"' },
{ 'LIR', 886, p.lirLink, "'Lain-lain"', "'1"' },
{ 'LNB', 1368, p.lnbLink, "'Perpustakaan nasional"', "'123456789"' },
{ 'Léonore', 640, p.leonoreLink, "'Lain-lain"', "'LH//1/1"', prefix = "'[[Léonore (identifier)|Léonore (Prancis)]]"' },
{ 'MA', 6366, p.maLink, "'Lain-lain"', "'123456789"' },
{ 'MBA', 434, p.mbaLink, "'Lain-lain"', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz' }, --special cat name
{ 'MBAREA', 982, p.mbareaLink, "'Lain-lain"', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz area' }, --special cat name
{ 'MBI', 1330, p.mbiLink, "'Lain-lain"', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz instrument' }, --special cat name
{ 'MBL', 966, p.mblLink, "'Lain-lain"', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz label' }, --special cat name
{ 'MBP', 1004, p.mbpLink, "'Lain-lain"', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz place' }, --special cat name
{ 'MBRG', 436, p.mbrgLink, "'Lain-lain"', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz release group' }, --special cat name
{ 'MBS', 1407, p.mbsLink, "'Lain-lain"', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz series' }, --special cat name
{ 'MBW', 435, p.mbwLink, "'Lain-lain"', "'12345678-1234-1234-1234-1234567890AB"', category = 'MusicBrainz work' }, --special cat name
{ 'MGP', 549, p.mgpLink, "'Basis data ilmiah"', "'123456"' },
{ 'NARA', 1225, p.naraLink, "'Lain-lain"', "'12345678"' },
{ 'NCL', 1048, p.nclLink, "'Perpustakaan nasional"', "'1081436"' },
{ 'NDL', 349, p.ndlLink, "'Perpustakaan nasional"', "'012345678"' },
{ 'NGV', 2041, p.ngvLink, "'Galeri seni dan museum"', "'12354"' },
{ 'NKC', 691, p.nkcLink, "'Perpustakaan nasional"', "'abcd12345678901234"' },
{ 'NLA', 409, p.nlaLink, "'Perpustakaan nasional"', "'123456789012"' },
{ 'NLG', 3348, p.nlgLink, "'Perpustakaan nasional"', "'12345678"' },
{ 'NLI', 949, p.nliLink, "'Perpustakaan nasional"', "'123456789"' },
{ 'NLK', 5034, p.nlkLink, "'Perpustakaan nasional"', "'KAB197000000"' },
{ 'NLP', 1695, p.nlpLink, "'Perpustakaan nasional"', "'9810123456789012345"' },
{ 'NLR', 1003, p.nlrLink, "'Perpustakaan nasional"', "'123456789"' },
{ 'NSK', 1375, p.nskLink, "'Perpustakaan nasional"', "'123456789"' },
{ 'NTA', 1006, p.ntaLink, "'Perpustakaan nasional"', "'12345678X"' },
{ 'ORCID', 496, p.orcidLink, "'Umum"', "'0000-0002-7398-5483"', prefix = '[[ORCID (identifier)|ORCID]]' },
{ 'PIC', 2750, p.picLink, "'Lembaga penelitian seni"', "'1"' },
{ 'PLWABN', 7293, p.plwabnLink, "'Perpustakaan nasional"', "'9812345678905606"' },
{ 'Publons', 3829, p.publonsLink, "'Basis data ilmiah"', "'2776255"' },
{ 'RID', 1053, p.ridLink, "'Basis data ilmiah"', "'A-1234-1934"' },
{ 'RISM', 5504, p.rismLink, "'Lain-lain"', "'pe1"', prefix = '[[RISM (identifier)|RISM (Prancis)]]' },
{ 'RERO', 3065, p.reroLink, "'Lain-lain"', "'02-A012345678"', prefix = '[[RERO (identifier)|RERO (Swiss)]]' },
{ 'RKDartists', 650, p.rkdartistsLink, "'Lembaga penelitian seni"', "'123456"' },
{ 'RKDID', 350, p.rkdidLink, "'Lembaga penelitian seni"', "'123456"' },
{ 'RSL', 947, p.rslLink, "'Perpustakaan nasional"', "'123456789"' },
{ 'SELIBR', 906, p.selibrLink, "'Perpustakaan nasional"', "'123456"' },
{ 'SIKART', 781, p.sikartLink, "'Lembaga penelitian seni"', '123456789' },
{ 'SNAC-ID', 3430, p.snacLink, "'Lain-lain"', "'A"' },
{ 'SUDOC', 269, p.sudocLink, "'Lain-lain"', "'026927608"', prefix = '[[SUDOC (identifier)|SUDOC (Prancis)]]' },
{ 'S2AuthorId', 4012, p.s2authoridLink, "'Basis data ilmiah"', "'1796130"', category = 'Semantic Scholar author' }, --special cat name
{ 'TA98', 1323, p.ta98Link, "'Basis data ilmiah"', "'A12.3.45.678"' },
{ 'TDVİA', 7314, p.tdviaLink, "'Lain-lain"', "'asim-b-behdele"' },
{ 'TETePapa', 16933544, p.teLinktepapaLink, "Basis'Galeri dataseni ilmiah"dan museum', "E1.23.45.67.8.9.0"'1' },
{ 'TePapaTLS', 3544 1362, p.tepapaLinktlsLink, "Galeri seni dan museum"'Lain-lain', "1"'Abcd' },
{ 'Trove', 1315, p.troveLink, 'Lain-lain', '12345678', prefix = '[[Trove (identifier)|Trove (Australia)]]' }, --formerly NLA-person
{ 'TH', 1694, p.thLink, "Basis data ilmiah", "H1.23.45.6.78901"},
{ 'TLSUKPARL', 13626213, p.tlsLinkukparlLink, "'Lain-lain"', "Abcd"'AQUupyiR' },
{ 'ULAN', 245, p.ulanLink, 'Lembaga penelitian seni', '500123456' },
{ 'Trove', 1315, p.troveLink, "Lain-lain", "12345678", prefix = '[[Trove (identifier)|Trove (Australia)]]'}, --formerly NLA-person
{ 'UKPARLUSCongress', 62131157, p.ukparlLinkuscongressLink, "'Lain-lain"', "AQUupyiR"'A000123', link = 'US Congress (identifier)' },
{ 'ULANVcBA', 2458034, p.ulanLinkvcbaLink, "Lembaga'Perpustakaan penelitian seni"nasional', "500123456"'494/9793' },
{ 'USCongressVIAF', 1157214, p.uscongressLinkviafLink, "Lain-lain"'Umum', "A000123"'123456789', linkprefix = "Kongres AS'[[VIAF (identifier)"|VIAF]]' },
{ 'WORLDCATID', 7859, nil, 'Umum', nil, link = 'WorldCat Identities (identifier)' },
{ 'VcBA', 8034, p.vcbaLink, "Perpustakaan nasional", "494/9793"},
{ 'VIAF', 214, p.viafLink, "Umum", "123456789", prefix = "[[VIAF (identifier)|VIAF]]"},
{ 'WORLDCATID', 7859, nil, "Umum", 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 = '[[Kategori: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.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 = '[[Kategori:Artikel Wikipedia dengan penanda pengawasan otoritas yang disembunyikan|'..params[1]..']]'
else
Baris 1.202 ⟶ 1.208:
if iMatches > 0 and iMatches == iParentArgs then
sameOnWDCat = '[[Kategori:Halaman yang menggunakan pengawasan otoritas dengan semua parameter 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 = {"'Umum"',"'Perpustakaan nasional"',"'Galeri seni dan museum"',
"'Lembaga penelitian seni"',"'Kamus biografi"',"'Basis data ilmiah"',
"'Lain-lain"'}
local sections = {
["'Umum"'] = {},
["'Perpustakaan nasional"'] = {},
["'Galeri seni dan museum"'] = {},
["'Lembaga penelitian seni"'] = {},
["'Kamus biografi"'] = {},
["'Basis data ilmiah"'] = {},
["'Lain-lain"'] = {}
}
-- 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.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 ) )
end
end
--collect Lain-lainother unique vals (IDs) from WD, if present
if itemId and tval[1] then
local nextIdVal = 2
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["'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["'Umum"'], p.createRow( 'VIAF', viafId, '[https://www.worldcat.org/identities/containsVIAFID/'..viafId..' WorldCat (via VIAF)]', nil, false ) )
if namespace == 0 then
worldcatCat = '[[Kategori:Artikel Wikipedia dengan penanda WorldCat-VIAF]]'
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["'Umum"'], p.createRow( 'LCCN', lccnId, '[https://www.worldcat.org/identities/lccn-'..lccnIdFmtd..' WorldCat (via Library of Congress)]', nil, false ) )
if namespace == 0 then
worldcatCat = '[[Kategori:Artikel Wikipedia dengan penanda WorldCat-LCCN]]'
end
end
rct = rct + 1
end
elseif worldcatId == '' then --if WORLDCATID suppressed
Baris 1.289 ⟶ 1.307:
end
--configure Navbox
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
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.303 ⟶ 1.316:
local pencil = frame:expandTemplate{ title = 'EditAtWikidata', args = args}
local navboxArgs = {
name = 'PengawasanAuthority otoritascontrol',
navboxclass = 'authority-control',
bodyclass = 'hlist',
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 = "[[Bantuan:Pengawasan otoritas|Pengawasan otoritas]]" .. pencil
else
navboxArgs.border = "child"
navboxArgs = {
group1 = "[[Bantuan:Pengawasan otoritas|Pengawasan otoritas]]" .. pencil,
list1 = Navbox._navbox(navboxArgs)
}
end
else
local sect = navboxArgs.group1
if sect == "'Umum"' or sect == "'Lain-lain"' 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 = "'[[Bantuan:Pengawasan otoritas|Pengawasan otoritas]]" '.. pencil
else
navboxArgs.group1 = "'[[Bantuan:Pengawasan otoritas|Pengawasan otoritas: " '.. 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:Artikel Wikipedia)', '%1:%2') --by definition