Modulo:Controllo Wikidata/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
nomi categorie Wikidata ottenuti automaticamente |
m Bot: rimuovo no globals obsoleto |
||
(Una versione intermedia di un altro utente non mostrate) | |||
Riga 3:
]]--
require('
local getArgs = require('Modulo:Arguments').getArgs
Riga 35:
-- consente di definire funzioni di confronto per proprietà specifiche
-- (oppure tramite eventuali parametri)
if args.id ~= 'no' then▼
▲ if mWikidata._getDatatype({ args[1] }) == 'file multimediale su Commons' then
▲ comparefunc = compareCommonsMediaFile
▲ comparefunc = compareURL
end
Riga 61 ⟶ 59:
function p._main(args)
local wdprop, userval = args[1], args[2]
-- namespace 0 e proprietà Wikidata obbligatori
if (mw.title.getCurrentTitle().namespace ~= 0 and args.everyNS ~= 'sì') or not wdprop then
return nil
end
▲ wdval = mWikidata._getProperty({
▲ wdprop,
▲ unit = args.unit,
▲ showunit = args.showunit,
▲ from = args.debug and args.from
▲ })
return getCategory(wdval, userval, args)
end
|