Modulo:FunzioniGeneriche: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
nessun oggetto della modifica
(Clear Kelvin Timeline suffixes in ship names)
Nessun oggetto della modifica
Riga 292: Riga 292:
     end
     end
mw.smw.set(PropName .. " = " .. PropValue)
mw.smw.set(PropName .. " = " .. PropValue)
end
--- Process the value assigned to parameter of the "old"-style template
-- (pre-DataTrek) to sanitize it and pass it as clean value to
-- SMW property using the #set function
--
-- @param frame The interface to the parameters passed to {{#invoke:}}
-- No return @return Sanitized string representing one or more property values
function p.PerformersToSemantic(frame)
local InputString = "* [[Vina]]: [[Melissa George]]* [[Spock]]: [[Ethan Peck]]* [[Leland]]: [[Alan van Sprang]]* [[Nhan]]: [[Rachael Ancheril]]* Un [[Talosiani|Talosiano]]: [[Dee Pelletier]]* Il ''Keeper'' [[Talosiani|Talosiano]]: [[Rob Brownstein]]* Lt. Cmdr. [[Airiam]]: [[Hannah Cheesman]]* Lt. [[Keyla Detmer]]: [[Emily Coutts]]* [[Talosiani|Talosiano]] n.3: [[Nicole Dickinson]]"
local Character
local Performer
local Pattern = "%*.-%[%[(.-)%]%].-:%s?%[%[(.-)%]%]"
_, _, Character, Performer = string.find(InputString, Pattern)
--print(Character, Performer)
for Character, Performer in string.gmatch(InputString, Pattern) do 
  Character = string.gsub(Character, "|.*","")
  print("Character: " .. Character, "Performer: " .. Performer)
end
end
end
function p.ParameterToSemanticTest(frame)
function p.ParameterToSemanticTest(frame)

Menu di navigazione