|
|
@ -3,7 +3,8 @@ def parse_template(title, template)
|
|
|
|
|
|
|
|
|
|
|
|
fields = {}
|
|
|
|
fields = {}
|
|
|
|
|
|
|
|
|
|
|
|
fields_string = @wiki.article(title).text.scan(template_re)[0][0]
|
|
|
|
if (scanned = @wiki.article(title).text.scan(template_re)) != []
|
|
|
|
|
|
|
|
fields_string = scanned[0][0]
|
|
|
|
|
|
|
|
|
|
|
|
inlink = 0
|
|
|
|
inlink = 0
|
|
|
|
field = ""
|
|
|
|
field = ""
|
|
|
@ -19,6 +20,9 @@ def parse_template(title, template)
|
|
|
|
field += c
|
|
|
|
field += c
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
$stderr.print "Template #{template} not found in #{title}!"
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
fields
|
|
|
|
fields
|
|
|
|
end
|
|
|
|
end
|
|
|
|