67 741
contributi
Nessun oggetto della modifica |
Nessun oggetto della modifica |
||
Riga 338: | Riga 338: | ||
local CountLiks = select(2, string.gsub(FullRow, "%[%[", "")) | local CountLiks = select(2, string.gsub(FullRow, "%[%[", "")) | ||
--print (CountLiks) | --print (CountLiks) | ||
if | if string.find(FullRow, ":") == nil then | ||
-- | --Character only, unknown performer | ||
Pattern = "%*.-%[%[(.-)%]%].-" | |||
Pattern = "%*.-%[%[(.-)%]%].- | _, Character = string.find(FullRow, Pattern) | ||
Performer = "Interprete non accreditato" | |||
else | else | ||
--error no links on either side | if CountLiks == 2 then | ||
--Two links in the string, process both | |||
--print("Two links") | |||
Pattern = "%*.-%[%[(.-)%]%].-:%s?%[%[(.-)%]%]" | |||
elseif CountLiks == 1 then | |||
--Character is not a linked entity | |||
--print("One link") | |||
Pattern = "%*%s?(.-)%s?:%s?%[%[(.-)%]%]" | |||
else | |||
--error no links on either side | |||
Pattern = "%*%s?(.-)%s?:%s?(.-)%s?\n" | |||
end | |||
_, _, Character, Performer = string.find(FullRow, Pattern) | |||
end | end | ||
Character = string.gsub(Character, "|.*","") | |||
--print(" Character: " .. Character, "Performer: " .. Performer) | --print(" Character: " .. Character, "Performer: " .. Performer) | ||
--print(string.rep("-",100)) | --print(string.rep("-",100)) |