Modulo:DTSem: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
m
nessun oggetto della modifica
mNessun oggetto della modifica
mNessun oggetto della modifica
Riga 88: Riga 88:
local CategoryText
local CategoryText
local Pages
local Pages
local Series
local SeriesShort
local SeriesShort
Riga 98: Riga 99:
SeriesShort = mw.wikibase.getEntity(Item.claims['P16'][1].mainsnak.datavalue.value.id).claims['P24'][1].mainsnak.datavalue.value
SeriesShort = mw.wikibase.getEntity(Item.claims['P16'][1].mainsnak.datavalue.value.id).claims['P24'][1].mainsnak.datavalue.value
Series = mw.wikibase.getLabel(Item.claims['P16'][1].mainsnak.datavalue.value.id)
if ShortName == "Serie Classica" or ShortName == "Serie Animata" then
if ShortName == "Serie Classica" or ShortName == "Serie Animata" then
Riga 120: Riga 122:
         -- Page.fulltext represents Page name
         -- Page.fulltext represents Page name
        
        
         Count = mw.smw.ask('[[Serie::Star Trek: ' .. SeriesShort .. ']][[Personaggio::' .. Page.fulltext .. ']]|format=count')
         Count = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|format=count')
         if Count > 0 then
         if Count > 0 then
         Episodes = mw.smw.ask('[[Serie::Star Trek: ' .. SeriesShort .. ']][[Personaggio::' .. Page.fulltext .. ']]|sort=Numero di produzione|order=asc')
         Episodes = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|sort=Numero di produzione|order=asc')
        
        
         for _, Episode in ipairs(Episodes) do
         for _, Episode in ipairs(Episodes) do
Riga 128: Riga 130:
         end
         end
        
        
         table.insert(Results, "* [[" .. Page.fulltext .. "]] (" .. Count .. "): " .. #Episodes .. " - " .. table.concat(List, ", "))
         table.insert(Results, Series .. "* [[" .. Page.fulltext .. "]] (" .. Count .. "): " .. #Episodes .. " - " .. table.concat(List, ", "))
         end
         end
     end
     end

Menu di navigazione