Follow TV Tropes

Following

History Tropers / STUART

Go To

OR

Is there an issue? Send a MessageReason:
None


@@[==]@@\\

to:

@@[==]@@\\\\
Is there an issue? Send a MessageReason:
None


@@[=local urlencode=]=[={}=]@@

to:

@@[=local urlencode=]=[={}=]@@



@@[= str =]=[= string.gsub (str, "\r?\n", "\r\n")=]@@

to:

@@[= str =]=[= string.gsub (str, "\r?\n", "\r\n")=]@@



@@[= str =]=[= string.gsub (str, "([^=]%[=w=]%[=-=]%[=.=]%[=_=]%[=~ =]][=)",=]@@
@@[= function (c) return string.format ("=]%[==]%[==]%[=02X", string.byte(c)) end)=]@@

to:

@@[= str =]=[= string.gsub (str, "([^=]%[=w=]%[=-=]%[=.=]%[=_=]%[=~ =]][=)",=]@@
@@[= function (c) return string.format ("=]%[==]%[==]%[=02X", string.byte(c)) end)=]@@



@@[=urlencode.string =]=[= encode=]@@

to:

@@[=urlencode.string =]=[= encode=]@@



@@[= local argts, i=]=[= {}, 1=]@@

to:

@@[= local argts, i=]=[= {}, 1=]@@



@@[= argts[i=]][==]=[=encode(k).."=]=[="..encode(v)=]@@
@@[= i=]=[=i+1=]@@

to:

@@[= argts[i=]][==]=[=encode(k).."=]=[="..encode(v)=]@@
@@[= i=]=[=i+1=]@@



@@[=local http =]=[= require"socket.http"=]@@

to:

@@[=local http =]=[= require"socket.http"=]@@



@@[=local urlencode =]=[= require "urlencode"=]@@

to:

@@[=local urlencode =]=[= require "urlencode"=]@@



@@[=local tvtropes=]=[={}=]@@

to:

@@[=local tvtropes=]=[={}=]@@



@@[= assert(type(page)=]=[==]=[="string","Destination page name required")=]@@

to:

@@[= assert(type(page)=]=[==]=[="string","Destination page name required")=]@@



@@[= if not string.find(page,'/') then page=]=[="Main/"..page end=]@@

to:

@@[= if not string.find(page,'/') then page=]=[="Main/"..page end=]@@



@@[= page=]=[=fullname(page)=]@@

to:

@@[= page=]=[=fullname(page)=]@@



@@[= assert(type(body)=]=[==]=[="string","Page body required")=]@@

to:

@@[= assert(type(body)=]=[==]=[="string","Page body required")=]@@



@@[= local response =]=[==]@@

to:

@@[= local response =]=[==]@@



@@[= action=]=[="post", post=]=[="save",=]@@
@@[= pagename=]=[=page, text=]=[=body,=]@@
@@[= author=]=[=author or "Anonymous",=]@@
@@[= reason=]=[=reason or ""=]@@

to:

@@[= action=]=[="post", post=]=[="save",=]@@
@@[= pagename=]=[=page, text=]=[=body,=]@@
@@[= author=]=[=author or "Anonymous",=]@@
@@[= reason=]=[=reason or ""=]@@



@@[= assert(response[1=]][=,response[2=]][=)=]@@

to:

@@[= assert(response[1=]][=,response[2=]][=)=]@@



@@[= if tonumber(response[2=]][=)~=]=[=302 then=]@@
@@[= return nil, response[2=]][=, response[1=]][==]@@

to:

@@[= if tonumber(response[2=]][=)~=]=[=302 then=]@@
@@[= return nil, response[2=]][=, response[1=]][==]@@



@@[= local ents =]=[= {quot=]=[='"', amp=]=[='&', lt=]=[='<', gt=]=[='>'}=]@@

to:

@@[= local ents =]=[= {quot=]=[='"', amp=]=[='&', lt=]=[='<', gt=]=[='>'}=]@@



@@[= src=]=[=string.gsub(src,"<br/>","\n")=]@@
@@[= src=]=[=string.gsub(src,"&(=]%[=w-);",ents)=]@@

to:

@@[= src=]=[=string.gsub(src,"<br/>","\n")=]@@
@@[= src=]=[=string.gsub(src,"&(=]%[=w-);",ents)=]@@



@@[= page=]=[=fullname(page)=]@@

to:

@@[= page=]=[=fullname(page)=]@@



@@[= local body, code =]=[= http.request(=]@@
@@[= authpageurl(page)..'?action=]=[=source')=]@@

to:

@@[= local body, code =]=[= http.request(=]@@
@@[= authpageurl(page)..'?action=]=[=source')=]@@



@@[=local tvtropes =]=[= require "tvtropes"=]@@

to:

@@[=local tvtropes =]=[= require "tvtropes"=]@@



@@[=local target =]=[= "Tropers/STUART"=]@@
@@[=local user=]=[="STUART"=]@@

to:

@@[=local target =]=[= "Tropers/STUART"=]@@
@@[=local user=]=[="STUART"=]@@



@@[=local scripts=]=[={=]@@

to:

@@[=local scripts=]=[={=]@@



@@[= "[[folder:=]%[=s=]][==]][=\n=]%[=s\n[[/folder=]][==]][=",=]@@

to:

@@[= "[[folder:=]%[=s=]][==]][=\n=]%[=s\n[[/folder=]][==]][=",=]@@



@@[= local folders=]=[={=]@@
@@[= "=]%[==]%[=STARTSCRIPTS=]%[==]%[=",=]@@
@@[= "[[foldercontrol=]][==]][="=]@@

to:

@@[= local folders=]=[={=]@@
@@[= "=]%[==]%[=STARTSCRIPTS=]%[==]%[=",=]@@
@@[= "[[foldercontrol=]][==]][="=]@@



@@[= local headers=]=[=#folders=]@@

to:

@@[= local headers=]=[=#folders=]@@



@@[= for i=]=[=1, #scripts do=]@@
@@[= local slines=]=[={}=]@@
@@[= for line in io.lines(scripts[i=]][=) do=]@@

to:

@@[= for i=]=[=1, #scripts do=]@@
@@[= local slines=]=[={}=]@@
@@[= for line in io.lines(scripts[i=]][=) do=]@@



@@[= local escaped=]=[=string.gsub(line,"[=]%[==]=[==]%[==]][==]%[==]%[==]][=",=]@@
@@[= function(char) return string.format("=]=[==]][=&#=]%[=i;[=]=[=",string.byte(char)) end)=]@@

to:

@@[= local escaped=]=[=string.gsub(line,"[=]%[==]=[==]%[==]][==]%[==]%[==]][=",=]@@
@@[= function(char) return string.format("=]=[==]][=&#=]%[=i;[=]=[=",string.byte(char)) end)=]@@



@@[= slines[#slines+1=]][==]=[=string.format("@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@

to:

@@[= slines[#slines+1=]][==]=[=string.format("@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@



@@[= local content=]=[=table.concat(slines,'\n')=]@@
@@[= folders[i+headers=]][==]=[=scriptfolder(scripts[i=]][=,content)=]@@

to:

@@[= local content=]=[=table.concat(slines,'\n')=]@@
@@[= folders[i+headers=]][==]=[=scriptfolder(scripts[i=]][=,content)=]@@



@@[= folders[#folders+1=]][==]=[="=]%[==]%[=ENDSCRIPTS=]%[==]%[="=]@@

to:

@@[= folders[#folders+1=]][==]=[="=]%[==]%[=ENDSCRIPTS=]%[==]%[="=]@@



@@[= local gssscripts=]=[=string.gsub(revsection(),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@

to:

@@[= local gssscripts=]=[=string.gsub(revsection(),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@



@@[= print(string.format("Getting current version of =]%[=s...",target))=]@@

to:

@@[= print(string.format("Getting current version of =]%[=s...",target))=]@@



@@[= local current=]=[=tvtropes.get(target)=]@@

to:

@@[= local current=]=[=tvtropes.get(target)=]@@



@@[= local updated=]=[=string.gsub(current,=]@@
@@[= "=]%[==]%[==]%[==]%[=STARTSCRIPTS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDSCRIPTS=]%[==]%[==]%[==]%[=",=]@@

to:

@@[= local updated=]=[=string.gsub(current,=]@@
@@[= "=]%[==]%[==]%[==]%[=STARTSCRIPTS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDSCRIPTS=]%[==]%[==]%[==]%[=",=]@@



@@[= print(string.format("Posting new version of =]%[=s...",target))=]@@

to:

@@[= print(string.format("Posting new version of =]%[=s...",target))=]@@



@@[= posted=]=[=tvtropes.post(target,updated,user,notes)=]@@

to:

@@[= posted=]=[=tvtropes.post(target,updated,user,notes)=]@@



@@[=local tvtropes=]=[=require "tvtropes"=]@@

to:

@@[=local tvtropes=]=[=require "tvtropes"=]@@



@@[=local urlencode=]=[=require "urlencode"=]@@

to:

@@[=local urlencode=]=[=require "urlencode"=]@@



@@[=adeps=]=[={=]@@

to:

@@[=adeps=]=[={=]@@



@@[=local tokens=]=[={}=]@@

to:

@@[=local tokens=]=[={}=]@@



@@[= local disambigeps=]=[={=]@@

to:

@@[= local disambigeps=]=[={=]@@



@@[= local disambiguated=]=[={}=]@@
@@[= for s=]=[=1,#disambigeps do=]@@
@@[= disambiguated[s=]][==]=[={}=]@@
@@[= for i=]=[=1,#disambigeps[s=]][= do=]@@
@@[= disambiguated[s=]][=[disambigeps[s=]][=[i=]][==]][==]=[=true=]@@

to:

@@[= local disambiguated=]=[={}=]@@
@@[= for s=]=[=1,#disambigeps do=]@@
@@[= disambiguated[s=]][==]=[={}=]@@
@@[= for i=]=[=1,#disambigeps[s=]][= do=]@@
@@[= disambiguated[s=]][=[disambigeps[s=]][=[i=]][==]][==]=[=true=]@@



@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
@@[= pagename=]=[=urlencode.string(pagename)=]@@
@@[= if disambiguated[s=]][=[e=]][= then=]@@

to:

@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
@@[= pagename=]=[=urlencode.string(pagename)=]@@
@@[= if disambiguated[s=]][=[e=]][= then=]@@



@@[= pagename=]=[=pagename.."_(Arrested_Development)"=]@@

to:

@@[= pagename=]=[=pagename.."_(Arrested_Development)"=]@@



@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
@@[= pagename=]=[=urlencode.string(pagename)=]@@

to:

@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
@@[= pagename=]=[=urlencode.string(pagename)=]@@



@@[= local s1flips=]=[={ [5=]][==]=[=6, [6=]][==]=[=5, [7=]][==]=[=8, [8=]][==]=[=7, [16=]][==]=[=18, [17=]][==]=[=16, [18=]][==]=[=17 }=]@@

to:

@@[= local s1flips=]=[={ [5=]][==]=[=6, [6=]][==]=[=5, [7=]][==]=[=8, [8=]][==]=[=7, [16=]][==]=[=18, [17=]][==]=[=16, [18=]][==]=[=17 }=]@@



@@[= if s=]=[==]=[=1 then e =]=[= s1flips[e=]][= or e end=]@@
@@[= return string.format("http://the-op.com/episode/=]%[=i=]%[=02i",s,e)=]@@

to:

@@[= if s=]=[==]=[=1 then e =]=[= s1flips[e=]][= or e end=]@@
@@[= return string.format("http://the-op.com/episode/=]%[=i=]%[=02i",s,e)=]@@



@@[==]@@

to:

@@[==]@@@@[==]@@\\



@@[= local ttnums=]=[={=]@@

to:

@@[= local ttnums=]=[={=]@@



@@[= return string.format("http://www.imdb.com/title/tt=]%[=07i/",ttnums[s=]][=[e=]][=)=]@@

to:

@@[= return string.format("http://www.imdb.com/title/tt=]%[=07i/",ttnums[s=]][=[e=]][=)=]@@



@@[= local watchnums=]=[={=]@@

to:

@@[= local watchnums=]=[={=]@@



@@[= "http://hulu.com/watch/=]%[=i", watchnums[s=]][=[e=]][=)=]@@

to:

@@[= "http://hulu.com/watch/=]%[=i", watchnums[s=]][=[e=]][=)=]@@



@@[= local movieids=]=[={=]@@

to:

@@[= local movieids=]=[={=]@@



@@[= "http://www.netflix.com/WiPlayer?movieid=]=[==]%[=i",movieids[s=]][=[e=]][=)=]@@

to:

@@[= "http://www.netflix.com/WiPlayer?movieid=]=[==]%[=i",movieids[s=]][=[e=]][=)=]@@



@@[= local template=]=[=[=]=[=[=]@@
@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@

to:

@@[= local template=]=[=[=]=[=[=]@@
@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@



@@[=Interwiki: [[$wikipedia Wikipedia=]][==]][= -- [[$wikia Wikia=]][==]][= -- [[$theop Balboa Observer-Picayune=]][==]][= -- [[$imdb IMDB=]][==]][==]@@

to:

@@[=Interwiki: [[$wikipedia Wikipedia=]][==]][= -- [[$wikia Wikia=]][==]][= -- [[$theop Balboa Observer-Picayune=]][==]][= -- [[$imdb IMDB=]][==]][==]@@



@@[=Watch now: [[$hulu Hulu=]][==]][= -- [[$netflix Netflix=]][==]][==]@@

to:

@@[=Watch now: [[$hulu Hulu=]][==]][= -- [[$netflix Netflix=]][==]][==]@@



@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
@@[==]][==]=[==]][==]@@

to:

@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
@@[==]][==]=[==]][==]@@



@@[= return (string.gsub(template,"=]%[=$(=]%[=w+)",function(token) return tokens[token=]][=(s,e) end))=]@@

to:

@@[= return (string.gsub(template,"=]%[=$(=]%[=w+)",function(token) return tokens[token=]][=(s,e) end))=]@@



@@[= local title=]=[=adeps[s=]][=[e=]][==]@@

to:

@@[= local title=]=[=adeps[s=]][=[e=]][==]@@



@@[= title=]=[=string.gsub(title,'é','e')=]@@

to:

@@[= title=]=[=string.gsub(title,'é','e')=]@@



@@[= title=]=[=string.gsub(title,' (=]%[=l?)',string.upper)=]@@

to:

@@[= title=]=[=string.gsub(title,' (=]%[=l?)',string.upper)=]@@



@@[= title=]=[=string.gsub(title,'=]%[=W','')=]@@

to:

@@[= title=]=[=string.gsub(title,'=]%[=W','')=]@@



@@[= return string.format("Recap/ArrestedDevelopmentS=]%[=iE=]%[=i=]%[=s",s,e,title)=]@@

to:

@@[= return string.format("Recap/ArrestedDevelopmentS=]%[=iE=]%[=i=]%[=s",s,e,title)=]@@



@@[= "\n\n=]%[=s\n!The ''ArrestedDevelopment'' episode \"=]%[=s\" provides examples of:\n\n",=]@@
@@[= ad_ep_links(s,e),adeps[s=]][=[e=]][=),=]@@

to:

@@[= "\n\n=]%[=s\n!The ''ArrestedDevelopment'' episode \"=]%[=s\" provides examples of:\n\n",=]@@
@@[= ad_ep_links(s,e),adeps[s=]][=[e=]][=),=]@@



@@[= if s=]=[==]=[=2 and e=]=[==]=[=3 then=]@@

to:

@@[= if s=]=[==]=[=2 and e=]=[==]=[=3 then=]@@



@@[= local pagename=]=[=recap_pagename(s,e)=]@@
@@[= local pageasis=]=[=tvtropes.get(pagename)=]@@
@@[= local gsubsafelinks =]=[= string.gsub(ad_ep_links(s,e),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@

to:

@@[= local pagename=]=[=recap_pagename(s,e)=]@@
@@[= local pageasis=]=[=tvtropes.get(pagename)=]@@
@@[= local gsubsafelinks =]=[= string.gsub(ad_ep_links(s,e),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@



@@[= success, code =]=[= tvtropes.post(pagename,=]@@
@@[= string.gsub(pageasis,"=]%[==]%[==]%[==]%[=STARTLINKS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDLINKS=]%[==]%[==]%[==]%[=",gsubsafelinks),=]@@

to:

@@[= success, code =]=[= tvtropes.post(pagename,=]@@
@@[= string.gsub(pageasis,"=]%[==]%[==]%[==]%[=STARTLINKS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDLINKS=]%[==]%[==]%[==]%[=",gsubsafelinks),=]@@



@@[= for s=]=[=1,#adeps do=]@@
@@[= for e=]=[=1,#adeps[s=]][= do=]@@
@@[= print(string.format('Doing Season =]%[=i Episode =]%[=i, "=]%[=s"...',s,e,adeps[s=]][=[e=]][=))=]@@

to:

@@[= for s=]=[=1,#adeps do=]@@
@@[= for e=]=[=1,#adeps[s=]][= do=]@@
@@[= print(string.format('Doing Season =]%[=i Episode =]%[=i, "=]%[=s"...',s,e,adeps[s=]][=[e=]][=))=]@@
Is there an issue? Send a MessageReason:
more madness from which there is no escape


->@@[=local urlencode=]=[={}=]@@
->@@[==]@@
->@@[=--URL encode a string.=]@@
->@@[=local function encode(str)=]@@
->@@[= --Ensure all newlines are in CRLF form=]@@
->@@[= str =]=[= string.gsub (str, "\r?\n", "\r\n")=]@@
->@@[= --Percent-encode all non-unreserved characters=]@@
->@@[= --as per RFC 3986, Section 2.3=]@@
->@@[= --(except for space, which gets plus-encoded)=]@@
->@@[= str =]=[= string.gsub (str, "([^=]%[=w=]%[=-=]%[=.=]%[=_=]%[=~ =]][=)",=]@@
->@@[= function (c) return string.format ("=]%[==]%[==]%[=02X", string.byte(c)) end)=]@@
->@@[= --Convert spaces to plus signs=]@@
->@@[= return string.gsub (str, " ", "+")=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Make this function available as part of the module=]@@
->@@[=urlencode.string =]=[= encode=]@@
->@@[==]@@
->@@[=--URL encode a table as a series of parameters.=]@@
->@@[=function urlencode.table(t)=]@@
->@@[= --table of argument strings=]@@
->@@[= local argts, i=]=[= {}, 1=]@@
->@@[= for k, v in pairs(t) do=]@@
->@@[= argts[i=]][==]=[=encode(k).."=]=[="..encode(v)=]@@
->@@[= i=]=[=i+1=]@@
->@@[= end=]@@
->@@[= return table.concat(argts,'&')=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=return urlencode=]@@

to:

->@@[=local @@[=local urlencode=]=[={}=]@@
->@@[==]@@
->@@[=--URL
@@[==]@@
@@[=--URL
encode a string.=]@@
->@@[=local @@[=local function encode(str)=]@@
->@@[= @@[= --Ensure all newlines are in CRLF form=]@@
->@@[= @@[= str =]=[= string.gsub (str, "\r?\n", "\r\n")=]@@
->@@[= @@[= --Percent-encode all non-unreserved characters=]@@
->@@[= @@[= --as per RFC 3986, Section 2.3=]@@
->@@[= @@[= --(except for space, which gets plus-encoded)=]@@
->@@[= @@[= str =]=[= string.gsub (str, "([^=]%[=w=]%[=-=]%[=.=]%[=_=]%[=~ =]][=)",=]@@
->@@[= @@[= function (c) return string.format ("=]%[==]%[==]%[=02X", string.byte(c)) end)=]@@
->@@[= @@[= --Convert spaces to plus signs=]@@
->@@[= @@[= return string.gsub (str, " ", "+")=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Make
@@[=end=]@@
@@[==]@@
@@[=--Make
this function available as part of the module=]@@
->@@[=urlencode.@@[=urlencode.string =]=[= encode=]@@
->@@[==]@@
->@@[=--URL
@@[==]@@
@@[=--URL
encode a table as a series of parameters.=]@@
->@@[=function @@[=function urlencode.table(t)=]@@
->@@[= @@[= --table of argument strings=]@@
->@@[= @@[= local argts, i=]=[= {}, 1=]@@
->@@[= @@[= for k, v in pairs(t) do=]@@
->@@[= @@[= argts[i=]][==]=[=encode(k).."=]=[="..encode(v)=]@@
->@@[= @@[= i=]=[=i+1=]@@
->@@[= @@[= end=]@@
->@@[= @@[= return table.concat(argts,'&')=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=return
@@[=end=]@@
@@[==]@@
@@[=return
urlencode=]@@



->@@[=--Required to send to TVTropes site.=]@@
->@@[=local http =]=[= require"socket.http"=]@@
->@@[==]@@
->@@[=--Required to create page post data.=]@@
->@@[=local urlencode =]=[= require "urlencode"=]@@
->@@[==]@@
->@@[=local tvtropes=]=[={}=]@@
->@@[==]@@
->@@[=--Function that returns the authenticated TVTropes URL for the given page.=]@@
->@@[=local function authpageurl(page)=]@@
->@@[= return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local function fullname(page)=]@@
->@@[= --Require pagename=]@@
->@@[= assert(type(page)=]=[==]=[="string","Destination page name required")=]@@
->@@[= --If no namespace specified, assume Main=]@@
->@@[= if not string.find(page,'/') then page=]=[="Main/"..page end=]@@
->@@[==]@@
->@@[= return page=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Function that posts the given page.=]@@
->@@[=function tvtropes.post(page, body, author, reason)=]@@
->@@[==]@@
->@@[= page=]=[=fullname(page)=]@@
->@@[==]@@
->@@[= assert(type(body)=]=[==]=[="string","Page body required")=]@@
->@@[==]@@
->@@[= local response =]=[==]@@
->@@[= {http.request(authpageurl(page),=]@@
->@@[= urlencode.table{=]@@
->@@[= action=]=[="post", post=]=[="save",=]@@
->@@[= pagename=]=[=page, text=]=[=body,=]@@
->@@[= author=]=[=author or "Anonymous",=]@@
->@@[= reason=]=[=reason or ""=]@@
->@@[= })}=]@@
->@@[==]@@
->@@[= --Error on any socket errors=]@@
->@@[= assert(response[1=]][=,response[2=]][=)=]@@
->@@[==]@@
->@@[= --If it doesn't return Found, return nil, the status, and the body:=]@@
->@@[= --sometimes it just rejects the password for some reason.=]@@
->@@[= if tonumber(response[2=]][=)~=]=[=302 then=]@@
->@@[= return nil, response[2=]][=, response[1=]][==]@@
->@@[= else return true=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Technically, this is kind of a general function, but it's designed exclusively around=]@@
->@@[=--TVTropes' source converter, so it's kept in here.=]@@
->@@[=local html2plain=]@@
->@@[=do=]@@
->@@[= local ents =]=[= {quot=]=[='"', amp=]=[='&', lt=]=[='<', gt=]=[='>'}=]@@
->@@[==]@@
->@@[= function html2plain(src)=]@@
->@@[= src=]=[=string.gsub(src,"<br/>","\n")=]@@
->@@[= src=]=[=string.gsub(src,"&(=]%[=w-);",ents)=]@@
->@@[= return src=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Function that gets a given page source.=]@@
->@@[=function tvtropes.get(page)=]@@
->@@[==]@@
->@@[= page=]=[=fullname(page)=]@@
->@@[==]@@
->@@[= local body, code =]=[= http.request(=]@@
->@@[= authpageurl(page)..'?action=]=[=source')=]@@
->@@[==]@@
->@@[= --Trigger error on socket failure=]@@
->@@[= assert(body,code)=]@@
->@@[==]@@
->@@[= --Return the source converted back from the HTML conversion=]@@
->@@[= return html2plain(body)=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=return tvtropes=]@@

to:

->@@[=--Required @@[=--Required to send to TVTropes site.=]@@
->@@[=local @@[=local http =]=[= require"socket.http"=]@@
->@@[==]@@
->@@[=--Required
@@[==]@@
@@[=--Required
to create page post data.=]@@
->@@[=local @@[=local urlencode =]=[= require "urlencode"=]@@
->@@[==]@@
->@@[=local
@@[==]@@
@@[=local
tvtropes=]=[={}=]@@
->@@[==]@@
->@@[=--Function
@@[==]@@
@@[=--Function
that returns the authenticated TVTropes URL for the given page.=]@@
->@@[=local @@[=local function authpageurl(page)=]@@
->@@[= @@[= return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local
@@[=end=]@@
@@[==]@@
@@[=local
function fullname(page)=]@@
->@@[= @@[= --Require pagename=]@@
->@@[= @@[= assert(type(page)=]=[==]=[="string","Destination page name required")=]@@
->@@[= @@[= --If no namespace specified, assume Main=]@@
->@@[= @@[= if not string.find(page,'/') then page=]=[="Main/"..page end=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
return page=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Function
@@[=end=]@@
@@[==]@@
@@[=--Function
that posts the given page.=]@@
->@@[=function @@[=function tvtropes.post(page, body, author, reason)=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
page=]=[=fullname(page)=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
assert(type(body)=]=[==]=[="string","Page body required")=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
local response =]=[==]@@
->@@[= @@[= {http.request(authpageurl(page),=]@@
->@@[= @@[= urlencode.table{=]@@
->@@[= @@[= action=]=[="post", post=]=[="save",=]@@
->@@[= @@[= pagename=]=[=page, text=]=[=body,=]@@
->@@[= @@[= author=]=[=author or "Anonymous",=]@@
->@@[= @@[= reason=]=[=reason or ""=]@@
->@@[= @@[= })}=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
--Error on any socket errors=]@@
->@@[= @@[= assert(response[1=]][=,response[2=]][=)=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
--If it doesn't return Found, return nil, the status, and the body:=]@@
->@@[= @@[= --sometimes it just rejects the password for some reason.=]@@
->@@[= @@[= if tonumber(response[2=]][=)~=]=[=302 then=]@@
->@@[= @@[= return nil, response[2=]][=, response[1=]][==]@@
->@@[= @@[= else return true=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Technically,
@@[=end=]@@
@@[==]@@
@@[=--Technically,
this is kind of a general function, but it's designed exclusively around=]@@
->@@[=--TVTropes' @@[=--TVTropes' source converter, so it's kept in here.=]@@
->@@[=local @@[=local html2plain=]@@
->@@[=do=]@@
->@@[=
@@[=do=]@@
@@[=
local ents =]=[= {quot=]=[='"', amp=]=[='&', lt=]=[='<', gt=]=[='>'}=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
function html2plain(src)=]@@
->@@[= @@[= src=]=[=string.gsub(src,"<br/>","\n")=]@@
->@@[= @@[= src=]=[=string.gsub(src,"&(=]%[=w-);",ents)=]@@
->@@[= @@[= return src=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Function
@@[=end=]@@
@@[==]@@
@@[=--Function
that gets a given page source.=]@@
->@@[=function @@[=function tvtropes.get(page)=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
page=]=[=fullname(page)=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
local body, code =]=[= http.request(=]@@
->@@[= @@[= authpageurl(page)..'?action=]=[=source')=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
--Trigger error on socket failure=]@@
->@@[= @@[= assert(body,code)=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
--Return the source converted back from the HTML conversion=]@@
->@@[= @@[= return html2plain(body)=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=return
@@[=end=]@@
@@[==]@@
@@[=return
tvtropes=]@@



->@@[=local tvtropes =]=[= require "tvtropes"=]@@
->@@[==]@@
->@@[=local target =]=[= "Tropers/STUART"=]@@
->@@[=local user=]=[="STUART"=]@@
->@@[==]@@
->@@[=local scripts=]=[={=]@@
->@@[= "urlencode.lua",=]@@
->@@[= "tvtropes.lua",=]@@
->@@[= "tropersrepo.lua",=]@@
->@@[= "arrdev_recap.lua",=]@@
->@@[=}=]@@
->@@[==]@@
->@@[=local function scriptfolder(name,script)=]@@
->@@[= return string.format(=]@@
->@@[= "[[folder:=]%[=s=]][==]][=\n=]%[=s\n[[/folder=]][==]][=",=]@@
->@@[= name,script)=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local function revsection()=]@@
->@@[= local folders=]=[={=]@@
->@@[= "=]%[==]%[=STARTSCRIPTS=]%[==]%[=",=]@@
->@@[= "[[foldercontrol=]][==]][="=]@@
->@@[= }=]@@
->@@[= local headers=]=[=#folders=]@@
->@@[==]@@
->@@[= for i=]=[=1, #scripts do=]@@
->@@[= local slines=]=[={}=]@@
->@@[= for line in io.lines(scripts[i=]][=) do=]@@
->@@[==]@@
->@@[= --escape all equals signs and percents=]@@
->@@[= local escaped=]=[=string.gsub(line,"[=]%[==]=[==]%[==]][==]%[==]%[==]][=",=]@@
->@@[= function(char) return string.format("=]=[==]][=&#=]%[=i;[=]=[=",string.byte(char)) end)=]@@
->@@[==]@@
->@@[= slines[#slines+1=]][==]=[=string.format("->@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@
->@@[= end=]@@
->@@[==]@@
->@@[= local content=]=[=table.concat(slines,'\n')=]@@
->@@[= folders[i+headers=]][==]=[=scriptfolder(scripts[i=]][=,content)=]@@
->@@[= end=]@@
->@@[==]@@
->@@[= folders[#folders+1=]][==]=[="=]%[==]%[=ENDSCRIPTS=]%[==]%[="=]@@
->@@[==]@@
->@@[= return table.concat(folders,"\n\n")=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local function push(notes)=]@@
->@@[= local gssscripts=]=[=string.gsub(revsection(),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@
->@@[==]@@
->@@[= print(string.format("Getting current version of =]%[=s...",target))=]@@
->@@[==]@@
->@@[= local current=]=[=tvtropes.get(target)=]@@
->@@[==]@@
->@@[= local updated=]=[=string.gsub(current,=]@@
->@@[= "=]%[==]%[==]%[==]%[=STARTSCRIPTS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDSCRIPTS=]%[==]%[==]%[==]%[=",=]@@
->@@[= gssscripts)=]@@
->@@[==]@@
->@@[= print(string.format("Posting new version of =]%[=s...",target))=]@@
->@@[==]@@
->@@[= local posted=]@@
->@@[= while not posted do=]@@
->@@[= posted=]=[=tvtropes.post(target,updated,user,notes)=]@@
->@@[= if not posted then print" Retrying..." end=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Executing code---------------------------------------------------------------=]@@
->@@
->@@[=push "more madness from which there is no escape"=]@@
->@@[==]@@
->@@[==]@@

to:

->@@[=local @@[=local tvtropes =]=[= require "tvtropes"=]@@
->@@[==]@@
->@@[=local
@@[==]@@
@@[=local
target =]=[= "Tropers/STUART"=]@@
->@@[=local @@[=local user=]=[="STUART"=]@@
->@@[==]@@
->@@[=local
@@[==]@@
@@[=local
scripts=]=[={=]@@
->@@[= @@[= "urlencode.lua",=]@@
->@@[= @@[= "tvtropes.lua",=]@@
->@@[= @@[= "tropersrepo.lua",=]@@
->@@[= @@[= "arrdev_recap.lua",=]@@
->@@[=}=]@@
->@@[==]@@
->@@[=local
@@[=}=]@@
@@[==]@@
@@[=local
function scriptfolder(name,script)=]@@
->@@[= @@[= return string.format(=]@@
->@@[= @@[= "[[folder:=]%[=s=]][==]][=\n=]%[=s\n[[/folder=]][==]][=",=]@@
->@@[= @@[= name,script)=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local
@@[=end=]@@
@@[==]@@
@@[=local
function revsection()=]@@
->@@[= @@[= local folders=]=[={=]@@
->@@[= @@[= "=]%[==]%[=STARTSCRIPTS=]%[==]%[=",=]@@
->@@[= @@[= "[[foldercontrol=]][==]][="=]@@
->@@[= @@[= }=]@@
->@@[= @@[= local headers=]=[=#folders=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
for i=]=[=1, #scripts do=]@@
->@@[= @@[= local slines=]=[={}=]@@
->@@[= @@[= for line in io.lines(scripts[i=]][=) do=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
--escape all equals signs and percents=]@@
->@@[= @@[= local escaped=]=[=string.gsub(line,"[=]%[==]=[==]%[==]][==]%[==]%[==]][=",=]@@
->@@[= @@[= function(char) return string.format("=]=[==]][=&#=]%[=i;[=]=[=",string.byte(char)) end)=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
slines[#slines+1=]][==]=[=string.format("->@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@
->@@[=
format("@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@
@@[=
end=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
local content=]=[=table.concat(slines,'\n')=]@@
->@@[= @@[= folders[i+headers=]][==]=[=scriptfolder(scripts[i=]][=,content)=]@@
->@@[= @@[= end=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
folders[#folders+1=]][==]=[="=]%[==]%[=ENDSCRIPTS=]%[==]%[="=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
return table.concat(folders,"\n\n")=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local
@@[=end=]@@
@@[==]@@
@@[=local
function push(notes)=]@@
->@@[= @@[= local gssscripts=]=[=string.gsub(revsection(),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
print(string.format("Getting current version of =]%[=s...",target))=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
local current=]=[=tvtropes.get(target)=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
local updated=]=[=string.gsub(current,=]@@
->@@[= @@[= "=]%[==]%[==]%[==]%[=STARTSCRIPTS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDSCRIPTS=]%[==]%[==]%[==]%[=",=]@@
->@@[= @@[= gssscripts)=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
print(string.format("Posting new version of =]%[=s...",target))=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
local posted=]@@
->@@[= @@[= while not posted do=]@@
->@@[= @@[= posted=]=[=tvtropes.post(target,updated,user,notes)=]@@
->@@[= @@[= if not posted then print" Retrying..." end=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Executing
@@[=end=]@@
@@[==]@@
@@[=--Executing
code---------------------------------------------------------------=]@@
->@@
->@@[=push
@@[==]@@
@@[=push
"more madness from which there is no escape"=]@@
->@@[==]@@
->@@[==]@@
@@[==]@@
@@[==]@@



->@@[=--encoding: UTF-8=]@@
->@@[==]@@
->@@[=--Required to post pages=]@@
->@@[=local tvtropes=]=[=require "tvtropes"=]@@
->@@[=--Required for encoding Wikipedia article titles=]@@
->@@[=local urlencode=]=[=require "urlencode"=]@@
->@@[==]@@
->@@[=--Arrested Development data----------------------------------------------------=]@@
->@@[=adeps=]=[={=]@@
->@@[= {=]@@
->@@[= "Pilot",=]@@
->@@[= "Top Banana",=]@@
->@@[= "Bringing Up Buster",=]@@
->@@[= "Key Decisions",=]@@
->@@[= "Visiting Ours",=]@@
->@@[= "Charity Drive",=]@@
->@@[= "My Mother, The Car",=]@@
->@@[= "In God We Trust",=]@@
->@@[= "Storming the Castle",=]@@
->@@[= "Pier Pressure",=]@@
->@@[= "Public Relations",=]@@
->@@[= "Marta Complex",=]@@
->@@[= "Beef Consommé",=]@@
->@@[= "Shock and Aww",=]@@
->@@[= "Staff Infection",=]@@
->@@[= "Missing Kitty",=]@@
->@@[= "Altar Egos",=]@@
->@@[= "Justice Is Blind",=]@@
->@@[= "Best Man for the GOB",=]@@
->@@[= "Whistler's Mother",=]@@
->@@[= "Not Without My Daughter",=]@@
->@@[= "Let 'Em Eat Cake"=]@@
->@@[= },=]@@
->@@[= {=]@@
->@@[= "The One Where Michael Leaves",=]@@
->@@[= "The One Where They Build a House",=]@@
->@@[= "¡Amigos!",=]@@
->@@[= "Good Grief",=]@@
->@@[= "Sad Sack",=]@@
->@@[= "Afternoon Delight",=]@@
->@@[= "Switch Hitter",=]@@
->@@[= "Queen for a Day",=]@@
->@@[= "Burning Love",=]@@
->@@[= "Ready, Aim, Marry Me",=]@@
->@@[= "Out on a Limb",=]@@
->@@[= "Hand to God",=]@@
->@@[= "Motherboy XXX",=]@@
->@@[= "The Immaculate Election",=]@@
->@@[= "Sword of Destiny",=]@@
->@@[= "Meat the Veals",=]@@
->@@[= "Spring Breakout",=]@@
->@@[= "Righteous Brothers",=]@@
->@@[= },=]@@
->@@[= {=]@@
->@@[= "The Cabin Show",=]@@
->@@[= "For British Eyes Only",=]@@
->@@[= "Forget-Me-Now",=]@@
->@@[= "Notapusy",=]@@
->@@[= "Mr. F",=]@@
->@@[= "The Ocean Walker",=]@@
->@@[= "Prison Break-In",=]@@
->@@[= "Making a Stand",=]@@
->@@[= "S.O.B.s",=]@@
->@@[= "Fakin' It",=]@@
->@@[= "Family Ties",=]@@
->@@[= "Exit Strategy",=]@@
->@@[= "Development Arrested"=]@@
->@@[= },=]@@
->@@[=}=]@@
->@@[=-------------------------------------------------------------------------------=]@@
->@@[==]@@
->@@[=--Interwiki data---------------------------------------------------------------=]@@
->@@[=local tokens=]=[={}=]@@
->@@[==]@@
->@@[=do --wikipedia=]@@
->@@[= --Numbers for episodes with ambiguous titles, Wikipedia-wise,=]@@
->@@[= --whose article titles end with "(Arrested Development)"=]@@
->@@[= local disambigeps=]=[={=]@@
->@@[= {1,2,8,11,20,21,22}, --Season 1=]@@
->@@[= {5,6,8,9,11,12,18}, --Season 2=]@@
->@@[= {10,11,12} --Season 3=]@@
->@@[= }=]@@
->@@[==]@@
->@@[= --construct lookup table=]@@
->@@[= local disambiguated=]=[={}=]@@
->@@[= for s=]=[=1,#disambigeps do=]@@
->@@[= disambiguated[s=]][==]=[={}=]@@
->@@[= for i=]=[=1,#disambigeps[s=]][= do=]@@
->@@[= disambiguated[s=]][=[disambigeps[s=]][=[i=]][==]][==]=[=true=]@@
->@@[= end=]@@
->@@[= end=]@@
->@@[==]@@
->@@[= --Function that returns the Wikipedia URL=]@@
->@@[= function tokens.wikipedia(s,e)=]@@
->@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
->@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
->@@[= pagename=]=[=urlencode.string(pagename)=]@@
->@@[= if disambiguated[s=]][=[e=]][= then=]@@
->@@[= --Technically, parentheses don't have to be percent-encoded=]@@
->@@[= --for HTTP URIs because they're unused sub-delims=]@@
->@@[= --per section 2.2 of RFC 3986, so we concatenate after=]@@
->@@[= --the function that percent-encodes all sub-delims=]@@
->@@[= pagename=]=[=pagename.."_(Arrested_Development)"=]@@
->@@[= end=]@@
->@@[==]@@
->@@[= return "http://en.wikipedia.org/wiki/"..pagename=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Function that returns the URL of the Arrested Development Wikia entry=]@@
->@@[=function tokens.wikia(s,e)=]@@
->@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
->@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
->@@[= pagename=]=[=urlencode.string(pagename)=]@@
->@@[= return "http://arresteddevelopment.wikia.com/wiki/"..pagename=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=do --Balboa Observer-Picayune=]@@
->@@[= --Season 1 episodes that are listed at different numbers=]@@
->@@[= local s1flips=]=[={ [5=]][==]=[=6, [6=]][==]=[=5, [7=]][==]=[=8, [8=]][==]=[=7, [16=]][==]=[=18, [17=]][==]=[=16, [18=]][==]=[=17 }=]@@
->@@[==]@@
->@@[= --Function the returns the URL of the episode's page on the-op.com=]@@
->@@[= function tokens.theop(s,e)=]@@
->@@[= --correct OutOfOrder Season 1 episodes=]@@
->@@[= if s=]=[==]=[=1 then e =]=[= s1flips[e=]][= or e end=]@@
->@@[= return string.format("http://the-op.com/episode/=]%[=i=]%[=02i",s,e)=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=do --IMDB=]@@
->@@[= --why hello, unreadable block of arbitrary indices, it sure sucks=]@@
->@@[= --that I have to use you=]@@
->@@[= local ttnums=]=[={=]@@
->@@[= { 0515236, 0515256, 0515212, 0515223, 0515257,=]@@
->@@[= 0515214, 0515231, 0515221, 0515247, 0515235,=]@@
->@@[= 0515238, 0515226, 0515210, 0515244, 0515246,=]@@
->@@[= 0515228, 0515208, 0515222, 0515211, 0515258,=]@@
->@@[= 0515232, 0515224, },=]@@
->@@[= { 0515253, 0515254, 0515209, 0515219, 0515243,=]@@
->@@[= 0515207, 0515248, 0515239, 0515213, 0515240,=]@@
->@@[= 0515234, 0515220, 0515229, 0515251, 0515255,=]@@
->@@[= 0515227, 0515245, 0515241, },=]@@
->@@[= { 0515250, 0515249, 0515218, 0515233, 0515230,=]@@
->@@[= 0515252, 0515237, 0515225, 0515242, 0515216,=]@@
->@@[= 0515217, 0515215, 0757386, }=]@@
->@@[= }=]@@
->@@[==]@@
->@@[= --Function that returns the URL for the episode's IMDB page=]@@
->@@[= function tokens.imdb(s,e)=]@@
->@@[= return string.format("http://www.imdb.com/title/tt=]%[=07i/",ttnums[s=]][=[e=]][=)=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=do --Hulu, you know, just in case=]@@
->@@[= local watchnums=]=[={=]@@
->@@[= { 589, 1786, 585, 1781, 1785,=]@@
->@@[= 580, 590, 588, 586, 575,=]@@
->@@[= 576, 579, 577, 644, 1783,=]@@
->@@[= 591, 582, 584, 578, 581,=]@@
->@@[= 583, 587},=]@@
->@@[= { 6641, 6644, 6643, 6638, 6639,=]@@
->@@[= 12883, 13226, 12561, 12609, 12298,=]@@
->@@[= 12271, 12901, 13248, 13267, 13276,=]@@
->@@[= 13206, 12232, 12532},=]@@
->@@[= { 6640, 6642, 6635, 6636, 6637,=]@@
->@@[= 12497, 17189, 12523, 13139, 12225,=]@@
->@@[= 12317, 12194, 12215},=]@@
->@@[= }=]@@
->@@[==]@@
->@@[= function tokens.hulu(s,e)=]@@
->@@[= return string.format(=]@@
->@@[= "http://hulu.com/watch/=]%[=i", watchnums[s=]][=[e=]][=)=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=do --Netflix Watch Instantly=]@@
->@@[= --It's largely sequential, but not quite.=]@@
->@@[= --I printed out all the numbers and moved them around=]@@
->@@[= --to fit the correct order (which is both inconsistent=]@@
->@@[= --in IDs to Netflix order and Netflix to DVD order).=]@@
->@@[= local movieids=]=[={=]@@
->@@[= { 70133673, 70133674, 70133675, 70133677, 70133676,=]@@
->@@[= 70133678, 70133680, 70133679, 70133681, 70133682,=]@@
->@@[= 70133683, 70133684, 70133685, 70133686, 70133687,=]@@
->@@[= 70133688, 70133689, 70133690, 70133691, 70133692,=]@@
->@@[= 70133693, 70133694, },=]@@
->@@[= { 70133695, 70133696, 70133697, 70133698, 70133699,=]@@
->@@[= 70133700, 70133701, 70133702, 70133703, 70133704,=]@@
->@@[= 70133705, 70133706, 70133707, 70133708, 70133711,=]@@
->@@[= 70133709, 70133710, 70133712, },=]@@
->@@[= { 70133713, 70133714, 70133715, 70133716, 70133717,=]@@
->@@[= 70133718, 70133720, 70133719, 70133721, 70133722,=]@@
->@@[= 70133723, 70133724, 70133725, }=]@@
->@@[= }=]@@
->@@[==]@@
->@@[= function tokens.netflix(s,e)=]@@
->@@[= return string.format(=]@@
->@@[= "http://www.netflix.com/WiPlayer?movieid=]=[==]%[=i",movieids[s=]][=[e=]][=)=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=-------------------------------------------------------------------------------=]@@
->@@[==]@@
->@@[=--Arrested Development TV Tropes Recap stuff-----------------------------------=]@@
->@@[=local ad_ep_links=]@@
->@@[=do=]@@
->@@[= local template=]=[=[=]=[=[=]@@
->@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@
->@@[=----=]@@
->@@[=Interwiki: [[$wikipedia Wikipedia=]][==]][= -- [[$wikia Wikia=]][==]][= -- [[$theop Balboa Observer-Picayune=]][==]][= -- [[$imdb IMDB=]][==]][==]@@
->@@[==]@@
->@@[=Watch now: [[$hulu Hulu=]][==]][= -- [[$netflix Netflix=]][==]][==]@@
->@@[=----=]@@
->@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
->@@[==]][==]=[==]][==]@@
->@@[= function ad_ep_links(s,e)=]@@
->@@[= return (string.gsub(template,"=]%[=$(=]%[=w+)",function(token) return tokens[token=]][=(s,e) end))=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Function that returns the page name of the episode's TVTropes Recap page.=]@@
->@@[=local function recap_pagename(s,e)=]@@
->@@[= --get the ep title=]@@
->@@[= local title=]=[=adeps[s=]][=[e=]][==]@@
->@@[= --replace the é in Beef Consommé=]@@
->@@[= title=]=[=string.gsub(title,'é','e')=]@@
->@@[= --transform to CamelCased WikiWord=]@@
->@@[= title=]=[=string.gsub(title,' (=]%[=l?)',string.upper)=]@@
->@@[= --Remove all non-alphanumeric characters=]@@
->@@[= title=]=[=string.gsub(title,'=]%[=W','')=]@@
->@@[==]@@
->@@[= return string.format("Recap/ArrestedDevelopmentS=]%[=iE=]%[=i=]%[=s",s,e,title)=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local function post_ad_recap_starter(s,e)=]@@
->@@[= return tvtropes.post(=]@@
->@@[= recap_pagename(s,e),=]@@
->@@[= string.format(=]@@
->@@[= "\n\n=]%[=s\n!The ''ArrestedDevelopment'' episode \"=]%[=s\" provides examples of:\n\n",=]@@
->@@[= ad_ep_links(s,e),adeps[s=]][=[e=]][=),=]@@
->@@[= "STUART",=]@@
->@@[= "Adding interwiki links and example header automatically (Ask me about Lua)")=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local function update_links(reason)=]@@
->@@[= return function(s,e)=]@@
->@@[= --until comment syntax is changed, Amigos is manual-only=]@@
->@@[= if s=]=[==]=[=2 and e=]=[==]=[=3 then=]@@
->@@[= print "(Skipping Amigos because the links go all screwy)"=]@@
->@@[= else=]@@
->@@[= local pagename=]=[=recap_pagename(s,e)=]@@
->@@[= local pageasis=]=[=tvtropes.get(pagename)=]@@
->@@[= local gsubsafelinks =]=[= string.gsub(ad_ep_links(s,e),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@
->@@[= local success=]@@
->@@[= while not success do=]@@
->@@[= local code=]@@
->@@[= success, code =]=[= tvtropes.post(pagename,=]@@
->@@[= string.gsub(pageasis,"=]%[==]%[==]%[==]%[=STARTLINKS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDLINKS=]%[==]%[==]%[==]%[=",gsubsafelinks),=]@@
->@@[= "STUART",reason)=]@@
->@@[= if not success then print("Retrying... "..code) end=]@@
->@@[= end=]@@
->@@[= end=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local function for_all_eps(f)=]@@
->@@[= for s=]=[=1,#adeps do=]@@
->@@[= for e=]=[=1,#adeps[s=]][= do=]@@
->@@[= print(string.format('Doing Season =]%[=i Episode =]%[=i, "=]%[=s"...',s,e,adeps[s=]][=[e=]][=))=]@@
->@@[= f(s,e)=]@@
->@@[= end=]@@
->@@[= end=]@@
->@@[=end=]@@
->@@[=-------------------------------------------------------------------------------=]@@
->@@[==]@@
->@@[=--Okay, put your executing commands down here.=]@@

to:

->@@[=--encoding: @@[=--encoding: UTF-8=]@@
->@@[==]@@
->@@[=--Required
@@[==]@@
@@[=--Required
to post pages=]@@
->@@[=local @@[=local tvtropes=]=[=require "tvtropes"=]@@
->@@[=--Required @@[=--Required for encoding Wikipedia article titles=]@@
->@@[=local @@[=local urlencode=]=[=require "urlencode"=]@@
->@@[==]@@
->@@[=--Arrested
@@[==]@@
@@[=--Arrested
Development data----------------------------------------------------=]@@
->@@[=adeps=]=[={=]@@
->@@[=
@@[=adeps=]=[={=]@@
@@[=
{=]@@
->@@[= @@[= "Pilot",=]@@
->@@[= @@[= "Top Banana",=]@@
->@@[= @@[= "Bringing Up Buster",=]@@
->@@[= @@[= "Key Decisions",=]@@
->@@[= @@[= "Visiting Ours",=]@@
->@@[= @@[= "Charity Drive",=]@@
->@@[= @@[= "My Mother, The Car",=]@@
->@@[= @@[= "In God We Trust",=]@@
->@@[= @@[= "Storming the Castle",=]@@
->@@[= @@[= "Pier Pressure",=]@@
->@@[= @@[= "Public Relations",=]@@
->@@[= @@[= "Marta Complex",=]@@
->@@[= @@[= "Beef Consommé",=]@@
->@@[= @@[= "Shock and Aww",=]@@
->@@[= @@[= "Staff Infection",=]@@
->@@[= @@[= "Missing Kitty",=]@@
->@@[= @@[= "Altar Egos",=]@@
->@@[= @@[= "Justice Is Blind",=]@@
->@@[= @@[= "Best Man for the GOB",=]@@
->@@[= @@[= "Whistler's Mother",=]@@
->@@[= @@[= "Not Without My Daughter",=]@@
->@@[= @@[= "Let 'Em Eat Cake"=]@@
->@@[= @@[= },=]@@
->@@[= @@[= {=]@@
->@@[= @@[= "The One Where Michael Leaves",=]@@
->@@[= @@[= "The One Where They Build a House",=]@@
->@@[= @@[= "¡Amigos!",=]@@
->@@[= @@[= "Good Grief",=]@@
->@@[= @@[= "Sad Sack",=]@@
->@@[= @@[= "Afternoon Delight",=]@@
->@@[= @@[= "Switch Hitter",=]@@
->@@[= @@[= "Queen for a Day",=]@@
->@@[= @@[= "Burning Love",=]@@
->@@[= @@[= "Ready, Aim, Marry Me",=]@@
->@@[= @@[= "Out on a Limb",=]@@
->@@[= @@[= "Hand to God",=]@@
->@@[= @@[= "Motherboy XXX",=]@@
->@@[= @@[= "The Immaculate Election",=]@@
->@@[= @@[= "Sword of Destiny",=]@@
->@@[= @@[= "Meat the Veals",=]@@
->@@[= @@[= "Spring Breakout",=]@@
->@@[= @@[= "Righteous Brothers",=]@@
->@@[= @@[= },=]@@
->@@[= @@[= {=]@@
->@@[= @@[= "The Cabin Show",=]@@
->@@[= @@[= "For British Eyes Only",=]@@
->@@[= @@[= "Forget-Me-Now",=]@@
->@@[= @@[= "Notapusy",=]@@
->@@[= @@[= "Mr. F",=]@@
->@@[= @@[= "The Ocean Walker",=]@@
->@@[= @@[= "Prison Break-In",=]@@
->@@[= @@[= "Making a Stand",=]@@
->@@[= @@[= "S.O.B.s",=]@@
->@@[= @@[= "Fakin' It",=]@@
->@@[= @@[= "Family Ties",=]@@
->@@[= @@[= "Exit Strategy",=]@@
->@@[= @@[= "Development Arrested"=]@@
->@@[= @@[= },=]@@
->@@[=}=]@@
->@@[=-------------------------------------------------------------------------------=]@@
->@@[==]@@
->@@[=--Interwiki
@@[=}=]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Interwiki
data---------------------------------------------------------------=]@@
->@@[=local @@[=local tokens=]=[={}=]@@
->@@[==]@@
->@@[=do
@@[==]@@
@@[=do
--wikipedia=]@@
->@@[= @@[= --Numbers for episodes with ambiguous titles, Wikipedia-wise,=]@@
->@@[= @@[= --whose article titles end with "(Arrested Development)"=]@@
->@@[= @@[= local disambigeps=]=[={=]@@
->@@[= @@[= {1,2,8,11,20,21,22}, --Season 1=]@@
->@@[= @@[= {5,6,8,9,11,12,18}, --Season 2=]@@
->@@[= @@[= {10,11,12} --Season 3=]@@
->@@[= @@[= }=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
--construct lookup table=]@@
->@@[= @@[= local disambiguated=]=[={}=]@@
->@@[= @@[= for s=]=[=1,#disambigeps do=]@@
->@@[= @@[= disambiguated[s=]][==]=[={}=]@@
->@@[= @@[= for i=]=[=1,#disambigeps[s=]][= do=]@@
->@@[= @@[= disambiguated[s=]][=[disambigeps[s=]][=[i=]][==]][==]=[=true=]@@
->@@[= @@[= end=]@@
->@@[= @@[= end=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
--Function that returns the Wikipedia URL=]@@
->@@[= @@[= function tokens.wikipedia(s,e)=]@@
->@@[= @@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
->@@[= @@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
->@@[= @@[= pagename=]=[=urlencode.string(pagename)=]@@
->@@[= @@[= if disambiguated[s=]][=[e=]][= then=]@@
->@@[= @@[= --Technically, parentheses don't have to be percent-encoded=]@@
->@@[= @@[= --for HTTP URIs because they're unused sub-delims=]@@
->@@[= @@[= --per section 2.2 of RFC 3986, so we concatenate after=]@@
->@@[= @@[= --the function that percent-encodes all sub-delims=]@@
->@@[= @@[= pagename=]=[=pagename.."_(Arrested_Development)"=]@@
->@@[= @@[= end=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
return "http://en.wikipedia.org/wiki/"..pagename=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Function
@@[=end=]@@
@@[==]@@
@@[=--Function
that returns the URL of the Arrested Development Wikia entry=]@@
->@@[=function @@[=function tokens.wikia(s,e)=]@@
->@@[= @@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
->@@[= @@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
->@@[= @@[= pagename=]=[=urlencode.string(pagename)=]@@
->@@[= @@[= return "http://arresteddevelopment.wikia.com/wiki/"..pagename=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=do
@@[=end=]@@
@@[==]@@
@@[=do
--Balboa Observer-Picayune=]@@
->@@[= @@[= --Season 1 episodes that are listed at different numbers=]@@
->@@[= @@[= local s1flips=]=[={ [5=]][==]=[=6, [6=]][==]=[=5, [7=]][==]=[=8, [8=]][==]=[=7, [16=]][==]=[=18, [17=]][==]=[=16, [18=]][==]=[=17 }=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
--Function the returns the URL of the episode's page on the-op.com=]@@
->@@[= @@[= function tokens.theop(s,e)=]@@
->@@[= @@[= --correct OutOfOrder Season 1 episodes=]@@
->@@[= @@[= if s=]=[==]=[=1 then e =]=[= s1flips[e=]][= or e end=]@@
->@@[= @@[= return string.format("http://the-op.com/episode/=]%[=i=]%[=02i",s,e)=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=do
@@[=end=]@@
@@[==]@@
@@[=do
--IMDB=]@@
->@@[= @@[= --why hello, unreadable block of arbitrary indices, it sure sucks=]@@
->@@[= @@[= --that I have to use you=]@@
->@@[= @@[= local ttnums=]=[={=]@@
->@@[= @@[= { 0515236, 0515256, 0515212, 0515223, 0515257,=]@@
->@@[= @@[= 0515214, 0515231, 0515221, 0515247, 0515235,=]@@
->@@[= @@[= 0515238, 0515226, 0515210, 0515244, 0515246,=]@@
->@@[= @@[= 0515228, 0515208, 0515222, 0515211, 0515258,=]@@
->@@[= @@[= 0515232, 0515224, },=]@@
->@@[= @@[= { 0515253, 0515254, 0515209, 0515219, 0515243,=]@@
->@@[= @@[= 0515207, 0515248, 0515239, 0515213, 0515240,=]@@
->@@[= @@[= 0515234, 0515220, 0515229, 0515251, 0515255,=]@@
->@@[= @@[= 0515227, 0515245, 0515241, },=]@@
->@@[= @@[= { 0515250, 0515249, 0515218, 0515233, 0515230,=]@@
->@@[= @@[= 0515252, 0515237, 0515225, 0515242, 0515216,=]@@
->@@[= @@[= 0515217, 0515215, 0757386, }=]@@
->@@[= @@[= }=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
--Function that returns the URL for the episode's IMDB page=]@@
->@@[= @@[= function tokens.imdb(s,e)=]@@
->@@[= @@[= return string.format("http://www.imdb.com/title/tt=]%[=07i/",ttnums[s=]][=[e=]][=)=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=do
@@[=end=]@@
@@[==]@@
@@[=do
--Hulu, you know, just in case=]@@
->@@[= @@[= local watchnums=]=[={=]@@
->@@[= @@[= { 589, 1786, 585, 1781, 1785,=]@@
->@@[= @@[= 580, 590, 588, 586, 575,=]@@
->@@[= @@[= 576, 579, 577, 644, 1783,=]@@
->@@[= @@[= 591, 582, 584, 578, 581,=]@@
->@@[= @@[= 583, 587},=]@@
->@@[= @@[= { 6641, 6644, 6643, 6638, 6639,=]@@
->@@[= @@[= 12883, 13226, 12561, 12609, 12298,=]@@
->@@[= @@[= 12271, 12901, 13248, 13267, 13276,=]@@
->@@[= @@[= 13206, 12232, 12532},=]@@
->@@[= @@[= { 6640, 6642, 6635, 6636, 6637,=]@@
->@@[= @@[= 12497, 17189, 12523, 13139, 12225,=]@@
->@@[= @@[= 12317, 12194, 12215},=]@@
->@@[= @@[= }=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
function tokens.hulu(s,e)=]@@
->@@[= @@[= return string.format(=]@@
->@@[= @@[= "http://hulu.com/watch/=]%[=i", watchnums[s=]][=[e=]][=)=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=do
@@[=end=]@@
@@[==]@@
@@[=do
--Netflix Watch Instantly=]@@
->@@[= @@[= --It's largely sequential, but not quite.=]@@
->@@[= @@[= --I printed out all the numbers and moved them around=]@@
->@@[= @@[= --to fit the correct order (which is both inconsistent=]@@
->@@[= @@[= --in IDs to Netflix order and Netflix to DVD order).=]@@
->@@[= @@[= local movieids=]=[={=]@@
->@@[= @@[= { 70133673, 70133674, 70133675, 70133677, 70133676,=]@@
->@@[= @@[= 70133678, 70133680, 70133679, 70133681, 70133682,=]@@
->@@[= @@[= 70133683, 70133684, 70133685, 70133686, 70133687,=]@@
->@@[= @@[= 70133688, 70133689, 70133690, 70133691, 70133692,=]@@
->@@[= @@[= 70133693, 70133694, },=]@@
->@@[= @@[= { 70133695, 70133696, 70133697, 70133698, 70133699,=]@@
->@@[= @@[= 70133700, 70133701, 70133702, 70133703, 70133704,=]@@
->@@[= @@[= 70133705, 70133706, 70133707, 70133708, 70133711,=]@@
->@@[= @@[= 70133709, 70133710, 70133712, },=]@@
->@@[= @@[= { 70133713, 70133714, 70133715, 70133716, 70133717,=]@@
->@@[= @@[= 70133718, 70133720, 70133719, 70133721, 70133722,=]@@
->@@[= @@[= 70133723, 70133724, 70133725, }=]@@
->@@[= @@[= }=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
function tokens.netflix(s,e)=]@@
->@@[= @@[= return string.format(=]@@
->@@[= @@[= "http://www.netflix.com/WiPlayer?movieid=]=[==]%[=i",movieids[s=]][=[e=]][=)=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=-------------------------------------------------------------------------------=]@@
->@@[==]@@
->@@[=--Arrested
@@[=end=]@@
@@[==]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Arrested
Development TV Tropes Recap stuff-----------------------------------=]@@
->@@[=local @@[=local ad_ep_links=]@@
->@@[=do=]@@
->@@[=
@@[=do=]@@
@@[=
local template=]=[=[=]=[=[=]@@
->@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@
->@@[=----=]@@
->@@[=Interwiki:
@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@
@@[=----=]@@
@@[=Interwiki:
[[$wikipedia Wikipedia=]][==]][= -- [[$wikia Wikia=]][==]][= -- [[$theop Balboa Observer-Picayune=]][==]][= -- [[$imdb IMDB=]][==]][==]@@
->@@[==]@@
->@@[=Watch
@@[==]@@
@@[=Watch
now: [[$hulu Hulu=]][==]][= -- [[$netflix Netflix=]][==]][==]@@
->@@[=----=]@@
->@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
->@@[==]][==]=[==]][==]@@
->@@[=
@@[=----=]@@
@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
@@[==]][==]=[==]][==]@@
@@[=
function ad_ep_links(s,e)=]@@
->@@[= @@[= return (string.gsub(template,"=]%[=$(=]%[=w+)",function(token) return tokens[token=]][=(s,e) end))=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=--Function
@@[=end=]@@
@@[==]@@
@@[=--Function
that returns the page name of the episode's TVTropes Recap page.=]@@
->@@[=local @@[=local function recap_pagename(s,e)=]@@
->@@[= @@[= --get the ep title=]@@
->@@[= @@[= local title=]=[=adeps[s=]][=[e=]][==]@@
->@@[= @@[= --replace the é in Beef Consommé=]@@
->@@[= @@[= title=]=[=string.gsub(title,'é','e')=]@@
->@@[= @@[= --transform to CamelCased WikiWord=]@@
->@@[= @@[= title=]=[=string.gsub(title,' (=]%[=l?)',string.upper)=]@@
->@@[= @@[= --Remove all non-alphanumeric characters=]@@
->@@[= @@[= title=]=[=string.gsub(title,'=]%[=W','')=]@@
->@@[==]@@
->@@[=
@@[==]@@
@@[=
return string.format("Recap/ArrestedDevelopmentS=]%[=iE=]%[=i=]%[=s",s,e,title)=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local
@@[=end=]@@
@@[==]@@
@@[=local
function post_ad_recap_starter(s,e)=]@@
->@@[= @@[= return tvtropes.post(=]@@
->@@[= @@[= recap_pagename(s,e),=]@@
->@@[= @@[= string.format(=]@@
->@@[= @@[= "\n\n=]%[=s\n!The ''ArrestedDevelopment'' episode \"=]%[=s\" provides examples of:\n\n",=]@@
->@@[= @@[= ad_ep_links(s,e),adeps[s=]][=[e=]][=),=]@@
->@@[= @@[= "STUART",=]@@
->@@[= @@[= "Adding interwiki links and example header automatically (Ask me about Lua)")=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local
@@[=end=]@@
@@[==]@@
@@[=local
function update_links(reason)=]@@
->@@[= @@[= return function(s,e)=]@@
->@@[= @@[= --until comment syntax is changed, Amigos is manual-only=]@@
->@@[= @@[= if s=]=[==]=[=2 and e=]=[==]=[=3 then=]@@
->@@[= @@[= print "(Skipping Amigos because the links go all screwy)"=]@@
->@@[= @@[= else=]@@
->@@[= @@[= local pagename=]=[=recap_pagename(s,e)=]@@
->@@[= @@[= local pageasis=]=[=tvtropes.get(pagename)=]@@
->@@[= @@[= local gsubsafelinks =]=[= string.gsub(ad_ep_links(s,e),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@
->@@[= @@[= local success=]@@
->@@[= @@[= while not success do=]@@
->@@[= @@[= local code=]@@
->@@[= @@[= success, code =]=[= tvtropes.post(pagename,=]@@
->@@[= @@[= string.gsub(pageasis,"=]%[==]%[==]%[==]%[=STARTLINKS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDLINKS=]%[==]%[==]%[==]%[=",gsubsafelinks),=]@@
->@@[= @@[= "STUART",reason)=]@@
->@@[= @@[= if not success then print("Retrying... "..code) end=]@@
->@@[= @@[= end=]@@
->@@[= @@[= end=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[==]@@
->@@[=local
@@[=end=]@@
@@[==]@@
@@[=local
function for_all_eps(f)=]@@
->@@[= @@[= for s=]=[=1,#adeps do=]@@
->@@[= @@[= for e=]=[=1,#adeps[s=]][= do=]@@
->@@[= @@[= print(string.format('Doing Season =]%[=i Episode =]%[=i, "=]%[=s"...',s,e,adeps[s=]][=[e=]][=))=]@@
->@@[= @@[= f(s,e)=]@@
->@@[= @@[= end=]@@
->@@[= @@[= end=]@@
->@@[=end=]@@
->@@[=-------------------------------------------------------------------------------=]@@
->@@[==]@@
->@@[=--Okay,
@@[=end=]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Okay,
put your executing commands down here.=]@@
Is there an issue? Send a MessageReason:
None


-><br/>

to:

-><br/>->@@
Is there an issue? Send a MessageReason:
None


->@@@@

to:

->@@@@-><br/>
Is there an issue? Send a MessageReason:
None


->@@[= =]@@

to:

->@@[= =]@@->@@@@

Added: 70

Changed: -4

Removed: 69

Is there an issue? Send a MessageReason:
None


->@@[=local urlencode=]=[={}=]@@

to:

->@@[=local urlencode=]=[={}=]@@



->@@[= str =]=[= string.gsub (str, "\r?\n", "\r\n")=]@@

to:

->@@[= str =]=[= string.gsub (str, "\r?\n", "\r\n")=]@@



->@@[= str =]=[= string.gsub (str, "([^=]%[=w=]%[=-=]%[=.=]%[=_=]%[=~ =]][=)",=]@@
->@@[= function (c) return string.format ("=]%[==]%[==]%[=02X", string.byte(c)) end)=]@@

to:

->@@[= str =]=[= string.gsub (str, "([^=]%[=w=]%[=-=]%[=.=]%[=_=]%[=~ =]][=)",=]@@
->@@[= function (c) return string.format ("=]%[==]%[==]%[=02X", string.byte(c)) end)=]@@



->@@[=urlencode.string =]=[= encode=]@@

to:

->@@[=urlencode.string =]=[= encode=]@@



->@@[= local argts, i=]=[= {}, 1=]@@

to:

->@@[= local argts, i=]=[= {}, 1=]@@



->@@[= argts[i=]][==]=[=encode(k).."=]=[="..encode(v)=]@@
->@@[= i=]=[=i+1=]@@

to:

->@@[= argts[i=]][==]=[=encode(k).."=]=[="..encode(v)=]@@
->@@[= i=]=[=i+1=]@@



->@@[=local http =]=[= require"socket.http"=]@@

to:

->@@[=local http =]=[= require"socket.http"=]@@



->@@[=local urlencode =]=[= require "urlencode"=]@@

to:

->@@[=local urlencode =]=[= require "urlencode"=]@@



->@@[=local tvtropes=]=[={}=]@@

to:

->@@[=local tvtropes=]=[={}=]@@



->@@[= assert(type(page)=]=[==]=[="string","Destination page name required")=]@@

to:

->@@[= assert(type(page)=]=[==]=[="string","Destination page name required")=]@@



->@@[= if not string.find(page,'/') then page=]=[="Main/"..page end=]@@

to:

->@@[= if not string.find(page,'/') then page=]=[="Main/"..page end=]@@



->@@[= page=]=[=fullname(page)=]@@

to:

->@@[= page=]=[=fullname(page)=]@@



->@@[= assert(type(body)=]=[==]=[="string","Page body required")=]@@

to:

->@@[= assert(type(body)=]=[==]=[="string","Page body required")=]@@



->@@[= local response =]=[==]@@

to:

->@@[= local response =]=[==]@@



->@@[= action=]=[="post", post=]=[="save",=]@@
->@@[= pagename=]=[=page, text=]=[=body,=]@@
->@@[= author=]=[=author or "Anonymous",=]@@
->@@[= reason=]=[=reason or ""=]@@

to:

->@@[= action=]=[="post", post=]=[="save",=]@@
->@@[= pagename=]=[=page, text=]=[=body,=]@@
->@@[= author=]=[=author or "Anonymous",=]@@
->@@[= reason=]=[=reason or ""=]@@



->@@[= assert(response[1=]][=,response[2=]][=)=]@@

to:

->@@[= assert(response[1=]][=,response[2=]][=)=]@@



->@@[= if tonumber(response[2=]][=)~=]=[=302 then=]@@
->@@[= return nil, response[2=]][=, response[1=]][==]@@

to:

->@@[= if tonumber(response[2=]][=)~=]=[=302 then=]@@
->@@[= return nil, response[2=]][=, response[1=]][==]@@



->@@[= local ents =]=[= {quot=]=[='"', amp=]=[='&', lt=]=[='<', gt=]=[='>'}=]@@

to:

->@@[= local ents =]=[= {quot=]=[='"', amp=]=[='&', lt=]=[='<', gt=]=[='>'}=]@@



->@@[= src=]=[=string.gsub(src,"<br/>","\n")=]@@
->@@[= src=]=[=string.gsub(src,"&(=]%[=w-);",ents)=]@@

to:

->@@[= src=]=[=string.gsub(src,"<br/>","\n")=]@@
->@@[= src=]=[=string.gsub(src,"&(=]%[=w-);",ents)=]@@



->@@[= page=]=[=fullname(page)=]@@

to:

->@@[= page=]=[=fullname(page)=]@@



->@@[= local body, code =]=[= http.request(=]@@
->@@[= authpageurl(page)..'?action=]=[=source')=]@@

to:

->@@[= local body, code =]=[= http.request(=]@@
->@@[= authpageurl(page)..'?action=]=[=source')=]@@



->@@[=local tvtropes =]=[= require "tvtropes"=]@@

to:

->@@[=local tvtropes =]=[= require "tvtropes"=]@@



->@@[=local target =]=[= "Tropers/STUART"=]@@
->@@[=local user=]=[="STUART"=]@@

to:

->@@[=local target =]=[= "Tropers/STUART"=]@@
->@@[=local user=]=[="STUART"=]@@



->@@[=local scripts=]=[={=]@@

to:

->@@[=local scripts=]=[={=]@@



->@@[= "[[folder:=]%[=s=]][==]][=\n=]%[=s\n[[/folder=]][==]][=",=]@@

to:

->@@[= "[[folder:=]%[=s=]][==]][=\n=]%[=s\n[[/folder=]][==]][=",=]@@



->@@[= local folders=]=[={=]@@
->@@[= "=]%[==]%[=STARTSCRIPTS=]%[==]%[=",=]@@
->@@[= "[[foldercontrol=]][==]][="=]@@

to:

->@@[= local folders=]=[={=]@@
->@@[= "=]%[==]%[=STARTSCRIPTS=]%[==]%[=",=]@@
->@@[= "[[foldercontrol=]][==]][="=]@@



->@@[= local headers=]=[=#folders=]@@

to:

->@@[= local headers=]=[=#folders=]@@



->@@[= for i=]=[=1, #scripts do=]@@
->@@[= local slines=]=[={}=]@@
->@@[= for line in io.lines(scripts[i=]][=) do=]@@

to:

->@@[= for i=]=[=1, #scripts do=]@@
->@@[= local slines=]=[={}=]@@
->@@[= for line in io.lines(scripts[i=]][=) do=]@@



->@@[= local escaped=]=[=string.gsub(line,"[=]%[==]=[==]%[==]][==]%[==]%[==]][=",=]@@
->@@[= function(char) return string.format("=]=[==]][=&#=]%[=i;[=]=[=",string.byte(char)) end)=]@@

to:

->@@[= local escaped=]=[=string.gsub(line,"[=]%[==]=[==]%[==]][==]%[==]%[==]][=",=]@@
->@@[= function(char) return string.format("=]=[==]][=&#=]%[=i;[=]=[=",string.byte(char)) end)=]@@



->@@[= slines[#slines+1=]][==]=[=string.format("->@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@

to:

->@@[= slines[#slines+1=]][==]=[=string.format("->@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@



->@@[= local content=]=[=table.concat(slines,'\n')=]@@
->@@[= folders[i+headers=]][==]=[=scriptfolder(scripts[i=]][=,content)=]@@

to:

->@@[= local content=]=[=table.concat(slines,'\n')=]@@
->@@[= folders[i+headers=]][==]=[=scriptfolder(scripts[i=]][=,content)=]@@



->@@[= folders[#folders+1=]][==]=[="=]%[==]%[=ENDSCRIPTS=]%[==]%[="=]@@

to:

->@@[= folders[#folders+1=]][==]=[="=]%[==]%[=ENDSCRIPTS=]%[==]%[="=]@@



->@@[= local gssscripts=]=[=string.gsub(revsection(),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@

to:

->@@[= local gssscripts=]=[=string.gsub(revsection(),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@



->@@[= print(string.format("Getting current version of =]%[=s...",target))=]@@

to:

->@@[= print(string.format("Getting current version of =]%[=s...",target))=]@@



->@@[= local current=]=[=tvtropes.get(target)=]@@

to:

->@@[= local current=]=[=tvtropes.get(target)=]@@



->@@[= local updated=]=[=string.gsub(current,=]@@
->@@[= "=]%[==]%[==]%[==]%[=STARTSCRIPTS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDSCRIPTS=]%[==]%[==]%[==]%[=",=]@@

to:

->@@[= local updated=]=[=string.gsub(current,=]@@
->@@[= "=]%[==]%[==]%[==]%[=STARTSCRIPTS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDSCRIPTS=]%[==]%[==]%[==]%[=",=]@@



->@@[= print(string.format("Posting new version of =]%[=s...",target))=]@@

to:

->@@[= print(string.format("Posting new version of =]%[=s...",target))=]@@



->@@[= posted=]=[=tvtropes.post(target,updated,user,notes)=]@@

to:

->@@[= posted=]=[=tvtropes.post(target,updated,user,notes)=]@@



->@@[= =]@@
->@@[=push "more madness from which there is no escape"=]@@



->@@[=push "more madness from which there is no escape"=]@@



->@@[==]@@



->@@[=local tvtropes=]=[=require "tvtropes"=]@@

to:

->@@[=local tvtropes=]=[=require "tvtropes"=]@@



->@@[=local urlencode=]=[=require "urlencode"=]@@

to:

->@@[=local urlencode=]=[=require "urlencode"=]@@



->@@[=adeps=]=[={=]@@

to:

->@@[=adeps=]=[={=]@@



->@@[=local tokens=]=[={}=]@@

to:

->@@[=local tokens=]=[={}=]@@



->@@[= local disambigeps=]=[={=]@@

to:

->@@[= local disambigeps=]=[={=]@@



->@@[= local disambiguated=]=[={}=]@@
->@@[= for s=]=[=1,#disambigeps do=]@@
->@@[= disambiguated[s=]][==]=[={}=]@@
->@@[= for i=]=[=1,#disambigeps[s=]][= do=]@@
->@@[= disambiguated[s=]][=[disambigeps[s=]][=[i=]][==]][==]=[=true=]@@

to:

->@@[= local disambiguated=]=[={}=]@@
->@@[= for s=]=[=1,#disambigeps do=]@@
->@@[= disambiguated[s=]][==]=[={}=]@@
->@@[= for i=]=[=1,#disambigeps[s=]][= do=]@@
->@@[= disambiguated[s=]][=[disambigeps[s=]][=[i=]][==]][==]=[=true=]@@



->@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
->@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
->@@[= pagename=]=[=urlencode.string(pagename)=]@@
->@@[= if disambiguated[s=]][=[e=]][= then=]@@

to:

->@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
->@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
->@@[= pagename=]=[=urlencode.string(pagename)=]@@
->@@[= if disambiguated[s=]][=[e=]][= then=]@@



->@@[= pagename=]=[=pagename.."_(Arrested_Development)"=]@@

to:

->@@[= pagename=]=[=pagename.."_(Arrested_Development)"=]@@



->@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
->@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
->@@[= pagename=]=[=urlencode.string(pagename)=]@@

to:

->@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
->@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
->@@[= pagename=]=[=urlencode.string(pagename)=]@@



->@@[= local s1flips=]=[={ [5=]][==]=[=6, [6=]][==]=[=5, [7=]][==]=[=8, [8=]][==]=[=7, [16=]][==]=[=18, [17=]][==]=[=16, [18=]][==]=[=17 }=]@@

to:

->@@[= local s1flips=]=[={ [5=]][==]=[=6, [6=]][==]=[=5, [7=]][==]=[=8, [8=]][==]=[=7, [16=]][==]=[=18, [17=]][==]=[=16, [18=]][==]=[=17 }=]@@



->@@[= if s=]=[==]=[=1 then e =]=[= s1flips[e=]][= or e end=]@@
->@@[= return string.format("http://the-op.com/episode/=]%[=i=]%[=02i",s,e)=]@@

to:

->@@[= if s=]=[==]=[=1 then e =]=[= s1flips[e=]][= or e end=]@@
->@@[= return string.format("http://the-op.com/episode/=]%[=i=]%[=02i",s,e)=]@@



->@@[= local ttnums=]=[={=]@@

to:

->@@[= local ttnums=]=[={=]@@



->@@[= return string.format("http://www.imdb.com/title/tt=]%[=07i/",ttnums[s=]][=[e=]][=)=]@@

to:

->@@[= return string.format("http://www.imdb.com/title/tt=]%[=07i/",ttnums[s=]][=[e=]][=)=]@@



->@@[= local watchnums=]=[={=]@@

to:

->@@[= local watchnums=]=[={=]@@



->@@[= "http://hulu.com/watch/=]%[=i", watchnums[s=]][=[e=]][=)=]@@

to:

->@@[= "http://hulu.com/watch/=]%[=i", watchnums[s=]][=[e=]][=)=]@@



->@@[= local movieids=]=[={=]@@

to:

->@@[= local movieids=]=[={=]@@



->@@[= "http://www.netflix.com/WiPlayer?movieid=]=[==]%[=i",movieids[s=]][=[e=]][=)=]@@

to:

->@@[= "http://www.netflix.com/WiPlayer?movieid=]=[==]%[=i",movieids[s=]][=[e=]][=)=]@@



->@@[= local template=]=[=[=]=[=[=]@@
->@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@

to:

->@@[= local template=]=[=[=]=[=[=]@@
->@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@



->@@[=Interwiki: [[$wikipedia Wikipedia=]][==]][= -- [[$wikia Wikia=]][==]][= -- [[$theop Balboa Observer-Picayune=]][==]][= -- [[$imdb IMDB=]][==]][==]@@

to:

->@@[=Interwiki: [[$wikipedia Wikipedia=]][==]][= -- [[$wikia Wikia=]][==]][= -- [[$theop Balboa Observer-Picayune=]][==]][= -- [[$imdb IMDB=]][==]][==]@@



->@@[=Watch now: [[$hulu Hulu=]][==]][= -- [[$netflix Netflix=]][==]][==]@@

to:

->@@[=Watch now: [[$hulu Hulu=]][==]][= -- [[$netflix Netflix=]][==]][==]@@



->@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
->@@[==]][==]=[==]][==]@@

to:

->@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
->@@[==]][==]=[==]][==]@@



->@@[= return (string.gsub(template,"=]%[=$(=]%[=w+)",function(token) return tokens[token=]][=(s,e) end))=]@@

to:

->@@[= return (string.gsub(template,"=]%[=$(=]%[=w+)",function(token) return tokens[token=]][=(s,e) end))=]@@



->@@[= local title=]=[=adeps[s=]][=[e=]][==]@@

to:

->@@[= local title=]=[=adeps[s=]][=[e=]][==]@@



->@@[= title=]=[=string.gsub(title,'é','e')=]@@

to:

->@@[= title=]=[=string.gsub(title,'é','e')=]@@



->@@[= title=]=[=string.gsub(title,' (=]%[=l?)',string.upper)=]@@

to:

->@@[= title=]=[=string.gsub(title,' (=]%[=l?)',string.upper)=]@@



->@@[= title=]=[=string.gsub(title,'=]%[=W','')=]@@

to:

->@@[= title=]=[=string.gsub(title,'=]%[=W','')=]@@



->@@[= return string.format("Recap/ArrestedDevelopmentS=]%[=iE=]%[=i=]%[=s",s,e,title)=]@@

to:

->@@[= return string.format("Recap/ArrestedDevelopmentS=]%[=iE=]%[=i=]%[=s",s,e,title)=]@@



->@@[= "\n\n=]%[=s\n!The ''ArrestedDevelopment'' episode \"=]%[=s\" provides examples of:\n\n",=]@@
->@@[= ad_ep_links(s,e),adeps[s=]][=[e=]][=),=]@@

to:

->@@[= "\n\n=]%[=s\n!The ''ArrestedDevelopment'' episode \"=]%[=s\" provides examples of:\n\n",=]@@
->@@[= ad_ep_links(s,e),adeps[s=]][=[e=]][=),=]@@



->@@[= if s=]=[==]=[=2 and e=]=[==]=[=3 then=]@@

to:

->@@[= if s=]=[==]=[=2 and e=]=[==]=[=3 then=]@@



->@@[= local pagename=]=[=recap_pagename(s,e)=]@@
->@@[= local pageasis=]=[=tvtropes.get(pagename)=]@@
->@@[= local gsubsafelinks =]=[= string.gsub(ad_ep_links(s,e),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@

to:

->@@[= local pagename=]=[=recap_pagename(s,e)=]@@
->@@[= local pageasis=]=[=tvtropes.get(pagename)=]@@
->@@[= local gsubsafelinks =]=[= string.gsub(ad_ep_links(s,e),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@



->@@[= success, code =]=[= tvtropes.post(pagename,=]@@
->@@[= string.gsub(pageasis,"=]%[==]%[==]%[==]%[=STARTLINKS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDLINKS=]%[==]%[==]%[==]%[=",gsubsafelinks),=]@@

to:

->@@[= success, code =]=[= tvtropes.post(pagename,=]@@
->@@[= string.gsub(pageasis,"=]%[==]%[==]%[==]%[=STARTLINKS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDLINKS=]%[==]%[==]%[==]%[=",gsubsafelinks),=]@@



->@@[= for s=]=[=1,#adeps do=]@@
->@@[= for e=]=[=1,#adeps[s=]][= do=]@@
->@@[= print(string.format('Doing Season =]%[=i Episode =]%[=i, "=]%[=s"...',s,e,adeps[s=]][=[e=]][=))=]@@

to:

->@@[= for s=]=[=1,#adeps do=]@@
->@@[= for e=]=[=1,#adeps[s=]][= do=]@@
->@@[= print(string.format('Doing Season =]%[=i Episode =]%[=i, "=]%[=s"...',s,e,adeps[s=]][=[e=]][=))=]@@
Is there an issue? Send a MessageReason:
more madness from which there is no escape


@@[=local urlencode=]=[={}=]@@
@@[==]@@
@@[=--URL encode a string.=]@@
@@[=local function encode(str)=]@@
@@[= --Ensure all newlines are in CRLF form=]@@
@@[= str =]=[= string.gsub (str, "\r?\n", "\r\n")=]@@
@@[= --Percent-encode all non-unreserved characters=]@@
@@[= --as per RFC 3986, Section 2.3=]@@
@@[= --(except for space, which gets plus-encoded)=]@@
@@[= str =]=[= string.gsub (str, "([^=]%[=w=]%[=-=]%[=.=]%[=_=]%[=~ =]][=)",=]@@
@@[= function (c) return string.format ("=]%[==]%[==]%[=02X", string.byte(c)) end)=]@@
@@[= --Convert spaces to plus signs=]@@
@@[= return string.gsub (str, " ", "+")=]@@
@@[=end=]@@
@@[==]@@
@@[=--Make this function available as part of the module=]@@
@@[=urlencode.string =]=[= encode=]@@
@@[==]@@
@@[=--URL encode a table as a series of parameters.=]@@
@@[=function urlencode.table(t)=]@@
@@[= --table of argument strings=]@@
@@[= local argts, i=]=[= {}, 1=]@@
@@[= for k, v in pairs(t) do=]@@
@@[= argts[i=]][==]=[=encode(k).."=]=[="..encode(v)=]@@
@@[= i=]=[=i+1=]@@
@@[= end=]@@
@@[= return table.concat(argts,'&')=]@@
@@[=end=]@@
@@[==]@@
@@[=return urlencode=]@@

to:

@@[=local ->@@[=local urlencode=]=[={}=]@@
@@[==]@@
@@[=--URL
->@@[==]@@
->@@[=--URL
encode a string.=]@@
@@[=local ->@@[=local function encode(str)=]@@
@@[= ->@@[= --Ensure all newlines are in CRLF form=]@@
@@[= ->@@[= str =]=[= string.gsub (str, "\r?\n", "\r\n")=]@@
@@[= ->@@[= --Percent-encode all non-unreserved characters=]@@
@@[= ->@@[= --as per RFC 3986, Section 2.3=]@@
@@[= ->@@[= --(except for space, which gets plus-encoded)=]@@
@@[= ->@@[= str =]=[= string.gsub (str, "([^=]%[=w=]%[=-=]%[=.=]%[=_=]%[=~ =]][=)",=]@@
@@[= ->@@[= function (c) return string.format ("=]%[==]%[==]%[=02X", string.byte(c)) end)=]@@
@@[= ->@@[= --Convert spaces to plus signs=]@@
@@[= ->@@[= return string.gsub (str, " ", "+")=]@@
@@[=end=]@@
@@[==]@@
@@[=--Make
->@@[=end=]@@
->@@[==]@@
->@@[=--Make
this function available as part of the module=]@@
@@[=urlencode.->@@[=urlencode.string =]=[= encode=]@@
@@[==]@@
@@[=--URL
->@@[==]@@
->@@[=--URL
encode a table as a series of parameters.=]@@
@@[=function ->@@[=function urlencode.table(t)=]@@
@@[= ->@@[= --table of argument strings=]@@
@@[= ->@@[= local argts, i=]=[= {}, 1=]@@
@@[= ->@@[= for k, v in pairs(t) do=]@@
@@[= ->@@[= argts[i=]][==]=[=encode(k).."=]=[="..encode(v)=]@@
@@[= ->@@[= i=]=[=i+1=]@@
@@[= ->@@[= end=]@@
@@[= ->@@[= return table.concat(argts,'&')=]@@
@@[=end=]@@
@@[==]@@
@@[=return
->@@[=end=]@@
->@@[==]@@
->@@[=return
urlencode=]@@



@@[=--Required to send to TVTropes site.=]@@
@@[=local http =]=[= require"socket.http"=]@@
@@[==]@@
@@[=--Required to create page post data.=]@@
@@[=local urlencode =]=[= require "urlencode"=]@@
@@[==]@@
@@[=local tvtropes=]=[={}=]@@
@@[==]@@
@@[=--Function that returns the authenticated TVTropes URL for the given page.=]@@
@@[=local function authpageurl(page)=]@@
@@[= return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page=]@@
@@[=end=]@@
@@[==]@@
@@[=local function fullname(page)=]@@
@@[= --Require pagename=]@@
@@[= assert(type(page)=]=[==]=[="string","Destination page name required")=]@@
@@[= --If no namespace specified, assume Main=]@@
@@[= if not string.find(page,'/') then page=]=[="Main/"..page end=]@@
@@[==]@@
@@[= return page=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function that posts the given page.=]@@
@@[=function tvtropes.post(page, body, author, reason)=]@@
@@[==]@@
@@[= page=]=[=fullname(page)=]@@
@@[==]@@
@@[= assert(type(body)=]=[==]=[="string","Page body required")=]@@
@@[==]@@
@@[= local response =]=[==]@@
@@[= {http.request(authpageurl(page),=]@@
@@[= urlencode.table{=]@@
@@[= action=]=[="post", post=]=[="save",=]@@
@@[= pagename=]=[=page, text=]=[=body,=]@@
@@[= author=]=[=author or "Anonymous",=]@@
@@[= reason=]=[=reason or ""=]@@
@@[= })}=]@@
@@[==]@@
@@[= --Error on any socket errors=]@@
@@[= assert(response[1=]][=,response[2=]][=)=]@@
@@[==]@@
@@[= --If it doesn't return Found, return nil, the status, and the body:=]@@
@@[= --sometimes it just rejects the password for some reason.=]@@
@@[= if tonumber(response[2=]][=)~=]=[=302 then=]@@
@@[= return nil, response[2=]][=, response[1=]][==]@@
@@[= else return true=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Technically, this is kind of a general function, but it's designed exclusively around=]@@
@@[=--TVTropes' source converter, so it's kept in here.=]@@
@@[=local html2plain=]@@
@@[=do=]@@
@@[= local ents =]=[= {quot=]=[='"', amp=]=[='&', lt=]=[='<', gt=]=[='>'}=]@@
@@[==]@@
@@[= function html2plain(src)=]@@
@@[= src=]=[=string.gsub(src,"<br/>","\n")=]@@
@@[= src=]=[=string.gsub(src,"&(=]%[=w-);",ents)=]@@
@@[= return src=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function that gets a given page source.=]@@
@@[=function tvtropes.get(page)=]@@
@@[==]@@
@@[= page=]=[=fullname(page)=]@@
@@[==]@@
@@[= local body, code =]=[= http.request(=]@@
@@[= authpageurl(page)..'?action=]=[=source')=]@@
@@[==]@@
@@[= --Trigger error on socket failure=]@@
@@[= assert(body,code)=]@@
@@[==]@@
@@[= --Return the source converted back from the HTML conversion=]@@
@@[= return html2plain(body)=]@@
@@[=end=]@@
@@[==]@@
@@[=return tvtropes=]@@

to:

@@[=--Required ->@@[=--Required to send to TVTropes site.=]@@
@@[=local ->@@[=local http =]=[= require"socket.http"=]@@
@@[==]@@
@@[=--Required
->@@[==]@@
->@@[=--Required
to create page post data.=]@@
@@[=local ->@@[=local urlencode =]=[= require "urlencode"=]@@
@@[==]@@
@@[=local
->@@[==]@@
->@@[=local
tvtropes=]=[={}=]@@
@@[==]@@
@@[=--Function
->@@[==]@@
->@@[=--Function
that returns the authenticated TVTropes URL for the given page.=]@@
@@[=local ->@@[=local function authpageurl(page)=]@@
@@[= ->@@[= return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page=]@@
@@[=end=]@@
@@[==]@@
@@[=local
->@@[=end=]@@
->@@[==]@@
->@@[=local
function fullname(page)=]@@
@@[= ->@@[= --Require pagename=]@@
@@[= ->@@[= assert(type(page)=]=[==]=[="string","Destination page name required")=]@@
@@[= ->@@[= --If no namespace specified, assume Main=]@@
@@[= ->@@[= if not string.find(page,'/') then page=]=[="Main/"..page end=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
return page=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function
->@@[=end=]@@
->@@[==]@@
->@@[=--Function
that posts the given page.=]@@
@@[=function ->@@[=function tvtropes.post(page, body, author, reason)=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
page=]=[=fullname(page)=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
assert(type(body)=]=[==]=[="string","Page body required")=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
local response =]=[==]@@
@@[= ->@@[= {http.request(authpageurl(page),=]@@
@@[= ->@@[= urlencode.table{=]@@
@@[= ->@@[= action=]=[="post", post=]=[="save",=]@@
@@[= ->@@[= pagename=]=[=page, text=]=[=body,=]@@
@@[= ->@@[= author=]=[=author or "Anonymous",=]@@
@@[= ->@@[= reason=]=[=reason or ""=]@@
@@[= ->@@[= })}=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
--Error on any socket errors=]@@
@@[= ->@@[= assert(response[1=]][=,response[2=]][=)=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
--If it doesn't return Found, return nil, the status, and the body:=]@@
@@[= ->@@[= --sometimes it just rejects the password for some reason.=]@@
@@[= ->@@[= if tonumber(response[2=]][=)~=]=[=302 then=]@@
@@[= ->@@[= return nil, response[2=]][=, response[1=]][==]@@
@@[= ->@@[= else return true=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Technically,
->@@[=end=]@@
->@@[==]@@
->@@[=--Technically,
this is kind of a general function, but it's designed exclusively around=]@@
@@[=--TVTropes' ->@@[=--TVTropes' source converter, so it's kept in here.=]@@
@@[=local ->@@[=local html2plain=]@@
@@[=do=]@@
@@[=
->@@[=do=]@@
->@@[=
local ents =]=[= {quot=]=[='"', amp=]=[='&', lt=]=[='<', gt=]=[='>'}=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
function html2plain(src)=]@@
@@[= ->@@[= src=]=[=string.gsub(src,"<br/>","\n")=]@@
@@[= ->@@[= src=]=[=string.gsub(src,"&(=]%[=w-);",ents)=]@@
@@[= ->@@[= return src=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function
->@@[=end=]@@
->@@[==]@@
->@@[=--Function
that gets a given page source.=]@@
@@[=function ->@@[=function tvtropes.get(page)=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
page=]=[=fullname(page)=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
local body, code =]=[= http.request(=]@@
@@[= ->@@[= authpageurl(page)..'?action=]=[=source')=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
--Trigger error on socket failure=]@@
@@[= ->@@[= assert(body,code)=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
--Return the source converted back from the HTML conversion=]@@
@@[= ->@@[= return html2plain(body)=]@@
@@[=end=]@@
@@[==]@@
@@[=return
->@@[=end=]@@
->@@[==]@@
->@@[=return
tvtropes=]@@



@@[=local tvtropes =]=[= require "tvtropes"=]@@
@@[==]@@
@@[=local target =]=[= "Tropers/STUART"=]@@
@@[=local user=]=[="STUART"=]@@
@@[==]@@
@@[=local scripts=]=[={=]@@
@@[= "urlencode.lua",=]@@
@@[= "tvtropes.lua",=]@@
@@[= "tropersrepo.lua",=]@@
@@[= "arrdev_recap.lua",=]@@
@@[=}=]@@
@@[==]@@
@@[=local function scriptfolder(name,script)=]@@
@@[= return string.format(=]@@
@@[= "[[folder:=]%[=s=]][==]][=\n=]%[=s\n[[/folder=]][==]][=",=]@@
@@[= name,script)=]@@
@@[=end=]@@
@@[==]@@
@@[=local function revsection()=]@@
@@[= local folders=]=[={=]@@
@@[= "=]%[==]%[=STARTSCRIPTS=]%[==]%[=",=]@@
@@[= "[[foldercontrol=]][==]][="=]@@
@@[= }=]@@
@@[= local headers=]=[=#folders=]@@
@@[==]@@
@@[= for i=]=[=1, #scripts do=]@@
@@[= local slines=]=[={}=]@@
@@[= for line in io.lines(scripts[i=]][=) do=]@@
@@[==]@@
@@[= --escape all equals signs and percents=]@@
@@[= local escaped=]=[=string.gsub(line,"[=]%[==]=[==]%[==]][==]%[==]%[==]][=",=]@@
@@[= function(char) return string.format("=]=[==]][=&#=]%[=i;[=]=[=",string.byte(char)) end)=]@@
@@[==]@@
@@[= slines[#slines+1=]][==]=[=string.format("@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@
@@[= end=]@@
@@[==]@@
@@[= local content=]=[=table.concat(slines,'\n')=]@@
@@[= folders[i+headers=]][==]=[=scriptfolder(scripts[i=]][=,content)=]@@
@@[= end=]@@
@@[==]@@
@@[= folders[#folders+1=]][==]=[="=]%[==]%[=ENDSCRIPTS=]%[==]%[="=]@@
@@[==]@@
@@[= return table.concat(folders,"\n\n")=]@@
@@[=end=]@@
@@[==]@@
@@[=local function push(notes)=]@@
@@[= local gssscripts=]=[=string.gsub(revsection(),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@
@@[==]@@
@@[= print(string.format("Getting current version of =]%[=s...",target))=]@@
@@[==]@@
@@[= local current=]=[=tvtropes.get(target)=]@@
@@[==]@@
@@[= local updated=]=[=string.gsub(current,=]@@
@@[= "=]%[==]%[==]%[==]%[=STARTSCRIPTS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDSCRIPTS=]%[==]%[==]%[==]%[=",=]@@
@@[= gssscripts)=]@@
@@[==]@@
@@[= print(string.format("Posting new version of =]%[=s...",target))=]@@
@@[==]@@
@@[= local posted=]@@
@@[= while not posted do=]@@
@@[= posted=]=[=tvtropes.post(target,updated,user,notes)=]@@
@@[= if not posted then print" Retrying..." end=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Executing code---------------------------------------------------------------=]@@
@@[==]@@
@@[=push "more madness from which there is no escape"=]@@
@@[==]@@
@@[==]@@

to:

@@[=local ->@@[=local tvtropes =]=[= require "tvtropes"=]@@
@@[==]@@
@@[=local
->@@[==]@@
->@@[=local
target =]=[= "Tropers/STUART"=]@@
@@[=local ->@@[=local user=]=[="STUART"=]@@
@@[==]@@
@@[=local
->@@[==]@@
->@@[=local
scripts=]=[={=]@@
@@[= ->@@[= "urlencode.lua",=]@@
@@[= ->@@[= "tvtropes.lua",=]@@
@@[= ->@@[= "tropersrepo.lua",=]@@
@@[= ->@@[= "arrdev_recap.lua",=]@@
@@[=}=]@@
@@[==]@@
@@[=local
->@@[=}=]@@
->@@[==]@@
->@@[=local
function scriptfolder(name,script)=]@@
@@[= ->@@[= return string.format(=]@@
@@[= ->@@[= "[[folder:=]%[=s=]][==]][=\n=]%[=s\n[[/folder=]][==]][=",=]@@
@@[= ->@@[= name,script)=]@@
@@[=end=]@@
@@[==]@@
@@[=local
->@@[=end=]@@
->@@[==]@@
->@@[=local
function revsection()=]@@
@@[= ->@@[= local folders=]=[={=]@@
@@[= ->@@[= "=]%[==]%[=STARTSCRIPTS=]%[==]%[=",=]@@
@@[= ->@@[= "[[foldercontrol=]][==]][="=]@@
@@[= ->@@[= }=]@@
@@[= ->@@[= local headers=]=[=#folders=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
for i=]=[=1, #scripts do=]@@
@@[= ->@@[= local slines=]=[={}=]@@
@@[= ->@@[= for line in io.lines(scripts[i=]][=) do=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
--escape all equals signs and percents=]@@
@@[= ->@@[= local escaped=]=[=string.gsub(line,"[=]%[==]=[==]%[==]][==]%[==]%[==]][=",=]@@
@@[= ->@@[= function(char) return string.format("=]=[==]][=&#=]%[=i;[=]=[=",string.byte(char)) end)=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
slines[#slines+1=]][==]=[=string.format("@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@
@@[=
format("->@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@
->@@[=
end=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
local content=]=[=table.concat(slines,'\n')=]@@
@@[= ->@@[= folders[i+headers=]][==]=[=scriptfolder(scripts[i=]][=,content)=]@@
@@[= ->@@[= end=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
folders[#folders+1=]][==]=[="=]%[==]%[=ENDSCRIPTS=]%[==]%[="=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
return table.concat(folders,"\n\n")=]@@
@@[=end=]@@
@@[==]@@
@@[=local
->@@[=end=]@@
->@@[==]@@
->@@[=local
function push(notes)=]@@
@@[= ->@@[= local gssscripts=]=[=string.gsub(revsection(),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
print(string.format("Getting current version of =]%[=s...",target))=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
local current=]=[=tvtropes.get(target)=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
local updated=]=[=string.gsub(current,=]@@
@@[= ->@@[= "=]%[==]%[==]%[==]%[=STARTSCRIPTS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDSCRIPTS=]%[==]%[==]%[==]%[=",=]@@
@@[= ->@@[= gssscripts)=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
print(string.format("Posting new version of =]%[=s...",target))=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
local posted=]@@
@@[= ->@@[= while not posted do=]@@
@@[= ->@@[= posted=]=[=tvtropes.post(target,updated,user,notes)=]@@
@@[= ->@@[= if not posted then print" Retrying..." end=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Executing
->@@[=end=]@@
->@@[==]@@
->@@[=--Executing
code---------------------------------------------------------------=]@@
@@[==]@@
@@[=push
->@@[==]@@
->@@[=push
"more madness from which there is no escape"=]@@
@@[==]@@
@@[==]@@
->@@[==]@@
->@@[==]@@



@@[=--encoding: UTF-8=]@@
@@[==]@@
@@[=--Required to post pages=]@@
@@[=local tvtropes=]=[=require "tvtropes"=]@@
@@[=--Required for encoding Wikipedia article titles=]@@
@@[=local urlencode=]=[=require "urlencode"=]@@
@@[==]@@
@@[=--Arrested Development data----------------------------------------------------=]@@
@@[=adeps=]=[={=]@@
@@[= {=]@@
@@[= "Pilot",=]@@
@@[= "Top Banana",=]@@
@@[= "Bringing Up Buster",=]@@
@@[= "Key Decisions",=]@@
@@[= "Visiting Ours",=]@@
@@[= "Charity Drive",=]@@
@@[= "My Mother, The Car",=]@@
@@[= "In God We Trust",=]@@
@@[= "Storming the Castle",=]@@
@@[= "Pier Pressure",=]@@
@@[= "Public Relations",=]@@
@@[= "Marta Complex",=]@@
@@[= "Beef Consommé",=]@@
@@[= "Shock and Aww",=]@@
@@[= "Staff Infection",=]@@
@@[= "Missing Kitty",=]@@
@@[= "Altar Egos",=]@@
@@[= "Justice Is Blind",=]@@
@@[= "Best Man for the GOB",=]@@
@@[= "Whistler's Mother",=]@@
@@[= "Not Without My Daughter",=]@@
@@[= "Let 'Em Eat Cake"=]@@
@@[= },=]@@
@@[= {=]@@
@@[= "The One Where Michael Leaves",=]@@
@@[= "The One Where They Build a House",=]@@
@@[= "¡Amigos!",=]@@
@@[= "Good Grief",=]@@
@@[= "Sad Sack",=]@@
@@[= "Afternoon Delight",=]@@
@@[= "Switch Hitter",=]@@
@@[= "Queen for a Day",=]@@
@@[= "Burning Love",=]@@
@@[= "Ready, Aim, Marry Me",=]@@
@@[= "Out on a Limb",=]@@
@@[= "Hand to God",=]@@
@@[= "Motherboy XXX",=]@@
@@[= "The Immaculate Election",=]@@
@@[= "Sword of Destiny",=]@@
@@[= "Meat the Veals",=]@@
@@[= "Spring Breakout",=]@@
@@[= "Righteous Brothers",=]@@
@@[= },=]@@
@@[= {=]@@
@@[= "The Cabin Show",=]@@
@@[= "For British Eyes Only",=]@@
@@[= "Forget-Me-Now",=]@@
@@[= "Notapusy",=]@@
@@[= "Mr. F",=]@@
@@[= "The Ocean Walker",=]@@
@@[= "Prison Break-In",=]@@
@@[= "Making a Stand",=]@@
@@[= "S.O.B.s",=]@@
@@[= "Fakin' It",=]@@
@@[= "Family Ties",=]@@
@@[= "Exit Strategy",=]@@
@@[= "Development Arrested"=]@@
@@[= },=]@@
@@[=}=]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Interwiki data---------------------------------------------------------------=]@@
@@[=local tokens=]=[={}=]@@
@@[==]@@
@@[=do --wikipedia=]@@
@@[= --Numbers for episodes with ambiguous titles, Wikipedia-wise,=]@@
@@[= --whose article titles end with "(Arrested Development)"=]@@
@@[= local disambigeps=]=[={=]@@
@@[= {1,2,8,11,20,21,22}, --Season 1=]@@
@@[= {5,6,8,9,11,12,18}, --Season 2=]@@
@@[= {10,11,12} --Season 3=]@@
@@[= }=]@@
@@[==]@@
@@[= --construct lookup table=]@@
@@[= local disambiguated=]=[={}=]@@
@@[= for s=]=[=1,#disambigeps do=]@@
@@[= disambiguated[s=]][==]=[={}=]@@
@@[= for i=]=[=1,#disambigeps[s=]][= do=]@@
@@[= disambiguated[s=]][=[disambigeps[s=]][=[i=]][==]][==]=[=true=]@@
@@[= end=]@@
@@[= end=]@@
@@[==]@@
@@[= --Function that returns the Wikipedia URL=]@@
@@[= function tokens.wikipedia(s,e)=]@@
@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
@@[= pagename=]=[=urlencode.string(pagename)=]@@
@@[= if disambiguated[s=]][=[e=]][= then=]@@
@@[= --Technically, parentheses don't have to be percent-encoded=]@@
@@[= --for HTTP URIs because they're unused sub-delims=]@@
@@[= --per section 2.2 of RFC 3986, so we concatenate after=]@@
@@[= --the function that percent-encodes all sub-delims=]@@
@@[= pagename=]=[=pagename.."_(Arrested_Development)"=]@@
@@[= end=]@@
@@[==]@@
@@[= return "http://en.wikipedia.org/wiki/"..pagename=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function that returns the URL of the Arrested Development Wikia entry=]@@
@@[=function tokens.wikia(s,e)=]@@
@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
@@[= pagename=]=[=urlencode.string(pagename)=]@@
@@[= return "http://arresteddevelopment.wikia.com/wiki/"..pagename=]@@
@@[=end=]@@
@@[==]@@
@@[=do --Balboa Observer-Picayune=]@@
@@[= --Season 1 episodes that are listed at different numbers=]@@
@@[= local s1flips=]=[={ [5=]][==]=[=6, [6=]][==]=[=5, [7=]][==]=[=8, [8=]][==]=[=7, [16=]][==]=[=18, [17=]][==]=[=16, [18=]][==]=[=17 }=]@@
@@[==]@@
@@[= --Function the returns the URL of the episode's page on the-op.com=]@@
@@[= function tokens.theop(s,e)=]@@
@@[= --correct OutOfOrder Season 1 episodes=]@@
@@[= if s=]=[==]=[=1 then e =]=[= s1flips[e=]][= or e end=]@@
@@[= return string.format("http://the-op.com/episode/=]%[=i=]%[=02i",s,e)=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=do --IMDB=]@@
@@[= --why hello, unreadable block of arbitrary indices, it sure sucks=]@@
@@[= --that I have to use you=]@@
@@[= local ttnums=]=[={=]@@
@@[= { 0515236, 0515256, 0515212, 0515223, 0515257,=]@@
@@[= 0515214, 0515231, 0515221, 0515247, 0515235,=]@@
@@[= 0515238, 0515226, 0515210, 0515244, 0515246,=]@@
@@[= 0515228, 0515208, 0515222, 0515211, 0515258,=]@@
@@[= 0515232, 0515224, },=]@@
@@[= { 0515253, 0515254, 0515209, 0515219, 0515243,=]@@
@@[= 0515207, 0515248, 0515239, 0515213, 0515240,=]@@
@@[= 0515234, 0515220, 0515229, 0515251, 0515255,=]@@
@@[= 0515227, 0515245, 0515241, },=]@@
@@[= { 0515250, 0515249, 0515218, 0515233, 0515230,=]@@
@@[= 0515252, 0515237, 0515225, 0515242, 0515216,=]@@
@@[= 0515217, 0515215, 0757386, }=]@@
@@[= }=]@@
@@[==]@@
@@[= --Function that returns the URL for the episode's IMDB page=]@@
@@[= function tokens.imdb(s,e)=]@@
@@[= return string.format("http://www.imdb.com/title/tt=]%[=07i/",ttnums[s=]][=[e=]][=)=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=do --Hulu, you know, just in case=]@@
@@[= local watchnums=]=[={=]@@
@@[= { 589, 1786, 585, 1781, 1785,=]@@
@@[= 580, 590, 588, 586, 575,=]@@
@@[= 576, 579, 577, 644, 1783,=]@@
@@[= 591, 582, 584, 578, 581,=]@@
@@[= 583, 587},=]@@
@@[= { 6641, 6644, 6643, 6638, 6639,=]@@
@@[= 12883, 13226, 12561, 12609, 12298,=]@@
@@[= 12271, 12901, 13248, 13267, 13276,=]@@
@@[= 13206, 12232, 12532},=]@@
@@[= { 6640, 6642, 6635, 6636, 6637,=]@@
@@[= 12497, 17189, 12523, 13139, 12225,=]@@
@@[= 12317, 12194, 12215},=]@@
@@[= }=]@@
@@[==]@@
@@[= function tokens.hulu(s,e)=]@@
@@[= return string.format(=]@@
@@[= "http://hulu.com/watch/=]%[=i", watchnums[s=]][=[e=]][=)=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=do --Netflix Watch Instantly=]@@
@@[= --It's largely sequential, but not quite.=]@@
@@[= --I printed out all the numbers and moved them around=]@@
@@[= --to fit the correct order (which is both inconsistent=]@@
@@[= --in IDs to Netflix order and Netflix to DVD order).=]@@
@@[= local movieids=]=[={=]@@
@@[= { 70133673, 70133674, 70133675, 70133677, 70133676,=]@@
@@[= 70133678, 70133680, 70133679, 70133681, 70133682,=]@@
@@[= 70133683, 70133684, 70133685, 70133686, 70133687,=]@@
@@[= 70133688, 70133689, 70133690, 70133691, 70133692,=]@@
@@[= 70133693, 70133694, },=]@@
@@[= { 70133695, 70133696, 70133697, 70133698, 70133699,=]@@
@@[= 70133700, 70133701, 70133702, 70133703, 70133704,=]@@
@@[= 70133705, 70133706, 70133707, 70133708, 70133711,=]@@
@@[= 70133709, 70133710, 70133712, },=]@@
@@[= { 70133713, 70133714, 70133715, 70133716, 70133717,=]@@
@@[= 70133718, 70133720, 70133719, 70133721, 70133722,=]@@
@@[= 70133723, 70133724, 70133725, }=]@@
@@[= }=]@@
@@[==]@@
@@[= function tokens.netflix(s,e)=]@@
@@[= return string.format(=]@@
@@[= "http://www.netflix.com/WiPlayer?movieid=]=[==]%[=i",movieids[s=]][=[e=]][=)=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Arrested Development TV Tropes Recap stuff-----------------------------------=]@@
@@[=local ad_ep_links=]@@
@@[=do=]@@
@@[= local template=]=[=[=]=[=[=]@@
@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@
@@[=----=]@@
@@[=Interwiki: [[$wikipedia Wikipedia=]][==]][= -- [[$wikia Wikia=]][==]][= -- [[$theop Balboa Observer-Picayune=]][==]][= -- [[$imdb IMDB=]][==]][==]@@
@@[==]@@
@@[=Watch now: [[$hulu Hulu=]][==]][= -- [[$netflix Netflix=]][==]][==]@@
@@[=----=]@@
@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
@@[==]][==]=[==]][==]@@
@@[= function ad_ep_links(s,e)=]@@
@@[= return (string.gsub(template,"=]%[=$(=]%[=w+)",function(token) return tokens[token=]][=(s,e) end))=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function that returns the page name of the episode's TVTropes Recap page.=]@@
@@[=local function recap_pagename(s,e)=]@@
@@[= --get the ep title=]@@
@@[= local title=]=[=adeps[s=]][=[e=]][==]@@
@@[= --replace the é in Beef Consommé=]@@
@@[= title=]=[=string.gsub(title,'é','e')=]@@
@@[= --transform to CamelCased WikiWord=]@@
@@[= title=]=[=string.gsub(title,' (=]%[=l?)',string.upper)=]@@
@@[= --Remove all non-alphanumeric characters=]@@
@@[= title=]=[=string.gsub(title,'=]%[=W','')=]@@
@@[==]@@
@@[= return string.format("Recap/ArrestedDevelopmentS=]%[=iE=]%[=i=]%[=s",s,e,title)=]@@
@@[=end=]@@
@@[==]@@
@@[=local function post_ad_recap_starter(s,e)=]@@
@@[= return tvtropes.post(=]@@
@@[= recap_pagename(s,e),=]@@
@@[= string.format(=]@@
@@[= "\n\n=]%[=s\n!The ''ArrestedDevelopment'' episode \"=]%[=s\" provides examples of:\n\n",=]@@
@@[= ad_ep_links(s,e),adeps[s=]][=[e=]][=),=]@@
@@[= "STUART",=]@@
@@[= "Adding interwiki links and example header automatically (Ask me about Lua)")=]@@
@@[=end=]@@
@@[==]@@
@@[=local function update_links(reason)=]@@
@@[= return function(s,e)=]@@
@@[= --until comment syntax is changed, Amigos is manual-only=]@@
@@[= if s=]=[==]=[=2 and e=]=[==]=[=3 then=]@@
@@[= print "(Skipping Amigos because the links go all screwy)"=]@@
@@[= else=]@@
@@[= local pagename=]=[=recap_pagename(s,e)=]@@
@@[= local pageasis=]=[=tvtropes.get(pagename)=]@@
@@[= local gsubsafelinks =]=[= string.gsub(ad_ep_links(s,e),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@
@@[= local success=]@@
@@[= while not success do=]@@
@@[= local code=]@@
@@[= success, code =]=[= tvtropes.post(pagename,=]@@
@@[= string.gsub(pageasis,"=]%[==]%[==]%[==]%[=STARTLINKS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDLINKS=]%[==]%[==]%[==]%[=",gsubsafelinks),=]@@
@@[= "STUART",reason)=]@@
@@[= if not success then print("Retrying... "..code) end=]@@
@@[= end=]@@
@@[= end=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=local function for_all_eps(f)=]@@
@@[= for s=]=[=1,#adeps do=]@@
@@[= for e=]=[=1,#adeps[s=]][= do=]@@
@@[= print(string.format('Doing Season =]%[=i Episode =]%[=i, "=]%[=s"...',s,e,adeps[s=]][=[e=]][=))=]@@
@@[= f(s,e)=]@@
@@[= end=]@@
@@[= end=]@@
@@[=end=]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Okay, put your executing commands down here.=]@@

to:

@@[=--encoding: ->@@[=--encoding: UTF-8=]@@
@@[==]@@
@@[=--Required
->@@[==]@@
->@@[=--Required
to post pages=]@@
@@[=local ->@@[=local tvtropes=]=[=require "tvtropes"=]@@
@@[=--Required ->@@[=--Required for encoding Wikipedia article titles=]@@
@@[=local ->@@[=local urlencode=]=[=require "urlencode"=]@@
@@[==]@@
@@[=--Arrested
->@@[==]@@
->@@[=--Arrested
Development data----------------------------------------------------=]@@
@@[=adeps=]=[={=]@@
@@[=
->@@[=adeps=]=[={=]@@
->@@[=
{=]@@
@@[= ->@@[= "Pilot",=]@@
@@[= ->@@[= "Top Banana",=]@@
@@[= ->@@[= "Bringing Up Buster",=]@@
@@[= ->@@[= "Key Decisions",=]@@
@@[= ->@@[= "Visiting Ours",=]@@
@@[= ->@@[= "Charity Drive",=]@@
@@[= ->@@[= "My Mother, The Car",=]@@
@@[= ->@@[= "In God We Trust",=]@@
@@[= ->@@[= "Storming the Castle",=]@@
@@[= ->@@[= "Pier Pressure",=]@@
@@[= ->@@[= "Public Relations",=]@@
@@[= ->@@[= "Marta Complex",=]@@
@@[= ->@@[= "Beef Consommé",=]@@
@@[= ->@@[= "Shock and Aww",=]@@
@@[= ->@@[= "Staff Infection",=]@@
@@[= ->@@[= "Missing Kitty",=]@@
@@[= ->@@[= "Altar Egos",=]@@
@@[= ->@@[= "Justice Is Blind",=]@@
@@[= ->@@[= "Best Man for the GOB",=]@@
@@[= ->@@[= "Whistler's Mother",=]@@
@@[= ->@@[= "Not Without My Daughter",=]@@
@@[= ->@@[= "Let 'Em Eat Cake"=]@@
@@[= ->@@[= },=]@@
@@[= ->@@[= {=]@@
@@[= ->@@[= "The One Where Michael Leaves",=]@@
@@[= ->@@[= "The One Where They Build a House",=]@@
@@[= ->@@[= "¡Amigos!",=]@@
@@[= ->@@[= "Good Grief",=]@@
@@[= ->@@[= "Sad Sack",=]@@
@@[= ->@@[= "Afternoon Delight",=]@@
@@[= ->@@[= "Switch Hitter",=]@@
@@[= ->@@[= "Queen for a Day",=]@@
@@[= ->@@[= "Burning Love",=]@@
@@[= ->@@[= "Ready, Aim, Marry Me",=]@@
@@[= ->@@[= "Out on a Limb",=]@@
@@[= ->@@[= "Hand to God",=]@@
@@[= ->@@[= "Motherboy XXX",=]@@
@@[= ->@@[= "The Immaculate Election",=]@@
@@[= ->@@[= "Sword of Destiny",=]@@
@@[= ->@@[= "Meat the Veals",=]@@
@@[= ->@@[= "Spring Breakout",=]@@
@@[= ->@@[= "Righteous Brothers",=]@@
@@[= ->@@[= },=]@@
@@[= ->@@[= {=]@@
@@[= ->@@[= "The Cabin Show",=]@@
@@[= ->@@[= "For British Eyes Only",=]@@
@@[= ->@@[= "Forget-Me-Now",=]@@
@@[= ->@@[= "Notapusy",=]@@
@@[= ->@@[= "Mr. F",=]@@
@@[= ->@@[= "The Ocean Walker",=]@@
@@[= ->@@[= "Prison Break-In",=]@@
@@[= ->@@[= "Making a Stand",=]@@
@@[= ->@@[= "S.O.B.s",=]@@
@@[= ->@@[= "Fakin' It",=]@@
@@[= ->@@[= "Family Ties",=]@@
@@[= ->@@[= "Exit Strategy",=]@@
@@[= ->@@[= "Development Arrested"=]@@
@@[= ->@@[= },=]@@
@@[=}=]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Interwiki
->@@[=}=]@@
->@@[=-------------------------------------------------------------------------------=]@@
->@@[==]@@
->@@[=--Interwiki
data---------------------------------------------------------------=]@@
@@[=local ->@@[=local tokens=]=[={}=]@@
@@[==]@@
@@[=do
->@@[==]@@
->@@[=do
--wikipedia=]@@
@@[= ->@@[= --Numbers for episodes with ambiguous titles, Wikipedia-wise,=]@@
@@[= ->@@[= --whose article titles end with "(Arrested Development)"=]@@
@@[= ->@@[= local disambigeps=]=[={=]@@
@@[= ->@@[= {1,2,8,11,20,21,22}, --Season 1=]@@
@@[= ->@@[= {5,6,8,9,11,12,18}, --Season 2=]@@
@@[= ->@@[= {10,11,12} --Season 3=]@@
@@[= ->@@[= }=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
--construct lookup table=]@@
@@[= ->@@[= local disambiguated=]=[={}=]@@
@@[= ->@@[= for s=]=[=1,#disambigeps do=]@@
@@[= ->@@[= disambiguated[s=]][==]=[={}=]@@
@@[= ->@@[= for i=]=[=1,#disambigeps[s=]][= do=]@@
@@[= ->@@[= disambiguated[s=]][=[disambigeps[s=]][=[i=]][==]][==]=[=true=]@@
@@[= ->@@[= end=]@@
@@[= ->@@[= end=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
--Function that returns the Wikipedia URL=]@@
@@[= ->@@[= function tokens.wikipedia(s,e)=]@@
@@[= ->@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
@@[= ->@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
@@[= ->@@[= pagename=]=[=urlencode.string(pagename)=]@@
@@[= ->@@[= if disambiguated[s=]][=[e=]][= then=]@@
@@[= ->@@[= --Technically, parentheses don't have to be percent-encoded=]@@
@@[= ->@@[= --for HTTP URIs because they're unused sub-delims=]@@
@@[= ->@@[= --per section 2.2 of RFC 3986, so we concatenate after=]@@
@@[= ->@@[= --the function that percent-encodes all sub-delims=]@@
@@[= ->@@[= pagename=]=[=pagename.."_(Arrested_Development)"=]@@
@@[= ->@@[= end=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
return "http://en.wikipedia.org/wiki/"..pagename=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function
->@@[=end=]@@
->@@[==]@@
->@@[=--Function
that returns the URL of the Arrested Development Wikia entry=]@@
@@[=function ->@@[=function tokens.wikia(s,e)=]@@
@@[= ->@@[= local pagename=]=[=adeps[s=]][=[e=]][==]@@
@@[= ->@@[= pagename=]=[=string.gsub(pagename,' ','_')=]@@
@@[= ->@@[= pagename=]=[=urlencode.string(pagename)=]@@
@@[= ->@@[= return "http://arresteddevelopment.wikia.com/wiki/"..pagename=]@@
@@[=end=]@@
@@[==]@@
@@[=do
->@@[=end=]@@
->@@[==]@@
->@@[=do
--Balboa Observer-Picayune=]@@
@@[= ->@@[= --Season 1 episodes that are listed at different numbers=]@@
@@[= ->@@[= local s1flips=]=[={ [5=]][==]=[=6, [6=]][==]=[=5, [7=]][==]=[=8, [8=]][==]=[=7, [16=]][==]=[=18, [17=]][==]=[=16, [18=]][==]=[=17 }=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
--Function the returns the URL of the episode's page on the-op.com=]@@
@@[= ->@@[= function tokens.theop(s,e)=]@@
@@[= ->@@[= --correct OutOfOrder Season 1 episodes=]@@
@@[= ->@@[= if s=]=[==]=[=1 then e =]=[= s1flips[e=]][= or e end=]@@
@@[= ->@@[= return string.format("http://the-op.com/episode/=]%[=i=]%[=02i",s,e)=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=do
->@@[=end=]@@
->@@[==]@@
->@@[=do
--IMDB=]@@
@@[= ->@@[= --why hello, unreadable block of arbitrary indices, it sure sucks=]@@
@@[= ->@@[= --that I have to use you=]@@
@@[= ->@@[= local ttnums=]=[={=]@@
@@[= ->@@[= { 0515236, 0515256, 0515212, 0515223, 0515257,=]@@
@@[= ->@@[= 0515214, 0515231, 0515221, 0515247, 0515235,=]@@
@@[= ->@@[= 0515238, 0515226, 0515210, 0515244, 0515246,=]@@
@@[= ->@@[= 0515228, 0515208, 0515222, 0515211, 0515258,=]@@
@@[= ->@@[= 0515232, 0515224, },=]@@
@@[= ->@@[= { 0515253, 0515254, 0515209, 0515219, 0515243,=]@@
@@[= ->@@[= 0515207, 0515248, 0515239, 0515213, 0515240,=]@@
@@[= ->@@[= 0515234, 0515220, 0515229, 0515251, 0515255,=]@@
@@[= ->@@[= 0515227, 0515245, 0515241, },=]@@
@@[= ->@@[= { 0515250, 0515249, 0515218, 0515233, 0515230,=]@@
@@[= ->@@[= 0515252, 0515237, 0515225, 0515242, 0515216,=]@@
@@[= ->@@[= 0515217, 0515215, 0757386, }=]@@
@@[= ->@@[= }=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
--Function that returns the URL for the episode's IMDB page=]@@
@@[= ->@@[= function tokens.imdb(s,e)=]@@
@@[= ->@@[= return string.format("http://www.imdb.com/title/tt=]%[=07i/",ttnums[s=]][=[e=]][=)=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=do
->@@[=end=]@@
->@@[==]@@
->@@[=do
--Hulu, you know, just in case=]@@
@@[= ->@@[= local watchnums=]=[={=]@@
@@[= ->@@[= { 589, 1786, 585, 1781, 1785,=]@@
@@[= ->@@[= 580, 590, 588, 586, 575,=]@@
@@[= ->@@[= 576, 579, 577, 644, 1783,=]@@
@@[= ->@@[= 591, 582, 584, 578, 581,=]@@
@@[= ->@@[= 583, 587},=]@@
@@[= ->@@[= { 6641, 6644, 6643, 6638, 6639,=]@@
@@[= ->@@[= 12883, 13226, 12561, 12609, 12298,=]@@
@@[= ->@@[= 12271, 12901, 13248, 13267, 13276,=]@@
@@[= ->@@[= 13206, 12232, 12532},=]@@
@@[= ->@@[= { 6640, 6642, 6635, 6636, 6637,=]@@
@@[= ->@@[= 12497, 17189, 12523, 13139, 12225,=]@@
@@[= ->@@[= 12317, 12194, 12215},=]@@
@@[= ->@@[= }=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
function tokens.hulu(s,e)=]@@
@@[= ->@@[= return string.format(=]@@
@@[= ->@@[= "http://hulu.com/watch/=]%[=i", watchnums[s=]][=[e=]][=)=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=do
->@@[=end=]@@
->@@[==]@@
->@@[=do
--Netflix Watch Instantly=]@@
@@[= ->@@[= --It's largely sequential, but not quite.=]@@
@@[= ->@@[= --I printed out all the numbers and moved them around=]@@
@@[= ->@@[= --to fit the correct order (which is both inconsistent=]@@
@@[= ->@@[= --in IDs to Netflix order and Netflix to DVD order).=]@@
@@[= ->@@[= local movieids=]=[={=]@@
@@[= ->@@[= { 70133673, 70133674, 70133675, 70133677, 70133676,=]@@
@@[= ->@@[= 70133678, 70133680, 70133679, 70133681, 70133682,=]@@
@@[= ->@@[= 70133683, 70133684, 70133685, 70133686, 70133687,=]@@
@@[= ->@@[= 70133688, 70133689, 70133690, 70133691, 70133692,=]@@
@@[= ->@@[= 70133693, 70133694, },=]@@
@@[= ->@@[= { 70133695, 70133696, 70133697, 70133698, 70133699,=]@@
@@[= ->@@[= 70133700, 70133701, 70133702, 70133703, 70133704,=]@@
@@[= ->@@[= 70133705, 70133706, 70133707, 70133708, 70133711,=]@@
@@[= ->@@[= 70133709, 70133710, 70133712, },=]@@
@@[= ->@@[= { 70133713, 70133714, 70133715, 70133716, 70133717,=]@@
@@[= ->@@[= 70133718, 70133720, 70133719, 70133721, 70133722,=]@@
@@[= ->@@[= 70133723, 70133724, 70133725, }=]@@
@@[= ->@@[= }=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
function tokens.netflix(s,e)=]@@
@@[= ->@@[= return string.format(=]@@
@@[= ->@@[= "http://www.netflix.com/WiPlayer?movieid=]=[==]%[=i",movieids[s=]][=[e=]][=)=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Arrested
->@@[=end=]@@
->@@[==]@@
->@@[=-------------------------------------------------------------------------------=]@@
->@@[==]@@
->@@[=--Arrested
Development TV Tropes Recap stuff-----------------------------------=]@@
@@[=local ->@@[=local ad_ep_links=]@@
@@[=do=]@@
@@[=
->@@[=do=]@@
->@@[=
local template=]=[=[=]=[=[=]@@
@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@
@@[=----=]@@
@@[=Interwiki:
->@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@
->@@[=----=]@@
->@@[=Interwiki:
[[$wikipedia Wikipedia=]][==]][= -- [[$wikia Wikia=]][==]][= -- [[$theop Balboa Observer-Picayune=]][==]][= -- [[$imdb IMDB=]][==]][==]@@
@@[==]@@
@@[=Watch
->@@[==]@@
->@@[=Watch
now: [[$hulu Hulu=]][==]][= -- [[$netflix Netflix=]][==]][==]@@
@@[=----=]@@
@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
@@[==]][==]=[==]][==]@@
@@[=
->@@[=----=]@@
->@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
->@@[==]][==]=[==]][==]@@
->@@[=
function ad_ep_links(s,e)=]@@
@@[= ->@@[= return (string.gsub(template,"=]%[=$(=]%[=w+)",function(token) return tokens[token=]][=(s,e) end))=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function
->@@[=end=]@@
->@@[==]@@
->@@[=--Function
that returns the page name of the episode's TVTropes Recap page.=]@@
@@[=local ->@@[=local function recap_pagename(s,e)=]@@
@@[= ->@@[= --get the ep title=]@@
@@[= ->@@[= local title=]=[=adeps[s=]][=[e=]][==]@@
@@[= ->@@[= --replace the é in Beef Consommé=]@@
@@[= ->@@[= title=]=[=string.gsub(title,'é','e')=]@@
@@[= ->@@[= --transform to CamelCased WikiWord=]@@
@@[= ->@@[= title=]=[=string.gsub(title,' (=]%[=l?)',string.upper)=]@@
@@[= ->@@[= --Remove all non-alphanumeric characters=]@@
@@[= ->@@[= title=]=[=string.gsub(title,'=]%[=W','')=]@@
@@[==]@@
@@[=
->@@[==]@@
->@@[=
return string.format("Recap/ArrestedDevelopmentS=]%[=iE=]%[=i=]%[=s",s,e,title)=]@@
@@[=end=]@@
@@[==]@@
@@[=local
->@@[=end=]@@
->@@[==]@@
->@@[=local
function post_ad_recap_starter(s,e)=]@@
@@[= ->@@[= return tvtropes.post(=]@@
@@[= ->@@[= recap_pagename(s,e),=]@@
@@[= ->@@[= string.format(=]@@
@@[= ->@@[= "\n\n=]%[=s\n!The ''ArrestedDevelopment'' episode \"=]%[=s\" provides examples of:\n\n",=]@@
@@[= ->@@[= ad_ep_links(s,e),adeps[s=]][=[e=]][=),=]@@
@@[= ->@@[= "STUART",=]@@
@@[= ->@@[= "Adding interwiki links and example header automatically (Ask me about Lua)")=]@@
@@[=end=]@@
@@[==]@@
@@[=local
->@@[=end=]@@
->@@[==]@@
->@@[=local
function update_links(reason)=]@@
@@[= ->@@[= return function(s,e)=]@@
@@[= ->@@[= --until comment syntax is changed, Amigos is manual-only=]@@
@@[= ->@@[= if s=]=[==]=[=2 and e=]=[==]=[=3 then=]@@
@@[= ->@@[= print "(Skipping Amigos because the links go all screwy)"=]@@
@@[= ->@@[= else=]@@
@@[= ->@@[= local pagename=]=[=recap_pagename(s,e)=]@@
@@[= ->@@[= local pageasis=]=[=tvtropes.get(pagename)=]@@
@@[= ->@@[= local gsubsafelinks =]=[= string.gsub(ad_ep_links(s,e),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@
@@[= ->@@[= local success=]@@
@@[= ->@@[= while not success do=]@@
@@[= ->@@[= local code=]@@
@@[= ->@@[= success, code =]=[= tvtropes.post(pagename,=]@@
@@[= ->@@[= string.gsub(pageasis,"=]%[==]%[==]%[==]%[=STARTLINKS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDLINKS=]%[==]%[==]%[==]%[=",gsubsafelinks),=]@@
@@[= ->@@[= "STUART",reason)=]@@
@@[= ->@@[= if not success then print("Retrying... "..code) end=]@@
@@[= ->@@[= end=]@@
@@[= ->@@[= end=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=local
->@@[=end=]@@
->@@[==]@@
->@@[=local
function for_all_eps(f)=]@@
@@[= ->@@[= for s=]=[=1,#adeps do=]@@
@@[= ->@@[= for e=]=[=1,#adeps[s=]][= do=]@@
@@[= ->@@[= print(string.format('Doing Season =]%[=i Episode =]%[=i, "=]%[=s"...',s,e,adeps[s=]][=[e=]][=))=]@@
@@[= ->@@[= f(s,e)=]@@
@@[= ->@@[= end=]@@
@@[= ->@@[= end=]@@
@@[=end=]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Okay,
->@@[=end=]@@
->@@[=-------------------------------------------------------------------------------=]@@
->@@[==]@@
->@@[=--Okay,
put your executing commands down here.=]@@

Added: 16

Changed: 4486

Is there an issue? Send a MessageReason:
more madness from which there is no escape


@@local urlencode={}@@
@@@@
@@--URL encode a string.@@
@@local function encode(str)@@
@@ --Ensure all newlines are in CRLF form@@
@@ str = string.gsub (str, "\r?\n", "\r\n")@@
@@ --Percent-encode all non-unreserved characters@@
@@ --as per RFC 3986, Section 2.3@@
@@ --(except for space, which gets plus-encoded)@@
@@ str = string.gsub (str, "([^%w%-%.%_%~ ])",@@
@@ function (c) return string.format ("%%%02X", string.byte(c)) end)@@
@@ --Convert spaces to plus signs@@
@@ return string.gsub (str, " ", "+")@@
@@end@@
@@@@
@@--Make this function available as part of the module@@
@@urlencode.string = encode@@
@@@@
@@--URL encode a table as a series of parameters.@@
@@function urlencode.table(t)@@
@@ --table of argument strings@@
@@ local argts, i= {}, 1@@
@@ for k, v in pairs(t) do@@
@@ argts[i]=encode(k).."="..encode(v)@@
@@ i=i+1@@
@@ end@@
@@ return table.concat(argts,'&')@@
@@end@@
@@@@
@@return urlencode@@

to:

@@local urlencode={}@@
@@@@
@@--URL
@@[=local urlencode=]=[={}=]@@
@@[==]@@
@@[=--URL
encode a string.@@
@@local
=]@@
@@[=local
function encode(str)@@
@@
encode(str)=]@@
@@[=
--Ensure all newlines are in CRLF form@@
@@
form=]@@
@@[=
str = =]=[= string.gsub (str, "\r?\n", "\r\n")@@
@@
"\r\n")=]@@
@@[=
--Percent-encode all non-unreserved characters@@
@@
characters=]@@
@@[=
--as per RFC 3986, Section 2.3@@
@@
3=]@@
@@[=
--(except for space, which gets plus-encoded)@@
@@
plus-encoded)=]@@
@@[=
str = =]=[= string.gsub (str, "([^%w%-%.%_%~ ])",@@
@@
"([^=]%[=w=]%[=-=]%[=.=]%[=_=]%[=~ =]][=)",=]@@
@@[=
function (c) return string.format ("%%%02X", ("=]%[==]%[==]%[=02X", string.byte(c)) end)@@
@@
end)=]@@
@@[=
--Convert spaces to plus signs@@
@@
signs=]@@
@@[=
return string.gsub (str, " ", "+")@@
@@end@@
@@@@
@@--Make
"+")=]@@
@@[=end=]@@
@@[==]@@
@@[=--Make
this function available as part of the module@@
@@urlencode.
module=]@@
@@[=urlencode.
string = encode@@
@@@@
@@--URL
=]=[= encode=]@@
@@[==]@@
@@[=--URL
encode a table as a series of parameters.@@
@@function
=]@@
@@[=function
urlencode.table(t)@@
@@
table(t)=]@@
@@[=
--table of argument strings@@
@@
strings=]@@
@@[=
local argts, i= i=]=[= {}, 1@@
@@
1=]@@
@@[=
for k, v in pairs(t) do@@
@@ argts[i]=encode(k).."="..encode(v)@@
@@ i=i+1@@
@@ end@@
@@
do=]@@
@@[= argts[i=]][==]=[=encode(k).."=]=[="..encode(v)=]@@
@@[= i=]=[=i+1=]@@
@@[= end=]@@
@@[=
return table.concat(argts,'&')@@
@@end@@
@@@@
@@return urlencode@@
concat(argts,'&')=]@@
@@[=end=]@@
@@[==]@@
@@[=return urlencode=]@@



@@--Required to send to TVTropes site.@@
@@local http = require"socket.http"@@
@@@@
@@--Required to create page post data.@@
@@local urlencode = require "urlencode"@@
@@@@
@@local tvtropes={}@@
@@@@
@@--Function that returns the authenticated TVTropes URL for the given page.@@
@@local function authpageurl(page)@@
@@ return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page@@
@@end@@
@@@@
@@local function fullname(page)@@
@@ --Require pagename@@
@@ assert(type(page)=="string","Destination page name required")@@
@@ --If no namespace specified, assume Main@@
@@ if not string.find(page,'/') then page="Main/"..page end@@
@@@@
@@ return page@@
@@end@@
@@@@
@@--Function that posts the given page.@@
@@function tvtropes.post(page, body, author, reason)@@
@@@@
@@ page=fullname(page)@@
@@@@
@@ assert(type(body)=="string","Page body required")@@
@@@@
@@ local response =@@
@@ {http.request(authpageurl(page),@@
@@ urlencode.table{@@
@@ action="post", post="save",@@
@@ pagename=page, text=body,@@
@@ author=author or "Anonymous",@@
@@ reason=reason or ""@@
@@ })}@@
@@@@
@@ --Error on any socket errors@@
@@ assert(response[1],response[2])@@
@@@@
@@ --If it doesn't return Found, return nil, the status, and the body:@@
@@ --sometimes it just rejects the password for some reason.@@
@@ if tonumber(response[2])~=302 then@@
@@ return nil, response[2], response[1]@@
@@ else return true@@
@@ end@@
@@end@@
@@@@
@@--Technically, this is kind of a general function, but it's designed exclusively around@@
@@--TVTropes' source converter, so it's kept in here.@@
@@local html2plain@@
@@do@@
@@ local ents = {quot='"', amp='&', lt='<', gt='>'}@@
@@@@
@@ function html2plain(src)@@
@@ src=string.gsub(src,"<br/>","\n")@@
@@ src=string.gsub(src,"&(%w-);",ents)@@
@@ return src@@
@@ end@@
@@end@@
@@@@
@@--Function that gets a given page source.@@
@@function tvtropes.get(page)@@
@@@@
@@ page=fullname(page)@@
@@@@
@@ local body, code = http.request(@@
@@ authpageurl(page)..'?action=source')@@
@@@@
@@ --Trigger error on socket failure@@
@@ assert(body,code)@@
@@@@
@@ --Return the source converted back from the HTML conversion@@
@@ return html2plain(body)@@
@@end@@
@@@@
@@return tvtropes@@

to:

@@--Required @@[=--Required to send to TVTropes site.@@
@@local
=]@@
@@[=local
http = =]=[= require"socket.http"@@
@@@@
@@--Required
http"=]@@
@@[==]@@
@@[=--Required
to create page post data.@@
@@local
=]@@
@@[=local
urlencode = =]=[= require "urlencode"@@
@@@@
@@local tvtropes={}@@
@@@@
@@--Function
"urlencode"=]@@
@@[==]@@
@@[=local tvtropes=]=[={}=]@@
@@[==]@@
@@[=--Function
that returns the authenticated TVTropes URL for the given page.@@
@@local
=]@@
@@[=local
function authpageurl(page)@@
@@
authpageurl(page)=]@@
@@[=
return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page@@
@@end@@
@@@@
@@local
page=]@@
@@[=end=]@@
@@[==]@@
@@[=local
function fullname(page)@@
@@
fullname(page)=]@@
@@[=
--Require pagename@@
@@ assert(type(page)=="string","Destination
pagename=]@@
@@[= assert(type(page)=]=[==]=[="string","Destination
page name required")@@
@@
required")=]@@
@@[=
--If no namespace specified, assume Main@@
@@
Main=]@@
@@[=
if not string.find(page,'/') then page="Main/"..page=]=[="Main/"..page end@@
@@@@
@@
end=]@@
@@[==]@@
@@[=
return page@@
@@end@@
@@@@
@@--Function
page=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function
that posts the given page.@@
@@function
=]@@
@@[=function
tvtropes.post(page, body, author, reason)@@
@@@@
@@ page=fullname(page)@@
@@@@
@@ assert(type(body)=="string","Page
reason)=]@@
@@[==]@@
@@[= page=]=[=fullname(page)=]@@
@@[==]@@
@@[= assert(type(body)=]=[==]=[="string","Page
body required")@@
@@@@
@@
required")=]@@
@@[==]@@
@@[=
local response =@@
@@
=]=[==]@@
@@[=
{http.request(authpageurl(page),@@
@@
request(authpageurl(page),=]@@
@@[=
urlencode.table{@@
@@ action="post", post="save",@@
@@ pagename=page, text=body,@@
@@ author=author
table{=]@@
@@[= action=]=[="post", post=]=[="save",=]@@
@@[= pagename=]=[=page, text=]=[=body,=]@@
@@[= author=]=[=author
or "Anonymous",@@
@@ reason=reason
"Anonymous",=]@@
@@[= reason=]=[=reason
or ""@@
@@ })}@@
@@@@
@@
""=]@@
@@[= })}=]@@
@@[==]@@
@@[=
--Error on any socket errors@@
@@ assert(response[1],response[2])@@
@@@@
@@
errors=]@@
@@[= assert(response[1=]][=,response[2=]][=)=]@@
@@[==]@@
@@[=
--If it doesn't return Found, return nil, the status, and the body:@@
@@
body:=]@@
@@[=
--sometimes it just rejects the password for some reason.@@
@@
=]@@
@@[=
if tonumber(response[2])~=302 then@@
@@
tonumber(response[2=]][=)~=]=[=302 then=]@@
@@[=
return nil, response[2], response[1]@@
@@
response[2=]][=, response[1=]][==]@@
@@[=
else return true@@
@@ end@@
@@end@@
@@@@
@@--Technically,
true=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Technically,
this is kind of a general function, but it's designed exclusively around@@
@@--TVTropes'
around=]@@
@@[=--TVTropes'
source converter, so it's kept in here.@@
@@local html2plain@@
@@do@@
@@
=]@@
@@[=local html2plain=]@@
@@[=do=]@@
@@[=
local ents = {quot='"', amp='&', lt='<', gt='>'}@@
@@@@
@@
=]=[= {quot=]=[='"', amp=]=[='&', lt=]=[='<', gt=]=[='>'}=]@@
@@[==]@@
@@[=
function html2plain(src)@@
@@ src=string.gsub(src,"<br/>","\n")@@
@@ src=string.gsub(src,"&(%w-);",ents)@@
@@
html2plain(src)=]@@
@@[= src=]=[=string.gsub(src,"<br/>","\n")=]@@
@@[= src=]=[=string.gsub(src,"&(=]%[=w-);",ents)=]@@
@@[=
return src@@
@@ end@@
@@end@@
@@@@
@@--Function
src=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function
that gets a given page source.@@
@@function
=]@@
@@[=function
tvtropes.get(page)@@
@@@@
@@ page=fullname(page)@@
@@@@
@@
get(page)=]@@
@@[==]@@
@@[= page=]=[=fullname(page)=]@@
@@[==]@@
@@[=
local body, code = =]=[= http.request(@@
@@
request(=]@@
@@[=
authpageurl(page)..'?action=source')@@
@@@@
@@
'?action=]=[=source')=]@@
@@[==]@@
@@[=
--Trigger error on socket failure@@
@@ assert(body,code)@@
@@@@
@@
failure=]@@
@@[= assert(body,code)=]@@
@@[==]@@
@@[=
--Return the source converted back from the HTML conversion@@
@@
conversion=]@@
@@[=
return html2plain(body)@@
@@end@@
@@@@
@@return tvtropes@@
html2plain(body)=]@@
@@[=end=]@@
@@[==]@@
@@[=return tvtropes=]@@



@@local tvtropes = require "tvtropes"@@
@@@@
@@local target = "Tropers/STUART"@@
@@local user="STUART"@@
@@@@
@@local scripts={@@
@@ "urlencode.lua",@@
@@ "tvtropes.lua",@@
@@ "tropersrepo.lua",@@
@@ "arrdev_recap.lua",@@
@@}@@
@@@@
@@local function scriptfolder(name,script)@@
@@ return string.format(@@
@@ "[[folder:%s]]\n%s\n[[/folder]]",@@
@@ name,script)@@
@@end@@
@@@@
@@local function revsection()@@
@@ local folders={@@
@@ "%%STARTSCRIPTS%%",@@
@@ "[[foldercontrol]]"@@
@@ }@@
@@ local headers=#folders@@
@@@@
@@ for i=1, #scripts do@@
@@ local slines={}@@
@@ for line in io.lines(scripts[i]) do@@
@@ local escaped=string.gsub(line,"[^%w%s]",@@
@@ function(char) return string.format("&#%i;",string.byte(char)) end)@@
@@@@
@@ slines[#slines+1]=string.format("@@%s@@",escaped)@@
@@ end@@
@@@@
@@ local content=table.concat(slines,'\n')@@
@@ folders[i+headers]=scriptfolder(scripts[i],content)@@
@@ end@@
@@@@
@@ folders[#folders+1]="%%ENDSCRIPTS%%"@@
@@@@
@@ return table.concat(folders,"\n\n")@@
@@end@@
@@@@
@@local function push(notes)@@
@@ local gssscripts=string.gsub(revsection(),"%%","%%%%")@@
@@@@
@@ print(string.format("Getting current version of %s...",target))@@
@@@@
@@ local current=tvtropes.get(target)@@
@@@@
@@ local updated=string.gsub(current,@@
@@ "%%%%STARTSCRIPTS%%%%.-%%%%ENDSCRIPTS%%%%",@@
@@ gssscripts)@@
@@@@
@@ print(string.format("Posting new version of %s...",target))@@
@@@@
@@ local posted@@
@@ while not posted do@@
@@ posted=tvtropes.post(target,updated,user,notes)@@
@@ if not posted then print" Retrying..." end@@
@@ end@@
@@end@@
@@@@
@@--Executing code---------------------------------------------------------------@@
@@@@
@@push "ARGH english language is such movink target"@@
@@@@
@@@@

to:

@@local @@[=local tvtropes = =]=[= require "tvtropes"@@
@@@@
@@local
"tvtropes"=]@@
@@[==]@@
@@[=local
target = "Tropers/STUART"@@
@@local user="STUART"@@
@@@@
@@local scripts={@@
@@
=]=[= "Tropers/STUART"=]@@
@@[=local user=]=[="STUART"=]@@
@@[==]@@
@@[=local scripts=]=[={=]@@
@@[=
"urlencode.lua",@@
@@
lua",=]@@
@@[=
"tvtropes.lua",@@
@@
lua",=]@@
@@[=
"tropersrepo.lua",@@
@@
lua",=]@@
@@[=
"arrdev_recap.lua",@@
@@}@@
@@@@
@@local
lua",=]@@
@@[=}=]@@
@@[==]@@
@@[=local
function scriptfolder(name,script)@@
@@
scriptfolder(name,script)=]@@
@@[=
return string.format(@@
@@ "[[folder:%s]]\n%s\n[[/folder]]",@@
@@ name,script)@@
@@end@@
@@@@
@@local
format(=]@@
@@[= "[[folder:=]%[=s=]][==]][=\n=]%[=s\n[[/folder=]][==]][=",=]@@
@@[= name,script)=]@@
@@[=end=]@@
@@[==]@@
@@[=local
function revsection()@@
@@
revsection()=]@@
@@[=
local folders={@@
@@ "%%STARTSCRIPTS%%",@@
@@ "[[foldercontrol]]"@@
@@ }@@
@@
folders=]=[={=]@@
@@[= "=]%[==]%[=STARTSCRIPTS=]%[==]%[=",=]@@
@@[= "[[foldercontrol=]][==]][="=]@@
@@[= }=]@@
@@[=
local headers=#folders@@
@@@@
@@
headers=]=[=#folders=]@@
@@[==]@@
@@[=
for i=1, i=]=[=1, #scripts do@@
@@
do=]@@
@@[=
local slines={}@@
@@
slines=]=[={}=]@@
@@[=
for line in io.lines(scripts[i]) do@@
@@
lines(scripts[i=]][=) do=]@@
@@[==]@@
@@[= --escape all equals signs and percents=]@@
@@[=
local escaped=string.gsub(line,"[^%w%s]",@@
@@
escaped=]=[=string.gsub(line,"[=]%[==]=[==]%[==]][==]%[==]%[==]][=",=]@@
@@[=
function(char) return string.format("&#%i;",string.format("=]=[==]][=&#=]%[=i;[=]=[=",string.byte(char)) end)@@
@@@@
@@ slines[#slines+1]=string.format("@@%s@@",escaped)@@
@@ end@@
@@@@
@@
end)=]@@
@@[==]@@
@@[= slines[#slines+1=]][==]=[=string.format("@@[=]=[==]%[=s=]=[==]][=@@",escaped)=]@@
@@[= end=]@@
@@[==]@@
@@[=
local content=table.concat(slines,'\n')@@
@@ folders[i+headers]=scriptfolder(scripts[i],content)@@
@@ end@@
@@@@
@@ folders[#folders+1]="%%ENDSCRIPTS%%"@@
@@@@
@@
content=]=[=table.concat(slines,'\n')=]@@
@@[= folders[i+headers=]][==]=[=scriptfolder(scripts[i=]][=,content)=]@@
@@[= end=]@@
@@[==]@@
@@[= folders[#folders+1=]][==]=[="=]%[==]%[=ENDSCRIPTS=]%[==]%[="=]@@
@@[==]@@
@@[=
return table.concat(folders,"\n\n")@@
@@end@@
@@@@
@@local
concat(folders,"\n\n")=]@@
@@[=end=]@@
@@[==]@@
@@[=local
function push(notes)@@
@@
push(notes)=]@@
@@[=
local gssscripts=string.gsub(revsection(),"%%","%%%%")@@
@@@@
@@
gssscripts=]=[=string.gsub(revsection(),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@
@@[==]@@
@@[=
print(string.format("Getting current version of %s...",target))@@
@@@@
@@
=]%[=s...",target))=]@@
@@[==]@@
@@[=
local current=tvtropes.get(target)@@
@@@@
@@
current=]=[=tvtropes.get(target)=]@@
@@[==]@@
@@[=
local updated=string.gsub(current,@@
@@ "%%%%STARTSCRIPTS%%%%.-%%%%ENDSCRIPTS%%%%",@@
@@ gssscripts)@@
@@@@
@@
updated=]=[=string.gsub(current,=]@@
@@[= "=]%[==]%[==]%[==]%[=STARTSCRIPTS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDSCRIPTS=]%[==]%[==]%[==]%[=",=]@@
@@[= gssscripts)=]@@
@@[==]@@
@@[=
print(string.format("Posting new version of %s...",target))@@
@@@@
@@
=]%[=s...",target))=]@@
@@[==]@@
@@[=
local posted@@
@@
posted=]@@
@@[=
while not posted do@@
@@ posted=tvtropes.post(target,updated,user,notes)@@
@@
do=]@@
@@[= posted=]=[=tvtropes.post(target,updated,user,notes)=]@@
@@[=
if not posted then print" Retrying..." end@@
@@ end@@
@@end@@
@@@@
@@--Executing code---------------------------------------------------------------@@
@@@@
@@push "ARGH english language
end=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Executing code---------------------------------------------------------------=]@@
@@[==]@@
@@[=push "more madness from which there
is such movink target"@@
@@@@
@@@@
no escape"=]@@
@@[==]@@
@@[==]@@



@@--encoding: UTF-8@@
@@@@
@@--Required to post pages@@
@@local tvtropes=require "tvtropes"@@
@@--Required for encoding Wikipedia article titles@@
@@local urlencode=require "urlencode"@@
@@@@
@@--Arrested Development data----------------------------------------------------@@
@@adeps={@@
@@ {@@
@@ "Pilot",@@
@@ "Top Banana",@@
@@ "Bringing Up Buster",@@
@@ "Key Decisions",@@
@@ "Visiting Ours",@@
@@ "Charity Drive",@@
@@ "My Mother, The Car",@@
@@ "In God We Trust",@@
@@ "Storming the Castle",@@
@@ "Pier Pressure",@@
@@ "Public Relations",@@
@@ "Marta Complex",@@
@@ "Beef Consommé",@@
@@ "Shock and Aww",@@
@@ "Staff Infection",@@
@@ "Missing Kitty",@@
@@ "Altar Egos",@@
@@ "Justice Is Blind",@@
@@ "Best Man for the GOB",@@
@@ "Whistler's Mother",@@
@@ "Not Without My Daughter",@@
@@ "Let 'Em Eat Cake"@@
@@ },@@
@@ {@@
@@ "The One Where Michael Leaves",@@
@@ "The One Where They Build a House",@@
@@ "¡Amigos!",@@
@@ "Good Grief",@@
@@ "Sad Sack",@@
@@ "Afternoon Delight",@@
@@ "Switch Hitter",@@
@@ "Queen for a Day",@@
@@ "Burning Love",@@
@@ "Ready, Aim, Marry Me",@@
@@ "Out on a Limb",@@
@@ "Hand to God",@@
@@ "Motherboy XXX",@@
@@ "The Immaculate Election",@@
@@ "Sword of Destiny",@@
@@ "Meat the Veals",@@
@@ "Spring Breakout",@@
@@ "Righteous Brothers",@@
@@ },@@
@@ {@@
@@ "The Cabin Show",@@
@@ "For British Eyes Only",@@
@@ "Forget-Me-Now",@@
@@ "Notapusy",@@
@@ "Mr. F",@@
@@ "The Ocean Walker",@@
@@ "Prison Break-In",@@
@@ "Making a Stand",@@
@@ "S.O.B.s",@@
@@ "Fakin' It",@@
@@ "Family Ties",@@
@@ "Exit Strategy",@@
@@ "Development Arrested"@@
@@ },@@
@@}@@
@@-------------------------------------------------------------------------------@@
@@@@
@@--Interwiki data---------------------------------------------------------------@@
@@local tokens={}@@
@@@@
@@do --wikipedia@@
@@ --Numbers for episodes with ambiguous titles, Wikipedia-wise,@@
@@ --whose article titles end with "(Arrested Development)"@@
@@ local disambigeps={@@
@@ {1,2,8,11,20,21,22}, --Season 1@@
@@ {5,6,8,9,11,12,18}, --Season 2@@
@@ {10,11,12} --Season 3@@
@@ }@@
@@@@
@@ --construct lookup table@@
@@ local disambiguated={}@@
@@ for s=1,#disambigeps do@@
@@ disambiguated[s]={}@@
@@ for i=1,#disambigeps[s] do@@
@@ disambiguated[s][disambigeps[s][i]]=true@@
@@ end@@
@@ end@@
@@@@
@@ --Function that returns the Wikipedia URL@@
@@ function tokens.wikipedia(s,e)@@
@@ local pagename=adeps[s][e]@@
@@ pagename=string.gsub(pagename,' ','_')@@
@@ pagename=urlencode.string(pagename)@@
@@ if disambiguated[s][e] then@@
@@ --Technically, parentheses don't have to be percent-encoded@@
@@ --for HTTP URIs because they're unused sub-delims@@
@@ --per section 2.2 of RFC 3986, so we concatenate after@@
@@ --the function that percent-encodes all sub-delims@@
@@ pagename=pagename.."_(Arrested_Development)"@@
@@ end@@
@@@@
@@ return "http://en.wikipedia.org/wiki/"..pagename@@
@@ end@@
@@end@@
@@@@
@@--Function that returns the URL of the Arrested Development Wikia entry@@
@@function tokens.wikia(s,e)@@
@@ local pagename=adeps[s][e]@@
@@ pagename=string.gsub(pagename,' ','_')@@
@@ pagename=urlencode.string(pagename)@@
@@ return "http://arresteddevelopment.wikia.com/wiki/"..pagename@@
@@end@@
@@@@
@@do --Balboa Observer-Picayune@@
@@ --Season 1 episodes that are listed at different numbers@@
@@ local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }@@
@@@@
@@ --Function the returns the URL of the episode's page on the-op.com@@
@@ function tokens.theop(s,e)@@
@@ --correct OutOfOrder Season 1 episodes@@
@@ if s==1 then e = s1flips[e] or e end@@
@@ return string.format("http://the-op.com/episode/%i%02i",s,e)@@
@@ end@@
@@end@@
@@@@
@@do --IMDB@@
@@ --why hello, unreadable block of arbitrary indices, it sure sucks@@
@@ --that I have to use you@@
@@ local ttnums={@@
@@ { 0515236, 0515256, 0515212, 0515223, 0515257,@@
@@ 0515214, 0515231, 0515221, 0515247, 0515235,@@
@@ 0515238, 0515226, 0515210, 0515244, 0515246,@@
@@ 0515228, 0515208, 0515222, 0515211, 0515258,@@
@@ 0515232, 0515224, },@@
@@ { 0515253, 0515254, 0515209, 0515219, 0515243,@@
@@ 0515207, 0515248, 0515239, 0515213, 0515240,@@
@@ 0515234, 0515220, 0515229, 0515251, 0515255,@@
@@ 0515227, 0515245, 0515241, },@@
@@ { 0515250, 0515249, 0515218, 0515233, 0515230,@@
@@ 0515252, 0515237, 0515225, 0515242, 0515216,@@
@@ 0515217, 0515215, 0757386, }@@
@@ }@@
@@@@
@@ --Function that returns the URL for the episode's IMDB page@@
@@ function tokens.imdb(s,e)@@
@@ return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])@@
@@ end@@
@@end@@
@@@@
@@do --Hulu, you know, just in case@@
@@ local watchnums={@@
@@ { 589, 1786, 585, 1781, 1785,@@
@@ 580, 590, 588, 586, 575,@@
@@ 576, 579, 577, 644, 1783,@@
@@ 591, 582, 584, 578, 581,@@
@@ 583, 587},@@
@@ { 6641, 6644, 6643, 6638, 6639,@@
@@ 12883, 13226, 12561, 12609, 12298,@@
@@ 12271, 12901, 13248, 13267, 13276,@@
@@ 13206, 12232, 12532},@@
@@ { 6640, 6642, 6635, 6636, 6637,@@
@@ 12497, 17189, 12523, 13139, 12225,@@
@@ 12317, 12194, 12215},@@
@@ }@@
@@@@
@@ function tokens.hulu(s,e)@@
@@ return string.format(@@
@@ "http://hulu.com/watch/%i", watchnums[s][e])@@
@@ end@@
@@end@@
@@@@
@@do --Netflix Watch Instantly@@
@@ --It's largely sequential, but not quite.@@
@@ --I printed out all the numbers and moved them around@@
@@ --to fit the correct order (which is both inconsistent@@
@@ --in IDs to Netflix order and Netflix to DVD order).@@
@@ local movieids={@@
@@ { 70133673, 70133674, 70133675, 70133677, 70133676,@@
@@ 70133678, 70133680, 70133679, 70133681, 70133682,@@
@@ 70133683, 70133684, 70133685, 70133686, 70133687,@@
@@ 70133688, 70133689, 70133690, 70133691, 70133692,@@
@@ 70133693, 70133694, },@@
@@ { 70133695, 70133696, 70133697, 70133698, 70133699,@@
@@ 70133700, 70133701, 70133702, 70133703, 70133704,@@
@@ 70133705, 70133706, 70133707, 70133708, 70133711,@@
@@ 70133709, 70133710, 70133712, },@@
@@ { 70133713, 70133714, 70133715, 70133716, 70133717,@@
@@ 70133718, 70133720, 70133719, 70133721, 70133722,@@
@@ 70133723, 70133724, 70133725, }@@
@@ }@@
@@@@
@@ function tokens.netflix(s,e)@@
@@ return string.format(@@
@@ "http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])@@
@@ end@@
@@end@@
@@@@
@@-------------------------------------------------------------------------------@@
@@@@
@@--Arrested Development TV Tropes Recap stuff-----------------------------------@@
@@local ad_ep_links@@
@@do@@
@@ local template=[=[@@
@@%%STARTLINKS%%@@
@@----@@
@@Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]@@
@@@@
@@Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]@@
@@----@@
@@%%ENDLINKS%%@@
@@]=]@@
@@ function ad_ep_links(s,e)@@
@@ return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))@@
@@ end@@
@@end@@
@@@@
@@--Function that returns the page name of the episode's TVTropes Recap page.@@
@@local function recap_pagename(s,e)@@
@@ --get the ep title@@
@@ local title=adeps[s][e]@@
@@ --replace the é in Beef Consommé@@
@@ title=string.gsub(title,'é','e')@@
@@ --transform to CamelCased WikiWord@@
@@ title=string.gsub(title,' (%l?)',string.upper)@@
@@ --Remove all non-alphanumeric characters@@
@@ title=string.gsub(title,'%W','')@@
@@@@
@@ return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)@@
@@end@@
@@@@
@@local function post_ad_recap_starter(s,e)@@
@@ return tvtropes.post(@@
@@ recap_pagename(s,e),@@
@@ string.format(@@
@@ "\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",@@
@@ ad_ep_links(s,e),adeps[s][e]),@@
@@ "STUART",@@
@@ "Adding interwiki links and example header automatically (Ask me about Lua)")@@
@@end@@
@@@@
@@local function update_links(reason)@@
@@ return function(s,e)@@
@@ --until comment syntax is changed, Amigos is manual-only@@
@@ if s==2 and e==3 then@@
@@ print "(Skipping Amigos because the links go all screwy)"@@
@@ else@@
@@ local pagename=recap_pagename(s,e)@@
@@ local pageasis=tvtropes.get(pagename)@@
@@ local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")@@
@@ local success@@
@@ while not success do@@
@@ local code@@
@@ success, code = tvtropes.post(pagename,@@
@@ string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),@@
@@ "STUART",reason)@@
@@ if not success then print("Retrying... "..code) end@@
@@ end@@
@@ end@@
@@ end@@
@@end@@
@@@@
@@local function for_all_eps(f)@@
@@ for s=1,#adeps do@@
@@ for e=1,#adeps[s] do@@
@@ print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))@@
@@ f(s,e)@@
@@ end@@
@@ end@@
@@end@@
@@-------------------------------------------------------------------------------@@
@@@@
@@--Okay, put your executing commands down here.@@

to:

@@--encoding: UTF-8@@
@@@@
@@--Required
@@[=--encoding: UTF-8=]@@
@@[==]@@
@@[=--Required
to post pages@@
@@local tvtropes=require "tvtropes"@@
@@--Required
pages=]@@
@@[=local tvtropes=]=[=require "tvtropes"=]@@
@@[=--Required
for encoding Wikipedia article titles@@
@@local urlencode=require "urlencode"@@
@@@@
@@--Arrested
titles=]@@
@@[=local urlencode=]=[=require "urlencode"=]@@
@@[==]@@
@@[=--Arrested
Development data----------------------------------------------------@@
@@adeps={@@
@@ {@@
@@ "Pilot",@@
@@
data----------------------------------------------------=]@@
@@[=adeps=]=[={=]@@
@@[= {=]@@
@@[= "Pilot",=]@@
@@[=
"Top Banana",@@
@@
Banana",=]@@
@@[=
"Bringing Up Buster",@@
@@
Buster",=]@@
@@[=
"Key Decisions",@@
@@
Decisions",=]@@
@@[=
"Visiting Ours",@@
@@
Ours",=]@@
@@[=
"Charity Drive",@@
@@
Drive",=]@@
@@[=
"My Mother, The Car",@@
@@
Car",=]@@
@@[=
"In God We Trust",@@
@@
Trust",=]@@
@@[=
"Storming the Castle",@@
@@
Castle",=]@@
@@[=
"Pier Pressure",@@
@@
Pressure",=]@@
@@[=
"Public Relations",@@
@@
Relations",=]@@
@@[=
"Marta Complex",@@
@@
Complex",=]@@
@@[=
"Beef Consommé",@@
@@
Consommé",=]@@
@@[=
"Shock and Aww",@@
@@
Aww",=]@@
@@[=
"Staff Infection",@@
@@
Infection",=]@@
@@[=
"Missing Kitty",@@
@@
Kitty",=]@@
@@[=
"Altar Egos",@@
@@
Egos",=]@@
@@[=
"Justice Is Blind",@@
@@
Blind",=]@@
@@[=
"Best Man for the GOB",@@
@@
GOB",=]@@
@@[=
"Whistler's Mother",@@
@@
Mother",=]@@
@@[=
"Not Without My Daughter",@@
@@
Daughter",=]@@
@@[=
"Let 'Em Eat Cake"@@
@@ },@@
@@ {@@
@@
Cake"=]@@
@@[= },=]@@
@@[= {=]@@
@@[=
"The One Where Michael Leaves",@@
@@
Leaves",=]@@
@@[=
"The One Where They Build a House",@@
@@ "¡Amigos!",@@
@@
House",=]@@
@@[= "¡Amigos!",=]@@
@@[=
"Good Grief",@@
@@
Grief",=]@@
@@[=
"Sad Sack",@@
@@
Sack",=]@@
@@[=
"Afternoon Delight",@@
@@
Delight",=]@@
@@[=
"Switch Hitter",@@
@@
Hitter",=]@@
@@[=
"Queen for a Day",@@
@@
Day",=]@@
@@[=
"Burning Love",@@
@@
Love",=]@@
@@[=
"Ready, Aim, Marry Me",@@
@@
Me",=]@@
@@[=
"Out on a Limb",@@
@@
Limb",=]@@
@@[=
"Hand to God",@@
@@
God",=]@@
@@[=
"Motherboy XXX",@@
@@
XXX",=]@@
@@[=
"The Immaculate Election",@@
@@
Election",=]@@
@@[=
"Sword of Destiny",@@
@@
Destiny",=]@@
@@[=
"Meat the Veals",@@
@@
Veals",=]@@
@@[=
"Spring Breakout",@@
@@
Breakout",=]@@
@@[=
"Righteous Brothers",@@
@@ },@@
@@ {@@
@@
Brothers",=]@@
@@[= },=]@@
@@[= {=]@@
@@[=
"The Cabin Show",@@
@@
Show",=]@@
@@[=
"For British Eyes Only",@@
@@ "Forget-Me-Now",@@
@@ "Notapusy",@@
@@
Only",=]@@
@@[= "Forget-Me-Now",=]@@
@@[= "Notapusy",=]@@
@@[=
"Mr. F",@@
@@
F",=]@@
@@[=
"The Ocean Walker",@@
@@
Walker",=]@@
@@[=
"Prison Break-In",@@
@@
Break-In",=]@@
@@[=
"Making a Stand",@@
@@
Stand",=]@@
@@[=
"S.O.B.s",@@
@@
s",=]@@
@@[=
"Fakin' It",@@
@@
It",=]@@
@@[=
"Family Ties",@@
@@
Ties",=]@@
@@[=
"Exit Strategy",@@
@@
Strategy",=]@@
@@[=
"Development Arrested"@@
@@ },@@
@@}@@
@@-------------------------------------------------------------------------------@@
@@@@
@@--Interwiki data---------------------------------------------------------------@@
@@local tokens={}@@
@@@@
@@do --wikipedia@@
@@
Arrested"=]@@
@@[= },=]@@
@@[=}=]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Interwiki data---------------------------------------------------------------=]@@
@@[=local tokens=]=[={}=]@@
@@[==]@@
@@[=do --wikipedia=]@@
@@[=
--Numbers for episodes with ambiguous titles, Wikipedia-wise,@@
@@
Wikipedia-wise,=]@@
@@[=
--whose article titles end with "(Arrested Development)"@@
@@
Development)"=]@@
@@[=
local disambigeps={@@
@@
disambigeps=]=[={=]@@
@@[=
{1,2,8,11,20,21,22}, --Season 1@@
@@
1=]@@
@@[=
{5,6,8,9,11,12,18}, --Season 2@@
@@
2=]@@
@@[=
{10,11,12} --Season 3@@
@@ }@@
@@@@
@@
3=]@@
@@[= }=]@@
@@[==]@@
@@[=
--construct lookup table@@
@@
table=]@@
@@[=
local disambiguated={}@@
@@
disambiguated=]=[={}=]@@
@@[=
for s=1,#disambigeps do@@
@@ disambiguated[s]={}@@
@@
s=]=[=1,#disambigeps do=]@@
@@[= disambiguated[s=]][==]=[={}=]@@
@@[=
for i=1,#disambigeps[s] do@@
@@ disambiguated[s][disambigeps[s][i]]=true@@
@@ end@@
@@ end@@
@@@@
@@
i=]=[=1,#disambigeps[s=]][= do=]@@
@@[= disambiguated[s=]][=[disambigeps[s=]][=[i=]][==]][==]=[=true=]@@
@@[= end=]@@
@@[= end=]@@
@@[==]@@
@@[=
--Function that returns the Wikipedia URL@@
@@
URL=]@@
@@[=
function tokens.wikipedia(s,e)@@
@@
wikipedia(s,e)=]@@
@@[=
local pagename=adeps[s][e]@@
@@ pagename=string.
pagename=]=[=adeps[s=]][=[e=]][==]@@
@@[= pagename=]=[=string.
gsub(pagename,' ','_')@@
@@ pagename=urlencode.string(pagename)@@
@@
','_')=]@@
@@[= pagename=]=[=urlencode.string(pagename)=]@@
@@[=
if disambiguated[s][e] then@@
@@
disambiguated[s=]][=[e=]][= then=]@@
@@[=
--Technically, parentheses don't have to be percent-encoded@@
@@
percent-encoded=]@@
@@[=
--for HTTP URIs because they're unused sub-delims@@
@@
sub-delims=]@@
@@[=
--per section 2.2 of RFC 3986, so we concatenate after@@
@@
after=]@@
@@[=
--the function that percent-encodes all sub-delims@@
@@ pagename=pagename.."_(Arrested_Development)"@@
@@ end@@
@@@@
@@
sub-delims=]@@
@@[= pagename=]=[=pagename.."_(Arrested_Development)"=]@@
@@[= end=]@@
@@[==]@@
@@[=
return "http://en.wikipedia.org/wiki/"..pagename@@
@@ end@@
@@end@@
@@@@
@@--Function
pagename=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function
that returns the URL of the Arrested Development Wikia entry@@
@@function
entry=]@@
@@[=function
tokens.wikia(s,e)@@
@@
wikia(s,e)=]@@
@@[=
local pagename=adeps[s][e]@@
@@ pagename=string.
pagename=]=[=adeps[s=]][=[e=]][==]@@
@@[= pagename=]=[=string.
gsub(pagename,' ','_')@@
@@ pagename=urlencode.string(pagename)@@
@@
','_')=]@@
@@[= pagename=]=[=urlencode.string(pagename)=]@@
@@[=
return "http://arresteddevelopment.wikia.com/wiki/"..pagename@@
@@end@@
@@@@
@@do
pagename=]@@
@@[=end=]@@
@@[==]@@
@@[=do
--Balboa Observer-Picayune@@
@@
Observer-Picayune=]@@
@@[=
--Season 1 episodes that are listed at different numbers@@
@@
numbers=]@@
@@[=
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }@@
@@@@
@@
s1flips=]=[={ [5=]][==]=[=6, [6=]][==]=[=5, [7=]][==]=[=8, [8=]][==]=[=7, [16=]][==]=[=18, [17=]][==]=[=16, [18=]][==]=[=17 }=]@@
@@[==]@@
@@[=
--Function the returns the URL of the episode's page on the-op.com@@
@@
com=]@@
@@[=
function tokens.theop(s,e)@@
@@
theop(s,e)=]@@
@@[=
--correct OutOfOrder Season 1 episodes@@
@@
episodes=]@@
@@[=
if s==1 s=]=[==]=[=1 then e = s1flips[e] =]=[= s1flips[e=]][= or e end@@
@@
end=]@@
@@[=
return string.format("http://the-op.com/episode/%i%02i",s,e)@@
@@ end@@
@@end@@
@@@@
@@do --IMDB@@
@@
com/episode/=]%[=i=]%[=02i",s,e)=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=do --IMDB=]@@
@@[=
--why hello, unreadable block of arbitrary indices, it sure sucks@@
@@
sucks=]@@
@@[=
--that I have to use you@@
@@
you=]@@
@@[=
local ttnums={@@
@@
ttnums=]=[={=]@@
@@[=
{ 0515236, 0515256, 0515212, 0515223, 0515257,@@
@@
0515257,=]@@
@@[=
0515214, 0515231, 0515221, 0515247, 0515235,@@
@@
0515235,=]@@
@@[=
0515238, 0515226, 0515210, 0515244, 0515246,@@
@@
0515246,=]@@
@@[=
0515228, 0515208, 0515222, 0515211, 0515258,@@
@@
0515258,=]@@
@@[=
0515232, 0515224, },@@
@@
},=]@@
@@[=
{ 0515253, 0515254, 0515209, 0515219, 0515243,@@
@@
0515243,=]@@
@@[=
0515207, 0515248, 0515239, 0515213, 0515240,@@
@@
0515240,=]@@
@@[=
0515234, 0515220, 0515229, 0515251, 0515255,@@
@@
0515255,=]@@
@@[=
0515227, 0515245, 0515241, },@@
@@
},=]@@
@@[=
{ 0515250, 0515249, 0515218, 0515233, 0515230,@@
@@
0515230,=]@@
@@[=
0515252, 0515237, 0515225, 0515242, 0515216,@@
@@
0515216,=]@@
@@[=
0515217, 0515215, 0757386, }@@
@@ }@@
@@@@
@@
}=]@@
@@[= }=]@@
@@[==]@@
@@[=
--Function that returns the URL for the episode's IMDB page@@
@@
page=]@@
@@[=
function tokens.imdb(s,e)@@
@@
imdb(s,e)=]@@
@@[=
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])@@
@@ end@@
@@end@@
@@@@
@@do
com/title/tt=]%[=07i/",ttnums[s=]][=[e=]][=)=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=do
--Hulu, you know, just in case@@
@@
case=]@@
@@[=
local watchnums={@@
@@
watchnums=]=[={=]@@
@@[=
{ 589, 1786, 585, 1781, 1785,@@
@@
1785,=]@@
@@[=
580, 590, 588, 586, 575,@@
@@
575,=]@@
@@[=
576, 579, 577, 644, 1783,@@
@@
1783,=]@@
@@[=
591, 582, 584, 578, 581,@@
@@
581,=]@@
@@[=
583, 587},@@
@@
587},=]@@
@@[=
{ 6641, 6644, 6643, 6638, 6639,@@
@@
6639,=]@@
@@[=
12883, 13226, 12561, 12609, 12298,@@
@@
12298,=]@@
@@[=
12271, 12901, 13248, 13267, 13276,@@
@@
13276,=]@@
@@[=
13206, 12232, 12532},@@
@@
12532},=]@@
@@[=
{ 6640, 6642, 6635, 6636, 6637,@@
@@
6637,=]@@
@@[=
12497, 17189, 12523, 13139, 12225,@@
@@
12225,=]@@
@@[=
12317, 12194, 12215},@@
@@ }@@
@@@@
@@
12215},=]@@
@@[= }=]@@
@@[==]@@
@@[=
function tokens.hulu(s,e)@@
@@
hulu(s,e)=]@@
@@[=
return string.format(@@
@@
format(=]@@
@@[=
"http://hulu.com/watch/%i", watchnums[s][e])@@
@@ end@@
@@end@@
@@@@
@@do
com/watch/=]%[=i", watchnums[s=]][=[e=]][=)=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=do
--Netflix Watch Instantly@@
@@
Instantly=]@@
@@[=
--It's largely sequential, but not quite.@@
@@
=]@@
@@[=
--I printed out all the numbers and moved them around@@
@@
around=]@@
@@[=
--to fit the correct order (which is both inconsistent@@
@@
inconsistent=]@@
@@[=
--in IDs to Netflix order and Netflix to DVD order).@@
@@
=]@@
@@[=
local movieids={@@
@@
movieids=]=[={=]@@
@@[=
{ 70133673, 70133674, 70133675, 70133677, 70133676,@@
@@
70133676,=]@@
@@[=
70133678, 70133680, 70133679, 70133681, 70133682,@@
@@
70133682,=]@@
@@[=
70133683, 70133684, 70133685, 70133686, 70133687,@@
@@
70133687,=]@@
@@[=
70133688, 70133689, 70133690, 70133691, 70133692,@@
@@
70133692,=]@@
@@[=
70133693, 70133694, },@@
@@
},=]@@
@@[=
{ 70133695, 70133696, 70133697, 70133698, 70133699,@@
@@
70133699,=]@@
@@[=
70133700, 70133701, 70133702, 70133703, 70133704,@@
@@
70133704,=]@@
@@[=
70133705, 70133706, 70133707, 70133708, 70133711,@@
@@
70133711,=]@@
@@[=
70133709, 70133710, 70133712, },@@
@@
},=]@@
@@[=
{ 70133713, 70133714, 70133715, 70133716, 70133717,@@
@@
70133717,=]@@
@@[=
70133718, 70133720, 70133719, 70133721, 70133722,@@
@@
70133722,=]@@
@@[=
70133723, 70133724, 70133725, }@@
@@ }@@
@@@@
@@
}=]@@
@@[= }=]@@
@@[==]@@
@@[=
function tokens.netflix(s,e)@@
@@
netflix(s,e)=]@@
@@[=
return string.format(@@
@@
format(=]@@
@@[=
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])@@
@@ end@@
@@end@@
@@@@
@@-------------------------------------------------------------------------------@@
@@@@
@@--Arrested
com/WiPlayer?movieid=]=[==]%[=i",movieids[s=]][=[e=]][=)=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Arrested
Development TV Tropes Recap stuff-----------------------------------@@
@@local ad_ep_links@@
@@do@@
@@
stuff-----------------------------------=]@@
@@[=local ad_ep_links=]@@
@@[=do=]@@
@@[=
local template=[=[@@
@@%%STARTLINKS%%@@
@@----@@
@@Interwiki:
template=]=[=[=]=[=[=]@@
@@[==]%[==]%[=STARTLINKS=]%[==]%[==]@@
@@[=----=]@@
@@[=Interwiki:
[[$wikipedia Wikipedia]] Wikipedia=]][==]][= -- [[$wikia Wikia]] Wikia=]][==]][= -- [[$theop Balboa Observer-Picayune]] Observer-Picayune=]][==]][= -- [[$imdb IMDB]]@@
@@@@
@@Watch
IMDB=]][==]][==]@@
@@[==]@@
@@[=Watch
now: [[$hulu Hulu]] Hulu=]][==]][= -- [[$netflix Netflix]]@@
@@----@@
@@%%ENDLINKS%%@@
@@]=]@@
@@
Netflix=]][==]][==]@@
@@[=----=]@@
@@[==]%[==]%[=ENDLINKS=]%[==]%[==]@@
@@[==]][==]=[==]][==]@@
@@[=
function ad_ep_links(s,e)@@
@@
ad_ep_links(s,e)=]@@
@@[=
return (string.gsub(template,"%$(%w+)",function(token) gsub(template,"=]%[=$(=]%[=w+)",function(token) return tokens[token](s,e) end))@@
@@ end@@
@@end@@
@@@@
@@--Function
tokens[token=]][=(s,e) end))=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=--Function
that returns the page name of the episode's TVTropes Recap page.@@
@@local
=]@@
@@[=local
function recap_pagename(s,e)@@
@@
recap_pagename(s,e)=]@@
@@[=
--get the ep title@@
@@
title=]@@
@@[=
local title=adeps[s][e]@@
@@
title=]=[=adeps[s=]][=[e=]][==]@@
@@[=
--replace the é in Beef Consommé@@
@@ title=string.gsub(title,'é','e')@@
@@
Consommé=]@@
@@[= title=]=[=string.gsub(title,'é','e')=]@@
@@[=
--transform to CamelCased WikiWord@@
@@ title=string.
WikiWord=]@@
@@[= title=]=[=string.
gsub(title,' (%l?)',string.upper)@@
@@
(=]%[=l?)',string.upper)=]@@
@@[=
--Remove all non-alphanumeric characters@@
@@ title=string.gsub(title,'%W','')@@
@@@@
@@
characters=]@@
@@[= title=]=[=string.gsub(title,'=]%[=W','')=]@@
@@[==]@@
@@[=
return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)@@
@@end@@
@@@@
@@local
format("Recap/ArrestedDevelopmentS=]%[=iE=]%[=i=]%[=s",s,e,title)=]@@
@@[=end=]@@
@@[==]@@
@@[=local
function post_ad_recap_starter(s,e)@@
@@
post_ad_recap_starter(s,e)=]@@
@@[=
return tvtropes.post(@@
@@ recap_pagename(s,e),@@
@@
post(=]@@
@@[= recap_pagename(s,e),=]@@
@@[=
string.format(@@
@@ "\n\n%s\n!The
format(=]@@
@@[= "\n\n=]%[=s\n!The
''ArrestedDevelopment'' episode \"%s\" \"=]%[=s\" provides examples of:\n\n",@@
@@ ad_ep_links(s,e),adeps[s][e]),@@
@@ "STUART",@@
@@
of:\n\n",=]@@
@@[= ad_ep_links(s,e),adeps[s=]][=[e=]][=),=]@@
@@[= "STUART",=]@@
@@[=
"Adding interwiki links and example header automatically (Ask me about Lua)")@@
@@end@@
@@@@
@@local
Lua)")=]@@
@@[=end=]@@
@@[==]@@
@@[=local
function update_links(reason)@@
@@
update_links(reason)=]@@
@@[=
return function(s,e)@@
@@
function(s,e)=]@@
@@[=
--until comment syntax is changed, Amigos is manual-only@@
@@
manual-only=]@@
@@[=
if s==2 s=]=[==]=[=2 and e==3 then@@
@@
e=]=[==]=[=3 then=]@@
@@[=
print "(Skipping Amigos because the links go all screwy)"@@
@@ else@@
@@
screwy)"=]@@
@@[= else=]@@
@@[=
local pagename=recap_pagename(s,e)@@
@@
pagename=]=[=recap_pagename(s,e)=]@@
@@[=
local pageasis=tvtropes.get(pagename)@@
@@
pageasis=]=[=tvtropes.get(pagename)=]@@
@@[=
local gsubsafelinks = =]=[= string.gsub(ad_ep_links(s,e),"%%","%%%%")@@
@@
gsub(ad_ep_links(s,e),"=]%[==]%[=","=]%[==]%[==]%[==]%[=")=]@@
@@[=
local success@@
@@
success=]@@
@@[=
while not success do@@
@@
do=]@@
@@[=
local code@@
@@
code=]@@
@@[=
success, code = =]=[= tvtropes.post(pagename,@@
@@
post(pagename,=]@@
@@[=
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),@@
@@ "STUART",reason)@@
@@
gsub(pageasis,"=]%[==]%[==]%[==]%[=STARTLINKS=]%[==]%[==]%[==]%[=.-=]%[==]%[==]%[==]%[=ENDLINKS=]%[==]%[==]%[==]%[=",gsubsafelinks),=]@@
@@[= "STUART",reason)=]@@
@@[=
if not success then print("Retrying... "..code) end@@
@@ end@@
@@ end@@
@@ end@@
@@end@@
@@@@
@@local
end=]@@
@@[= end=]@@
@@[= end=]@@
@@[= end=]@@
@@[=end=]@@
@@[==]@@
@@[=local
function for_all_eps(f)@@
@@
for_all_eps(f)=]@@
@@[=
for s=1,#adeps do@@
@@
s=]=[=1,#adeps do=]@@
@@[=
for e=1,#adeps[s] do@@
@@
e=]=[=1,#adeps[s=]][= do=]@@
@@[=
print(string.format('Doing Season %i =]%[=i Episode %i, "%s"...',s,e,adeps[s][e]))@@
@@ f(s,e)@@
@@ end@@
@@ end@@
@@end@@
@@-------------------------------------------------------------------------------@@
@@@@
@@--Okay,
=]%[=i, "=]%[=s"...',s,e,adeps[s=]][=[e=]][=))=]@@
@@[= f(s,e)=]@@
@@[= end=]@@
@@[= end=]@@
@@[=end=]@@
@@[=-------------------------------------------------------------------------------=]@@
@@[==]@@
@@[=--Okay,
put your executing commands down here.@@=]@@
Is there an issue? Send a MessageReason:
ARGH english language is such movink target


@@ local urlencode&61;&123;&125;
@@
@@ &45;&45;URL encode a string&46;
@@ local function encode&40;str&41;
@@ &45;&45;Ensure all newlines are in CRLF form
@@ str &61; string&46;gsub &40;str&44; &34;&92;r&63;&92;n&34;&44; &34;&92;r&92;n&34;&41;
@@ &45;&45;Percent&45;encode all non&45;unreserved characters
@@ &45;&45;as per RFC 3986&44; Section 2&46;3
@@ &45;&45;&40;except for space&44; which gets plus&45;encoded&41;
@@ str &61; string&46;gsub &40;str&44; &34;&40;&91;&94;&37;w&37;&45;&37;&46;&37;&95;&37;&126; &93;&41;&34;&44;
@@ function &40;c&41; return string&46;format &40;&34;&37;&37;&37;02X&34;&44; string&46;byte&40;c&41;&41; end&41;
@@ &45;&45;Convert spaces to plus signs
@@ return string&46;gsub &40;str&44; &34; &34;&44; &34;&43;&34;&41;
@@ end
@@
@@ &45;&45;Make this function available as part of the module
@@ urlencode&46;string &61; encode
@@
@@ &45;&45;URL encode a table as a series of parameters&46;
@@ function urlencode&46;table&40;t&41;
@@ &45;&45;table of argument strings
@@ local argts&44; i&61; &123;&125;&44; 1
@@ for k&44; v in pairs&40;t&41; do
@@ argts&91;i&93;&61;encode&40;k&41;&46;&46;&34;&61;&34;&46;&46;encode&40;v&41;
@@ i&61;i&43;1
@@ end
@@ return table&46;concat&40;argts&44;&39;&38;&39;&41;
@@ end
@@
@@ return urlencode

to:

@@ local urlencode&61;&123;&125;
@@
@@ &45;&45;URL
@@local urlencode={}@@
@@@@
@@--URL
encode a string&46;
@@ local
string.@@
@@local
function encode&40;str&41;
@@ &45;&45;Ensure
encode(str)@@
@@ --Ensure
all newlines are in CRLF form
@@
form@@
@@
str &61; string&46;gsub &40;str&44; &34;&92;r&63;&92;n&34;&44; &34;&92;r&92;n&34;&41;
@@ &45;&45;Percent&45;encode
= string.gsub (str, "\r?\n", "\r\n")@@
@@ --Percent-encode
all non&45;unreserved characters
@@ &45;&45;as
non-unreserved characters@@
@@ --as
per RFC 3986&44; 3986, Section 2&46;3
@@ &45;&45;&40;except
2.3@@
@@ --(except
for space&44; space, which gets plus&45;encoded&41;
@@
plus-encoded)@@
@@
str &61; string&46;gsub &40;str&44; &34;&40;&91;&94;&37;w&37;&45;&37;&46;&37;&95;&37;&126; &93;&41;&34;&44;
@@
= string.gsub (str, "([^%w%-%.%_%~ ])",@@
@@
function &40;c&41; (c) return string&46;format &40;&34;&37;&37;&37;02X&34;&44; string&46;byte&40;c&41;&41; end&41;
@@ &45;&45;Convert
string.format ("%%%02X", string.byte(c)) end)@@
@@ --Convert
spaces to plus signs
@@
signs@@
@@
return string&46;gsub &40;str&44; &34; &34;&44; &34;&43;&34;&41;
@@ end
@@
@@ &45;&45;Make
string.gsub (str, " ", "+")@@
@@end@@
@@@@
@@--Make
this function available as part of the module
@@ urlencode&46;string &61; encode
@@
@@ &45;&45;URL
module@@
@@urlencode.string = encode@@
@@@@
@@--URL
encode a table as a series of parameters&46;
@@ function urlencode&46;table&40;t&41;
@@ &45;&45;table
parameters.@@
@@function urlencode.table(t)@@
@@ --table
of argument strings
@@
strings@@
@@
local argts&44; i&61; &123;&125;&44; 1
@@
argts, i= {}, 1@@
@@
for k&44; k, v in pairs&40;t&41; do
@@ argts&91;i&93;&61;encode&40;k&41;&46;&46;&34;&61;&34;&46;&46;encode&40;v&41;
@@ i&61;i&43;1
@@ end
@@
pairs(t) do@@
@@ argts[i]=encode(k).."="..encode(v)@@
@@ i=i+1@@
@@ end@@
@@
return table&46;concat&40;argts&44;&39;&38;&39;&41;
@@ end
@@
@@ return urlencode
table.concat(argts,'&')@@
@@end@@
@@@@
@@return urlencode@@



@@ &45;&45;Required to send to TVTropes site&46;
@@ local http &61; require&34;socket&46;http&34;
@@
@@ &45;&45;Required to create page post data&46;
@@ local urlencode &61; require &34;urlencode&34;
@@
@@ local tvtropes&61;&123;&125;
@@
@@ &45;&45;Function that returns the authenticated TVTropes URL for the given page&46;
@@ local function authpageurl&40;page&41;
@@ return &34;http&58;&47;&47;&58;foamy&64;tvtropes&46;org&47;pmwiki&47;pmwiki&46;php&47;&34;&46;&46;page
@@ end
@@
@@ local function fullname&40;page&41;
@@ &45;&45;Require pagename
@@ assert&40;type&40;page&41;&61;&61;&34;string&34;&44;&34;Destination page name required&34;&41;
@@ &45;&45;If no namespace specified&44; assume Main
@@ if not string&46;find&40;page&44;&39;&47;&39;&41; then page&61;&34;Main&47;&34;&46;&46;page end
@@
@@ return page
@@ end
@@
@@ &45;&45;Function that posts the given page&46;
@@ function tvtropes&46;post&40;page&44; body&44; author&44; reason&41;
@@
@@ page&61;fullname&40;page&41;
@@
@@ assert&40;type&40;body&41;&61;&61;&34;string&34;&44;&34;Page body required&34;&41;
@@
@@ local response &61;
@@ &123;http&46;request&40;authpageurl&40;page&41;&44;
@@ urlencode&46;table&123;
@@ action&61;&34;post&34;&44; post&61;&34;save&34;&44;
@@ pagename&61;page&44; text&61;body&44;
@@ author&61;author or &34;Anonymous&34;&44;
@@ reason&61;reason or &34;&34;
@@ &125;&41;&125;
@@
@@ &45;&45;Error on any socket errors
@@ assert&40;response&91;1&93;&44;response&91;2&93;&41;
@@
@@ &45;&45;If it doesn&39;t return Found&44; return nil&44; the status&44; and the body&58;
@@ &45;&45;sometimes it just rejects the password for some reason&46;
@@ if tonumber&40;response&91;2&93;&41;&126;&61;302 then
@@ return nil&44; response&91;2&93;&44; response&91;1&93;
@@ else return true
@@ end
@@ end
@@
@@ &45;&45;Technically&44; this is kind of a general function&44; but it&39;s designed exclusively around
@@ &45;&45;TVTropes&39; source converter&44; so it&39;s kept in here&46;
@@ local html2plain
@@ do
@@ local ents &61; &123;quot&61;&39;&34;&39;&44; amp&61;&39;&38;&39;&44; lt&61;&39;&60;&39;&44; gt&61;&39;&62;&39;&125;
@@
@@ function html2plain&40;src&41;
@@ src&61;string&46;gsub&40;src&44;&34;&60;br&47;&62;&34;&44;&34;&92;n&34;&41;
@@ src&61;string&46;gsub&40;src&44;&34;&38;&40;&37;w&45;&41;&59;&34;&44;ents&41;
@@ return src
@@ end
@@ end
@@
@@ &45;&45;Function that gets a given page source&46;
@@ function tvtropes&46;get&40;page&41;
@@
@@ page&61;fullname&40;page&41;
@@
@@ local body&44; code &61; http&46;request&40;
@@ authpageurl&40;page&41;&46;&46;&39;&63;action&61;source&39;&41;
@@
@@ &45;&45;Trigger error on socket failure
@@ assert&40;body&44;code&41;
@@
@@ &45;&45;Return the source converted back from the HTML conversion
@@ return html2plain&40;body&41;
@@ end
@@
@@ return tvtropes

to:

@@ &45;&45;Required @@--Required to send to TVTropes site&46;
@@ local
site.@@
@@local
http &61; require&34;socket&46;http&34;
@@
@@ &45;&45;Required
= require"socket.http"@@
@@@@
@@--Required
to create page post data&46;
@@ local
data.@@
@@local
urlencode &61; = require &34;urlencode&34;
@@
@@ local tvtropes&61;&123;&125;
@@
@@ &45;&45;Function
"urlencode"@@
@@@@
@@local tvtropes={}@@
@@@@
@@--Function
that returns the authenticated TVTropes URL for the given page&46;
@@ local
page.@@
@@local
function authpageurl&40;page&41;
@@
authpageurl(page)@@
@@
return &34;http&58;&47;&47;&58;foamy&64;tvtropes&46;org&47;pmwiki&47;pmwiki&46;php&47;&34;&46;&46;page
@@ end
@@
@@ local
"http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page@@
@@end@@
@@@@
@@local
function fullname&40;page&41;
@@ &45;&45;Require pagename
@@ assert&40;type&40;page&41;&61;&61;&34;string&34;&44;&34;Destination
fullname(page)@@
@@ --Require pagename@@
@@ assert(type(page)=="string","Destination
page name required&34;&41;
@@ &45;&45;If
required")@@
@@ --If
no namespace specified&44; specified, assume Main
@@
Main@@
@@
if not string&46;find&40;page&44;&39;&47;&39;&41; string.find(page,'/') then page&61;&34;Main&47;&34;&46;&46;page end
@@
@@
page="Main/"..page end@@
@@@@
@@
return page
@@ end
@@
@@ &45;&45;Function
page@@
@@end@@
@@@@
@@--Function
that posts the given page&46;
@@ function tvtropes&46;post&40;page&44; body&44; author&44; reason&41;
@@
@@ page&61;fullname&40;page&41;
@@
@@ assert&40;type&40;body&41;&61;&61;&34;string&34;&44;&34;Page
page.@@
@@function tvtropes.post(page, body, author, reason)@@
@@@@
@@ page=fullname(page)@@
@@@@
@@ assert(type(body)=="string","Page
body required&34;&41;
@@
@@
required")@@
@@@@
@@
local response &61;
@@ &123;http&46;request&40;authpageurl&40;page&41;&44;
@@ urlencode&46;table&123;
@@ action&61;&34;post&34;&44; post&61;&34;save&34;&44;
@@ pagename&61;page&44; text&61;body&44;
@@ author&61;author
=@@
@@ {http.request(authpageurl(page),@@
@@ urlencode.table{@@
@@ action="post", post="save",@@
@@ pagename=page, text=body,@@
@@ author=author
or &34;Anonymous&34;&44;
@@ reason&61;reason
"Anonymous",@@
@@ reason=reason
or &34;&34;
@@ &125;&41;&125;
@@
@@ &45;&45;Error
""@@
@@ })}@@
@@@@
@@ --Error
on any socket errors
@@ assert&40;response&91;1&93;&44;response&91;2&93;&41;
@@
@@ &45;&45;If
errors@@
@@ assert(response[1],response[2])@@
@@@@
@@ --If
it doesn&39;t doesn't return Found&44; Found, return nil&44; nil, the status&44; status, and the body&58;
@@ &45;&45;sometimes
body:@@
@@ --sometimes
it just rejects the password for some reason&46;
@@
reason.@@
@@
if tonumber&40;response&91;2&93;&41;&126;&61;302 then
@@
tonumber(response[2])~=302 then@@
@@
return nil&44; response&91;2&93;&44; response&91;1&93;
@@
nil, response[2], response[1]@@
@@
else return true
@@ end
@@ end
@@
@@ &45;&45;Technically&44;
true@@
@@ end@@
@@end@@
@@@@
@@--Technically,
this is kind of a general function&44; function, but it&39;s it's designed exclusively around
@@ &45;&45;TVTropes&39;
around@@
@@--TVTropes'
source converter&44; converter, so it&39;s it's kept in here&46;
@@ local html2plain
@@ do
@@
here.@@
@@local html2plain@@
@@do@@
@@
local ents &61; &123;quot&61;&39;&34;&39;&44; amp&61;&39;&38;&39;&44; lt&61;&39;&60;&39;&44; gt&61;&39;&62;&39;&125;
@@
@@
= {quot='"', amp='&', lt='<', gt='>'}@@
@@@@
@@
function html2plain&40;src&41;
@@ src&61;string&46;gsub&40;src&44;&34;&60;br&47;&62;&34;&44;&34;&92;n&34;&41;
@@ src&61;string&46;gsub&40;src&44;&34;&38;&40;&37;w&45;&41;&59;&34;&44;ents&41;
@@
html2plain(src)@@
@@ src=string.gsub(src,"<br/>","\n")@@
@@ src=string.gsub(src,"&(%w-);",ents)@@
@@
return src
@@ end
@@ end
@@
@@ &45;&45;Function
src@@
@@ end@@
@@end@@
@@@@
@@--Function
that gets a given page source&46;
@@ function tvtropes&46;get&40;page&41;
@@
@@ page&61;fullname&40;page&41;
@@
@@
source.@@
@@function tvtropes.get(page)@@
@@@@
@@ page=fullname(page)@@
@@@@
@@
local body&44; body, code &61; http&46;request&40;
@@ authpageurl&40;page&41;&46;&46;&39;&63;action&61;source&39;&41;
@@
@@ &45;&45;Trigger
= http.request(@@
@@ authpageurl(page)..'?action=source')@@
@@@@
@@ --Trigger
error on socket failure
@@ assert&40;body&44;code&41;
@@
@@ &45;&45;Return
failure@@
@@ assert(body,code)@@
@@@@
@@ --Return
the source converted back from the HTML conversion
@@
conversion@@
@@
return html2plain&40;body&41;
@@ end
@@
@@ return tvtropes
html2plain(body)@@
@@end@@
@@@@
@@return tvtropes@@



@@ local tvtropes &61; require &34;tvtropes&34;
@@
@@ local target &61; &34;Tropers&47;STUART&34;
@@ local user&61;&34;STUART&34;
@@
@@ local scripts&61;&123;
@@ &34;urlencode&46;lua&34;&44;
@@ &34;tvtropes&46;lua&34;&44;
@@ &34;tropersrepo&46;lua&34;&44;
@@ &34;arrdev&95;recap&46;lua&34;&44;
@@ &125;
@@
@@ local function scriptfolder&40;name&44;script&41;
@@ return string&46;format&40;
@@ &34;&91;&91;folder&58;&37;s&93;&93;&92;n&37;s&92;n&91;&91;&47;folder&93;&93;&34;&44;
@@ name&44;script&41;
@@ end
@@
@@ local function revsection&40;&41;
@@ local folders&61;&123;
@@ &34;&37;&37;STARTSCRIPTS&37;&37;&34;&44;
@@ &34;&91;&91;foldercontrol&93;&93;&34;
@@ &125;
@@ local headers&61;&35;folders
@@
@@ for i&61;1&44; &35;scripts do
@@ local slines&61;&123;&125;
@@ for line in io&46;lines&40;scripts&91;i&93;&41; do
@@ local escaped&61;string&46;gsub&40;line&44;&34;&91;&94;&37;w&37;s&93;&34;&44;
@@ function&40;char&41; return string&46;format&40;&34;&38;&37;i&59;&34;&44;string&46;byte&40;char&41;&41; end&41;
@@
@@ slines&91;&35;slines&43;1&93;&61;string&46;format&40;&34;&64;&64; &37;s&34;&44;escaped&41;
@@ end
@@
@@ local content&61;table&46;concat&40;slines&44;&39;&92;n&39;&41;
@@ folders&91;i&43;headers&93;&61;scriptfolder&40;scripts&91;i&93;&44;content&41;
@@ end
@@
@@ folders&91;&35;folders&43;1&93;&61;&34;&37;&37;ENDSCRIPTS&37;&37;&34;
@@
@@ return table&46;concat&40;folders&44;&34;&92;n&92;n&34;&41;
@@ end
@@
@@ local function push&40;notes&41;
@@ local gssscripts&61;string&46;gsub&40;revsection&40;&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;
@@
@@ print&40;string&46;format&40;&34;Getting current version of &37;s&46;&46;&46;&34;&44;target&41;&41;
@@
@@ local current&61;tvtropes&46;get&40;target&41;
@@
@@ local updated&61;string&46;gsub&40;current&44;
@@ &34;&37;&37;&37;&37;STARTSCRIPTS&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;ENDSCRIPTS&37;&37;&37;&37;&34;&44;
@@ gssscripts&41;
@@
@@ print&40;string&46;format&40;&34;Posting new version of &37;s&46;&46;&46;&34;&44;target&41;&41;
@@
@@ local posted
@@ while not posted do
@@ posted&61;tvtropes&46;post&40;target&44;updated&44;user&44;notes&41;
@@ if not posted then print&34; Retrying&46;&46;&46;&34; end
@@ end
@@ end
@@
@@ &45;&45;Executing code&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ push &34;ARGH english language is such movink target&34;
@@
@@

to:

@@ local @@local tvtropes &61; = require &34;tvtropes&34;
@@
@@ local
"tvtropes"@@
@@@@
@@local
target &61; &34;Tropers&47;STUART&34;
@@ local user&61;&34;STUART&34;
@@
@@ local scripts&61;&123;
@@ &34;urlencode&46;lua&34;&44;
@@ &34;tvtropes&46;lua&34;&44;
@@ &34;tropersrepo&46;lua&34;&44;
@@ &34;arrdev&95;recap&46;lua&34;&44;
@@ &125;
@@
@@ local
= "Tropers/STUART"@@
@@local user="STUART"@@
@@@@
@@local scripts={@@
@@ "urlencode.lua",@@
@@ "tvtropes.lua",@@
@@ "tropersrepo.lua",@@
@@ "arrdev_recap.lua",@@
@@}@@
@@@@
@@local
function scriptfolder&40;name&44;script&41;
@@
scriptfolder(name,script)@@
@@
return string&46;format&40;
@@ &34;&91;&91;folder&58;&37;s&93;&93;&92;n&37;s&92;n&91;&91;&47;folder&93;&93;&34;&44;
@@ name&44;script&41;
@@ end
@@
@@ local
string.format(@@
@@ "[[folder:%s]]\n%s\n[[/folder]]",@@
@@ name,script)@@
@@end@@
@@@@
@@local
function revsection&40;&41;
@@
revsection()@@
@@
local folders&61;&123;
@@ &34;&37;&37;STARTSCRIPTS&37;&37;&34;&44;
@@ &34;&91;&91;foldercontrol&93;&93;&34;
@@ &125;
@@
folders={@@
@@ "%%STARTSCRIPTS%%",@@
@@ "[[foldercontrol]]"@@
@@ }@@
@@
local headers&61;&35;folders
@@
@@
headers=#folders@@
@@@@
@@
for i&61;1&44; &35;scripts do
@@
i=1, #scripts do@@
@@
local slines&61;&123;&125;
@@
slines={}@@
@@
for line in io&46;lines&40;scripts&91;i&93;&41; do
@@
io.lines(scripts[i]) do@@
@@
local escaped&61;string&46;gsub&40;line&44;&34;&91;&94;&37;w&37;s&93;&34;&44;
@@ function&40;char&41;
escaped=string.gsub(line,"[^%w%s]",@@
@@ function(char)
return string&46;format&40;&34;&38;&37;i&59;&34;&44;string&46;byte&40;char&41;&41; end&41;
@@
@@ slines&91;&35;slines&43;1&93;&61;string&46;format&40;&34;&64;&64; &37;s&34;&44;escaped&41;
@@ end
@@
@@
string.format("&#%i;",string.byte(char)) end)@@
@@@@
@@ slines[#slines+1]=string.format("@@%s@@",escaped)@@
@@ end@@
@@@@
@@
local content&61;table&46;concat&40;slines&44;&39;&92;n&39;&41;
@@ folders&91;i&43;headers&93;&61;scriptfolder&40;scripts&91;i&93;&44;content&41;
@@ end
@@
@@ folders&91;&35;folders&43;1&93;&61;&34;&37;&37;ENDSCRIPTS&37;&37;&34;
@@
@@
content=table.concat(slines,'\n')@@
@@ folders[i+headers]=scriptfolder(scripts[i],content)@@
@@ end@@
@@@@
@@ folders[#folders+1]="%%ENDSCRIPTS%%"@@
@@@@
@@
return table&46;concat&40;folders&44;&34;&92;n&92;n&34;&41;
@@ end
@@
@@ local
table.concat(folders,"\n\n")@@
@@end@@
@@@@
@@local
function push&40;notes&41;
@@
push(notes)@@
@@
local gssscripts&61;string&46;gsub&40;revsection&40;&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;
@@
@@ print&40;string&46;format&40;&34;Getting
gssscripts=string.gsub(revsection(),"%%","%%%%")@@
@@@@
@@ print(string.format("Getting
current version of &37;s&46;&46;&46;&34;&44;target&41;&41;
@@
@@
%s...",target))@@
@@@@
@@
local current&61;tvtropes&46;get&40;target&41;
@@
@@
current=tvtropes.get(target)@@
@@@@
@@
local updated&61;string&46;gsub&40;current&44;
@@ &34;&37;&37;&37;&37;STARTSCRIPTS&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;ENDSCRIPTS&37;&37;&37;&37;&34;&44;
@@ gssscripts&41;
@@
@@ print&40;string&46;format&40;&34;Posting
updated=string.gsub(current,@@
@@ "%%%%STARTSCRIPTS%%%%.-%%%%ENDSCRIPTS%%%%",@@
@@ gssscripts)@@
@@@@
@@ print(string.format("Posting
new version of &37;s&46;&46;&46;&34;&44;target&41;&41;
@@
@@
%s...",target))@@
@@@@
@@
local posted
@@
posted@@
@@
while not posted do
@@ posted&61;tvtropes&46;post&40;target&44;updated&44;user&44;notes&41;
@@
do@@
@@ posted=tvtropes.post(target,updated,user,notes)@@
@@
if not posted then print&34; Retrying&46;&46;&46;&34; end
@@ end
@@ end
@@
@@ &45;&45;Executing code&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ push &34;ARGH
print" Retrying..." end@@
@@ end@@
@@end@@
@@@@
@@--Executing code---------------------------------------------------------------@@
@@@@
@@push "ARGH
english language is such movink target&34;
@@
@@
target"@@
@@@@
@@@@



@@ &45;&45;encoding&58; UTF&45;8
@@
@@ &45;&45;Required to post pages
@@ local tvtropes&61;require &34;tvtropes&34;
@@ &45;&45;Required for encoding Wikipedia article titles
@@ local urlencode&61;require &34;urlencode&34;
@@
@@ &45;&45;Arrested Development data&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ adeps&61;&123;
@@ &123;
@@ &34;Pilot&34;&44;
@@ &34;Top Banana&34;&44;
@@ &34;Bringing Up Buster&34;&44;
@@ &34;Key Decisions&34;&44;
@@ &34;Visiting Ours&34;&44;
@@ &34;Charity Drive&34;&44;
@@ &34;My Mother&44; The Car&34;&44;
@@ &34;In God We Trust&34;&44;
@@ &34;Storming the Castle&34;&44;
@@ &34;Pier Pressure&34;&44;
@@ &34;Public Relations&34;&44;
@@ &34;Marta Complex&34;&44;
@@ &34;Beef Consomm&195;&169;&34;&44;
@@ &34;Shock and Aww&34;&44;
@@ &34;Staff Infection&34;&44;
@@ &34;Missing Kitty&34;&44;
@@ &34;Altar Egos&34;&44;
@@ &34;Justice Is Blind&34;&44;
@@ &34;Best Man for the GOB&34;&44;
@@ &34;Whistler&39;s Mother&34;&44;
@@ &34;Not Without My Daughter&34;&44;
@@ &34;Let &39;Em Eat Cake&34;
@@ &125;&44;
@@ &123;
@@ &34;The One Where Michael Leaves&34;&44;
@@ &34;The One Where They Build a House&34;&44;
@@ &34;&194;&161;Amigos&33;&34;&44;
@@ &34;Good Grief&34;&44;
@@ &34;Sad Sack&34;&44;
@@ &34;Afternoon Delight&34;&44;
@@ &34;Switch Hitter&34;&44;
@@ &34;Queen for a Day&34;&44;
@@ &34;Burning Love&34;&44;
@@ &34;Ready&44; Aim&44; Marry Me&34;&44;
@@ &34;Out on a Limb&34;&44;
@@ &34;Hand to God&34;&44;
@@ &34;Motherboy XXX&34;&44;
@@ &34;The Immaculate Election&34;&44;
@@ &34;Sword of Destiny&34;&44;
@@ &34;Meat the Veals&34;&44;
@@ &34;Spring Breakout&34;&44;
@@ &34;Righteous Brothers&34;&44;
@@ &125;&44;
@@ &123;
@@ &34;The Cabin Show&34;&44;
@@ &34;For British Eyes Only&34;&44;
@@ &34;Forget&45;Me&45;Now&34;&44;
@@ &34;Notapusy&34;&44;
@@ &34;Mr&46; F&34;&44;
@@ &34;The Ocean Walker&34;&44;
@@ &34;Prison Break&45;In&34;&44;
@@ &34;Making a Stand&34;&44;
@@ &34;S&46;O&46;B&46;s&34;&44;
@@ &34;Fakin&39; It&34;&44;
@@ &34;Family Ties&34;&44;
@@ &34;Exit Strategy&34;&44;
@@ &34;Development Arrested&34;
@@ &125;&44;
@@ &125;
@@ &45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ &45;&45;Interwiki data&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ local tokens&61;&123;&125;
@@
@@ do &45;&45;wikipedia
@@ &45;&45;Numbers for episodes with ambiguous titles&44; Wikipedia&45;wise&44;
@@ &45;&45;whose article titles end with &34;&40;Arrested Development&41;&34;
@@ local disambigeps&61;&123;
@@ &123;1&44;2&44;8&44;11&44;20&44;21&44;22&125;&44; &45;&45;Season 1
@@ &123;5&44;6&44;8&44;9&44;11&44;12&44;18&125;&44; &45;&45;Season 2
@@ &123;10&44;11&44;12&125; &45;&45;Season 3
@@ &125;
@@
@@ &45;&45;construct lookup table
@@ local disambiguated&61;&123;&125;
@@ for s&61;1&44;&35;disambigeps do
@@ disambiguated&91;s&93;&61;&123;&125;
@@ for i&61;1&44;&35;disambigeps&91;s&93; do
@@ disambiguated&91;s&93;&91;disambigeps&91;s&93;&91;i&93;&93;&61;true
@@ end
@@ end
@@
@@ &45;&45;Function that returns the Wikipedia URL
@@ function tokens&46;wikipedia&40;s&44;e&41;
@@ local pagename&61;adeps&91;s&93;&91;e&93;
@@ pagename&61;string&46;gsub&40;pagename&44;&39; &39;&44;&39;&95;&39;&41;
@@ pagename&61;urlencode&46;string&40;pagename&41;
@@ if disambiguated&91;s&93;&91;e&93; then
@@ &45;&45;Technically&44; parentheses don&39;t have to be percent&45;encoded
@@ &45;&45;for HTTP URIs because they&39;re unused sub&45;delims
@@ &45;&45;per section 2&46;2 of RFC 3986&44; so we concatenate after
@@ &45;&45;the function that percent&45;encodes all sub&45;delims
@@ pagename&61;pagename&46;&46;&34;&95;&40;Arrested&95;Development&41;&34;
@@ end
@@
@@ return &34;http&58;&47;&47;en&46;wikipedia&46;org&47;wiki&47;&34;&46;&46;pagename
@@ end
@@ end
@@
@@ &45;&45;Function that returns the URL of the Arrested Development Wikia entry
@@ function tokens&46;wikia&40;s&44;e&41;
@@ local pagename&61;adeps&91;s&93;&91;e&93;
@@ pagename&61;string&46;gsub&40;pagename&44;&39; &39;&44;&39;&95;&39;&41;
@@ pagename&61;urlencode&46;string&40;pagename&41;
@@ return &34;http&58;&47;&47;arresteddevelopment&46;wikia&46;com&47;wiki&47;&34;&46;&46;pagename
@@ end
@@
@@ do &45;&45;Balboa Observer&45;Picayune
@@ &45;&45;Season 1 episodes that are listed at different numbers
@@ local s1flips&61;&123; &91;5&93;&61;6&44; &91;6&93;&61;5&44; &91;7&93;&61;8&44; &91;8&93;&61;7&44; &91;16&93;&61;18&44; &91;17&93;&61;16&44; &91;18&93;&61;17 &125;
@@
@@ &45;&45;Function the returns the URL of the episode&39;s page on the&45;op&46;com
@@ function tokens&46;theop&40;s&44;e&41;
@@ &45;&45;correct OutOfOrder Season 1 episodes
@@ if s&61;&61;1 then e &61; s1flips&91;e&93; or e end
@@ return string&46;format&40;&34;http&58;&47;&47;the&45;op&46;com&47;episode&47;&37;i&37;02i&34;&44;s&44;e&41;
@@ end
@@ end
@@
@@ do &45;&45;IMDB
@@ &45;&45;why hello&44; unreadable block of arbitrary indices&44; it sure sucks
@@ &45;&45;that I have to use you
@@ local ttnums&61;&123;
@@ &123; 0515236&44; 0515256&44; 0515212&44; 0515223&44; 0515257&44;
@@ 0515214&44; 0515231&44; 0515221&44; 0515247&44; 0515235&44;
@@ 0515238&44; 0515226&44; 0515210&44; 0515244&44; 0515246&44;
@@ 0515228&44; 0515208&44; 0515222&44; 0515211&44; 0515258&44;
@@ 0515232&44; 0515224&44; &125;&44;
@@ &123; 0515253&44; 0515254&44; 0515209&44; 0515219&44; 0515243&44;
@@ 0515207&44; 0515248&44; 0515239&44; 0515213&44; 0515240&44;
@@ 0515234&44; 0515220&44; 0515229&44; 0515251&44; 0515255&44;
@@ 0515227&44; 0515245&44; 0515241&44; &125;&44;
@@ &123; 0515250&44; 0515249&44; 0515218&44; 0515233&44; 0515230&44;
@@ 0515252&44; 0515237&44; 0515225&44; 0515242&44; 0515216&44;
@@ 0515217&44; 0515215&44; 0757386&44; &125;
@@ &125;
@@
@@ &45;&45;Function that returns the URL for the episode&39;s IMDB page
@@ function tokens&46;imdb&40;s&44;e&41;
@@ return string&46;format&40;&34;http&58;&47;&47;www&46;imdb&46;com&47;title&47;tt&37;07i&47;&34;&44;ttnums&91;s&93;&91;e&93;&41;
@@ end
@@ end
@@
@@ do &45;&45;Hulu&44; you know&44; just in case
@@ local watchnums&61;&123;
@@ &123; 589&44; 1786&44; 585&44; 1781&44; 1785&44;
@@ 580&44; 590&44; 588&44; 586&44; 575&44;
@@ 576&44; 579&44; 577&44; 644&44; 1783&44;
@@ 591&44; 582&44; 584&44; 578&44; 581&44;
@@ 583&44; 587&125;&44;
@@ &123; 6641&44; 6644&44; 6643&44; 6638&44; 6639&44;
@@ 12883&44; 13226&44; 12561&44; 12609&44; 12298&44;
@@ 12271&44; 12901&44; 13248&44; 13267&44; 13276&44;
@@ 13206&44; 12232&44; 12532&125;&44;
@@ &123; 6640&44; 6642&44; 6635&44; 6636&44; 6637&44;
@@ 12497&44; 17189&44; 12523&44; 13139&44; 12225&44;
@@ 12317&44; 12194&44; 12215&125;&44;
@@ &125;
@@
@@ function tokens&46;hulu&40;s&44;e&41;
@@ return string&46;format&40;
@@ &34;http&58;&47;&47;hulu&46;com&47;watch&47;&37;i&34;&44; watchnums&91;s&93;&91;e&93;&41;
@@ end
@@ end
@@
@@ do &45;&45;Netflix Watch Instantly
@@ &45;&45;It&39;s largely sequential&44; but not quite&46;
@@ &45;&45;I printed out all the numbers and moved them around
@@ &45;&45;to fit the correct order &40;which is both inconsistent
@@ &45;&45;in IDs to Netflix order and Netflix to DVD order&41;&46;
@@ local movieids&61;&123;
@@ &123; 70133673&44; 70133674&44; 70133675&44; 70133677&44; 70133676&44;
@@ 70133678&44; 70133680&44; 70133679&44; 70133681&44; 70133682&44;
@@ 70133683&44; 70133684&44; 70133685&44; 70133686&44; 70133687&44;
@@ 70133688&44; 70133689&44; 70133690&44; 70133691&44; 70133692&44;
@@ 70133693&44; 70133694&44; &125;&44;
@@ &123; 70133695&44; 70133696&44; 70133697&44; 70133698&44; 70133699&44;
@@ 70133700&44; 70133701&44; 70133702&44; 70133703&44; 70133704&44;
@@ 70133705&44; 70133706&44; 70133707&44; 70133708&44; 70133711&44;
@@ 70133709&44; 70133710&44; 70133712&44; &125;&44;
@@ &123; 70133713&44; 70133714&44; 70133715&44; 70133716&44; 70133717&44;
@@ 70133718&44; 70133720&44; 70133719&44; 70133721&44; 70133722&44;
@@ 70133723&44; 70133724&44; 70133725&44; &125;
@@ &125;
@@
@@ function tokens&46;netflix&40;s&44;e&41;
@@ return string&46;format&40;
@@ &34;http&58;&47;&47;www&46;netflix&46;com&47;WiPlayer&63;movieid&61;&37;i&34;&44;movieids&91;s&93;&91;e&93;&41;
@@ end
@@ end
@@
@@ &45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ &45;&45;Arrested Development TV Tropes Recap stuff&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ local ad&95;ep&95;links
@@ do
@@ local template&61;&91;&61;&91;
@@ &37;&37;STARTLINKS&37;&37;
@@ &45;&45;&45;&45;
@@ Interwiki&58; &91;&91;&36;wikipedia Wikipedia&93;&93; &45;&45; &91;&91;&36;wikia Wikia&93;&93; &45;&45; &91;&91;&36;theop Balboa Observer&45;Picayune&93;&93; &45;&45; &91;&91;&36;imdb IMDB&93;&93;
@@
@@ Watch now&58; &91;&91;&36;hulu Hulu&93;&93; &45;&45; &91;&91;&36;netflix Netflix&93;&93;
@@ &45;&45;&45;&45;
@@ &37;&37;ENDLINKS&37;&37;
@@ &93;&61;&93;
@@ function ad&95;ep&95;links&40;s&44;e&41;
@@ return &40;string&46;gsub&40;template&44;&34;&37;&36;&40;&37;w&43;&41;&34;&44;function&40;token&41; return tokens&91;token&93;&40;s&44;e&41; end&41;&41;
@@ end
@@ end
@@
@@ &45;&45;Function that returns the page name of the episode&39;s TVTropes Recap page&46;
@@ local function recap&95;pagename&40;s&44;e&41;
@@ &45;&45;get the ep title
@@ local title&61;adeps&91;s&93;&91;e&93;
@@ &45;&45;replace the &195;&169; in Beef Consomm&195;&169;
@@ title&61;string&46;gsub&40;title&44;&39;&195;&169;&39;&44;&39;e&39;&41;
@@ &45;&45;transform to CamelCased WikiWord
@@ title&61;string&46;gsub&40;title&44;&39; &40;&37;l&63;&41;&39;&44;string&46;upper&41;
@@ &45;&45;Remove all non&45;alphanumeric characters
@@ title&61;string&46;gsub&40;title&44;&39;&37;W&39;&44;&39;&39;&41;
@@
@@ return string&46;format&40;&34;Recap&47;ArrestedDevelopmentS&37;iE&37;i&37;s&34;&44;s&44;e&44;title&41;
@@ end
@@
@@ local function post&95;ad&95;recap&95;starter&40;s&44;e&41;
@@ return tvtropes&46;post&40;
@@ recap&95;pagename&40;s&44;e&41;&44;
@@ string&46;format&40;
@@ &34;&92;n&92;n&37;s&92;n&33;The &39;&39;ArrestedDevelopment&39;&39; episode &92;&34;&37;s&92;&34; provides examples of&58;&92;n&92;n&34;&44;
@@ ad&95;ep&95;links&40;s&44;e&41;&44;adeps&91;s&93;&91;e&93;&41;&44;
@@ &34;STUART&34;&44;
@@ &34;Adding interwiki links and example header automatically &40;Ask me about Lua&41;&34;&41;
@@ end
@@
@@ local function update&95;links&40;reason&41;
@@ return function&40;s&44;e&41;
@@ &45;&45;until comment syntax is changed&44; Amigos is manual&45;only
@@ if s&61;&61;2 and e&61;&61;3 then
@@ print &34;&40;Skipping Amigos because the links go all screwy&41;&34;
@@ else
@@ local pagename&61;recap&95;pagename&40;s&44;e&41;
@@ local pageasis&61;tvtropes&46;get&40;pagename&41;
@@ local gsubsafelinks &61; string&46;gsub&40;ad&95;ep&95;links&40;s&44;e&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;
@@ local success
@@ while not success do
@@ local code
@@ success&44; code &61; tvtropes&46;post&40;pagename&44;
@@ string&46;gsub&40;pageasis&44;&34;&37;&37;&37;&37;STARTLINKS&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;ENDLINKS&37;&37;&37;&37;&34;&44;gsubsafelinks&41;&44;
@@ &34;STUART&34;&44;reason&41;
@@ if not success then print&40;&34;Retrying&46;&46;&46; &34;&46;&46;code&41; end
@@ end
@@ end
@@ end
@@ end
@@
@@ local function for&95;all&95;eps&40;f&41;
@@ for s&61;1&44;&35;adeps do
@@ for e&61;1&44;&35;adeps&91;s&93; do
@@ print&40;string&46;format&40;&39;Doing Season &37;i Episode &37;i&44; &34;&37;s&34;&46;&46;&46;&39;&44;s&44;e&44;adeps&91;s&93;&91;e&93;&41;&41;
@@ f&40;s&44;e&41;
@@ end
@@ end
@@ end
@@ &45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ &45;&45;Okay&44; put your executing commands down here&46;

to:

@@ &45;&45;encoding&58; UTF&45;8
@@
@@ &45;&45;Required
@@--encoding: UTF-8@@
@@@@
@@--Required
to post pages
@@ local tvtropes&61;require &34;tvtropes&34;
@@ &45;&45;Required
pages@@
@@local tvtropes=require "tvtropes"@@
@@--Required
for encoding Wikipedia article titles
@@ local urlencode&61;require &34;urlencode&34;
@@
@@ &45;&45;Arrested
titles@@
@@local urlencode=require "urlencode"@@
@@@@
@@--Arrested
Development data&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ adeps&61;&123;
@@ &123;
@@ &34;Pilot&34;&44;
@@ &34;Top Banana&34;&44;
@@ &34;Bringing
data----------------------------------------------------@@
@@adeps={@@
@@ {@@
@@ "Pilot",@@
@@ "Top Banana",@@
@@ "Bringing
Up Buster&34;&44;
@@ &34;Key Decisions&34;&44;
@@ &34;Visiting Ours&34;&44;
@@ &34;Charity Drive&34;&44;
@@ &34;My Mother&44;
Buster",@@
@@ "Key Decisions",@@
@@ "Visiting Ours",@@
@@ "Charity Drive",@@
@@ "My Mother,
The Car&34;&44;
@@ &34;In
Car",@@
@@ "In
God We Trust&34;&44;
@@ &34;Storming
Trust",@@
@@ "Storming
the Castle&34;&44;
@@ &34;Pier Pressure&34;&44;
@@ &34;Public Relations&34;&44;
@@ &34;Marta Complex&34;&44;
@@ &34;Beef Consomm&195;&169;&34;&44;
@@ &34;Shock
Castle",@@
@@ "Pier Pressure",@@
@@ "Public Relations",@@
@@ "Marta Complex",@@
@@ "Beef Consommé",@@
@@ "Shock
and Aww&34;&44;
@@ &34;Staff Infection&34;&44;
@@ &34;Missing Kitty&34;&44;
@@ &34;Altar Egos&34;&44;
@@ &34;Justice
Aww",@@
@@ "Staff Infection",@@
@@ "Missing Kitty",@@
@@ "Altar Egos",@@
@@ "Justice
Is Blind&34;&44;
@@ &34;Best
Blind",@@
@@ "Best
Man for the GOB&34;&44;
@@ &34;Whistler&39;s Mother&34;&44;
@@ &34;Not
GOB",@@
@@ "Whistler's Mother",@@
@@ "Not
Without My Daughter&34;&44;
@@ &34;Let &39;Em
Daughter",@@
@@ "Let 'Em
Eat Cake&34;
@@ &125;&44;
@@ &123;
@@ &34;The
Cake"@@
@@ },@@
@@ {@@
@@ "The
One Where Michael Leaves&34;&44;
@@ &34;The
Leaves",@@
@@ "The
One Where They Build a House&34;&44;
@@ &34;&194;&161;Amigos&33;&34;&44;
@@ &34;Good Grief&34;&44;
@@ &34;Sad Sack&34;&44;
@@ &34;Afternoon Delight&34;&44;
@@ &34;Switch Hitter&34;&44;
@@ &34;Queen
House",@@
@@ "¡Amigos!",@@
@@ "Good Grief",@@
@@ "Sad Sack",@@
@@ "Afternoon Delight",@@
@@ "Switch Hitter",@@
@@ "Queen
for a Day&34;&44;
@@ &34;Burning Love&34;&44;
@@ &34;Ready&44; Aim&44;
Day",@@
@@ "Burning Love",@@
@@ "Ready, Aim,
Marry Me&34;&44;
@@ &34;Out
Me",@@
@@ "Out
on a Limb&34;&44;
@@ &34;Hand
Limb",@@
@@ "Hand
to God&34;&44;
@@ &34;Motherboy XXX&34;&44;
@@ &34;The
God",@@
@@ "Motherboy XXX",@@
@@ "The
Immaculate Election&34;&44;
@@ &34;Sword
Election",@@
@@ "Sword
of Destiny&34;&44;
@@ &34;Meat
Destiny",@@
@@ "Meat
the Veals&34;&44;
@@ &34;Spring Breakout&34;&44;
@@ &34;Righteous Brothers&34;&44;
@@ &125;&44;
@@ &123;
@@ &34;The
Veals",@@
@@ "Spring Breakout",@@
@@ "Righteous Brothers",@@
@@ },@@
@@ {@@
@@ "The
Cabin Show&34;&44;
@@ &34;For
Show",@@
@@ "For
British Eyes Only&34;&44;
@@ &34;Forget&45;Me&45;Now&34;&44;
@@ &34;Notapusy&34;&44;
@@ &34;Mr&46; F&34;&44;
@@ &34;The
Only",@@
@@ "Forget-Me-Now",@@
@@ "Notapusy",@@
@@ "Mr. F",@@
@@ "The
Ocean Walker&34;&44;
@@ &34;Prison Break&45;In&34;&44;
@@ &34;Making
Walker",@@
@@ "Prison Break-In",@@
@@ "Making
a Stand&34;&44;
@@ &34;S&46;O&46;B&46;s&34;&44;
@@ &34;Fakin&39; It&34;&44;
@@ &34;Family Ties&34;&44;
@@ &34;Exit Strategy&34;&44;
@@ &34;Development Arrested&34;
@@ &125;&44;
@@ &125;
@@ &45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ &45;&45;Interwiki data&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ local tokens&61;&123;&125;
@@
@@ do &45;&45;wikipedia
@@ &45;&45;Numbers
Stand",@@
@@ "S.O.B.s",@@
@@ "Fakin' It",@@
@@ "Family Ties",@@
@@ "Exit Strategy",@@
@@ "Development Arrested"@@
@@ },@@
@@}@@
@@-------------------------------------------------------------------------------@@
@@@@
@@--Interwiki data---------------------------------------------------------------@@
@@local tokens={}@@
@@@@
@@do --wikipedia@@
@@ --Numbers
for episodes with ambiguous titles&44; Wikipedia&45;wise&44;
@@ &45;&45;whose
titles, Wikipedia-wise,@@
@@ --whose
article titles end with &34;&40;Arrested Development&41;&34;
@@
"(Arrested Development)"@@
@@
local disambigeps&61;&123;
@@ &123;1&44;2&44;8&44;11&44;20&44;21&44;22&125;&44; &45;&45;Season 1
@@ &123;5&44;6&44;8&44;9&44;11&44;12&44;18&125;&44; &45;&45;Season 2
@@ &123;10&44;11&44;12&125; &45;&45;Season 3
@@ &125;
@@
@@ &45;&45;construct
disambigeps={@@
@@ {1,2,8,11,20,21,22}, --Season 1@@
@@ {5,6,8,9,11,12,18}, --Season 2@@
@@ {10,11,12} --Season 3@@
@@ }@@
@@@@
@@ --construct
lookup table
@@
table@@
@@
local disambiguated&61;&123;&125;
@@
disambiguated={}@@
@@
for s&61;1&44;&35;disambigeps do
@@ disambiguated&91;s&93;&61;&123;&125;
@@
s=1,#disambigeps do@@
@@ disambiguated[s]={}@@
@@
for i&61;1&44;&35;disambigeps&91;s&93; do
@@ disambiguated&91;s&93;&91;disambigeps&91;s&93;&91;i&93;&93;&61;true
@@ end
@@ end
@@
@@ &45;&45;Function
i=1,#disambigeps[s] do@@
@@ disambiguated[s][disambigeps[s][i]]=true@@
@@ end@@
@@ end@@
@@@@
@@ --Function
that returns the Wikipedia URL
@@
URL@@
@@
function tokens&46;wikipedia&40;s&44;e&41;
@@
tokens.wikipedia(s,e)@@
@@
local pagename&61;adeps&91;s&93;&91;e&93;
@@ pagename&61;string&46;gsub&40;pagename&44;&39; &39;&44;&39;&95;&39;&41;
@@ pagename&61;urlencode&46;string&40;pagename&41;
@@
pagename=adeps[s][e]@@
@@ pagename=string.gsub(pagename,' ','_')@@
@@ pagename=urlencode.string(pagename)@@
@@
if disambiguated&91;s&93;&91;e&93; then
@@ &45;&45;Technically&44;
disambiguated[s][e] then@@
@@ --Technically,
parentheses don&39;t don't have to be percent&45;encoded
@@ &45;&45;for
percent-encoded@@
@@ --for
HTTP URIs because they&39;re they're unused sub&45;delims
@@ &45;&45;per
sub-delims@@
@@ --per
section 2&46;2 2.2 of RFC 3986&44; 3986, so we concatenate after
@@ &45;&45;the
after@@
@@ --the
function that percent&45;encodes percent-encodes all sub&45;delims
@@ pagename&61;pagename&46;&46;&34;&95;&40;Arrested&95;Development&41;&34;
@@ end
@@
@@
sub-delims@@
@@ pagename=pagename.."_(Arrested_Development)"@@
@@ end@@
@@@@
@@
return &34;http&58;&47;&47;en&46;wikipedia&46;org&47;wiki&47;&34;&46;&46;pagename
@@ end
@@ end
@@
@@ &45;&45;Function
"http://en.wikipedia.org/wiki/"..pagename@@
@@ end@@
@@end@@
@@@@
@@--Function
that returns the URL of the Arrested Development Wikia entry
@@ function tokens&46;wikia&40;s&44;e&41;
@@
entry@@
@@function tokens.wikia(s,e)@@
@@
local pagename&61;adeps&91;s&93;&91;e&93;
@@ pagename&61;string&46;gsub&40;pagename&44;&39; &39;&44;&39;&95;&39;&41;
@@ pagename&61;urlencode&46;string&40;pagename&41;
@@
pagename=adeps[s][e]@@
@@ pagename=string.gsub(pagename,' ','_')@@
@@ pagename=urlencode.string(pagename)@@
@@
return &34;http&58;&47;&47;arresteddevelopment&46;wikia&46;com&47;wiki&47;&34;&46;&46;pagename
@@ end
@@
@@ do &45;&45;Balboa Observer&45;Picayune
@@ &45;&45;Season
"http://arresteddevelopment.wikia.com/wiki/"..pagename@@
@@end@@
@@@@
@@do --Balboa Observer-Picayune@@
@@ --Season
1 episodes that are listed at different numbers
@@
numbers@@
@@
local s1flips&61;&123; &91;5&93;&61;6&44; &91;6&93;&61;5&44; &91;7&93;&61;8&44; &91;8&93;&61;7&44; &91;16&93;&61;18&44; &91;17&93;&61;16&44; &91;18&93;&61;17 &125;
@@
@@ &45;&45;Function
s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }@@
@@@@
@@ --Function
the returns the URL of the episode&39;s episode's page on the&45;op&46;com
@@
the-op.com@@
@@
function tokens&46;theop&40;s&44;e&41;
@@ &45;&45;correct
tokens.theop(s,e)@@
@@ --correct
OutOfOrder Season 1 episodes
@@
episodes@@
@@
if s&61;&61;1 s==1 then e &61; s1flips&91;e&93; = s1flips[e] or e end
@@
end@@
@@
return string&46;format&40;&34;http&58;&47;&47;the&45;op&46;com&47;episode&47;&37;i&37;02i&34;&44;s&44;e&41;
@@ end
@@ end
@@
@@ do &45;&45;IMDB
@@ &45;&45;why hello&44;
string.format("http://the-op.com/episode/%i%02i",s,e)@@
@@ end@@
@@end@@
@@@@
@@do --IMDB@@
@@ --why hello,
unreadable block of arbitrary indices&44; indices, it sure sucks
@@ &45;&45;that
sucks@@
@@ --that
I have to use you
@@
you@@
@@
local ttnums&61;&123;
@@ &123; 0515236&44; 0515256&44; 0515212&44; 0515223&44; 0515257&44;
@@ 0515214&44; 0515231&44; 0515221&44; 0515247&44; 0515235&44;
@@ 0515238&44; 0515226&44; 0515210&44; 0515244&44; 0515246&44;
@@ 0515228&44; 0515208&44; 0515222&44; 0515211&44; 0515258&44;
@@ 0515232&44; 0515224&44; &125;&44;
@@ &123; 0515253&44; 0515254&44; 0515209&44; 0515219&44; 0515243&44;
@@ 0515207&44; 0515248&44; 0515239&44; 0515213&44; 0515240&44;
@@ 0515234&44; 0515220&44; 0515229&44; 0515251&44; 0515255&44;
@@ 0515227&44; 0515245&44; 0515241&44; &125;&44;
@@ &123; 0515250&44; 0515249&44; 0515218&44; 0515233&44; 0515230&44;
@@ 0515252&44; 0515237&44; 0515225&44; 0515242&44; 0515216&44;
@@ 0515217&44; 0515215&44; 0757386&44; &125;
@@ &125;
@@
@@ &45;&45;Function
ttnums={@@
@@ { 0515236, 0515256, 0515212, 0515223, 0515257,@@
@@ 0515214, 0515231, 0515221, 0515247, 0515235,@@
@@ 0515238, 0515226, 0515210, 0515244, 0515246,@@
@@ 0515228, 0515208, 0515222, 0515211, 0515258,@@
@@ 0515232, 0515224, },@@
@@ { 0515253, 0515254, 0515209, 0515219, 0515243,@@
@@ 0515207, 0515248, 0515239, 0515213, 0515240,@@
@@ 0515234, 0515220, 0515229, 0515251, 0515255,@@
@@ 0515227, 0515245, 0515241, },@@
@@ { 0515250, 0515249, 0515218, 0515233, 0515230,@@
@@ 0515252, 0515237, 0515225, 0515242, 0515216,@@
@@ 0515217, 0515215, 0757386, }@@
@@ }@@
@@@@
@@ --Function
that returns the URL for the episode&39;s episode's IMDB page
@@
page@@
@@
function tokens&46;imdb&40;s&44;e&41;
@@
tokens.imdb(s,e)@@
@@
return string&46;format&40;&34;http&58;&47;&47;www&46;imdb&46;com&47;title&47;tt&37;07i&47;&34;&44;ttnums&91;s&93;&91;e&93;&41;
@@ end
@@ end
@@
@@ do &45;&45;Hulu&44;
string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])@@
@@ end@@
@@end@@
@@@@
@@do --Hulu,
you know&44; know, just in case
@@
case@@
@@
local watchnums&61;&123;
@@ &123; 589&44; 1786&44; 585&44; 1781&44; 1785&44;
@@ 580&44; 590&44; 588&44; 586&44; 575&44;
@@ 576&44; 579&44; 577&44; 644&44; 1783&44;
@@ 591&44; 582&44; 584&44; 578&44; 581&44;
@@ 583&44; 587&125;&44;
@@ &123; 6641&44; 6644&44; 6643&44; 6638&44; 6639&44;
@@ 12883&44; 13226&44; 12561&44; 12609&44; 12298&44;
@@ 12271&44; 12901&44; 13248&44; 13267&44; 13276&44;
@@ 13206&44; 12232&44; 12532&125;&44;
@@ &123; 6640&44; 6642&44; 6635&44; 6636&44; 6637&44;
@@ 12497&44; 17189&44; 12523&44; 13139&44; 12225&44;
@@ 12317&44; 12194&44; 12215&125;&44;
@@ &125;
@@
@@
watchnums={@@
@@ { 589, 1786, 585, 1781, 1785,@@
@@ 580, 590, 588, 586, 575,@@
@@ 576, 579, 577, 644, 1783,@@
@@ 591, 582, 584, 578, 581,@@
@@ 583, 587},@@
@@ { 6641, 6644, 6643, 6638, 6639,@@
@@ 12883, 13226, 12561, 12609, 12298,@@
@@ 12271, 12901, 13248, 13267, 13276,@@
@@ 13206, 12232, 12532},@@
@@ { 6640, 6642, 6635, 6636, 6637,@@
@@ 12497, 17189, 12523, 13139, 12225,@@
@@ 12317, 12194, 12215},@@
@@ }@@
@@@@
@@
function tokens&46;hulu&40;s&44;e&41;
@@
tokens.hulu(s,e)@@
@@
return string&46;format&40;
@@ &34;http&58;&47;&47;hulu&46;com&47;watch&47;&37;i&34;&44; watchnums&91;s&93;&91;e&93;&41;
@@ end
@@ end
@@
@@ do &45;&45;Netflix
string.format(@@
@@ "http://hulu.com/watch/%i", watchnums[s][e])@@
@@ end@@
@@end@@
@@@@
@@do --Netflix
Watch Instantly
@@ &45;&45;It&39;s
Instantly@@
@@ --It's
largely sequential&44; sequential, but not quite&46;
@@ &45;&45;I
quite.@@
@@ --I
printed out all the numbers and moved them around
@@ &45;&45;to
around@@
@@ --to
fit the correct order &40;which (which is both inconsistent
@@ &45;&45;in
inconsistent@@
@@ --in
IDs to Netflix order and Netflix to DVD order&41;&46;
@@
order).@@
@@
local movieids&61;&123;
@@ &123; 70133673&44; 70133674&44; 70133675&44; 70133677&44; 70133676&44;
@@ 70133678&44; 70133680&44; 70133679&44; 70133681&44; 70133682&44;
@@ 70133683&44; 70133684&44; 70133685&44; 70133686&44; 70133687&44;
@@ 70133688&44; 70133689&44; 70133690&44; 70133691&44; 70133692&44;
@@ 70133693&44; 70133694&44; &125;&44;
@@ &123; 70133695&44; 70133696&44; 70133697&44; 70133698&44; 70133699&44;
@@ 70133700&44; 70133701&44; 70133702&44; 70133703&44; 70133704&44;
@@ 70133705&44; 70133706&44; 70133707&44; 70133708&44; 70133711&44;
@@ 70133709&44; 70133710&44; 70133712&44; &125;&44;
@@ &123; 70133713&44; 70133714&44; 70133715&44; 70133716&44; 70133717&44;
@@ 70133718&44; 70133720&44; 70133719&44; 70133721&44; 70133722&44;
@@ 70133723&44; 70133724&44; 70133725&44; &125;
@@ &125;
@@
@@
movieids={@@
@@ { 70133673, 70133674, 70133675, 70133677, 70133676,@@
@@ 70133678, 70133680, 70133679, 70133681, 70133682,@@
@@ 70133683, 70133684, 70133685, 70133686, 70133687,@@
@@ 70133688, 70133689, 70133690, 70133691, 70133692,@@
@@ 70133693, 70133694, },@@
@@ { 70133695, 70133696, 70133697, 70133698, 70133699,@@
@@ 70133700, 70133701, 70133702, 70133703, 70133704,@@
@@ 70133705, 70133706, 70133707, 70133708, 70133711,@@
@@ 70133709, 70133710, 70133712, },@@
@@ { 70133713, 70133714, 70133715, 70133716, 70133717,@@
@@ 70133718, 70133720, 70133719, 70133721, 70133722,@@
@@ 70133723, 70133724, 70133725, }@@
@@ }@@
@@@@
@@
function tokens&46;netflix&40;s&44;e&41;
@@
tokens.netflix(s,e)@@
@@
return string&46;format&40;
@@ &34;http&58;&47;&47;www&46;netflix&46;com&47;WiPlayer&63;movieid&61;&37;i&34;&44;movieids&91;s&93;&91;e&93;&41;
@@ end
@@ end
@@
@@ &45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ &45;&45;Arrested
string.format(@@
@@ "http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])@@
@@ end@@
@@end@@
@@@@
@@-------------------------------------------------------------------------------@@
@@@@
@@--Arrested
Development TV Tropes Recap stuff&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
stuff-----------------------------------@@
@@local ad_ep_links@@
@@do@@
@@
local ad&95;ep&95;links
@@ do
@@ local template&61;&91;&61;&91;
@@ &37;&37;STARTLINKS&37;&37;
@@ &45;&45;&45;&45;
@@ Interwiki&58; &91;&91;&36;wikipedia Wikipedia&93;&93; &45;&45; &91;&91;&36;wikia Wikia&93;&93; &45;&45; &91;&91;&36;theop
template=[=[@@
@@%%STARTLINKS%%@@
@@----@@
@@Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop
Balboa Observer&45;Picayune&93;&93; &45;&45; &91;&91;&36;imdb IMDB&93;&93;
@@
@@ Watch now&58; &91;&91;&36;hulu Hulu&93;&93; &45;&45; &91;&91;&36;netflix Netflix&93;&93;
@@ &45;&45;&45;&45;
@@ &37;&37;ENDLINKS&37;&37;
@@ &93;&61;&93;
@@
Observer-Picayune]] -- [[$imdb IMDB]]@@
@@@@
@@Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]@@
@@----@@
@@%%ENDLINKS%%@@
@@]=]@@
@@
function ad&95;ep&95;links&40;s&44;e&41;
@@
ad_ep_links(s,e)@@
@@
return &40;string&46;gsub&40;template&44;&34;&37;&36;&40;&37;w&43;&41;&34;&44;function&40;token&41; (string.gsub(template,"%$(%w+)",function(token) return tokens&91;token&93;&40;s&44;e&41; end&41;&41;
@@ end
@@ end
@@
@@ &45;&45;Function
tokens[token](s,e) end))@@
@@ end@@
@@end@@
@@@@
@@--Function
that returns the page name of the episode&39;s episode's TVTropes Recap page&46;
@@ local
page.@@
@@local
function recap&95;pagename&40;s&44;e&41;
@@ &45;&45;get
recap_pagename(s,e)@@
@@ --get
the ep title
@@
title@@
@@
local title&61;adeps&91;s&93;&91;e&93;
@@ &45;&45;replace
title=adeps[s][e]@@
@@ --replace
the &195;&169; é in Beef Consomm&195;&169;
@@ title&61;string&46;gsub&40;title&44;&39;&195;&169;&39;&44;&39;e&39;&41;
@@ &45;&45;transform
Consommé@@
@@ title=string.gsub(title,'é','e')@@
@@ --transform
to CamelCased WikiWord
@@ title&61;string&46;gsub&40;title&44;&39; &40;&37;l&63;&41;&39;&44;string&46;upper&41;
@@ &45;&45;Remove
WikiWord@@
@@ title=string.gsub(title,' (%l?)',string.upper)@@
@@ --Remove
all non&45;alphanumeric characters
@@ title&61;string&46;gsub&40;title&44;&39;&37;W&39;&44;&39;&39;&41;
@@
@@
non-alphanumeric characters@@
@@ title=string.gsub(title,'%W','')@@
@@@@
@@
return string&46;format&40;&34;Recap&47;ArrestedDevelopmentS&37;iE&37;i&37;s&34;&44;s&44;e&44;title&41;
@@ end
@@
@@ local
string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)@@
@@end@@
@@@@
@@local
function post&95;ad&95;recap&95;starter&40;s&44;e&41;
@@
post_ad_recap_starter(s,e)@@
@@
return tvtropes&46;post&40;
@@ recap&95;pagename&40;s&44;e&41;&44;
@@ string&46;format&40;
@@ &34;&92;n&92;n&37;s&92;n&33;The &39;&39;ArrestedDevelopment&39;&39;
tvtropes.post(@@
@@ recap_pagename(s,e),@@
@@ string.format(@@
@@ "\n\n%s\n!The ''ArrestedDevelopment''
episode &92;&34;&37;s&92;&34; \"%s\" provides examples of&58;&92;n&92;n&34;&44;
@@ ad&95;ep&95;links&40;s&44;e&41;&44;adeps&91;s&93;&91;e&93;&41;&44;
@@ &34;STUART&34;&44;
@@ &34;Adding
of:\n\n",@@
@@ ad_ep_links(s,e),adeps[s][e]),@@
@@ "STUART",@@
@@ "Adding
interwiki links and example header automatically &40;Ask (Ask me about Lua&41;&34;&41;
@@ end
@@
@@ local
Lua)")@@
@@end@@
@@@@
@@local
function update&95;links&40;reason&41;
@@
update_links(reason)@@
@@
return function&40;s&44;e&41;
@@ &45;&45;until
function(s,e)@@
@@ --until
comment syntax is changed&44; changed, Amigos is manual&45;only
@@
manual-only@@
@@
if s&61;&61;2 s==2 and e&61;&61;3 then
@@
e==3 then@@
@@
print &34;&40;Skipping "(Skipping Amigos because the links go all screwy&41;&34;
@@ else
@@
screwy)"@@
@@ else@@
@@
local pagename&61;recap&95;pagename&40;s&44;e&41;
@@
pagename=recap_pagename(s,e)@@
@@
local pageasis&61;tvtropes&46;get&40;pagename&41;
@@
pageasis=tvtropes.get(pagename)@@
@@
local gsubsafelinks &61; string&46;gsub&40;ad&95;ep&95;links&40;s&44;e&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;
@@
= string.gsub(ad_ep_links(s,e),"%%","%%%%")@@
@@
local success
@@
success@@
@@
while not success do
@@
do@@
@@
local code
@@ success&44;
code@@
@@ success,
code &61; tvtropes&46;post&40;pagename&44;
@@ string&46;gsub&40;pageasis&44;&34;&37;&37;&37;&37;STARTLINKS&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;ENDLINKS&37;&37;&37;&37;&34;&44;gsubsafelinks&41;&44;
@@ &34;STUART&34;&44;reason&41;
@@
= tvtropes.post(pagename,@@
@@ string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),@@
@@ "STUART",reason)@@
@@
if not success then print&40;&34;Retrying&46;&46;&46; &34;&46;&46;code&41; end
@@ end
@@ end
@@ end
@@ end
@@
@@ local
print("Retrying... "..code) end@@
@@ end@@
@@ end@@
@@ end@@
@@end@@
@@@@
@@local
function for&95;all&95;eps&40;f&41;
@@
for_all_eps(f)@@
@@
for s&61;1&44;&35;adeps do
@@
s=1,#adeps do@@
@@
for e&61;1&44;&35;adeps&91;s&93; do
@@ print&40;string&46;format&40;&39;Doing
e=1,#adeps[s] do@@
@@ print(string.format('Doing
Season &37;i %i Episode &37;i&44; &34;&37;s&34;&46;&46;&46;&39;&44;s&44;e&44;adeps&91;s&93;&91;e&93;&41;&41;
@@ f&40;s&44;e&41;
@@ end
@@ end
@@ end
@@ &45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ &45;&45;Okay&44;
%i, "%s"...',s,e,adeps[s][e]))@@
@@ f(s,e)@@
@@ end@@
@@ end@@
@@end@@
@@-------------------------------------------------------------------------------@@
@@@@
@@--Okay,
put your executing commands down here&46;here.@@
Is there an issue? Send a MessageReason:
ARGH english language is such movink target


@@ &108;&111;&99;&97;&108;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&61;&123;&125;

to:

@@ &108;&111;&99;&97;&108;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&61;&123;&125;local urlencode&61;&123;&125;



@@ &45;&45;&85;&82;&76;&32;&101;&110;&99;&111;&100;&101;&32;&97;&32;&115;&116;&114;&105;&110;&103;&46;
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&101;&110;&99;&111;&100;&101;&40;&115;&116;&114;&41;
@@ &32;&32;&45;&45;&69;&110;&115;&117;&114;&101;&32;&97;&108;&108;&32;&110;&101;&119;&108;&105;&110;&101;&115;&32;&97;&114;&101;&32;&105;&110;&32;&67;&82;&76;&70;&32;&102;&111;&114;&109;
@@ &32;&32;&115;&116;&114;&32;&61;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&32;&40;&115;&116;&114;&44;&32;&34;&92;&114;&63;&92;&110;&34;&44;&32;&34;&92;&114;&92;&110;&34;&41;
@@ &32;&32;&45;&45;&80;&101;&114;&99;&101;&110;&116;&45;&101;&110;&99;&111;&100;&101;&32;&97;&108;&108;&32;&110;&111;&110;&45;&117;&110;&114;&101;&115;&101;&114;&118;&101;&100;&32;&99;&104;&97;&114;&97;&99;&116;&101;&114;&115;
@@ &32;&32;&45;&45;&97;&115;&32;&112;&101;&114;&32;&82;&70;&67;&32;&51;&57;&56;&54;&44;&32;&83;&101;&99;&116;&105;&111;&110;&32;&50;&46;&51;
@@ &32;&32;&45;&45;&40;&101;&120;&99;&101;&112;&116;&32;&102;&111;&114;&32;&115;&112;&97;&99;&101;&44;&32;&119;&104;&105;&99;&104;&32;&103;&101;&116;&115;&32;&112;&108;&117;&115;&45;&101;&110;&99;&111;&100;&101;&100;&41;
@@ &32;&32;&115;&116;&114;&32;&61;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&32;&40;&115;&116;&114;&44;&32;&34;&40;&91;&94;&37;&119;&37;&45;&37;&46;&37;&95;&37;&126;&32;&93;&41;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&40;&99;&41;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&32;&40;&34;&37;&37;&37;&48;&50;&88;&34;&44;&32;&115;&116;&114;&105;&110;&103;&46;&98;&121;&116;&101;&40;&99;&41;&41;&32;&101;&110;&100;&41;
@@ &32;&32;&45;&45;&67;&111;&110;&118;&101;&114;&116;&32;&115;&112;&97;&99;&101;&115;&32;&116;&111;&32;&112;&108;&117;&115;&32;&115;&105;&103;&110;&115;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&32;&40;&115;&116;&114;&44;&32;&34;&32;&34;&44;&32;&34;&43;&34;&41;
@@ &101;&110;&100;

to:

@@ &45;&45;&85;&82;&76;&32;&101;&110;&99;&111;&100;&101;&32;&97;&32;&115;&116;&114;&105;&110;&103;&46;
&45;&45;URL encode a string&46;
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&101;&110;&99;&111;&100;&101;&40;&115;&116;&114;&41;
local function encode&40;str&41;
@@ &45;&45;Ensure all newlines are in CRLF form
@@ str &61; string&46;gsub &40;str&44; &34;&92;r&63;&92;n&34;&44; &34;&92;r&92;n&34;&41;
@@ &45;&45;Percent&45;encode all non&45;unreserved characters
@@ &45;&45;as per RFC 3986&44; Section 2&46;3
@@ &45;&45;&40;except for space&44; which gets plus&45;encoded&41;
@@ str &61; string&46;gsub &40;str&44; &34;&40;&91;&94;&37;w&37;&45;&37;&46;&37;&95;&37;&126; &93;&41;&34;&44;
@@ function &40;c&41; return string&46;format &40;&34;&37;&37;&37;02X&34;&44; string&46;byte&40;c&41;&41; end&41;
@@ &45;&45;Convert spaces to plus signs
@@ return string&46;gsub &40;str&44; &34; &34;&44; &34;&43;&34;&41;
@@ &32;&32;&45;&45;&69;&110;&115;&117;&114;&101;&32;&97;&108;&108;&32;&110;&101;&119;&108;&105;&110;&101;&115;&32;&97;&114;&101;&32;&105;&110;&32;&67;&82;&76;&70;&32;&102;&111;&114;&109;
@@ &32;&32;&115;&116;&114;&32;&61;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&32;&40;&115;&116;&114;&44;&32;&34;&92;&114;&63;&92;&110;&34;&44;&32;&34;&92;&114;&92;&110;&34;&41;
@@ &32;&32;&45;&45;&80;&101;&114;&99;&101;&110;&116;&45;&101;&110;&99;&111;&100;&101;&32;&97;&108;&108;&32;&110;&111;&110;&45;&117;&110;&114;&101;&115;&101;&114;&118;&101;&100;&32;&99;&104;&97;&114;&97;&99;&116;&101;&114;&115;
@@ &32;&32;&45;&45;&97;&115;&32;&112;&101;&114;&32;&82;&70;&67;&32;&51;&57;&56;&54;&44;&32;&83;&101;&99;&116;&105;&111;&110;&32;&50;&46;&51;
@@ &32;&32;&45;&45;&40;&101;&120;&99;&101;&112;&116;&32;&102;&111;&114;&32;&115;&112;&97;&99;&101;&44;&32;&119;&104;&105;&99;&104;&32;&103;&101;&116;&115;&32;&112;&108;&117;&115;&45;&101;&110;&99;&111;&100;&101;&100;&41;
@@ &32;&32;&115;&116;&114;&32;&61;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&32;&40;&115;&116;&114;&44;&32;&34;&40;&91;&94;&37;&119;&37;&45;&37;&46;&37;&95;&37;&126;&32;&93;&41;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&40;&99;&41;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&32;&40;&34;&37;&37;&37;&48;&50;&88;&34;&44;&32;&115;&116;&114;&105;&110;&103;&46;&98;&121;&116;&101;&40;&99;&41;&41;&32;&101;&110;&100;&41;
@@ &32;&32;&45;&45;&67;&111;&110;&118;&101;&114;&116;&32;&115;&112;&97;&99;&101;&115;&32;&116;&111;&32;&112;&108;&117;&115;&32;&115;&105;&103;&110;&115;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&32;&40;&115;&116;&114;&44;&32;&34;&32;&34;&44;&32;&34;&43;&34;&41;
@@ &101;&110;&100;
end



@@ &45;&45;&77;&97;&107;&101;&32;&116;&104;&105;&115;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&97;&118;&97;&105;&108;&97;&98;&108;&101;&32;&97;&115;&32;&112;&97;&114;&116;&32;&111;&102;&32;&116;&104;&101;&32;&109;&111;&100;&117;&108;&101;
@@ &117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&115;&116;&114;&105;&110;&103;&32;&61;&32;&101;&110;&99;&111;&100;&101;

to:

@@ &45;&45;&77;&97;&107;&101;&32;&116;&104;&105;&115;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&97;&118;&97;&105;&108;&97;&98;&108;&101;&32;&97;&115;&32;&112;&97;&114;&116;&32;&111;&102;&32;&116;&104;&101;&32;&109;&111;&100;&117;&108;&101;
&45;&45;Make this function available as part of the module
@@ &117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&115;&116;&114;&105;&110;&103;&32;&61;&32;&101;&110;&99;&111;&100;&101;urlencode&46;string &61; encode



@@ &45;&45;&85;&82;&76;&32;&101;&110;&99;&111;&100;&101;&32;&97;&32;&116;&97;&98;&108;&101;&32;&97;&115;&32;&97;&32;&115;&101;&114;&105;&101;&115;&32;&111;&102;&32;&112;&97;&114;&97;&109;&101;&116;&101;&114;&115;&46;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&116;&97;&98;&108;&101;&40;&116;&41;
@@ &32;&32;&45;&45;&116;&97;&98;&108;&101;&32;&111;&102;&32;&97;&114;&103;&117;&109;&101;&110;&116;&32;&115;&116;&114;&105;&110;&103;&115;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&97;&114;&103;&116;&115;&44;&32;&105;&61;&32;&123;&125;&44;&32;&49;
@@ &32;&32;&102;&111;&114;&32;&107;&44;&32;&118;&32;&105;&110;&32;&112;&97;&105;&114;&115;&40;&116;&41;&32;&100;&111;
@@ &32;&32;&32;&32;&97;&114;&103;&116;&115;&91;&105;&93;&61;&101;&110;&99;&111;&100;&101;&40;&107;&41;&46;&46;&34;&61;&34;&46;&46;&101;&110;&99;&111;&100;&101;&40;&118;&41;
@@ &32;&32;&32;&32;&105;&61;&105;&43;&49;
@@ &32;&32;&101;&110;&100;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&116;&97;&98;&108;&101;&46;&99;&111;&110;&99;&97;&116;&40;&97;&114;&103;&116;&115;&44;&39;&38;&39;&41;
@@ &101;&110;&100;

to:

@@ &45;&45;&85;&82;&76;&32;&101;&110;&99;&111;&100;&101;&32;&97;&32;&116;&97;&98;&108;&101;&32;&97;&115;&32;&97;&32;&115;&101;&114;&105;&101;&115;&32;&111;&102;&32;&112;&97;&114;&97;&109;&101;&116;&101;&114;&115;&46;
&45;&45;URL encode a table as a series of parameters&46;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&116;&97;&98;&108;&101;&40;&116;&41;
function urlencode&46;table&40;t&41;
@@ &45;&45;table of argument strings
@@ local argts&44; i&61; &123;&125;&44; 1
@@ for k&44; v in pairs&40;t&41; do
@@ argts&91;i&93;&61;encode&40;k&41;&46;&46;&34;&61;&34;&46;&46;encode&40;v&41;
@@ i&61;i&43;1
@@ end
@@ return table&46;concat&40;argts&44;&39;&38;&39;&41;
@@ &32;&32;&45;&45;&116;&97;&98;&108;&101;&32;&111;&102;&32;&97;&114;&103;&117;&109;&101;&110;&116;&32;&115;&116;&114;&105;&110;&103;&115;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&97;&114;&103;&116;&115;&44;&32;&105;&61;&32;&123;&125;&44;&32;&49;
@@ &32;&32;&102;&111;&114;&32;&107;&44;&32;&118;&32;&105;&110;&32;&112;&97;&105;&114;&115;&40;&116;&41;&32;&100;&111;
@@ &32;&32;&32;&32;&97;&114;&103;&116;&115;&91;&105;&93;&61;&101;&110;&99;&111;&100;&101;&40;&107;&41;&46;&46;&34;&61;&34;&46;&46;&101;&110;&99;&111;&100;&101;&40;&118;&41;
@@ &32;&32;&32;&32;&105;&61;&105;&43;&49;
@@ &32;&32;&101;&110;&100;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&116;&97;&98;&108;&101;&46;&99;&111;&110;&99;&97;&116;&40;&97;&114;&103;&116;&115;&44;&39;&38;&39;&41;
@@ &101;&110;&100;
end



@@ &114;&101;&116;&117;&114;&110;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;

to:

@@ &114;&101;&116;&117;&114;&110;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;return urlencode



@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&116;&111;&32;&115;&101;&110;&100;&32;&116;&111;&32;&84;&86;&84;&114;&111;&112;&101;&115;&32;&115;&105;&116;&101;&46;
@@ &108;&111;&99;&97;&108;&32;&104;&116;&116;&112;&32;&61;&32;&114;&101;&113;&117;&105;&114;&101;&34;&115;&111;&99;&107;&101;&116;&46;&104;&116;&116;&112;&34;

to:

@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&116;&111;&32;&115;&101;&110;&100;&32;&116;&111;&32;&84;&86;&84;&114;&111;&112;&101;&115;&32;&115;&105;&116;&101;&46;
&45;&45;Required to send to TVTropes site&46;
@@ &108;&111;&99;&97;&108;&32;&104;&116;&116;&112;&32;&61;&32;&114;&101;&113;&117;&105;&114;&101;&34;&115;&111;&99;&107;&101;&116;&46;&104;&116;&116;&112;&34;local http &61; require&34;socket&46;http&34;



@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&116;&111;&32;&99;&114;&101;&97;&116;&101;&32;&112;&97;&103;&101;&32;&112;&111;&115;&116;&32;&100;&97;&116;&97;&46;
@@ &108;&111;&99;&97;&108;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&32;&61;&32;&114;&101;&113;&117;&105;&114;&101;&32;&34;&117;&114;&108;&101;&110;&99;&111;&100;&101;&34;

to:

@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&116;&111;&32;&99;&114;&101;&97;&116;&101;&32;&112;&97;&103;&101;&32;&112;&111;&115;&116;&32;&100;&97;&116;&97;&46;
&45;&45;Required to create page post data&46;
@@ &108;&111;&99;&97;&108;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&32;&61;&32;&114;&101;&113;&117;&105;&114;&101;&32;&34;&117;&114;&108;&101;&110;&99;&111;&100;&101;&34;local urlencode &61; require &34;urlencode&34;



@@ &108;&111;&99;&97;&108;&32;&116;&118;&116;&114;&111;&112;&101;&115;&61;&123;&125;

to:

@@ &108;&111;&99;&97;&108;&32;&116;&118;&116;&114;&111;&112;&101;&115;&61;&123;&125;local tvtropes&61;&123;&125;



@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&97;&117;&116;&104;&101;&110;&116;&105;&99;&97;&116;&101;&100;&32;&84;&86;&84;&114;&111;&112;&101;&115;&32;&85;&82;&76;&32;&102;&111;&114;&32;&116;&104;&101;&32;&103;&105;&118;&101;&110;&32;&112;&97;&103;&101;&46;
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&97;&117;&116;&104;&112;&97;&103;&101;&117;&114;&108;&40;&112;&97;&103;&101;&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&34;&104;&116;&116;&112;&58;&47;&47;&58;&102;&111;&97;&109;&121;&64;&116;&118;&116;&114;&111;&112;&101;&115;&46;&111;&114;&103;&47;&112;&109;&119;&105;&107;&105;&47;&112;&109;&119;&105;&107;&105;&46;&112;&104;&112;&47;&34;&46;&46;&112;&97;&103;&101;
@@ &101;&110;&100;

to:

@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&97;&117;&116;&104;&101;&110;&116;&105;&99;&97;&116;&101;&100;&32;&84;&86;&84;&114;&111;&112;&101;&115;&32;&85;&82;&76;&32;&102;&111;&114;&32;&116;&104;&101;&32;&103;&105;&118;&101;&110;&32;&112;&97;&103;&101;&46;
&45;&45;Function that returns the authenticated TVTropes URL for the given page&46;
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&97;&117;&116;&104;&112;&97;&103;&101;&117;&114;&108;&40;&112;&97;&103;&101;&41;
local function authpageurl&40;page&41;
@@ return &34;http&58;&47;&47;&58;foamy&64;tvtropes&46;org&47;pmwiki&47;pmwiki&46;php&47;&34;&46;&46;page
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&34;&104;&116;&116;&112;&58;&47;&47;&58;&102;&111;&97;&109;&121;&64;&116;&118;&116;&114;&111;&112;&101;&115;&46;&111;&114;&103;&47;&112;&109;&119;&105;&107;&105;&47;&112;&109;&119;&105;&107;&105;&46;&112;&104;&112;&47;&34;&46;&46;&112;&97;&103;&101;
@@ &101;&110;&100;
end



@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&102;&117;&108;&108;&110;&97;&109;&101;&40;&112;&97;&103;&101;&41;
@@ &32;&32;&45;&45;&82;&101;&113;&117;&105;&114;&101;&32;&112;&97;&103;&101;&110;&97;&109;&101;
@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&116;&121;&112;&101;&40;&112;&97;&103;&101;&41;&61;&61;&34;&115;&116;&114;&105;&110;&103;&34;&44;&34;&68;&101;&115;&116;&105;&110;&97;&116;&105;&111;&110;&32;&112;&97;&103;&101;&32;&110;&97;&109;&101;&32;&114;&101;&113;&117;&105;&114;&101;&100;&34;&41;
@@ &32;&32;&45;&45;&73;&102;&32;&110;&111;&32;&110;&97;&109;&101;&115;&112;&97;&99;&101;&32;&115;&112;&101;&99;&105;&102;&105;&101;&100;&44;&32;&97;&115;&115;&117;&109;&101;&32;&77;&97;&105;&110;
@@ &32;&32;&105;&102;&32;&110;&111;&116;&32;&115;&116;&114;&105;&110;&103;&46;&102;&105;&110;&100;&40;&112;&97;&103;&101;&44;&39;&47;&39;&41;&32;&116;&104;&101;&110;&32;&112;&97;&103;&101;&61;&34;&77;&97;&105;&110;&47;&34;&46;&46;&112;&97;&103;&101;&32;&101;&110;&100;

to:

@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&102;&117;&108;&108;&110;&97;&109;&101;&40;&112;&97;&103;&101;&41;
@@ &32;&32;&45;&45;&82;&101;&113;&117;&105;&114;&101;&32;&112;&97;&103;&101;&110;&97;&109;&101;
@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&116;&121;&112;&101;&40;&112;&97;&103;&101;&41;&61;&61;&34;&115;&116;&114;&105;&110;&103;&34;&44;&34;&68;&101;&115;&116;&105;&110;&97;&116;&105;&111;&110;&32;&112;&97;&103;&101;&32;&110;&97;&109;&101;&32;&114;&101;&113;&117;&105;&114;&101;&100;&34;&41;
@@ &32;&32;&45;&45;&73;&102;&32;&110;&111;&32;&110;&97;&109;&101;&115;&112;&97;&99;&101;&32;&115;&112;&101;&99;&105;&102;&105;&101;&100;&44;&32;&97;&115;&115;&117;&109;&101;&32;&77;&97;&105;&110;
@@ &32;&32;&105;&102;&32;&110;&111;&116;&32;&115;&116;&114;&105;&110;&103;&46;&102;&105;&110;&100;&40;&112;&97;&103;&101;&44;&39;&47;&39;&41;&32;&116;&104;&101;&110;&32;&112;&97;&103;&101;&61;&34;&77;&97;&105;&110;&47;&34;&46;&46;&112;&97;&103;&101;&32;&101;&110;&100;
local function fullname&40;page&41;
@@ &45;&45;Require pagename
@@ assert&40;type&40;page&41;&61;&61;&34;string&34;&44;&34;Destination page name required&34;&41;
@@ &45;&45;If no namespace specified&44; assume Main
@@ if not string&46;find&40;page&44;&39;&47;&39;&41; then page&61;&34;Main&47;&34;&46;&46;page end



@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&112;&97;&103;&101;
@@ &101;&110;&100;

to:

@@ return page
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&112;&97;&103;&101;
@@ &101;&110;&100;
end



@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&112;&111;&115;&116;&115;&32;&116;&104;&101;&32;&103;&105;&118;&101;&110;&32;&112;&97;&103;&101;&46;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;&112;&97;&103;&101;&44;&32;&98;&111;&100;&121;&44;&32;&97;&117;&116;&104;&111;&114;&44;&32;&114;&101;&97;&115;&111;&110;&41;

to:

@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&112;&111;&115;&116;&115;&32;&116;&104;&101;&32;&103;&105;&118;&101;&110;&32;&112;&97;&103;&101;&46;
&45;&45;Function that posts the given page&46;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;&112;&97;&103;&101;&44;&32;&98;&111;&100;&121;&44;&32;&97;&117;&116;&104;&111;&114;&44;&32;&114;&101;&97;&115;&111;&110;&41;function tvtropes&46;post&40;page&44; body&44; author&44; reason&41;



@@ &32;&32;&112;&97;&103;&101;&61;&102;&117;&108;&108;&110;&97;&109;&101;&40;&112;&97;&103;&101;&41;

to:

@@ &32;&32;&112;&97;&103;&101;&61;&102;&117;&108;&108;&110;&97;&109;&101;&40;&112;&97;&103;&101;&41;@@ page&61;fullname&40;page&41;



@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&116;&121;&112;&101;&40;&98;&111;&100;&121;&41;&61;&61;&34;&115;&116;&114;&105;&110;&103;&34;&44;&34;&80;&97;&103;&101;&32;&98;&111;&100;&121;&32;&114;&101;&113;&117;&105;&114;&101;&100;&34;&41;

to:

@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&116;&121;&112;&101;&40;&98;&111;&100;&121;&41;&61;&61;&34;&115;&116;&114;&105;&110;&103;&34;&44;&34;&80;&97;&103;&101;&32;&98;&111;&100;&121;&32;&114;&101;&113;&117;&105;&114;&101;&100;&34;&41;@@ assert&40;type&40;body&41;&61;&61;&34;string&34;&44;&34;Page body required&34;&41;



@@ &32;&32;&108;&111;&99;&97;&108;&32;&114;&101;&115;&112;&111;&110;&115;&101;&32;&61;
@@ &32;&32;&32;&32;&123;&104;&116;&116;&112;&46;&114;&101;&113;&117;&101;&115;&116;&40;&97;&117;&116;&104;&112;&97;&103;&101;&117;&114;&108;&40;&112;&97;&103;&101;&41;&44;
@@ &32;&32;&32;&32;&32;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&116;&97;&98;&108;&101;&123;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&97;&99;&116;&105;&111;&110;&61;&34;&112;&111;&115;&116;&34;&44;&32;&112;&111;&115;&116;&61;&34;&115;&97;&118;&101;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&112;&97;&103;&101;&44;&32;&116;&101;&120;&116;&61;&98;&111;&100;&121;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&97;&117;&116;&104;&111;&114;&61;&97;&117;&116;&104;&111;&114;&32;&111;&114;&32;&34;&65;&110;&111;&110;&121;&109;&111;&117;&115;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&114;&101;&97;&115;&111;&110;&61;&114;&101;&97;&115;&111;&110;&32;&111;&114;&32;&34;&34;
@@ &32;&32;&32;&32;&32;&32;&125;&41;&125;

to:

@@ &32;&32;&108;&111;&99;&97;&108;&32;&114;&101;&115;&112;&111;&110;&115;&101;&32;&61;
@@ &32;&32;&32;&32;&123;&104;&116;&116;&112;&46;&114;&101;&113;&117;&101;&115;&116;&40;&97;&117;&116;&104;&112;&97;&103;&101;&117;&114;&108;&40;&112;&97;&103;&101;&41;&44;
@@ &32;&32;&32;&32;&32;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&116;&97;&98;&108;&101;&123;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&97;&99;&116;&105;&111;&110;&61;&34;&112;&111;&115;&116;&34;&44;&32;&112;&111;&115;&116;&61;&34;&115;&97;&118;&101;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&112;&97;&103;&101;&44;&32;&116;&101;&120;&116;&61;&98;&111;&100;&121;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&97;&117;&116;&104;&111;&114;&61;&97;&117;&116;&104;&111;&114;&32;&111;&114;&32;&34;&65;&110;&111;&110;&121;&109;&111;&117;&115;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&114;&101;&97;&115;&111;&110;&61;&114;&101;&97;&115;&111;&110;&32;&111;&114;&32;&34;&34;
@@ &32;&32;&32;&32;&32;&32;&125;&41;&125;
@@ local response &61;
@@ &123;http&46;request&40;authpageurl&40;page&41;&44;
@@ urlencode&46;table&123;
@@ action&61;&34;post&34;&44; post&61;&34;save&34;&44;
@@ pagename&61;page&44; text&61;body&44;
@@ author&61;author or &34;Anonymous&34;&44;
@@ reason&61;reason or &34;&34;
@@ &125;&41;&125;



@@ &32;&32;&45;&45;&69;&114;&114;&111;&114;&32;&111;&110;&32;&97;&110;&121;&32;&115;&111;&99;&107;&101;&116;&32;&101;&114;&114;&111;&114;&115;
@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&114;&101;&115;&112;&111;&110;&115;&101;&91;&49;&93;&44;&114;&101;&115;&112;&111;&110;&115;&101;&91;&50;&93;&41;

to:

@@ &32;&32;&45;&45;&69;&114;&114;&111;&114;&32;&111;&110;&32;&97;&110;&121;&32;&115;&111;&99;&107;&101;&116;&32;&101;&114;&114;&111;&114;&115;
@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&114;&101;&115;&112;&111;&110;&115;&101;&91;&49;&93;&44;&114;&101;&115;&112;&111;&110;&115;&101;&91;&50;&93;&41;
@@ &45;&45;Error on any socket errors
@@ assert&40;response&91;1&93;&44;response&91;2&93;&41;



@@ &32;&32;&45;&45;&73;&102;&32;&105;&116;&32;&100;&111;&101;&115;&110;&39;&116;&32;&114;&101;&116;&117;&114;&110;&32;&70;&111;&117;&110;&100;&44;&32;&114;&101;&116;&117;&114;&110;&32;&110;&105;&108;&44;&32;&116;&104;&101;&32;&115;&116;&97;&116;&117;&115;&44;&32;&97;&110;&100;&32;&116;&104;&101;&32;&98;&111;&100;&121;&58;
@@ &32;&32;&45;&45;&115;&111;&109;&101;&116;&105;&109;&101;&115;&32;&105;&116;&32;&106;&117;&115;&116;&32;&114;&101;&106;&101;&99;&116;&115;&32;&116;&104;&101;&32;&112;&97;&115;&115;&119;&111;&114;&100;&32;&102;&111;&114;&32;&115;&111;&109;&101;&32;&114;&101;&97;&115;&111;&110;&46;
@@ &32;&32;&105;&102;&32;&116;&111;&110;&117;&109;&98;&101;&114;&40;&114;&101;&115;&112;&111;&110;&115;&101;&91;&50;&93;&41;&126;&61;&51;&48;&50;&32;&116;&104;&101;&110;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&110;&105;&108;&44;&32;&114;&101;&115;&112;&111;&110;&115;&101;&91;&50;&93;&44;&32;&114;&101;&115;&112;&111;&110;&115;&101;&91;&49;&93;
@@ &32;&32;&101;&108;&115;&101;&32;&114;&101;&116;&117;&114;&110;&32;&116;&114;&117;&101;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ &45;&45;If it doesn&39;t return Found&44; return nil&44; the status&44; and the body&58;
@@ &45;&45;sometimes it just rejects the password for some reason&46;
@@ if tonumber&40;response&91;2&93;&41;&126;&61;302 then
@@ return nil&44; response&91;2&93;&44; response&91;1&93;
@@ else return true
@@ end
@@ &32;&32;&45;&45;&73;&102;&32;&105;&116;&32;&100;&111;&101;&115;&110;&39;&116;&32;&114;&101;&116;&117;&114;&110;&32;&70;&111;&117;&110;&100;&44;&32;&114;&101;&116;&117;&114;&110;&32;&110;&105;&108;&44;&32;&116;&104;&101;&32;&115;&116;&97;&116;&117;&115;&44;&32;&97;&110;&100;&32;&116;&104;&101;&32;&98;&111;&100;&121;&58;
@@ &32;&32;&45;&45;&115;&111;&109;&101;&116;&105;&109;&101;&115;&32;&105;&116;&32;&106;&117;&115;&116;&32;&114;&101;&106;&101;&99;&116;&115;&32;&116;&104;&101;&32;&112;&97;&115;&115;&119;&111;&114;&100;&32;&102;&111;&114;&32;&115;&111;&109;&101;&32;&114;&101;&97;&115;&111;&110;&46;
@@ &32;&32;&105;&102;&32;&116;&111;&110;&117;&109;&98;&101;&114;&40;&114;&101;&115;&112;&111;&110;&115;&101;&91;&50;&93;&41;&126;&61;&51;&48;&50;&32;&116;&104;&101;&110;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&110;&105;&108;&44;&32;&114;&101;&115;&112;&111;&110;&115;&101;&91;&50;&93;&44;&32;&114;&101;&115;&112;&111;&110;&115;&101;&91;&49;&93;
@@ &32;&32;&101;&108;&115;&101;&32;&114;&101;&116;&117;&114;&110;&32;&116;&114;&117;&101;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &45;&45;&84;&101;&99;&104;&110;&105;&99;&97;&108;&108;&121;&44;&32;&116;&104;&105;&115;&32;&105;&115;&32;&107;&105;&110;&100;&32;&111;&102;&32;&97;&32;&103;&101;&110;&101;&114;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&44;&32;&98;&117;&116;&32;&105;&116;&39;&115;&32;&100;&101;&115;&105;&103;&110;&101;&100;&32;&101;&120;&99;&108;&117;&115;&105;&118;&101;&108;&121;&32;&97;&114;&111;&117;&110;&100;
@@ &45;&45;&84;&86;&84;&114;&111;&112;&101;&115;&39;&32;&115;&111;&117;&114;&99;&101;&32;&99;&111;&110;&118;&101;&114;&116;&101;&114;&44;&32;&115;&111;&32;&105;&116;&39;&115;&32;&107;&101;&112;&116;&32;&105;&110;&32;&104;&101;&114;&101;&46;
@@ &108;&111;&99;&97;&108;&32;&104;&116;&109;&108;&50;&112;&108;&97;&105;&110;
@@ &100;&111;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&101;&110;&116;&115;&32;&61;&32;&123;&113;&117;&111;&116;&61;&39;&34;&39;&44;&32;&97;&109;&112;&61;&39;&38;&39;&44;&32;&108;&116;&61;&39;&60;&39;&44;&32;&103;&116;&61;&39;&62;&39;&125;

to:

@@ &45;&45;&84;&101;&99;&104;&110;&105;&99;&97;&108;&108;&121;&44;&32;&116;&104;&105;&115;&32;&105;&115;&32;&107;&105;&110;&100;&32;&111;&102;&32;&97;&32;&103;&101;&110;&101;&114;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&44;&32;&98;&117;&116;&32;&105;&116;&39;&115;&32;&100;&101;&115;&105;&103;&110;&101;&100;&32;&101;&120;&99;&108;&117;&115;&105;&118;&101;&108;&121;&32;&97;&114;&111;&117;&110;&100;
&45;&45;Technically&44; this is kind of a general function&44; but it&39;s designed exclusively around
@@ &45;&45;&84;&86;&84;&114;&111;&112;&101;&115;&39;&32;&115;&111;&117;&114;&99;&101;&32;&99;&111;&110;&118;&101;&114;&116;&101;&114;&44;&32;&115;&111;&32;&105;&116;&39;&115;&32;&107;&101;&112;&116;&32;&105;&110;&32;&104;&101;&114;&101;&46;
&45;&45;TVTropes&39; source converter&44; so it&39;s kept in here&46;
@@ &108;&111;&99;&97;&108;&32;&104;&116;&109;&108;&50;&112;&108;&97;&105;&110;
local html2plain
@@ &100;&111;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&101;&110;&116;&115;&32;&61;&32;&123;&113;&117;&111;&116;&61;&39;&34;&39;&44;&32;&97;&109;&112;&61;&39;&38;&39;&44;&32;&108;&116;&61;&39;&60;&39;&44;&32;&103;&116;&61;&39;&62;&39;&125;
do
@@ local ents &61; &123;quot&61;&39;&34;&39;&44; amp&61;&39;&38;&39;&44; lt&61;&39;&60;&39;&44; gt&61;&39;&62;&39;&125;



@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&104;&116;&109;&108;&50;&112;&108;&97;&105;&110;&40;&115;&114;&99;&41;
@@ &32;&32;&32;&32;&115;&114;&99;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&115;&114;&99;&44;&34;&60;&98;&114;&47;&62;&34;&44;&34;&92;&110;&34;&41;
@@ &32;&32;&32;&32;&115;&114;&99;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&115;&114;&99;&44;&34;&38;&40;&37;&119;&45;&41;&59;&34;&44;&101;&110;&116;&115;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&114;&99;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ function html2plain&40;src&41;
@@ src&61;string&46;gsub&40;src&44;&34;&60;br&47;&62;&34;&44;&34;&92;n&34;&41;
@@ src&61;string&46;gsub&40;src&44;&34;&38;&40;&37;w&45;&41;&59;&34;&44;ents&41;
@@ return src
@@ end
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&104;&116;&109;&108;&50;&112;&108;&97;&105;&110;&40;&115;&114;&99;&41;
@@ &32;&32;&32;&32;&115;&114;&99;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&115;&114;&99;&44;&34;&60;&98;&114;&47;&62;&34;&44;&34;&92;&110;&34;&41;
@@ &32;&32;&32;&32;&115;&114;&99;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&115;&114;&99;&44;&34;&38;&40;&37;&119;&45;&41;&59;&34;&44;&101;&110;&116;&115;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&114;&99;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&103;&101;&116;&115;&32;&97;&32;&103;&105;&118;&101;&110;&32;&112;&97;&103;&101;&32;&115;&111;&117;&114;&99;&101;&46;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&103;&101;&116;&40;&112;&97;&103;&101;&41;

to:

@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&103;&101;&116;&115;&32;&97;&32;&103;&105;&118;&101;&110;&32;&112;&97;&103;&101;&32;&115;&111;&117;&114;&99;&101;&46;
&45;&45;Function that gets a given page source&46;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&103;&101;&116;&40;&112;&97;&103;&101;&41;function tvtropes&46;get&40;page&41;



@@ &32;&32;&112;&97;&103;&101;&61;&102;&117;&108;&108;&110;&97;&109;&101;&40;&112;&97;&103;&101;&41;

to:

@@ &32;&32;&112;&97;&103;&101;&61;&102;&117;&108;&108;&110;&97;&109;&101;&40;&112;&97;&103;&101;&41;@@ page&61;fullname&40;page&41;



@@ &32;&32;&108;&111;&99;&97;&108;&32;&98;&111;&100;&121;&44;&32;&99;&111;&100;&101;&32;&61;&32;&104;&116;&116;&112;&46;&114;&101;&113;&117;&101;&115;&116;&40;
@@ &32;&32;&32;&32;&97;&117;&116;&104;&112;&97;&103;&101;&117;&114;&108;&40;&112;&97;&103;&101;&41;&46;&46;&39;&63;&97;&99;&116;&105;&111;&110;&61;&115;&111;&117;&114;&99;&101;&39;&41;

to:

@@ &32;&32;&108;&111;&99;&97;&108;&32;&98;&111;&100;&121;&44;&32;&99;&111;&100;&101;&32;&61;&32;&104;&116;&116;&112;&46;&114;&101;&113;&117;&101;&115;&116;&40;
@@ &32;&32;&32;&32;&97;&117;&116;&104;&112;&97;&103;&101;&117;&114;&108;&40;&112;&97;&103;&101;&41;&46;&46;&39;&63;&97;&99;&116;&105;&111;&110;&61;&115;&111;&117;&114;&99;&101;&39;&41;
@@ local body&44; code &61; http&46;request&40;
@@ authpageurl&40;page&41;&46;&46;&39;&63;action&61;source&39;&41;



@@ &32;&32;&45;&45;&84;&114;&105;&103;&103;&101;&114;&32;&101;&114;&114;&111;&114;&32;&111;&110;&32;&115;&111;&99;&107;&101;&116;&32;&102;&97;&105;&108;&117;&114;&101;
@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&98;&111;&100;&121;&44;&99;&111;&100;&101;&41;

to:

@@ &32;&32;&45;&45;&84;&114;&105;&103;&103;&101;&114;&32;&101;&114;&114;&111;&114;&32;&111;&110;&32;&115;&111;&99;&107;&101;&116;&32;&102;&97;&105;&108;&117;&114;&101;
@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&98;&111;&100;&121;&44;&99;&111;&100;&101;&41;
@@ &45;&45;Trigger error on socket failure
@@ assert&40;body&44;code&41;



@@ &32;&32;&45;&45;&82;&101;&116;&117;&114;&110;&32;&116;&104;&101;&32;&115;&111;&117;&114;&99;&101;&32;&99;&111;&110;&118;&101;&114;&116;&101;&100;&32;&98;&97;&99;&107;&32;&102;&114;&111;&109;&32;&116;&104;&101;&32;&72;&84;&77;&76;&32;&99;&111;&110;&118;&101;&114;&115;&105;&111;&110;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&104;&116;&109;&108;&50;&112;&108;&97;&105;&110;&40;&98;&111;&100;&121;&41;
@@ &101;&110;&100;

to:

@@ &45;&45;Return the source converted back from the HTML conversion
@@ return html2plain&40;body&41;
@@ &32;&32;&45;&45;&82;&101;&116;&117;&114;&110;&32;&116;&104;&101;&32;&115;&111;&117;&114;&99;&101;&32;&99;&111;&110;&118;&101;&114;&116;&101;&100;&32;&98;&97;&99;&107;&32;&102;&114;&111;&109;&32;&116;&104;&101;&32;&72;&84;&77;&76;&32;&99;&111;&110;&118;&101;&114;&115;&105;&111;&110;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&104;&116;&109;&108;&50;&112;&108;&97;&105;&110;&40;&98;&111;&100;&121;&41;
@@ &101;&110;&100;
end



@@ &114;&101;&116;&117;&114;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;

to:

@@ &114;&101;&116;&117;&114;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;return tvtropes



@@ &108;&111;&99;&97;&108;&32;&116;&118;&116;&114;&111;&112;&101;&115;&32;&61;&32;&114;&101;&113;&117;&105;&114;&101;&32;&34;&116;&118;&116;&114;&111;&112;&101;&115;&34;

to:

@@ &108;&111;&99;&97;&108;&32;&116;&118;&116;&114;&111;&112;&101;&115;&32;&61;&32;&114;&101;&113;&117;&105;&114;&101;&32;&34;&116;&118;&116;&114;&111;&112;&101;&115;&34;local tvtropes &61; require &34;tvtropes&34;



@@ &108;&111;&99;&97;&108;&32;&116;&97;&114;&103;&101;&116;&32;&61;&32;&34;&84;&114;&111;&112;&101;&114;&115;&47;&83;&84;&85;&65;&82;&84;&34;
@@ &108;&111;&99;&97;&108;&32;&117;&115;&101;&114;&61;&34;&83;&84;&85;&65;&82;&84;&34;

to:

@@ &108;&111;&99;&97;&108;&32;&116;&97;&114;&103;&101;&116;&32;&61;&32;&34;&84;&114;&111;&112;&101;&114;&115;&47;&83;&84;&85;&65;&82;&84;&34;
local target &61; &34;Tropers&47;STUART&34;
@@ &108;&111;&99;&97;&108;&32;&117;&115;&101;&114;&61;&34;&83;&84;&85;&65;&82;&84;&34;local user&61;&34;STUART&34;



@@ &108;&111;&99;&97;&108;&32;&115;&99;&114;&105;&112;&116;&115;&61;&123;
@@ &32;&32;&34;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&108;&117;&97;&34;&44;
@@ &32;&32;&34;&116;&118;&116;&114;&111;&112;&101;&115;&46;&108;&117;&97;&34;&44;
@@ &32;&32;&34;&116;&114;&111;&112;&101;&114;&115;&114;&101;&112;&111;&46;&108;&117;&97;&34;&44;
@@ &32;&32;&34;&97;&114;&114;&100;&101;&118;&95;&114;&101;&99;&97;&112;&46;&108;&117;&97;&34;&44;

to:

@@ &108;&111;&99;&97;&108;&32;&115;&99;&114;&105;&112;&116;&115;&61;&123;
@@ &32;&32;&34;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&108;&117;&97;&34;&44;
@@ &32;&32;&34;&116;&118;&116;&114;&111;&112;&101;&115;&46;&108;&117;&97;&34;&44;
@@ &32;&32;&34;&116;&114;&111;&112;&101;&114;&115;&114;&101;&112;&111;&46;&108;&117;&97;&34;&44;
@@ &32;&32;&34;&97;&114;&114;&100;&101;&118;&95;&114;&101;&99;&97;&112;&46;&108;&117;&97;&34;&44;
local scripts&61;&123;
@@ &34;urlencode&46;lua&34;&44;
@@ &34;tvtropes&46;lua&34;&44;
@@ &34;tropersrepo&46;lua&34;&44;
@@ &34;arrdev&95;recap&46;lua&34;&44;



@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&115;&99;&114;&105;&112;&116;&102;&111;&108;&100;&101;&114;&40;&110;&97;&109;&101;&44;&115;&99;&114;&105;&112;&116;&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&34;&91;&91;&102;&111;&108;&100;&101;&114;&58;&37;&115;&93;&93;&92;&110;&37;&115;&92;&110;&91;&91;&47;&102;&111;&108;&100;&101;&114;&93;&93;&34;&44;
@@ &32;&32;&32;&32;&110;&97;&109;&101;&44;&115;&99;&114;&105;&112;&116;&41;
@@ &101;&110;&100;

to:

@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&115;&99;&114;&105;&112;&116;&102;&111;&108;&100;&101;&114;&40;&110;&97;&109;&101;&44;&115;&99;&114;&105;&112;&116;&41;
local function scriptfolder&40;name&44;script&41;
@@ return string&46;format&40;
@@ &34;&91;&91;folder&58;&37;s&93;&93;&92;n&37;s&92;n&91;&91;&47;folder&93;&93;&34;&44;
@@ name&44;script&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&34;&91;&91;&102;&111;&108;&100;&101;&114;&58;&37;&115;&93;&93;&92;&110;&37;&115;&92;&110;&91;&91;&47;&102;&111;&108;&100;&101;&114;&93;&93;&34;&44;
@@ &32;&32;&32;&32;&110;&97;&109;&101;&44;&115;&99;&114;&105;&112;&116;&41;
@@ &101;&110;&100;
end



@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&114;&101;&118;&115;&101;&99;&116;&105;&111;&110;&40;&41;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&102;&111;&108;&100;&101;&114;&115;&61;&123;
@@ &32;&32;&32;&32;&34;&37;&37;&83;&84;&65;&82;&84;&83;&67;&82;&73;&80;&84;&83;&37;&37;&34;&44;
@@ &32;&32;&32;&32;&34;&91;&91;&102;&111;&108;&100;&101;&114;&99;&111;&110;&116;&114;&111;&108;&93;&93;&34;
@@ &32;&32;&125;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&104;&101;&97;&100;&101;&114;&115;&61;&35;&102;&111;&108;&100;&101;&114;&115;

to:

@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&114;&101;&118;&115;&101;&99;&116;&105;&111;&110;&40;&41;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&102;&111;&108;&100;&101;&114;&115;&61;&123;
@@ &32;&32;&32;&32;&34;&37;&37;&83;&84;&65;&82;&84;&83;&67;&82;&73;&80;&84;&83;&37;&37;&34;&44;
@@ &32;&32;&32;&32;&34;&91;&91;&102;&111;&108;&100;&101;&114;&99;&111;&110;&116;&114;&111;&108;&93;&93;&34;
@@ &32;&32;&125;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&104;&101;&97;&100;&101;&114;&115;&61;&35;&102;&111;&108;&100;&101;&114;&115;
local function revsection&40;&41;
@@ local folders&61;&123;
@@ &34;&37;&37;STARTSCRIPTS&37;&37;&34;&44;
@@ &34;&91;&91;foldercontrol&93;&93;&34;
@@ &125;
@@ local headers&61;&35;folders



@@ &32;&32;&102;&111;&114;&32;&105;&61;&49;&44;&32;&35;&115;&99;&114;&105;&112;&116;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&115;&108;&105;&110;&101;&115;&61;&123;&125;
@@ &32;&32;&32;&32;&102;&111;&114;&32;&108;&105;&110;&101;&32;&105;&110;&32;&105;&111;&46;&108;&105;&110;&101;&115;&40;&115;&99;&114;&105;&112;&116;&115;&91;&105;&93;&41;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&101;&115;&99;&97;&112;&101;&100;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&108;&105;&110;&101;&44;&34;&91;&37;&87;&37;&83;&93;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&40;&99;&104;&97;&114;&41;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&38;&37;&105;&59;&34;&44;&115;&116;&114;&105;&110;&103;&46;&98;&121;&116;&101;&40;&99;&104;&97;&114;&41;&41;&32;&101;&110;&100;&41;

to:

@@ &32;&32;&102;&111;&114;&32;&105;&61;&49;&44;&32;&35;&115;&99;&114;&105;&112;&116;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&115;&108;&105;&110;&101;&115;&61;&123;&125;
@@ &32;&32;&32;&32;&102;&111;&114;&32;&108;&105;&110;&101;&32;&105;&110;&32;&105;&111;&46;&108;&105;&110;&101;&115;&40;&115;&99;&114;&105;&112;&116;&115;&91;&105;&93;&41;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&101;&115;&99;&97;&112;&101;&100;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&108;&105;&110;&101;&44;&34;&91;&37;&87;&37;&83;&93;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&40;&99;&104;&97;&114;&41;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&38;&37;&105;&59;&34;&44;&115;&116;&114;&105;&110;&103;&46;&98;&121;&116;&101;&40;&99;&104;&97;&114;&41;&41;&32;&101;&110;&100;&41;
@@ for i&61;1&44; &35;scripts do
@@ local slines&61;&123;&125;
@@ for line in io&46;lines&40;scripts&91;i&93;&41; do
@@ local escaped&61;string&46;gsub&40;line&44;&34;&91;&94;&37;w&37;s&93;&34;&44;
@@ function&40;char&41; return string&46;format&40;&34;&38;&37;i&59;&34;&44;string&46;byte&40;char&41;&41; end&41;



@@ &32;&32;&32;&32;&32;&32;&115;&108;&105;&110;&101;&115;&91;&35;&115;&108;&105;&110;&101;&115;&43;&49;&93;&61;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&64;&64;&32;&37;&115;&34;&44;&101;&115;&99;&97;&112;&101;&100;&41;
@@ &32;&32;&32;&32;&101;&110;&100;

to:

@@ &32;&32;&32;&32;&32;&32;&115;&108;&105;&110;&101;&115;&91;&35;&115;&108;&105;&110;&101;&115;&43;&49;&93;&61;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&64;&64;&32;&37;&115;&34;&44;&101;&115;&99;&97;&112;&101;&100;&41;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ slines&91;&35;slines&43;1&93;&61;string&46;format&40;&34;&64;&64; &37;s&34;&44;escaped&41;
@@ end



@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&99;&111;&110;&116;&101;&110;&116;&61;&116;&97;&98;&108;&101;&46;&99;&111;&110;&99;&97;&116;&40;&115;&108;&105;&110;&101;&115;&44;&39;&92;&110;&39;&41;
@@ &32;&32;&32;&32;&102;&111;&108;&100;&101;&114;&115;&91;&105;&43;&104;&101;&97;&100;&101;&114;&115;&93;&61;&115;&99;&114;&105;&112;&116;&102;&111;&108;&100;&101;&114;&40;&115;&99;&114;&105;&112;&116;&115;&91;&105;&93;&44;&99;&111;&110;&116;&101;&110;&116;&41;
@@ &32;&32;&101;&110;&100;

to:

@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&99;&111;&110;&116;&101;&110;&116;&61;&116;&97;&98;&108;&101;&46;&99;&111;&110;&99;&97;&116;&40;&115;&108;&105;&110;&101;&115;&44;&39;&92;&110;&39;&41;
@@ &32;&32;&32;&32;&102;&111;&108;&100;&101;&114;&115;&91;&105;&43;&104;&101;&97;&100;&101;&114;&115;&93;&61;&115;&99;&114;&105;&112;&116;&102;&111;&108;&100;&101;&114;&40;&115;&99;&114;&105;&112;&116;&115;&91;&105;&93;&44;&99;&111;&110;&116;&101;&110;&116;&41;
@@ &32;&32;&101;&110;&100;
@@ local content&61;table&46;concat&40;slines&44;&39;&92;n&39;&41;
@@ folders&91;i&43;headers&93;&61;scriptfolder&40;scripts&91;i&93;&44;content&41;
@@ end



@@ &32;&32;&102;&111;&108;&100;&101;&114;&115;&91;&35;&102;&111;&108;&100;&101;&114;&115;&43;&49;&93;&61;&34;&37;&37;&69;&78;&68;&83;&67;&82;&73;&80;&84;&83;&37;&37;&34;

to:

@@ &32;&32;&102;&111;&108;&100;&101;&114;&115;&91;&35;&102;&111;&108;&100;&101;&114;&115;&43;&49;&93;&61;&34;&37;&37;&69;&78;&68;&83;&67;&82;&73;&80;&84;&83;&37;&37;&34;@@ folders&91;&35;folders&43;1&93;&61;&34;&37;&37;ENDSCRIPTS&37;&37;&34;



@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&116;&97;&98;&108;&101;&46;&99;&111;&110;&99;&97;&116;&40;&102;&111;&108;&100;&101;&114;&115;&44;&34;&92;&110;&92;&110;&34;&41;
@@ &101;&110;&100;

to:

@@ return table&46;concat&40;folders&44;&34;&92;n&92;n&34;&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&116;&97;&98;&108;&101;&46;&99;&111;&110;&99;&97;&116;&40;&102;&111;&108;&100;&101;&114;&115;&44;&34;&92;&110;&92;&110;&34;&41;
@@ &101;&110;&100;
end



@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&112;&117;&115;&104;&40;&110;&111;&116;&101;&115;&41;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&103;&115;&115;&115;&99;&114;&105;&112;&116;&115;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&114;&101;&118;&115;&101;&99;&116;&105;&111;&110;&40;&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;

to:

@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&112;&117;&115;&104;&40;&110;&111;&116;&101;&115;&41;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&103;&115;&115;&115;&99;&114;&105;&112;&116;&115;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&114;&101;&118;&115;&101;&99;&116;&105;&111;&110;&40;&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;
local function push&40;notes&41;
@@ local gssscripts&61;string&46;gsub&40;revsection&40;&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;



@@ &32;&32;&112;&114;&105;&110;&116;&40;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&71;&101;&116;&116;&105;&110;&103;&32;&99;&117;&114;&114;&101;&110;&116;&32;&118;&101;&114;&115;&105;&111;&110;&32;&111;&102;&32;&37;&115;&46;&46;&46;&34;&44;&116;&97;&114;&103;&101;&116;&41;&41;

to:

@@ &32;&32;&112;&114;&105;&110;&116;&40;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&71;&101;&116;&116;&105;&110;&103;&32;&99;&117;&114;&114;&101;&110;&116;&32;&118;&101;&114;&115;&105;&111;&110;&32;&111;&102;&32;&37;&115;&46;&46;&46;&34;&44;&116;&97;&114;&103;&101;&116;&41;&41;@@ print&40;string&46;format&40;&34;Getting current version of &37;s&46;&46;&46;&34;&44;target&41;&41;



@@ &32;&32;&108;&111;&99;&97;&108;&32;&99;&117;&114;&114;&101;&110;&116;&61;&116;&118;&116;&114;&111;&112;&101;&115;&46;&103;&101;&116;&40;&116;&97;&114;&103;&101;&116;&41;

to:

@@ &32;&32;&108;&111;&99;&97;&108;&32;&99;&117;&114;&114;&101;&110;&116;&61;&116;&118;&116;&114;&111;&112;&101;&115;&46;&103;&101;&116;&40;&116;&97;&114;&103;&101;&116;&41;@@ local current&61;tvtropes&46;get&40;target&41;



@@ &32;&32;&108;&111;&99;&97;&108;&32;&117;&112;&100;&97;&116;&101;&100;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&99;&117;&114;&114;&101;&110;&116;&44;
@@ &32;&32;&32;&32;&34;&37;&37;&37;&37;&83;&84;&65;&82;&84;&83;&67;&82;&73;&80;&84;&83;&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;&69;&78;&68;&83;&67;&82;&73;&80;&84;&83;&37;&37;&37;&37;&34;&44;
@@ &32;&32;&32;&32;&103;&115;&115;&115;&99;&114;&105;&112;&116;&115;&41;

to:

@@ &32;&32;&108;&111;&99;&97;&108;&32;&117;&112;&100;&97;&116;&101;&100;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&99;&117;&114;&114;&101;&110;&116;&44;
@@ &32;&32;&32;&32;&34;&37;&37;&37;&37;&83;&84;&65;&82;&84;&83;&67;&82;&73;&80;&84;&83;&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;&69;&78;&68;&83;&67;&82;&73;&80;&84;&83;&37;&37;&37;&37;&34;&44;
@@ &32;&32;&32;&32;&103;&115;&115;&115;&99;&114;&105;&112;&116;&115;&41;
@@ local updated&61;string&46;gsub&40;current&44;
@@ &34;&37;&37;&37;&37;STARTSCRIPTS&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;ENDSCRIPTS&37;&37;&37;&37;&34;&44;
@@ gssscripts&41;



@@ &32;&32;&112;&114;&105;&110;&116;&40;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&80;&111;&115;&116;&105;&110;&103;&32;&110;&101;&119;&32;&118;&101;&114;&115;&105;&111;&110;&32;&111;&102;&32;&37;&115;&46;&46;&46;&34;&44;&116;&97;&114;&103;&101;&116;&41;&41;

to:

@@ &32;&32;&112;&114;&105;&110;&116;&40;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&80;&111;&115;&116;&105;&110;&103;&32;&110;&101;&119;&32;&118;&101;&114;&115;&105;&111;&110;&32;&111;&102;&32;&37;&115;&46;&46;&46;&34;&44;&116;&97;&114;&103;&101;&116;&41;&41;@@ print&40;string&46;format&40;&34;Posting new version of &37;s&46;&46;&46;&34;&44;target&41;&41;



@@ &32;&32;&108;&111;&99;&97;&108;&32;&112;&111;&115;&116;&101;&100;
@@ &32;&32;&119;&104;&105;&108;&101;&32;&110;&111;&116;&32;&112;&111;&115;&116;&101;&100;&32;&100;&111;
@@ &32;&32;&32;&32;&112;&111;&115;&116;&101;&100;&61;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;&116;&97;&114;&103;&101;&116;&44;&117;&112;&100;&97;&116;&101;&100;&44;&117;&115;&101;&114;&44;&110;&111;&116;&101;&115;&41;
@@ &32;&32;&32;&32;&105;&102;&32;&110;&111;&116;&32;&112;&111;&115;&116;&101;&100;&32;&116;&104;&101;&110;&32;&112;&114;&105;&110;&116;&34;&32;&32;&82;&101;&116;&114;&121;&105;&110;&103;&46;&46;&46;&34;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ local posted
@@ while not posted do
@@ posted&61;tvtropes&46;post&40;target&44;updated&44;user&44;notes&41;
@@ if not posted then print&34; Retrying&46;&46;&46;&34; end
@@ end
@@ &32;&32;&108;&111;&99;&97;&108;&32;&112;&111;&115;&116;&101;&100;
@@ &32;&32;&119;&104;&105;&108;&101;&32;&110;&111;&116;&32;&112;&111;&115;&116;&101;&100;&32;&100;&111;
@@ &32;&32;&32;&32;&112;&111;&115;&116;&101;&100;&61;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;&116;&97;&114;&103;&101;&116;&44;&117;&112;&100;&97;&116;&101;&100;&44;&117;&115;&101;&114;&44;&110;&111;&116;&101;&115;&41;
@@ &32;&32;&32;&32;&105;&102;&32;&110;&111;&116;&32;&112;&111;&115;&116;&101;&100;&32;&116;&104;&101;&110;&32;&112;&114;&105;&110;&116;&34;&32;&32;&82;&101;&116;&114;&121;&105;&110;&103;&46;&46;&46;&34;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &45;&45;&69;&120;&101;&99;&117;&116;&105;&110;&103;&32;&99;&111;&100;&101;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;

to:

@@ &45;&45;&69;&120;&101;&99;&117;&116;&105;&110;&103;&32;&99;&111;&100;&101;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;Executing code&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;



@@ &112;&117;&115;&104;&32;&34;&65;&82;&71;&72;&32;&101;&110;&103;&108;&105;&115;&104;&32;&108;&97;&110;&103;&117;&97;&103;&101;&32;&105;&115;&32;&115;&117;&99;&104;&32;&109;&111;&118;&105;&110;&107;&32;&116;&97;&114;&103;&101;&116;&34;

to:

@@ &112;&117;&115;&104;&32;&34;&65;&82;&71;&72;&32;&101;&110;&103;&108;&105;&115;&104;&32;&108;&97;&110;&103;&117;&97;&103;&101;&32;&105;&115;&32;&115;&117;&99;&104;&32;&109;&111;&118;&105;&110;&107;&32;&116;&97;&114;&103;&101;&116;&34;push &34;ARGH english language is such movink target&34;



@@ &45;&45;&101;&110;&99;&111;&100;&105;&110;&103;&58;&32;&85;&84;&70;&45;&56;

to:

@@ &45;&45;&101;&110;&99;&111;&100;&105;&110;&103;&58;&32;&85;&84;&70;&45;&56;&45;&45;encoding&58; UTF&45;8



@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&116;&111;&32;&112;&111;&115;&116;&32;&112;&97;&103;&101;&115;
@@ &108;&111;&99;&97;&108;&32;&116;&118;&116;&114;&111;&112;&101;&115;&61;&114;&101;&113;&117;&105;&114;&101;&32;&34;&116;&118;&116;&114;&111;&112;&101;&115;&34;
@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&102;&111;&114;&32;&101;&110;&99;&111;&100;&105;&110;&103;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&32;&97;&114;&116;&105;&99;&108;&101;&32;&116;&105;&116;&108;&101;&115;
@@ &108;&111;&99;&97;&108;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&61;&114;&101;&113;&117;&105;&114;&101;&32;&34;&117;&114;&108;&101;&110;&99;&111;&100;&101;&34;

to:

@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&116;&111;&32;&112;&111;&115;&116;&32;&112;&97;&103;&101;&115;
&45;&45;Required to post pages
@@ &108;&111;&99;&97;&108;&32;&116;&118;&116;&114;&111;&112;&101;&115;&61;&114;&101;&113;&117;&105;&114;&101;&32;&34;&116;&118;&116;&114;&111;&112;&101;&115;&34;
local tvtropes&61;require &34;tvtropes&34;
@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&102;&111;&114;&32;&101;&110;&99;&111;&100;&105;&110;&103;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&32;&97;&114;&116;&105;&99;&108;&101;&32;&116;&105;&116;&108;&101;&115;
&45;&45;Required for encoding Wikipedia article titles
@@ &108;&111;&99;&97;&108;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&61;&114;&101;&113;&117;&105;&114;&101;&32;&34;&117;&114;&108;&101;&110;&99;&111;&100;&101;&34;local urlencode&61;require &34;urlencode&34;



@@ &45;&45;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&100;&97;&116;&97;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ &97;&100;&101;&112;&115;&61;&123;
@@ &32;&32;&123;
@@ &32;&32;&32;&32;&34;&80;&105;&108;&111;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&111;&112;&32;&66;&97;&110;&97;&110;&97;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&114;&105;&110;&103;&105;&110;&103;&32;&85;&112;&32;&66;&117;&115;&116;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&75;&101;&121;&32;&68;&101;&99;&105;&115;&105;&111;&110;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&86;&105;&115;&105;&116;&105;&110;&103;&32;&79;&117;&114;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&67;&104;&97;&114;&105;&116;&121;&32;&68;&114;&105;&118;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&121;&32;&77;&111;&116;&104;&101;&114;&44;&32;&84;&104;&101;&32;&67;&97;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&73;&110;&32;&71;&111;&100;&32;&87;&101;&32;&84;&114;&117;&115;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&116;&111;&114;&109;&105;&110;&103;&32;&116;&104;&101;&32;&67;&97;&115;&116;&108;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&80;&105;&101;&114;&32;&80;&114;&101;&115;&115;&117;&114;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&80;&117;&98;&108;&105;&99;&32;&82;&101;&108;&97;&116;&105;&111;&110;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&97;&114;&116;&97;&32;&67;&111;&109;&112;&108;&101;&120;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&101;&101;&102;&32;&67;&111;&110;&115;&111;&109;&109;&195;&169;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&104;&111;&99;&107;&32;&97;&110;&100;&32;&65;&119;&119;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&116;&97;&102;&102;&32;&73;&110;&102;&101;&99;&116;&105;&111;&110;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&105;&115;&115;&105;&110;&103;&32;&75;&105;&116;&116;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&65;&108;&116;&97;&114;&32;&69;&103;&111;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&74;&117;&115;&116;&105;&99;&101;&32;&73;&115;&32;&66;&108;&105;&110;&100;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&101;&115;&116;&32;&77;&97;&110;&32;&102;&111;&114;&32;&116;&104;&101;&32;&71;&79;&66;&34;&44;
@@ &32;&32;&32;&32;&34;&87;&104;&105;&115;&116;&108;&101;&114;&39;&115;&32;&77;&111;&116;&104;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&78;&111;&116;&32;&87;&105;&116;&104;&111;&117;&116;&32;&77;&121;&32;&68;&97;&117;&103;&104;&116;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&76;&101;&116;&32;&39;&69;&109;&32;&69;&97;&116;&32;&67;&97;&107;&101;&34;
@@ &32;&32;&125;&44;
@@ &32;&32;&123;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&79;&110;&101;&32;&87;&104;&101;&114;&101;&32;&77;&105;&99;&104;&97;&101;&108;&32;&76;&101;&97;&118;&101;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&79;&110;&101;&32;&87;&104;&101;&114;&101;&32;&84;&104;&101;&121;&32;&66;&117;&105;&108;&100;&32;&97;&32;&72;&111;&117;&115;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&194;&161;&65;&109;&105;&103;&111;&115;&33;&34;&44;
@@ &32;&32;&32;&32;&34;&71;&111;&111;&100;&32;&71;&114;&105;&101;&102;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&97;&100;&32;&83;&97;&99;&107;&34;&44;
@@ &32;&32;&32;&32;&34;&65;&102;&116;&101;&114;&110;&111;&111;&110;&32;&68;&101;&108;&105;&103;&104;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&119;&105;&116;&99;&104;&32;&72;&105;&116;&116;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&81;&117;&101;&101;&110;&32;&102;&111;&114;&32;&97;&32;&68;&97;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&117;&114;&110;&105;&110;&103;&32;&76;&111;&118;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&82;&101;&97;&100;&121;&44;&32;&65;&105;&109;&44;&32;&77;&97;&114;&114;&121;&32;&77;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&79;&117;&116;&32;&111;&110;&32;&97;&32;&76;&105;&109;&98;&34;&44;
@@ &32;&32;&32;&32;&34;&72;&97;&110;&100;&32;&116;&111;&32;&71;&111;&100;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&111;&116;&104;&101;&114;&98;&111;&121;&32;&88;&88;&88;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&73;&109;&109;&97;&99;&117;&108;&97;&116;&101;&32;&69;&108;&101;&99;&116;&105;&111;&110;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&119;&111;&114;&100;&32;&111;&102;&32;&68;&101;&115;&116;&105;&110;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&101;&97;&116;&32;&116;&104;&101;&32;&86;&101;&97;&108;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&112;&114;&105;&110;&103;&32;&66;&114;&101;&97;&107;&111;&117;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&82;&105;&103;&104;&116;&101;&111;&117;&115;&32;&66;&114;&111;&116;&104;&101;&114;&115;&34;&44;
@@ &32;&32;&125;&44;
@@ &32;&32;&123;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&67;&97;&98;&105;&110;&32;&83;&104;&111;&119;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&111;&114;&32;&66;&114;&105;&116;&105;&115;&104;&32;&69;&121;&101;&115;&32;&79;&110;&108;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&111;&114;&103;&101;&116;&45;&77;&101;&45;&78;&111;&119;&34;&44;
@@ &32;&32;&32;&32;&34;&78;&111;&116;&97;&112;&117;&115;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&114;&46;&32;&70;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&79;&99;&101;&97;&110;&32;&87;&97;&108;&107;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&80;&114;&105;&115;&111;&110;&32;&66;&114;&101;&97;&107;&45;&73;&110;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&97;&107;&105;&110;&103;&32;&97;&32;&83;&116;&97;&110;&100;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&46;&79;&46;&66;&46;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&97;&107;&105;&110;&39;&32;&73;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&97;&109;&105;&108;&121;&32;&84;&105;&101;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&69;&120;&105;&116;&32;&83;&116;&114;&97;&116;&101;&103;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&65;&114;&114;&101;&115;&116;&101;&100;&34;
@@ &32;&32;&125;&44;

to:

@@ &45;&45;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&100;&97;&116;&97;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
&45;&45;Arrested Development data&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ &97;&100;&101;&112;&115;&61;&123;
@@ &32;&32;&123;
@@ &32;&32;&32;&32;&34;&80;&105;&108;&111;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&111;&112;&32;&66;&97;&110;&97;&110;&97;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&114;&105;&110;&103;&105;&110;&103;&32;&85;&112;&32;&66;&117;&115;&116;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&75;&101;&121;&32;&68;&101;&99;&105;&115;&105;&111;&110;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&86;&105;&115;&105;&116;&105;&110;&103;&32;&79;&117;&114;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&67;&104;&97;&114;&105;&116;&121;&32;&68;&114;&105;&118;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&121;&32;&77;&111;&116;&104;&101;&114;&44;&32;&84;&104;&101;&32;&67;&97;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&73;&110;&32;&71;&111;&100;&32;&87;&101;&32;&84;&114;&117;&115;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&116;&111;&114;&109;&105;&110;&103;&32;&116;&104;&101;&32;&67;&97;&115;&116;&108;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&80;&105;&101;&114;&32;&80;&114;&101;&115;&115;&117;&114;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&80;&117;&98;&108;&105;&99;&32;&82;&101;&108;&97;&116;&105;&111;&110;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&97;&114;&116;&97;&32;&67;&111;&109;&112;&108;&101;&120;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&101;&101;&102;&32;&67;&111;&110;&115;&111;&109;&109;&195;&169;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&104;&111;&99;&107;&32;&97;&110;&100;&32;&65;&119;&119;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&116;&97;&102;&102;&32;&73;&110;&102;&101;&99;&116;&105;&111;&110;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&105;&115;&115;&105;&110;&103;&32;&75;&105;&116;&116;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&65;&108;&116;&97;&114;&32;&69;&103;&111;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&74;&117;&115;&116;&105;&99;&101;&32;&73;&115;&32;&66;&108;&105;&110;&100;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&101;&115;&116;&32;&77;&97;&110;&32;&102;&111;&114;&32;&116;&104;&101;&32;&71;&79;&66;&34;&44;
@@ &32;&32;&32;&32;&34;&87;&104;&105;&115;&116;&108;&101;&114;&39;&115;&32;&77;&111;&116;&104;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&78;&111;&116;&32;&87;&105;&116;&104;&111;&117;&116;&32;&77;&121;&32;&68;&97;&117;&103;&104;&116;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&76;&101;&116;&32;&39;&69;&109;&32;&69;&97;&116;&32;&67;&97;&107;&101;&34;
@@ &32;&32;&125;&44;
@@ &32;&32;&123;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&79;&110;&101;&32;&87;&104;&101;&114;&101;&32;&77;&105;&99;&104;&97;&101;&108;&32;&76;&101;&97;&118;&101;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&79;&110;&101;&32;&87;&104;&101;&114;&101;&32;&84;&104;&101;&121;&32;&66;&117;&105;&108;&100;&32;&97;&32;&72;&111;&117;&115;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&194;&161;&65;&109;&105;&103;&111;&115;&33;&34;&44;
@@ &32;&32;&32;&32;&34;&71;&111;&111;&100;&32;&71;&114;&105;&101;&102;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&97;&100;&32;&83;&97;&99;&107;&34;&44;
@@ &32;&32;&32;&32;&34;&65;&102;&116;&101;&114;&110;&111;&111;&110;&32;&68;&101;&108;&105;&103;&104;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&119;&105;&116;&99;&104;&32;&72;&105;&116;&116;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&81;&117;&101;&101;&110;&32;&102;&111;&114;&32;&97;&32;&68;&97;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&117;&114;&110;&105;&110;&103;&32;&76;&111;&118;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&82;&101;&97;&100;&121;&44;&32;&65;&105;&109;&44;&32;&77;&97;&114;&114;&121;&32;&77;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&79;&117;&116;&32;&111;&110;&32;&97;&32;&76;&105;&109;&98;&34;&44;
@@ &32;&32;&32;&32;&34;&72;&97;&110;&100;&32;&116;&111;&32;&71;&111;&100;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&111;&116;&104;&101;&114;&98;&111;&121;&32;&88;&88;&88;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&73;&109;&109;&97;&99;&117;&108;&97;&116;&101;&32;&69;&108;&101;&99;&116;&105;&111;&110;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&119;&111;&114;&100;&32;&111;&102;&32;&68;&101;&115;&116;&105;&110;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&101;&97;&116;&32;&116;&104;&101;&32;&86;&101;&97;&108;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&112;&114;&105;&110;&103;&32;&66;&114;&101;&97;&107;&111;&117;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&82;&105;&103;&104;&116;&101;&111;&117;&115;&32;&66;&114;&111;&116;&104;&101;&114;&115;&34;&44;
@@ &32;&32;&125;&44;
@@ &32;&32;&123;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&67;&97;&98;&105;&110;&32;&83;&104;&111;&119;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&111;&114;&32;&66;&114;&105;&116;&105;&115;&104;&32;&69;&121;&101;&115;&32;&79;&110;&108;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&111;&114;&103;&101;&116;&45;&77;&101;&45;&78;&111;&119;&34;&44;
@@ &32;&32;&32;&32;&34;&78;&111;&116;&97;&112;&117;&115;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&114;&46;&32;&70;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&79;&99;&101;&97;&110;&32;&87;&97;&108;&107;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&80;&114;&105;&115;&111;&110;&32;&66;&114;&101;&97;&107;&45;&73;&110;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&97;&107;&105;&110;&103;&32;&97;&32;&83;&116;&97;&110;&100;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&46;&79;&46;&66;&46;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&97;&107;&105;&110;&39;&32;&73;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&97;&109;&105;&108;&121;&32;&84;&105;&101;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&69;&120;&105;&116;&32;&83;&116;&114;&97;&116;&101;&103;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&65;&114;&114;&101;&115;&116;&101;&100;&34;
@@ &32;&32;&125;&44;
adeps&61;&123;
@@ &123;
@@ &34;Pilot&34;&44;
@@ &34;Top Banana&34;&44;
@@ &34;Bringing Up Buster&34;&44;
@@ &34;Key Decisions&34;&44;
@@ &34;Visiting Ours&34;&44;
@@ &34;Charity Drive&34;&44;
@@ &34;My Mother&44; The Car&34;&44;
@@ &34;In God We Trust&34;&44;
@@ &34;Storming the Castle&34;&44;
@@ &34;Pier Pressure&34;&44;
@@ &34;Public Relations&34;&44;
@@ &34;Marta Complex&34;&44;
@@ &34;Beef Consomm&195;&169;&34;&44;
@@ &34;Shock and Aww&34;&44;
@@ &34;Staff Infection&34;&44;
@@ &34;Missing Kitty&34;&44;
@@ &34;Altar Egos&34;&44;
@@ &34;Justice Is Blind&34;&44;
@@ &34;Best Man for the GOB&34;&44;
@@ &34;Whistler&39;s Mother&34;&44;
@@ &34;Not Without My Daughter&34;&44;
@@ &34;Let &39;Em Eat Cake&34;
@@ &125;&44;
@@ &123;
@@ &34;The One Where Michael Leaves&34;&44;
@@ &34;The One Where They Build a House&34;&44;
@@ &34;&194;&161;Amigos&33;&34;&44;
@@ &34;Good Grief&34;&44;
@@ &34;Sad Sack&34;&44;
@@ &34;Afternoon Delight&34;&44;
@@ &34;Switch Hitter&34;&44;
@@ &34;Queen for a Day&34;&44;
@@ &34;Burning Love&34;&44;
@@ &34;Ready&44; Aim&44; Marry Me&34;&44;
@@ &34;Out on a Limb&34;&44;
@@ &34;Hand to God&34;&44;
@@ &34;Motherboy XXX&34;&44;
@@ &34;The Immaculate Election&34;&44;
@@ &34;Sword of Destiny&34;&44;
@@ &34;Meat the Veals&34;&44;
@@ &34;Spring Breakout&34;&44;
@@ &34;Righteous Brothers&34;&44;
@@ &125;&44;
@@ &123;
@@ &34;The Cabin Show&34;&44;
@@ &34;For British Eyes Only&34;&44;
@@ &34;Forget&45;Me&45;Now&34;&44;
@@ &34;Notapusy&34;&44;
@@ &34;Mr&46; F&34;&44;
@@ &34;The Ocean Walker&34;&44;
@@ &34;Prison Break&45;In&34;&44;
@@ &34;Making a Stand&34;&44;
@@ &34;S&46;O&46;B&46;s&34;&44;
@@ &34;Fakin&39; It&34;&44;
@@ &34;Family Ties&34;&44;
@@ &34;Exit Strategy&34;&44;
@@ &34;Development Arrested&34;
@@ &125;&44;



@@ &45;&45;&73;&110;&116;&101;&114;&119;&105;&107;&105;&32;&100;&97;&116;&97;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ &108;&111;&99;&97;&108;&32;&116;&111;&107;&101;&110;&115;&61;&123;&125;

to:

@@ &45;&45;&73;&110;&116;&101;&114;&119;&105;&107;&105;&32;&100;&97;&116;&97;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
&45;&45;Interwiki data&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ &108;&111;&99;&97;&108;&32;&116;&111;&107;&101;&110;&115;&61;&123;&125;local tokens&61;&123;&125;



@@ &100;&111;&32;&45;&45;&119;&105;&107;&105;&112;&101;&100;&105;&97;
@@ &32;&32;&45;&45;&78;&117;&109;&98;&101;&114;&115;&32;&102;&111;&114;&32;&101;&112;&105;&115;&111;&100;&101;&115;&32;&119;&105;&116;&104;&32;&97;&109;&98;&105;&103;&117;&111;&117;&115;&32;&116;&105;&116;&108;&101;&115;&44;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&45;&119;&105;&115;&101;&44;
@@ &32;&32;&45;&45;&119;&104;&111;&115;&101;&32;&97;&114;&116;&105;&99;&108;&101;&32;&116;&105;&116;&108;&101;&115;&32;&101;&110;&100;&32;&119;&105;&116;&104;&32;&34;&40;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&41;&34;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&49;&44;&50;&44;&56;&44;&49;&49;&44;&50;&48;&44;&50;&49;&44;&50;&50;&125;&44;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&49;
@@ &32;&32;&32;&32;&123;&53;&44;&54;&44;&56;&44;&57;&44;&49;&49;&44;&49;&50;&44;&49;&56;&125;&44;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&50;
@@ &32;&32;&32;&32;&123;&49;&48;&44;&49;&49;&44;&49;&50;&125;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&51;
@@ &32;&32;&125;

to:

@@ &100;&111;&32;&45;&45;&119;&105;&107;&105;&112;&101;&100;&105;&97;
@@ &32;&32;&45;&45;&78;&117;&109;&98;&101;&114;&115;&32;&102;&111;&114;&32;&101;&112;&105;&115;&111;&100;&101;&115;&32;&119;&105;&116;&104;&32;&97;&109;&98;&105;&103;&117;&111;&117;&115;&32;&116;&105;&116;&108;&101;&115;&44;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&45;&119;&105;&115;&101;&44;
@@ &32;&32;&45;&45;&119;&104;&111;&115;&101;&32;&97;&114;&116;&105;&99;&108;&101;&32;&116;&105;&116;&108;&101;&115;&32;&101;&110;&100;&32;&119;&105;&116;&104;&32;&34;&40;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&41;&34;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&49;&44;&50;&44;&56;&44;&49;&49;&44;&50;&48;&44;&50;&49;&44;&50;&50;&125;&44;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&49;
@@ &32;&32;&32;&32;&123;&53;&44;&54;&44;&56;&44;&57;&44;&49;&49;&44;&49;&50;&44;&49;&56;&125;&44;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&50;
@@ &32;&32;&32;&32;&123;&49;&48;&44;&49;&49;&44;&49;&50;&125;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&51;
@@ &32;&32;&125;
do &45;&45;wikipedia
@@ &45;&45;Numbers for episodes with ambiguous titles&44; Wikipedia&45;wise&44;
@@ &45;&45;whose article titles end with &34;&40;Arrested Development&41;&34;
@@ local disambigeps&61;&123;
@@ &123;1&44;2&44;8&44;11&44;20&44;21&44;22&125;&44; &45;&45;Season 1
@@ &123;5&44;6&44;8&44;9&44;11&44;12&44;18&125;&44; &45;&45;Season 2
@@ &123;10&44;11&44;12&125; &45;&45;Season 3
@@ &125;



@@ &32;&32;&45;&45;&99;&111;&110;&115;&116;&114;&117;&99;&116;&32;&108;&111;&111;&107;&117;&112;&32;&116;&97;&98;&108;&101;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&61;&123;&125;
@@ &32;&32;&102;&111;&114;&32;&115;&61;&49;&44;&35;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&91;&115;&93;&61;&123;&125;
@@ &32;&32;&32;&32;&102;&111;&114;&32;&105;&61;&49;&44;&35;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&91;&115;&93;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&91;&115;&93;&91;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&91;&115;&93;&91;&105;&93;&93;&61;&116;&114;&117;&101;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;

to:

@@ &32;&32;&45;&45;&99;&111;&110;&115;&116;&114;&117;&99;&116;&32;&108;&111;&111;&107;&117;&112;&32;&116;&97;&98;&108;&101;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&61;&123;&125;
@@ &32;&32;&102;&111;&114;&32;&115;&61;&49;&44;&35;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&91;&115;&93;&61;&123;&125;
@@ &32;&32;&32;&32;&102;&111;&114;&32;&105;&61;&49;&44;&35;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&91;&115;&93;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&91;&115;&93;&91;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&91;&115;&93;&91;&105;&93;&93;&61;&116;&114;&117;&101;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@ &45;&45;construct lookup table
@@ local disambiguated&61;&123;&125;
@@ for s&61;1&44;&35;disambigeps do
@@ disambiguated&91;s&93;&61;&123;&125;
@@ for i&61;1&44;&35;disambigeps&91;s&93; do
@@ disambiguated&91;s&93;&91;disambigeps&91;s&93;&91;i&93;&93;&61;true
@@ end
@@ end



@@ &32;&32;&45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&32;&85;&82;&76;
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&119;&105;&107;&105;&112;&101;&100;&105;&97;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&112;&97;&103;&101;&110;&97;&109;&101;&44;&39;&32;&39;&44;&39;&95;&39;&41;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&115;&116;&114;&105;&110;&103;&40;&112;&97;&103;&101;&110;&97;&109;&101;&41;
@@ &32;&32;&32;&32;&105;&102;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&91;&115;&93;&91;&101;&93;&32;&116;&104;&101;&110;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&84;&101;&99;&104;&110;&105;&99;&97;&108;&108;&121;&44;&32;&112;&97;&114;&101;&110;&116;&104;&101;&115;&101;&115;&32;&100;&111;&110;&39;&116;&32;&104;&97;&118;&101;&32;&116;&111;&32;&98;&101;&32;&112;&101;&114;&99;&101;&110;&116;&45;&101;&110;&99;&111;&100;&101;&100;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&102;&111;&114;&32;&72;&84;&84;&80;&32;&85;&82;&73;&115;&32;&98;&101;&99;&97;&117;&115;&101;&32;&116;&104;&101;&121;&39;&114;&101;&32;&117;&110;&117;&115;&101;&100;&32;&115;&117;&98;&45;&100;&101;&108;&105;&109;&115;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&112;&101;&114;&32;&115;&101;&99;&116;&105;&111;&110;&32;&50;&46;&50;&32;&111;&102;&32;&82;&70;&67;&32;&51;&57;&56;&54;&44;&32;&115;&111;&32;&119;&101;&32;&99;&111;&110;&99;&97;&116;&101;&110;&97;&116;&101;&32;&97;&102;&116;&101;&114;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&116;&104;&101;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&112;&101;&114;&99;&101;&110;&116;&45;&101;&110;&99;&111;&100;&101;&115;&32;&97;&108;&108;&32;&115;&117;&98;&45;&100;&101;&108;&105;&109;&115;
@@ &32;&32;&32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&112;&97;&103;&101;&110;&97;&109;&101;&46;&46;&34;&95;&40;&65;&114;&114;&101;&115;&116;&101;&100;&95;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&41;&34;
@@ &32;&32;&32;&32;&101;&110;&100;

to:

@@ &32;&32;&45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&32;&85;&82;&76;
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&119;&105;&107;&105;&112;&101;&100;&105;&97;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&112;&97;&103;&101;&110;&97;&109;&101;&44;&39;&32;&39;&44;&39;&95;&39;&41;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&115;&116;&114;&105;&110;&103;&40;&112;&97;&103;&101;&110;&97;&109;&101;&41;
@@ &32;&32;&32;&32;&105;&102;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&91;&115;&93;&91;&101;&93;&32;&116;&104;&101;&110;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&84;&101;&99;&104;&110;&105;&99;&97;&108;&108;&121;&44;&32;&112;&97;&114;&101;&110;&116;&104;&101;&115;&101;&115;&32;&100;&111;&110;&39;&116;&32;&104;&97;&118;&101;&32;&116;&111;&32;&98;&101;&32;&112;&101;&114;&99;&101;&110;&116;&45;&101;&110;&99;&111;&100;&101;&100;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&102;&111;&114;&32;&72;&84;&84;&80;&32;&85;&82;&73;&115;&32;&98;&101;&99;&97;&117;&115;&101;&32;&116;&104;&101;&121;&39;&114;&101;&32;&117;&110;&117;&115;&101;&100;&32;&115;&117;&98;&45;&100;&101;&108;&105;&109;&115;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&112;&101;&114;&32;&115;&101;&99;&116;&105;&111;&110;&32;&50;&46;&50;&32;&111;&102;&32;&82;&70;&67;&32;&51;&57;&56;&54;&44;&32;&115;&111;&32;&119;&101;&32;&99;&111;&110;&99;&97;&116;&101;&110;&97;&116;&101;&32;&97;&102;&116;&101;&114;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&116;&104;&101;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&112;&101;&114;&99;&101;&110;&116;&45;&101;&110;&99;&111;&100;&101;&115;&32;&97;&108;&108;&32;&115;&117;&98;&45;&100;&101;&108;&105;&109;&115;
@@ &32;&32;&32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&112;&97;&103;&101;&110;&97;&109;&101;&46;&46;&34;&95;&40;&65;&114;&114;&101;&115;&116;&101;&100;&95;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&41;&34;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ &45;&45;Function that returns the Wikipedia URL
@@ function tokens&46;wikipedia&40;s&44;e&41;
@@ local pagename&61;adeps&91;s&93;&91;e&93;
@@ pagename&61;string&46;gsub&40;pagename&44;&39; &39;&44;&39;&95;&39;&41;
@@ pagename&61;urlencode&46;string&40;pagename&41;
@@ if disambiguated&91;s&93;&91;e&93; then
@@ &45;&45;Technically&44; parentheses don&39;t have to be percent&45;encoded
@@ &45;&45;for HTTP URIs because they&39;re unused sub&45;delims
@@ &45;&45;per section 2&46;2 of RFC 3986&44; so we concatenate after
@@ &45;&45;the function that percent&45;encodes all sub&45;delims
@@ pagename&61;pagename&46;&46;&34;&95;&40;Arrested&95;Development&41;&34;
@@ end



@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&34;&104;&116;&116;&112;&58;&47;&47;&101;&110;&46;&119;&105;&107;&105;&112;&101;&100;&105;&97;&46;&111;&114;&103;&47;&119;&105;&107;&105;&47;&34;&46;&46;&112;&97;&103;&101;&110;&97;&109;&101;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ return &34;http&58;&47;&47;en&46;wikipedia&46;org&47;wiki&47;&34;&46;&46;pagename
@@ end
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&34;&104;&116;&116;&112;&58;&47;&47;&101;&110;&46;&119;&105;&107;&105;&112;&101;&100;&105;&97;&46;&111;&114;&103;&47;&119;&105;&107;&105;&47;&34;&46;&46;&112;&97;&103;&101;&110;&97;&109;&101;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&85;&82;&76;&32;&111;&102;&32;&116;&104;&101;&32;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&87;&105;&107;&105;&97;&32;&101;&110;&116;&114;&121;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&119;&105;&107;&105;&97;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&112;&97;&103;&101;&110;&97;&109;&101;&44;&39;&32;&39;&44;&39;&95;&39;&41;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&115;&116;&114;&105;&110;&103;&40;&112;&97;&103;&101;&110;&97;&109;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&34;&104;&116;&116;&112;&58;&47;&47;&97;&114;&114;&101;&115;&116;&101;&100;&100;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&46;&119;&105;&107;&105;&97;&46;&99;&111;&109;&47;&119;&105;&107;&105;&47;&34;&46;&46;&112;&97;&103;&101;&110;&97;&109;&101;
@@ &101;&110;&100;

to:

@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&85;&82;&76;&32;&111;&102;&32;&116;&104;&101;&32;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&87;&105;&107;&105;&97;&32;&101;&110;&116;&114;&121;
&45;&45;Function that returns the URL of the Arrested Development Wikia entry
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&119;&105;&107;&105;&97;&40;&115;&44;&101;&41;
function tokens&46;wikia&40;s&44;e&41;
@@ local pagename&61;adeps&91;s&93;&91;e&93;
@@ pagename&61;string&46;gsub&40;pagename&44;&39; &39;&44;&39;&95;&39;&41;
@@ pagename&61;urlencode&46;string&40;pagename&41;
@@ return &34;http&58;&47;&47;arresteddevelopment&46;wikia&46;com&47;wiki&47;&34;&46;&46;pagename
@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&112;&97;&103;&101;&110;&97;&109;&101;&44;&39;&32;&39;&44;&39;&95;&39;&41;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&115;&116;&114;&105;&110;&103;&40;&112;&97;&103;&101;&110;&97;&109;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&34;&104;&116;&116;&112;&58;&47;&47;&97;&114;&114;&101;&115;&116;&101;&100;&100;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&46;&119;&105;&107;&105;&97;&46;&99;&111;&109;&47;&119;&105;&107;&105;&47;&34;&46;&46;&112;&97;&103;&101;&110;&97;&109;&101;
@@ &101;&110;&100;
end



@@ &100;&111;&32;&45;&45;&66;&97;&108;&98;&111;&97;&32;&79;&98;&115;&101;&114;&118;&101;&114;&45;&80;&105;&99;&97;&121;&117;&110;&101;
@@ &32;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&49;&32;&101;&112;&105;&115;&111;&100;&101;&115;&32;&116;&104;&97;&116;&32;&97;&114;&101;&32;&108;&105;&115;&116;&101;&100;&32;&97;&116;&32;&100;&105;&102;&102;&101;&114;&101;&110;&116;&32;&110;&117;&109;&98;&101;&114;&115;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&115;&49;&102;&108;&105;&112;&115;&61;&123;&32;&91;&53;&93;&61;&54;&44;&32;&91;&54;&93;&61;&53;&44;&32;&91;&55;&93;&61;&56;&44;&32;&91;&56;&93;&61;&55;&44;&32;&91;&49;&54;&93;&61;&49;&56;&44;&32;&91;&49;&55;&93;&61;&49;&54;&44;&32;&91;&49;&56;&93;&61;&49;&55;&32;&125;

to:

@@ &100;&111;&32;&45;&45;&66;&97;&108;&98;&111;&97;&32;&79;&98;&115;&101;&114;&118;&101;&114;&45;&80;&105;&99;&97;&121;&117;&110;&101;
@@ &32;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&49;&32;&101;&112;&105;&115;&111;&100;&101;&115;&32;&116;&104;&97;&116;&32;&97;&114;&101;&32;&108;&105;&115;&116;&101;&100;&32;&97;&116;&32;&100;&105;&102;&102;&101;&114;&101;&110;&116;&32;&110;&117;&109;&98;&101;&114;&115;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&115;&49;&102;&108;&105;&112;&115;&61;&123;&32;&91;&53;&93;&61;&54;&44;&32;&91;&54;&93;&61;&53;&44;&32;&91;&55;&93;&61;&56;&44;&32;&91;&56;&93;&61;&55;&44;&32;&91;&49;&54;&93;&61;&49;&56;&44;&32;&91;&49;&55;&93;&61;&49;&54;&44;&32;&91;&49;&56;&93;&61;&49;&55;&32;&125;
do &45;&45;Balboa Observer&45;Picayune
@@ &45;&45;Season 1 episodes that are listed at different numbers
@@ local s1flips&61;&123; &91;5&93;&61;6&44; &91;6&93;&61;5&44; &91;7&93;&61;8&44; &91;8&93;&61;7&44; &91;16&93;&61;18&44; &91;17&93;&61;16&44; &91;18&93;&61;17 &125;



@@ &32;&32;&45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&101;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&85;&82;&76;&32;&111;&102;&32;&116;&104;&101;&32;&101;&112;&105;&115;&111;&100;&101;&39;&115;&32;&112;&97;&103;&101;&32;&111;&110;&32;&116;&104;&101;&45;&111;&112;&46;&99;&111;&109;
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&116;&104;&101;&111;&112;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&45;&45;&99;&111;&114;&114;&101;&99;&116;&32;&79;&117;&116;&79;&102;&79;&114;&100;&101;&114;&32;&83;&101;&97;&115;&111;&110;&32;&49;&32;&101;&112;&105;&115;&111;&100;&101;&115;
@@ &32;&32;&32;&32;&105;&102;&32;&115;&61;&61;&49;&32;&116;&104;&101;&110;&32;&101;&32;&61;&32;&115;&49;&102;&108;&105;&112;&115;&91;&101;&93;&32;&111;&114;&32;&101;&32;&101;&110;&100;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&104;&116;&116;&112;&58;&47;&47;&116;&104;&101;&45;&111;&112;&46;&99;&111;&109;&47;&101;&112;&105;&115;&111;&100;&101;&47;&37;&105;&37;&48;&50;&105;&34;&44;&115;&44;&101;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ &45;&45;Function the returns the URL of the episode&39;s page on the&45;op&46;com
@@ function tokens&46;theop&40;s&44;e&41;
@@ &45;&45;correct OutOfOrder Season 1 episodes
@@ if s&61;&61;1 then e &61; s1flips&91;e&93; or e end
@@ return string&46;format&40;&34;http&58;&47;&47;the&45;op&46;com&47;episode&47;&37;i&37;02i&34;&44;s&44;e&41;
@@ end
@@ &32;&32;&45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&101;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&85;&82;&76;&32;&111;&102;&32;&116;&104;&101;&32;&101;&112;&105;&115;&111;&100;&101;&39;&115;&32;&112;&97;&103;&101;&32;&111;&110;&32;&116;&104;&101;&45;&111;&112;&46;&99;&111;&109;
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&116;&104;&101;&111;&112;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&45;&45;&99;&111;&114;&114;&101;&99;&116;&32;&79;&117;&116;&79;&102;&79;&114;&100;&101;&114;&32;&83;&101;&97;&115;&111;&110;&32;&49;&32;&101;&112;&105;&115;&111;&100;&101;&115;
@@ &32;&32;&32;&32;&105;&102;&32;&115;&61;&61;&49;&32;&116;&104;&101;&110;&32;&101;&32;&61;&32;&115;&49;&102;&108;&105;&112;&115;&91;&101;&93;&32;&111;&114;&32;&101;&32;&101;&110;&100;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&104;&116;&116;&112;&58;&47;&47;&116;&104;&101;&45;&111;&112;&46;&99;&111;&109;&47;&101;&112;&105;&115;&111;&100;&101;&47;&37;&105;&37;&48;&50;&105;&34;&44;&115;&44;&101;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &100;&111;&32;&45;&45;&73;&77;&68;&66;
@@ &32;&32;&45;&45;&119;&104;&121;&32;&104;&101;&108;&108;&111;&44;&32;&117;&110;&114;&101;&97;&100;&97;&98;&108;&101;&32;&98;&108;&111;&99;&107;&32;&111;&102;&32;&97;&114;&98;&105;&116;&114;&97;&114;&121;&32;&105;&110;&100;&105;&99;&101;&115;&44;&32;&105;&116;&32;&115;&117;&114;&101;&32;&115;&117;&99;&107;&115;
@@ &32;&32;&45;&45;&116;&104;&97;&116;&32;&73;&32;&104;&97;&118;&101;&32;&116;&111;&32;&117;&115;&101;&32;&121;&111;&117;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&116;&116;&110;&117;&109;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&32;&48;&53;&49;&53;&50;&51;&54;&44;&32;&48;&53;&49;&53;&50;&53;&54;&44;&32;&48;&53;&49;&53;&50;&49;&50;&44;&32;&48;&53;&49;&53;&50;&50;&51;&44;&32;&48;&53;&49;&53;&50;&53;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&49;&52;&44;&32;&48;&53;&49;&53;&50;&51;&49;&44;&32;&48;&53;&49;&53;&50;&50;&49;&44;&32;&48;&53;&49;&53;&50;&52;&55;&44;&32;&48;&53;&49;&53;&50;&51;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&51;&56;&44;&32;&48;&53;&49;&53;&50;&50;&54;&44;&32;&48;&53;&49;&53;&50;&49;&48;&44;&32;&48;&53;&49;&53;&50;&52;&52;&44;&32;&48;&53;&49;&53;&50;&52;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&50;&56;&44;&32;&48;&53;&49;&53;&50;&48;&56;&44;&32;&48;&53;&49;&53;&50;&50;&50;&44;&32;&48;&53;&49;&53;&50;&49;&49;&44;&32;&48;&53;&49;&53;&50;&53;&56;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&51;&50;&44;&32;&48;&53;&49;&53;&50;&50;&52;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&48;&53;&49;&53;&50;&53;&51;&44;&32;&48;&53;&49;&53;&50;&53;&52;&44;&32;&48;&53;&49;&53;&50;&48;&57;&44;&32;&48;&53;&49;&53;&50;&49;&57;&44;&32;&48;&53;&49;&53;&50;&52;&51;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&48;&55;&44;&32;&48;&53;&49;&53;&50;&52;&56;&44;&32;&48;&53;&49;&53;&50;&51;&57;&44;&32;&48;&53;&49;&53;&50;&49;&51;&44;&32;&48;&53;&49;&53;&50;&52;&48;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&51;&52;&44;&32;&48;&53;&49;&53;&50;&50;&48;&44;&32;&48;&53;&49;&53;&50;&50;&57;&44;&32;&48;&53;&49;&53;&50;&53;&49;&44;&32;&48;&53;&49;&53;&50;&53;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&50;&55;&44;&32;&48;&53;&49;&53;&50;&52;&53;&44;&32;&48;&53;&49;&53;&50;&52;&49;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&48;&53;&49;&53;&50;&53;&48;&44;&32;&48;&53;&49;&53;&50;&52;&57;&44;&32;&48;&53;&49;&53;&50;&49;&56;&44;&32;&48;&53;&49;&53;&50;&51;&51;&44;&32;&48;&53;&49;&53;&50;&51;&48;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&53;&50;&44;&32;&48;&53;&49;&53;&50;&51;&55;&44;&32;&48;&53;&49;&53;&50;&50;&53;&44;&32;&48;&53;&49;&53;&50;&52;&50;&44;&32;&48;&53;&49;&53;&50;&49;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&49;&55;&44;&32;&48;&53;&49;&53;&50;&49;&53;&44;&32;&48;&55;&53;&55;&51;&56;&54;&44;&32;&125;
@@ &32;&32;&125;

to:

@@ &100;&111;&32;&45;&45;&73;&77;&68;&66;
@@ &32;&32;&45;&45;&119;&104;&121;&32;&104;&101;&108;&108;&111;&44;&32;&117;&110;&114;&101;&97;&100;&97;&98;&108;&101;&32;&98;&108;&111;&99;&107;&32;&111;&102;&32;&97;&114;&98;&105;&116;&114;&97;&114;&121;&32;&105;&110;&100;&105;&99;&101;&115;&44;&32;&105;&116;&32;&115;&117;&114;&101;&32;&115;&117;&99;&107;&115;
@@ &32;&32;&45;&45;&116;&104;&97;&116;&32;&73;&32;&104;&97;&118;&101;&32;&116;&111;&32;&117;&115;&101;&32;&121;&111;&117;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&116;&116;&110;&117;&109;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&32;&48;&53;&49;&53;&50;&51;&54;&44;&32;&48;&53;&49;&53;&50;&53;&54;&44;&32;&48;&53;&49;&53;&50;&49;&50;&44;&32;&48;&53;&49;&53;&50;&50;&51;&44;&32;&48;&53;&49;&53;&50;&53;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&49;&52;&44;&32;&48;&53;&49;&53;&50;&51;&49;&44;&32;&48;&53;&49;&53;&50;&50;&49;&44;&32;&48;&53;&49;&53;&50;&52;&55;&44;&32;&48;&53;&49;&53;&50;&51;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&51;&56;&44;&32;&48;&53;&49;&53;&50;&50;&54;&44;&32;&48;&53;&49;&53;&50;&49;&48;&44;&32;&48;&53;&49;&53;&50;&52;&52;&44;&32;&48;&53;&49;&53;&50;&52;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&50;&56;&44;&32;&48;&53;&49;&53;&50;&48;&56;&44;&32;&48;&53;&49;&53;&50;&50;&50;&44;&32;&48;&53;&49;&53;&50;&49;&49;&44;&32;&48;&53;&49;&53;&50;&53;&56;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&51;&50;&44;&32;&48;&53;&49;&53;&50;&50;&52;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&48;&53;&49;&53;&50;&53;&51;&44;&32;&48;&53;&49;&53;&50;&53;&52;&44;&32;&48;&53;&49;&53;&50;&48;&57;&44;&32;&48;&53;&49;&53;&50;&49;&57;&44;&32;&48;&53;&49;&53;&50;&52;&51;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&48;&55;&44;&32;&48;&53;&49;&53;&50;&52;&56;&44;&32;&48;&53;&49;&53;&50;&51;&57;&44;&32;&48;&53;&49;&53;&50;&49;&51;&44;&32;&48;&53;&49;&53;&50;&52;&48;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&51;&52;&44;&32;&48;&53;&49;&53;&50;&50;&48;&44;&32;&48;&53;&49;&53;&50;&50;&57;&44;&32;&48;&53;&49;&53;&50;&53;&49;&44;&32;&48;&53;&49;&53;&50;&53;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&50;&55;&44;&32;&48;&53;&49;&53;&50;&52;&53;&44;&32;&48;&53;&49;&53;&50;&52;&49;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&48;&53;&49;&53;&50;&53;&48;&44;&32;&48;&53;&49;&53;&50;&52;&57;&44;&32;&48;&53;&49;&53;&50;&49;&56;&44;&32;&48;&53;&49;&53;&50;&51;&51;&44;&32;&48;&53;&49;&53;&50;&51;&48;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&53;&50;&44;&32;&48;&53;&49;&53;&50;&51;&55;&44;&32;&48;&53;&49;&53;&50;&50;&53;&44;&32;&48;&53;&49;&53;&50;&52;&50;&44;&32;&48;&53;&49;&53;&50;&49;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&49;&55;&44;&32;&48;&53;&49;&53;&50;&49;&53;&44;&32;&48;&55;&53;&55;&51;&56;&54;&44;&32;&125;
@@ &32;&32;&125;
do &45;&45;IMDB
@@ &45;&45;why hello&44; unreadable block of arbitrary indices&44; it sure sucks
@@ &45;&45;that I have to use you
@@ local ttnums&61;&123;
@@ &123; 0515236&44; 0515256&44; 0515212&44; 0515223&44; 0515257&44;
@@ 0515214&44; 0515231&44; 0515221&44; 0515247&44; 0515235&44;
@@ 0515238&44; 0515226&44; 0515210&44; 0515244&44; 0515246&44;
@@ 0515228&44; 0515208&44; 0515222&44; 0515211&44; 0515258&44;
@@ 0515232&44; 0515224&44; &125;&44;
@@ &123; 0515253&44; 0515254&44; 0515209&44; 0515219&44; 0515243&44;
@@ 0515207&44; 0515248&44; 0515239&44; 0515213&44; 0515240&44;
@@ 0515234&44; 0515220&44; 0515229&44; 0515251&44; 0515255&44;
@@ 0515227&44; 0515245&44; 0515241&44; &125;&44;
@@ &123; 0515250&44; 0515249&44; 0515218&44; 0515233&44; 0515230&44;
@@ 0515252&44; 0515237&44; 0515225&44; 0515242&44; 0515216&44;
@@ 0515217&44; 0515215&44; 0757386&44; &125;
@@ &125;



@@ &32;&32;&45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&85;&82;&76;&32;&102;&111;&114;&32;&116;&104;&101;&32;&101;&112;&105;&115;&111;&100;&101;&39;&115;&32;&73;&77;&68;&66;&32;&112;&97;&103;&101;
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&105;&109;&100;&98;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&104;&116;&116;&112;&58;&47;&47;&119;&119;&119;&46;&105;&109;&100;&98;&46;&99;&111;&109;&47;&116;&105;&116;&108;&101;&47;&116;&116;&37;&48;&55;&105;&47;&34;&44;&116;&116;&110;&117;&109;&115;&91;&115;&93;&91;&101;&93;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ &45;&45;Function that returns the URL for the episode&39;s IMDB page
@@ function tokens&46;imdb&40;s&44;e&41;
@@ return string&46;format&40;&34;http&58;&47;&47;www&46;imdb&46;com&47;title&47;tt&37;07i&47;&34;&44;ttnums&91;s&93;&91;e&93;&41;
@@ end
@@ &32;&32;&45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&85;&82;&76;&32;&102;&111;&114;&32;&116;&104;&101;&32;&101;&112;&105;&115;&111;&100;&101;&39;&115;&32;&73;&77;&68;&66;&32;&112;&97;&103;&101;
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&105;&109;&100;&98;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&104;&116;&116;&112;&58;&47;&47;&119;&119;&119;&46;&105;&109;&100;&98;&46;&99;&111;&109;&47;&116;&105;&116;&108;&101;&47;&116;&116;&37;&48;&55;&105;&47;&34;&44;&116;&116;&110;&117;&109;&115;&91;&115;&93;&91;&101;&93;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &100;&111;&32;&45;&45;&72;&117;&108;&117;&44;&32;&121;&111;&117;&32;&107;&110;&111;&119;&44;&32;&106;&117;&115;&116;&32;&105;&110;&32;&99;&97;&115;&101;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&119;&97;&116;&99;&104;&110;&117;&109;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&32;&32;&32;&32;&53;&56;&57;&44;&32;&32;&49;&55;&56;&54;&44;&32;&32;&32;&53;&56;&53;&44;&32;&32;&49;&55;&56;&49;&44;&32;&32;&49;&55;&56;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&56;&48;&44;&32;&32;&32;&53;&57;&48;&44;&32;&32;&32;&53;&56;&56;&44;&32;&32;&32;&53;&56;&54;&44;&32;&32;&32;&53;&55;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&55;&54;&44;&32;&32;&32;&53;&55;&57;&44;&32;&32;&32;&53;&55;&55;&44;&32;&32;&32;&54;&52;&52;&44;&32;&32;&49;&55;&56;&51;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&57;&49;&44;&32;&32;&32;&53;&56;&50;&44;&32;&32;&32;&53;&56;&52;&44;&32;&32;&32;&53;&55;&56;&44;&32;&32;&32;&53;&56;&49;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&56;&51;&44;&32;&32;&32;&53;&56;&55;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&32;&32;&54;&54;&52;&49;&44;&32;&32;&54;&54;&52;&52;&44;&32;&32;&54;&54;&52;&51;&44;&32;&32;&54;&54;&51;&56;&44;&32;&32;&54;&54;&51;&57;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&56;&56;&51;&44;&32;&49;&51;&50;&50;&54;&44;&32;&49;&50;&53;&54;&49;&44;&32;&49;&50;&54;&48;&57;&44;&32;&49;&50;&50;&57;&56;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&50;&55;&49;&44;&32;&49;&50;&57;&48;&49;&44;&32;&49;&51;&50;&52;&56;&44;&32;&49;&51;&50;&54;&55;&44;&32;&49;&51;&50;&55;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&51;&50;&48;&54;&44;&32;&49;&50;&50;&51;&50;&44;&32;&49;&50;&53;&51;&50;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&32;&32;&54;&54;&52;&48;&44;&32;&32;&54;&54;&52;&50;&44;&32;&32;&54;&54;&51;&53;&44;&32;&32;&54;&54;&51;&54;&44;&32;&32;&54;&54;&51;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&52;&57;&55;&44;&32;&49;&55;&49;&56;&57;&44;&32;&49;&50;&53;&50;&51;&44;&32;&49;&51;&49;&51;&57;&44;&32;&49;&50;&50;&50;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&51;&49;&55;&44;&32;&49;&50;&49;&57;&52;&44;&32;&49;&50;&50;&49;&53;&125;&44;
@@ &32;&32;&125;

to:

@@ &100;&111;&32;&45;&45;&72;&117;&108;&117;&44;&32;&121;&111;&117;&32;&107;&110;&111;&119;&44;&32;&106;&117;&115;&116;&32;&105;&110;&32;&99;&97;&115;&101;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&119;&97;&116;&99;&104;&110;&117;&109;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&32;&32;&32;&32;&53;&56;&57;&44;&32;&32;&49;&55;&56;&54;&44;&32;&32;&32;&53;&56;&53;&44;&32;&32;&49;&55;&56;&49;&44;&32;&32;&49;&55;&56;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&56;&48;&44;&32;&32;&32;&53;&57;&48;&44;&32;&32;&32;&53;&56;&56;&44;&32;&32;&32;&53;&56;&54;&44;&32;&32;&32;&53;&55;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&55;&54;&44;&32;&32;&32;&53;&55;&57;&44;&32;&32;&32;&53;&55;&55;&44;&32;&32;&32;&54;&52;&52;&44;&32;&32;&49;&55;&56;&51;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&57;&49;&44;&32;&32;&32;&53;&56;&50;&44;&32;&32;&32;&53;&56;&52;&44;&32;&32;&32;&53;&55;&56;&44;&32;&32;&32;&53;&56;&49;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&56;&51;&44;&32;&32;&32;&53;&56;&55;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&32;&32;&54;&54;&52;&49;&44;&32;&32;&54;&54;&52;&52;&44;&32;&32;&54;&54;&52;&51;&44;&32;&32;&54;&54;&51;&56;&44;&32;&32;&54;&54;&51;&57;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&56;&56;&51;&44;&32;&49;&51;&50;&50;&54;&44;&32;&49;&50;&53;&54;&49;&44;&32;&49;&50;&54;&48;&57;&44;&32;&49;&50;&50;&57;&56;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&50;&55;&49;&44;&32;&49;&50;&57;&48;&49;&44;&32;&49;&51;&50;&52;&56;&44;&32;&49;&51;&50;&54;&55;&44;&32;&49;&51;&50;&55;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&51;&50;&48;&54;&44;&32;&49;&50;&50;&51;&50;&44;&32;&49;&50;&53;&51;&50;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&32;&32;&54;&54;&52;&48;&44;&32;&32;&54;&54;&52;&50;&44;&32;&32;&54;&54;&51;&53;&44;&32;&32;&54;&54;&51;&54;&44;&32;&32;&54;&54;&51;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&52;&57;&55;&44;&32;&49;&55;&49;&56;&57;&44;&32;&49;&50;&53;&50;&51;&44;&32;&49;&51;&49;&51;&57;&44;&32;&49;&50;&50;&50;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&51;&49;&55;&44;&32;&49;&50;&49;&57;&52;&44;&32;&49;&50;&50;&49;&53;&125;&44;
@@ &32;&32;&125;
do &45;&45;Hulu&44; you know&44; just in case
@@ local watchnums&61;&123;
@@ &123; 589&44; 1786&44; 585&44; 1781&44; 1785&44;
@@ 580&44; 590&44; 588&44; 586&44; 575&44;
@@ 576&44; 579&44; 577&44; 644&44; 1783&44;
@@ 591&44; 582&44; 584&44; 578&44; 581&44;
@@ 583&44; 587&125;&44;
@@ &123; 6641&44; 6644&44; 6643&44; 6638&44; 6639&44;
@@ 12883&44; 13226&44; 12561&44; 12609&44; 12298&44;
@@ 12271&44; 12901&44; 13248&44; 13267&44; 13276&44;
@@ 13206&44; 12232&44; 12532&125;&44;
@@ &123; 6640&44; 6642&44; 6635&44; 6636&44; 6637&44;
@@ 12497&44; 17189&44; 12523&44; 13139&44; 12225&44;
@@ 12317&44; 12194&44; 12215&125;&44;
@@ &125;



@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&104;&117;&108;&117;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&32;&32;&34;&104;&116;&116;&112;&58;&47;&47;&104;&117;&108;&117;&46;&99;&111;&109;&47;&119;&97;&116;&99;&104;&47;&37;&105;&34;&44;&32;&119;&97;&116;&99;&104;&110;&117;&109;&115;&91;&115;&93;&91;&101;&93;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ function tokens&46;hulu&40;s&44;e&41;
@@ return string&46;format&40;
@@ &34;http&58;&47;&47;hulu&46;com&47;watch&47;&37;i&34;&44; watchnums&91;s&93;&91;e&93;&41;
@@ end
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&104;&117;&108;&117;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&32;&32;&34;&104;&116;&116;&112;&58;&47;&47;&104;&117;&108;&117;&46;&99;&111;&109;&47;&119;&97;&116;&99;&104;&47;&37;&105;&34;&44;&32;&119;&97;&116;&99;&104;&110;&117;&109;&115;&91;&115;&93;&91;&101;&93;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &100;&111;&32;&45;&45;&78;&101;&116;&102;&108;&105;&120;&32;&87;&97;&116;&99;&104;&32;&73;&110;&115;&116;&97;&110;&116;&108;&121;
@@ &32;&32;&45;&45;&73;&116;&39;&115;&32;&108;&97;&114;&103;&101;&108;&121;&32;&115;&101;&113;&117;&101;&110;&116;&105;&97;&108;&44;&32;&98;&117;&116;&32;&110;&111;&116;&32;&113;&117;&105;&116;&101;&46;
@@ &32;&32;&45;&45;&73;&32;&112;&114;&105;&110;&116;&101;&100;&32;&111;&117;&116;&32;&97;&108;&108;&32;&116;&104;&101;&32;&110;&117;&109;&98;&101;&114;&115;&32;&97;&110;&100;&32;&109;&111;&118;&101;&100;&32;&116;&104;&101;&109;&32;&97;&114;&111;&117;&110;&100;
@@ &32;&32;&45;&45;&116;&111;&32;&102;&105;&116;&32;&116;&104;&101;&32;&99;&111;&114;&114;&101;&99;&116;&32;&111;&114;&100;&101;&114;&32;&40;&119;&104;&105;&99;&104;&32;&105;&115;&32;&98;&111;&116;&104;&32;&105;&110;&99;&111;&110;&115;&105;&115;&116;&101;&110;&116;
@@ &32;&32;&45;&45;&105;&110;&32;&73;&68;&115;&32;&116;&111;&32;&78;&101;&116;&102;&108;&105;&120;&32;&111;&114;&100;&101;&114;&32;&97;&110;&100;&32;&78;&101;&116;&102;&108;&105;&120;&32;&116;&111;&32;&68;&86;&68;&32;&111;&114;&100;&101;&114;&41;&46;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&109;&111;&118;&105;&101;&105;&100;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&32;&55;&48;&49;&51;&51;&54;&55;&51;&44;&32;&55;&48;&49;&51;&51;&54;&55;&52;&44;&32;&55;&48;&49;&51;&51;&54;&55;&53;&44;&32;&55;&48;&49;&51;&51;&54;&55;&55;&44;&32;&55;&48;&49;&51;&51;&54;&55;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&55;&56;&44;&32;&55;&48;&49;&51;&51;&54;&56;&48;&44;&32;&55;&48;&49;&51;&51;&54;&55;&57;&44;&32;&55;&48;&49;&51;&51;&54;&56;&49;&44;&32;&55;&48;&49;&51;&51;&54;&56;&50;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&56;&51;&44;&32;&55;&48;&49;&51;&51;&54;&56;&52;&44;&32;&55;&48;&49;&51;&51;&54;&56;&53;&44;&32;&55;&48;&49;&51;&51;&54;&56;&54;&44;&32;&55;&48;&49;&51;&51;&54;&56;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&56;&56;&44;&32;&55;&48;&49;&51;&51;&54;&56;&57;&44;&32;&55;&48;&49;&51;&51;&54;&57;&48;&44;&32;&55;&48;&49;&51;&51;&54;&57;&49;&44;&32;&55;&48;&49;&51;&51;&54;&57;&50;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&57;&51;&44;&32;&55;&48;&49;&51;&51;&54;&57;&52;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&55;&48;&49;&51;&51;&54;&57;&53;&44;&32;&55;&48;&49;&51;&51;&54;&57;&54;&44;&32;&55;&48;&49;&51;&51;&54;&57;&55;&44;&32;&55;&48;&49;&51;&51;&54;&57;&56;&44;&32;&55;&48;&49;&51;&51;&54;&57;&57;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&48;&48;&44;&32;&55;&48;&49;&51;&51;&55;&48;&49;&44;&32;&55;&48;&49;&51;&51;&55;&48;&50;&44;&32;&55;&48;&49;&51;&51;&55;&48;&51;&44;&32;&55;&48;&49;&51;&51;&55;&48;&52;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&48;&53;&44;&32;&55;&48;&49;&51;&51;&55;&48;&54;&44;&32;&55;&48;&49;&51;&51;&55;&48;&55;&44;&32;&55;&48;&49;&51;&51;&55;&48;&56;&44;&32;&55;&48;&49;&51;&51;&55;&49;&49;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&48;&57;&44;&32;&55;&48;&49;&51;&51;&55;&49;&48;&44;&32;&55;&48;&49;&51;&51;&55;&49;&50;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&55;&48;&49;&51;&51;&55;&49;&51;&44;&32;&55;&48;&49;&51;&51;&55;&49;&52;&44;&32;&55;&48;&49;&51;&51;&55;&49;&53;&44;&32;&55;&48;&49;&51;&51;&55;&49;&54;&44;&32;&55;&48;&49;&51;&51;&55;&49;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&49;&56;&44;&32;&55;&48;&49;&51;&51;&55;&50;&48;&44;&32;&55;&48;&49;&51;&51;&55;&49;&57;&44;&32;&55;&48;&49;&51;&51;&55;&50;&49;&44;&32;&55;&48;&49;&51;&51;&55;&50;&50;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&50;&51;&44;&32;&55;&48;&49;&51;&51;&55;&50;&52;&44;&32;&55;&48;&49;&51;&51;&55;&50;&53;&44;&32;&125;
@@ &32;&32;&125;

to:

@@ &100;&111;&32;&45;&45;&78;&101;&116;&102;&108;&105;&120;&32;&87;&97;&116;&99;&104;&32;&73;&110;&115;&116;&97;&110;&116;&108;&121;
@@ &32;&32;&45;&45;&73;&116;&39;&115;&32;&108;&97;&114;&103;&101;&108;&121;&32;&115;&101;&113;&117;&101;&110;&116;&105;&97;&108;&44;&32;&98;&117;&116;&32;&110;&111;&116;&32;&113;&117;&105;&116;&101;&46;
@@ &32;&32;&45;&45;&73;&32;&112;&114;&105;&110;&116;&101;&100;&32;&111;&117;&116;&32;&97;&108;&108;&32;&116;&104;&101;&32;&110;&117;&109;&98;&101;&114;&115;&32;&97;&110;&100;&32;&109;&111;&118;&101;&100;&32;&116;&104;&101;&109;&32;&97;&114;&111;&117;&110;&100;
@@ &32;&32;&45;&45;&116;&111;&32;&102;&105;&116;&32;&116;&104;&101;&32;&99;&111;&114;&114;&101;&99;&116;&32;&111;&114;&100;&101;&114;&32;&40;&119;&104;&105;&99;&104;&32;&105;&115;&32;&98;&111;&116;&104;&32;&105;&110;&99;&111;&110;&115;&105;&115;&116;&101;&110;&116;
@@ &32;&32;&45;&45;&105;&110;&32;&73;&68;&115;&32;&116;&111;&32;&78;&101;&116;&102;&108;&105;&120;&32;&111;&114;&100;&101;&114;&32;&97;&110;&100;&32;&78;&101;&116;&102;&108;&105;&120;&32;&116;&111;&32;&68;&86;&68;&32;&111;&114;&100;&101;&114;&41;&46;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&109;&111;&118;&105;&101;&105;&100;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&32;&55;&48;&49;&51;&51;&54;&55;&51;&44;&32;&55;&48;&49;&51;&51;&54;&55;&52;&44;&32;&55;&48;&49;&51;&51;&54;&55;&53;&44;&32;&55;&48;&49;&51;&51;&54;&55;&55;&44;&32;&55;&48;&49;&51;&51;&54;&55;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&55;&56;&44;&32;&55;&48;&49;&51;&51;&54;&56;&48;&44;&32;&55;&48;&49;&51;&51;&54;&55;&57;&44;&32;&55;&48;&49;&51;&51;&54;&56;&49;&44;&32;&55;&48;&49;&51;&51;&54;&56;&50;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&56;&51;&44;&32;&55;&48;&49;&51;&51;&54;&56;&52;&44;&32;&55;&48;&49;&51;&51;&54;&56;&53;&44;&32;&55;&48;&49;&51;&51;&54;&56;&54;&44;&32;&55;&48;&49;&51;&51;&54;&56;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&56;&56;&44;&32;&55;&48;&49;&51;&51;&54;&56;&57;&44;&32;&55;&48;&49;&51;&51;&54;&57;&48;&44;&32;&55;&48;&49;&51;&51;&54;&57;&49;&44;&32;&55;&48;&49;&51;&51;&54;&57;&50;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&57;&51;&44;&32;&55;&48;&49;&51;&51;&54;&57;&52;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&55;&48;&49;&51;&51;&54;&57;&53;&44;&32;&55;&48;&49;&51;&51;&54;&57;&54;&44;&32;&55;&48;&49;&51;&51;&54;&57;&55;&44;&32;&55;&48;&49;&51;&51;&54;&57;&56;&44;&32;&55;&48;&49;&51;&51;&54;&57;&57;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&48;&48;&44;&32;&55;&48;&49;&51;&51;&55;&48;&49;&44;&32;&55;&48;&49;&51;&51;&55;&48;&50;&44;&32;&55;&48;&49;&51;&51;&55;&48;&51;&44;&32;&55;&48;&49;&51;&51;&55;&48;&52;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&48;&53;&44;&32;&55;&48;&49;&51;&51;&55;&48;&54;&44;&32;&55;&48;&49;&51;&51;&55;&48;&55;&44;&32;&55;&48;&49;&51;&51;&55;&48;&56;&44;&32;&55;&48;&49;&51;&51;&55;&49;&49;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&48;&57;&44;&32;&55;&48;&49;&51;&51;&55;&49;&48;&44;&32;&55;&48;&49;&51;&51;&55;&49;&50;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&55;&48;&49;&51;&51;&55;&49;&51;&44;&32;&55;&48;&49;&51;&51;&55;&49;&52;&44;&32;&55;&48;&49;&51;&51;&55;&49;&53;&44;&32;&55;&48;&49;&51;&51;&55;&49;&54;&44;&32;&55;&48;&49;&51;&51;&55;&49;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&49;&56;&44;&32;&55;&48;&49;&51;&51;&55;&50;&48;&44;&32;&55;&48;&49;&51;&51;&55;&49;&57;&44;&32;&55;&48;&49;&51;&51;&55;&50;&49;&44;&32;&55;&48;&49;&51;&51;&55;&50;&50;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&50;&51;&44;&32;&55;&48;&49;&51;&51;&55;&50;&52;&44;&32;&55;&48;&49;&51;&51;&55;&50;&53;&44;&32;&125;
@@ &32;&32;&125;
do &45;&45;Netflix Watch Instantly
@@ &45;&45;It&39;s largely sequential&44; but not quite&46;
@@ &45;&45;I printed out all the numbers and moved them around
@@ &45;&45;to fit the correct order &40;which is both inconsistent
@@ &45;&45;in IDs to Netflix order and Netflix to DVD order&41;&46;
@@ local movieids&61;&123;
@@ &123; 70133673&44; 70133674&44; 70133675&44; 70133677&44; 70133676&44;
@@ 70133678&44; 70133680&44; 70133679&44; 70133681&44; 70133682&44;
@@ 70133683&44; 70133684&44; 70133685&44; 70133686&44; 70133687&44;
@@ 70133688&44; 70133689&44; 70133690&44; 70133691&44; 70133692&44;
@@ 70133693&44; 70133694&44; &125;&44;
@@ &123; 70133695&44; 70133696&44; 70133697&44; 70133698&44; 70133699&44;
@@ 70133700&44; 70133701&44; 70133702&44; 70133703&44; 70133704&44;
@@ 70133705&44; 70133706&44; 70133707&44; 70133708&44; 70133711&44;
@@ 70133709&44; 70133710&44; 70133712&44; &125;&44;
@@ &123; 70133713&44; 70133714&44; 70133715&44; 70133716&44; 70133717&44;
@@ 70133718&44; 70133720&44; 70133719&44; 70133721&44; 70133722&44;
@@ 70133723&44; 70133724&44; 70133725&44; &125;
@@ &125;



@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&110;&101;&116;&102;&108;&105;&120;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&32;&32;&34;&104;&116;&116;&112;&58;&47;&47;&119;&119;&119;&46;&110;&101;&116;&102;&108;&105;&120;&46;&99;&111;&109;&47;&87;&105;&80;&108;&97;&121;&101;&114;&63;&109;&111;&118;&105;&101;&105;&100;&61;&37;&105;&34;&44;&109;&111;&118;&105;&101;&105;&100;&115;&91;&115;&93;&91;&101;&93;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ function tokens&46;netflix&40;s&44;e&41;
@@ return string&46;format&40;
@@ &34;http&58;&47;&47;www&46;netflix&46;com&47;WiPlayer&63;movieid&61;&37;i&34;&44;movieids&91;s&93;&91;e&93;&41;
@@ end
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&110;&101;&116;&102;&108;&105;&120;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&32;&32;&34;&104;&116;&116;&112;&58;&47;&47;&119;&119;&119;&46;&110;&101;&116;&102;&108;&105;&120;&46;&99;&111;&109;&47;&87;&105;&80;&108;&97;&121;&101;&114;&63;&109;&111;&118;&105;&101;&105;&100;&61;&37;&105;&34;&44;&109;&111;&118;&105;&101;&105;&100;&115;&91;&115;&93;&91;&101;&93;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &45;&45;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&84;&86;&32;&84;&114;&111;&112;&101;&115;&32;&82;&101;&99;&97;&112;&32;&115;&116;&117;&102;&102;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ &108;&111;&99;&97;&108;&32;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;
@@ &100;&111;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&116;&101;&109;&112;&108;&97;&116;&101;&61;&91;&61;&91;
@@ &37;&37;&83;&84;&65;&82;&84;&76;&73;&78;&75;&83;&37;&37;

to:

@@ &45;&45;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&84;&86;&32;&84;&114;&111;&112;&101;&115;&32;&82;&101;&99;&97;&112;&32;&115;&116;&117;&102;&102;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
&45;&45;Arrested Development TV Tropes Recap stuff&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ &108;&111;&99;&97;&108;&32;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;
local ad&95;ep&95;links
@@ &100;&111;
do
@@ local template&61;&91;&61;&91;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&116;&101;&109;&112;&108;&97;&116;&101;&61;&91;&61;&91;
@@ &37;&37;&83;&84;&65;&82;&84;&76;&73;&78;&75;&83;&37;&37;
&37;&37;STARTLINKS&37;&37;



@@ &73;&110;&116;&101;&114;&119;&105;&107;&105;&58;&32;&91;&91;&36;&119;&105;&107;&105;&112;&101;&100;&105;&97;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&93;&93;&32;&45;&45;&32;&91;&91;&36;&119;&105;&107;&105;&97;&32;&87;&105;&107;&105;&97;&93;&93;&32;&45;&45;&32;&91;&91;&36;&116;&104;&101;&111;&112;&32;&66;&97;&108;&98;&111;&97;&32;&79;&98;&115;&101;&114;&118;&101;&114;&45;&80;&105;&99;&97;&121;&117;&110;&101;&93;&93;&32;&45;&45;&32;&91;&91;&36;&105;&109;&100;&98;&32;&73;&77;&68;&66;&93;&93;

to:

@@ &73;&110;&116;&101;&114;&119;&105;&107;&105;&58;&32;&91;&91;&36;&119;&105;&107;&105;&112;&101;&100;&105;&97;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&93;&93;&32;&45;&45;&32;&91;&91;&36;&119;&105;&107;&105;&97;&32;&87;&105;&107;&105;&97;&93;&93;&32;&45;&45;&32;&91;&91;&36;&116;&104;&101;&111;&112;&32;&66;&97;&108;&98;&111;&97;&32;&79;&98;&115;&101;&114;&118;&101;&114;&45;&80;&105;&99;&97;&121;&117;&110;&101;&93;&93;&32;&45;&45;&32;&91;&91;&36;&105;&109;&100;&98;&32;&73;&77;&68;&66;&93;&93;Interwiki&58; &91;&91;&36;wikipedia Wikipedia&93;&93; &45;&45; &91;&91;&36;wikia Wikia&93;&93; &45;&45; &91;&91;&36;theop Balboa Observer&45;Picayune&93;&93; &45;&45; &91;&91;&36;imdb IMDB&93;&93;



@@ &87;&97;&116;&99;&104;&32;&110;&111;&119;&58;&32;&91;&91;&36;&104;&117;&108;&117;&32;&72;&117;&108;&117;&93;&93;&32;&45;&45;&32;&91;&91;&36;&110;&101;&116;&102;&108;&105;&120;&32;&78;&101;&116;&102;&108;&105;&120;&93;&93;

to:

@@ &87;&97;&116;&99;&104;&32;&110;&111;&119;&58;&32;&91;&91;&36;&104;&117;&108;&117;&32;&72;&117;&108;&117;&93;&93;&32;&45;&45;&32;&91;&91;&36;&110;&101;&116;&102;&108;&105;&120;&32;&78;&101;&116;&102;&108;&105;&120;&93;&93;Watch now&58; &91;&91;&36;hulu Hulu&93;&93; &45;&45; &91;&91;&36;netflix Netflix&93;&93;



@@ &37;&37;&69;&78;&68;&76;&73;&78;&75;&83;&37;&37;

to:

@@ &37;&37;&69;&78;&68;&76;&73;&78;&75;&83;&37;&37;&37;&37;ENDLINKS&37;&37;



@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&40;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&101;&109;&112;&108;&97;&116;&101;&44;&34;&37;&36;&40;&37;&119;&43;&41;&34;&44;&102;&117;&110;&99;&116;&105;&111;&110;&40;&116;&111;&107;&101;&110;&41;&32;&114;&101;&116;&117;&114;&110;&32;&116;&111;&107;&101;&110;&115;&91;&116;&111;&107;&101;&110;&93;&40;&115;&44;&101;&41;&32;&101;&110;&100;&41;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ function ad&95;ep&95;links&40;s&44;e&41;
@@ return &40;string&46;gsub&40;template&44;&34;&37;&36;&40;&37;w&43;&41;&34;&44;function&40;token&41; return tokens&91;token&93;&40;s&44;e&41; end&41;&41;
@@ end
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&40;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&101;&109;&112;&108;&97;&116;&101;&44;&34;&37;&36;&40;&37;&119;&43;&41;&34;&44;&102;&117;&110;&99;&116;&105;&111;&110;&40;&116;&111;&107;&101;&110;&41;&32;&114;&101;&116;&117;&114;&110;&32;&116;&111;&107;&101;&110;&115;&91;&116;&111;&107;&101;&110;&93;&40;&115;&44;&101;&41;&32;&101;&110;&100;&41;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&112;&97;&103;&101;&32;&110;&97;&109;&101;&32;&111;&102;&32;&116;&104;&101;&32;&101;&112;&105;&115;&111;&100;&101;&39;&115;&32;&84;&86;&84;&114;&111;&112;&101;&115;&32;&82;&101;&99;&97;&112;&32;&112;&97;&103;&101;&46;
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&114;&101;&99;&97;&112;&95;&112;&97;&103;&101;&110;&97;&109;&101;&40;&115;&44;&101;&41;
@@ &32;&32;&45;&45;&103;&101;&116;&32;&116;&104;&101;&32;&101;&112;&32;&116;&105;&116;&108;&101;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&116;&105;&116;&108;&101;&61;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;
@@ &32;&32;&45;&45;&114;&101;&112;&108;&97;&99;&101;&32;&116;&104;&101;&32;&195;&169;&32;&105;&110;&32;&66;&101;&101;&102;&32;&67;&111;&110;&115;&111;&109;&109;&195;&169;
@@ &32;&32;&116;&105;&116;&108;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&105;&116;&108;&101;&44;&39;&195;&169;&39;&44;&39;&101;&39;&41;
@@ &32;&32;&45;&45;&116;&114;&97;&110;&115;&102;&111;&114;&109;&32;&116;&111;&32;&67;&97;&109;&101;&108;&67;&97;&115;&101;&100;&32;&87;&105;&107;&105;&87;&111;&114;&100;
@@ &32;&32;&116;&105;&116;&108;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&105;&116;&108;&101;&44;&39;&32;&40;&37;&108;&63;&41;&39;&44;&115;&116;&114;&105;&110;&103;&46;&117;&112;&112;&101;&114;&41;
@@ &32;&32;&45;&45;&82;&101;&109;&111;&118;&101;&32;&97;&108;&108;&32;&110;&111;&110;&45;&97;&108;&112;&104;&97;&110;&117;&109;&101;&114;&105;&99;&32;&99;&104;&97;&114;&97;&99;&116;&101;&114;&115;
@@ &32;&32;&116;&105;&116;&108;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&105;&116;&108;&101;&44;&39;&37;&87;&39;&44;&39;&39;&41;

to:

@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&112;&97;&103;&101;&32;&110;&97;&109;&101;&32;&111;&102;&32;&116;&104;&101;&32;&101;&112;&105;&115;&111;&100;&101;&39;&115;&32;&84;&86;&84;&114;&111;&112;&101;&115;&32;&82;&101;&99;&97;&112;&32;&112;&97;&103;&101;&46;
&45;&45;Function that returns the page name of the episode&39;s TVTropes Recap page&46;
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&114;&101;&99;&97;&112;&95;&112;&97;&103;&101;&110;&97;&109;&101;&40;&115;&44;&101;&41;
@@ &32;&32;&45;&45;&103;&101;&116;&32;&116;&104;&101;&32;&101;&112;&32;&116;&105;&116;&108;&101;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&116;&105;&116;&108;&101;&61;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;
@@ &32;&32;&45;&45;&114;&101;&112;&108;&97;&99;&101;&32;&116;&104;&101;&32;&195;&169;&32;&105;&110;&32;&66;&101;&101;&102;&32;&67;&111;&110;&115;&111;&109;&109;&195;&169;
@@ &32;&32;&116;&105;&116;&108;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&105;&116;&108;&101;&44;&39;&195;&169;&39;&44;&39;&101;&39;&41;
@@ &32;&32;&45;&45;&116;&114;&97;&110;&115;&102;&111;&114;&109;&32;&116;&111;&32;&67;&97;&109;&101;&108;&67;&97;&115;&101;&100;&32;&87;&105;&107;&105;&87;&111;&114;&100;
@@ &32;&32;&116;&105;&116;&108;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&105;&116;&108;&101;&44;&39;&32;&40;&37;&108;&63;&41;&39;&44;&115;&116;&114;&105;&110;&103;&46;&117;&112;&112;&101;&114;&41;
@@ &32;&32;&45;&45;&82;&101;&109;&111;&118;&101;&32;&97;&108;&108;&32;&110;&111;&110;&45;&97;&108;&112;&104;&97;&110;&117;&109;&101;&114;&105;&99;&32;&99;&104;&97;&114;&97;&99;&116;&101;&114;&115;
@@ &32;&32;&116;&105;&116;&108;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&105;&116;&108;&101;&44;&39;&37;&87;&39;&44;&39;&39;&41;
local function recap&95;pagename&40;s&44;e&41;
@@ &45;&45;get the ep title
@@ local title&61;adeps&91;s&93;&91;e&93;
@@ &45;&45;replace the &195;&169; in Beef Consomm&195;&169;
@@ title&61;string&46;gsub&40;title&44;&39;&195;&169;&39;&44;&39;e&39;&41;
@@ &45;&45;transform to CamelCased WikiWord
@@ title&61;string&46;gsub&40;title&44;&39; &40;&37;l&63;&41;&39;&44;string&46;upper&41;
@@ &45;&45;Remove all non&45;alphanumeric characters
@@ title&61;string&46;gsub&40;title&44;&39;&37;W&39;&44;&39;&39;&41;



@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&82;&101;&99;&97;&112;&47;&65;&114;&114;&101;&115;&116;&101;&100;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&83;&37;&105;&69;&37;&105;&37;&115;&34;&44;&115;&44;&101;&44;&116;&105;&116;&108;&101;&41;
@@ &101;&110;&100;

to:

@@ return string&46;format&40;&34;Recap&47;ArrestedDevelopmentS&37;iE&37;i&37;s&34;&44;s&44;e&44;title&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&82;&101;&99;&97;&112;&47;&65;&114;&114;&101;&115;&116;&101;&100;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&83;&37;&105;&69;&37;&105;&37;&115;&34;&44;&115;&44;&101;&44;&116;&105;&116;&108;&101;&41;
@@ &101;&110;&100;
end



@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&112;&111;&115;&116;&95;&97;&100;&95;&114;&101;&99;&97;&112;&95;&115;&116;&97;&114;&116;&101;&114;&40;&115;&44;&101;&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;
@@ &32;&32;&32;&32;&114;&101;&99;&97;&112;&95;&112;&97;&103;&101;&110;&97;&109;&101;&40;&115;&44;&101;&41;&44;
@@ &32;&32;&32;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&32;&32;&34;&92;&110;&92;&110;&37;&115;&92;&110;&33;&84;&104;&101;&32;&39;&39;&65;&114;&114;&101;&115;&116;&101;&100;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&39;&39;&32;&101;&112;&105;&115;&111;&100;&101;&32;&92;&34;&37;&115;&92;&34;&32;&112;&114;&111;&118;&105;&100;&101;&115;&32;&101;&120;&97;&109;&112;&108;&101;&115;&32;&111;&102;&58;&92;&110;&92;&110;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;&40;&115;&44;&101;&41;&44;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;&41;&44;
@@ &32;&32;&32;&32;&34;&83;&84;&85;&65;&82;&84;&34;&44;
@@ &32;&32;&32;&32;&34;&65;&100;&100;&105;&110;&103;&32;&105;&110;&116;&101;&114;&119;&105;&107;&105;&32;&108;&105;&110;&107;&115;&32;&97;&110;&100;&32;&101;&120;&97;&109;&112;&108;&101;&32;&104;&101;&97;&100;&101;&114;&32;&97;&117;&116;&111;&109;&97;&116;&105;&99;&97;&108;&108;&121;&32;&40;&65;&115;&107;&32;&109;&101;&32;&97;&98;&111;&117;&116;&32;&76;&117;&97;&41;&34;&41;
@@ &101;&110;&100;

to:

@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&112;&111;&115;&116;&95;&97;&100;&95;&114;&101;&99;&97;&112;&95;&115;&116;&97;&114;&116;&101;&114;&40;&115;&44;&101;&41;
local function post&95;ad&95;recap&95;starter&40;s&44;e&41;
@@ return tvtropes&46;post&40;
@@ recap&95;pagename&40;s&44;e&41;&44;
@@ string&46;format&40;
@@ &34;&92;n&92;n&37;s&92;n&33;The &39;&39;ArrestedDevelopment&39;&39; episode &92;&34;&37;s&92;&34; provides examples of&58;&92;n&92;n&34;&44;
@@ ad&95;ep&95;links&40;s&44;e&41;&44;adeps&91;s&93;&91;e&93;&41;&44;
@@ &34;STUART&34;&44;
@@ &34;Adding interwiki links and example header automatically &40;Ask me about Lua&41;&34;&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;
@@ &32;&32;&32;&32;&114;&101;&99;&97;&112;&95;&112;&97;&103;&101;&110;&97;&109;&101;&40;&115;&44;&101;&41;&44;
@@ &32;&32;&32;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&32;&32;&34;&92;&110;&92;&110;&37;&115;&92;&110;&33;&84;&104;&101;&32;&39;&39;&65;&114;&114;&101;&115;&116;&101;&100;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&39;&39;&32;&101;&112;&105;&115;&111;&100;&101;&32;&92;&34;&37;&115;&92;&34;&32;&112;&114;&111;&118;&105;&100;&101;&115;&32;&101;&120;&97;&109;&112;&108;&101;&115;&32;&111;&102;&58;&92;&110;&92;&110;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;&40;&115;&44;&101;&41;&44;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;&41;&44;
@@ &32;&32;&32;&32;&34;&83;&84;&85;&65;&82;&84;&34;&44;
@@ &32;&32;&32;&32;&34;&65;&100;&100;&105;&110;&103;&32;&105;&110;&116;&101;&114;&119;&105;&107;&105;&32;&108;&105;&110;&107;&115;&32;&97;&110;&100;&32;&101;&120;&97;&109;&112;&108;&101;&32;&104;&101;&97;&100;&101;&114;&32;&97;&117;&116;&111;&109;&97;&116;&105;&99;&97;&108;&108;&121;&32;&40;&65;&115;&107;&32;&109;&101;&32;&97;&98;&111;&117;&116;&32;&76;&117;&97;&41;&34;&41;
@@ &101;&110;&100;
end



@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&117;&112;&100;&97;&116;&101;&95;&108;&105;&110;&107;&115;&40;&114;&101;&97;&115;&111;&110;&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&102;&117;&110;&99;&116;&105;&111;&110;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&45;&45;&117;&110;&116;&105;&108;&32;&99;&111;&109;&109;&101;&110;&116;&32;&115;&121;&110;&116;&97;&120;&32;&105;&115;&32;&99;&104;&97;&110;&103;&101;&100;&44;&32;&65;&109;&105;&103;&111;&115;&32;&105;&115;&32;&109;&97;&110;&117;&97;&108;&45;&111;&110;&108;&121;
@@ &32;&32;&32;&32;&105;&102;&32;&115;&61;&61;&50;&32;&97;&110;&100;&32;&101;&61;&61;&51;&32;&116;&104;&101;&110;
@@ &32;&32;&32;&32;&32;&32;&112;&114;&105;&110;&116;&32;&34;&40;&83;&107;&105;&112;&112;&105;&110;&103;&32;&65;&109;&105;&103;&111;&115;&32;&98;&101;&99;&97;&117;&115;&101;&32;&116;&104;&101;&32;&108;&105;&110;&107;&115;&32;&103;&111;&32;&97;&108;&108;&32;&115;&99;&114;&101;&119;&121;&41;&34;
@@ &32;&32;&32;&32;&101;&108;&115;&101;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&114;&101;&99;&97;&112;&95;&112;&97;&103;&101;&110;&97;&109;&101;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&97;&115;&105;&115;&61;&116;&118;&116;&114;&111;&112;&101;&115;&46;&103;&101;&116;&40;&112;&97;&103;&101;&110;&97;&109;&101;&41;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&103;&115;&117;&98;&115;&97;&102;&101;&108;&105;&110;&107;&115;&32;&61;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;&40;&115;&44;&101;&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&115;&117;&99;&99;&101;&115;&115;
@@ &32;&32;&32;&32;&32;&32;&119;&104;&105;&108;&101;&32;&110;&111;&116;&32;&115;&117;&99;&99;&101;&115;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&99;&111;&100;&101;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&115;&117;&99;&99;&101;&115;&115;&44;&32;&99;&111;&100;&101;&32;&61;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;&112;&97;&103;&101;&110;&97;&109;&101;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&112;&97;&103;&101;&97;&115;&105;&115;&44;&34;&37;&37;&37;&37;&83;&84;&65;&82;&84;&76;&73;&78;&75;&83;&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;&69;&78;&68;&76;&73;&78;&75;&83;&37;&37;&37;&37;&34;&44;&103;&115;&117;&98;&115;&97;&102;&101;&108;&105;&110;&107;&115;&41;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&32;&34;&83;&84;&85;&65;&82;&84;&34;&44;&114;&101;&97;&115;&111;&110;&41;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&105;&102;&32;&110;&111;&116;&32;&115;&117;&99;&99;&101;&115;&115;&32;&116;&104;&101;&110;&32;&112;&114;&105;&110;&116;&40;&34;&82;&101;&116;&114;&121;&105;&110;&103;&46;&46;&46;&32;&34;&46;&46;&99;&111;&100;&101;&41;&32;&101;&110;&100;
@@ &32;&32;&32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&117;&112;&100;&97;&116;&101;&95;&108;&105;&110;&107;&115;&40;&114;&101;&97;&115;&111;&110;&41;
local function update&95;links&40;reason&41;
@@ return function&40;s&44;e&41;
@@ &45;&45;until comment syntax is changed&44; Amigos is manual&45;only
@@ if s&61;&61;2 and e&61;&61;3 then
@@ print &34;&40;Skipping Amigos because the links go all screwy&41;&34;
@@ else
@@ local pagename&61;recap&95;pagename&40;s&44;e&41;
@@ local pageasis&61;tvtropes&46;get&40;pagename&41;
@@ local gsubsafelinks &61; string&46;gsub&40;ad&95;ep&95;links&40;s&44;e&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;
@@ local success
@@ while not success do
@@ local code
@@ success&44; code &61; tvtropes&46;post&40;pagename&44;
@@ string&46;gsub&40;pageasis&44;&34;&37;&37;&37;&37;STARTLINKS&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;ENDLINKS&37;&37;&37;&37;&34;&44;gsubsafelinks&41;&44;
@@ &34;STUART&34;&44;reason&41;
@@ if not success then print&40;&34;Retrying&46;&46;&46; &34;&46;&46;code&41; end
@@ end
@@ end
@@ end
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&102;&117;&110;&99;&116;&105;&111;&110;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&45;&45;&117;&110;&116;&105;&108;&32;&99;&111;&109;&109;&101;&110;&116;&32;&115;&121;&110;&116;&97;&120;&32;&105;&115;&32;&99;&104;&97;&110;&103;&101;&100;&44;&32;&65;&109;&105;&103;&111;&115;&32;&105;&115;&32;&109;&97;&110;&117;&97;&108;&45;&111;&110;&108;&121;
@@ &32;&32;&32;&32;&105;&102;&32;&115;&61;&61;&50;&32;&97;&110;&100;&32;&101;&61;&61;&51;&32;&116;&104;&101;&110;
@@ &32;&32;&32;&32;&32;&32;&112;&114;&105;&110;&116;&32;&34;&40;&83;&107;&105;&112;&112;&105;&110;&103;&32;&65;&109;&105;&103;&111;&115;&32;&98;&101;&99;&97;&117;&115;&101;&32;&116;&104;&101;&32;&108;&105;&110;&107;&115;&32;&103;&111;&32;&97;&108;&108;&32;&115;&99;&114;&101;&119;&121;&41;&34;
@@ &32;&32;&32;&32;&101;&108;&115;&101;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&114;&101;&99;&97;&112;&95;&112;&97;&103;&101;&110;&97;&109;&101;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&97;&115;&105;&115;&61;&116;&118;&116;&114;&111;&112;&101;&115;&46;&103;&101;&116;&40;&112;&97;&103;&101;&110;&97;&109;&101;&41;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&103;&115;&117;&98;&115;&97;&102;&101;&108;&105;&110;&107;&115;&32;&61;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;&40;&115;&44;&101;&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&115;&117;&99;&99;&101;&115;&115;
@@ &32;&32;&32;&32;&32;&32;&119;&104;&105;&108;&101;&32;&110;&111;&116;&32;&115;&117;&99;&99;&101;&115;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&99;&111;&100;&101;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&115;&117;&99;&99;&101;&115;&115;&44;&32;&99;&111;&100;&101;&32;&61;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;&112;&97;&103;&101;&110;&97;&109;&101;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&112;&97;&103;&101;&97;&115;&105;&115;&44;&34;&37;&37;&37;&37;&83;&84;&65;&82;&84;&76;&73;&78;&75;&83;&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;&69;&78;&68;&76;&73;&78;&75;&83;&37;&37;&37;&37;&34;&44;&103;&115;&117;&98;&115;&97;&102;&101;&108;&105;&110;&107;&115;&41;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&32;&34;&83;&84;&85;&65;&82;&84;&34;&44;&114;&101;&97;&115;&111;&110;&41;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&105;&102;&32;&110;&111;&116;&32;&115;&117;&99;&99;&101;&115;&115;&32;&116;&104;&101;&110;&32;&112;&114;&105;&110;&116;&40;&34;&82;&101;&116;&114;&121;&105;&110;&103;&46;&46;&46;&32;&34;&46;&46;&99;&111;&100;&101;&41;&32;&101;&110;&100;
@@ &32;&32;&32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&102;&111;&114;&95;&97;&108;&108;&95;&101;&112;&115;&40;&102;&41;
@@ &32;&32;&102;&111;&114;&32;&115;&61;&49;&44;&35;&97;&100;&101;&112;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&102;&111;&114;&32;&101;&61;&49;&44;&35;&97;&100;&101;&112;&115;&91;&115;&93;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&112;&114;&105;&110;&116;&40;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&39;&68;&111;&105;&110;&103;&32;&83;&101;&97;&115;&111;&110;&32;&37;&105;&32;&69;&112;&105;&115;&111;&100;&101;&32;&37;&105;&44;&32;&34;&37;&115;&34;&46;&46;&46;&39;&44;&115;&44;&101;&44;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;&41;&41;
@@ &32;&32;&32;&32;&32;&32;&102;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;

to:

@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&102;&111;&114;&95;&97;&108;&108;&95;&101;&112;&115;&40;&102;&41;
local function for&95;all&95;eps&40;f&41;
@@ for s&61;1&44;&35;adeps do
@@ for e&61;1&44;&35;adeps&91;s&93; do
@@ print&40;string&46;format&40;&39;Doing Season &37;i Episode &37;i&44; &34;&37;s&34;&46;&46;&46;&39;&44;s&44;e&44;adeps&91;s&93;&91;e&93;&41;&41;
@@ f&40;s&44;e&41;
@@ end
@@ end
@@ &32;&32;&102;&111;&114;&32;&115;&61;&49;&44;&35;&97;&100;&101;&112;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&102;&111;&114;&32;&101;&61;&49;&44;&35;&97;&100;&101;&112;&115;&91;&115;&93;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&112;&114;&105;&110;&116;&40;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&39;&68;&111;&105;&110;&103;&32;&83;&101;&97;&115;&111;&110;&32;&37;&105;&32;&69;&112;&105;&115;&111;&100;&101;&32;&37;&105;&44;&32;&34;&37;&115;&34;&46;&46;&46;&39;&44;&115;&44;&101;&44;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;&41;&41;
@@ &32;&32;&32;&32;&32;&32;&102;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
end



@@ &45;&45;&79;&107;&97;&121;&44;&32;&112;&117;&116;&32;&121;&111;&117;&114;&32;&101;&120;&101;&99;&117;&116;&105;&110;&103;&32;&99;&111;&109;&109;&97;&110;&100;&115;&32;&100;&111;&119;&110;&32;&104;&101;&114;&101;&46;

to:

@@ &45;&45;&79;&107;&97;&121;&44;&32;&112;&117;&116;&32;&121;&111;&117;&114;&32;&101;&120;&101;&99;&117;&116;&105;&110;&103;&32;&99;&111;&109;&109;&97;&110;&100;&115;&32;&100;&111;&119;&110;&32;&104;&101;&114;&101;&46;&45;&45;Okay&44; put your executing commands down here&46;

Added: 55654

Changed: 45

Is there an issue? Send a MessageReason:
ARGH english language is such movink target


Putting scripts here is a neverending battle.

to:

Putting scripts here is a neverending battle.
[[foldercontrol]]

[[folder:urlencode.lua]]
@@ &108;&111;&99;&97;&108;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&61;&123;&125;
@@
@@ &45;&45;&85;&82;&76;&32;&101;&110;&99;&111;&100;&101;&32;&97;&32;&115;&116;&114;&105;&110;&103;&46;
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&101;&110;&99;&111;&100;&101;&40;&115;&116;&114;&41;
@@ &32;&32;&45;&45;&69;&110;&115;&117;&114;&101;&32;&97;&108;&108;&32;&110;&101;&119;&108;&105;&110;&101;&115;&32;&97;&114;&101;&32;&105;&110;&32;&67;&82;&76;&70;&32;&102;&111;&114;&109;
@@ &32;&32;&115;&116;&114;&32;&61;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&32;&40;&115;&116;&114;&44;&32;&34;&92;&114;&63;&92;&110;&34;&44;&32;&34;&92;&114;&92;&110;&34;&41;
@@ &32;&32;&45;&45;&80;&101;&114;&99;&101;&110;&116;&45;&101;&110;&99;&111;&100;&101;&32;&97;&108;&108;&32;&110;&111;&110;&45;&117;&110;&114;&101;&115;&101;&114;&118;&101;&100;&32;&99;&104;&97;&114;&97;&99;&116;&101;&114;&115;
@@ &32;&32;&45;&45;&97;&115;&32;&112;&101;&114;&32;&82;&70;&67;&32;&51;&57;&56;&54;&44;&32;&83;&101;&99;&116;&105;&111;&110;&32;&50;&46;&51;
@@ &32;&32;&45;&45;&40;&101;&120;&99;&101;&112;&116;&32;&102;&111;&114;&32;&115;&112;&97;&99;&101;&44;&32;&119;&104;&105;&99;&104;&32;&103;&101;&116;&115;&32;&112;&108;&117;&115;&45;&101;&110;&99;&111;&100;&101;&100;&41;
@@ &32;&32;&115;&116;&114;&32;&61;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&32;&40;&115;&116;&114;&44;&32;&34;&40;&91;&94;&37;&119;&37;&45;&37;&46;&37;&95;&37;&126;&32;&93;&41;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&40;&99;&41;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&32;&40;&34;&37;&37;&37;&48;&50;&88;&34;&44;&32;&115;&116;&114;&105;&110;&103;&46;&98;&121;&116;&101;&40;&99;&41;&41;&32;&101;&110;&100;&41;
@@ &32;&32;&45;&45;&67;&111;&110;&118;&101;&114;&116;&32;&115;&112;&97;&99;&101;&115;&32;&116;&111;&32;&112;&108;&117;&115;&32;&115;&105;&103;&110;&115;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&32;&40;&115;&116;&114;&44;&32;&34;&32;&34;&44;&32;&34;&43;&34;&41;
@@ &101;&110;&100;
@@
@@ &45;&45;&77;&97;&107;&101;&32;&116;&104;&105;&115;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&97;&118;&97;&105;&108;&97;&98;&108;&101;&32;&97;&115;&32;&112;&97;&114;&116;&32;&111;&102;&32;&116;&104;&101;&32;&109;&111;&100;&117;&108;&101;
@@ &117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&115;&116;&114;&105;&110;&103;&32;&61;&32;&101;&110;&99;&111;&100;&101;
@@
@@ &45;&45;&85;&82;&76;&32;&101;&110;&99;&111;&100;&101;&32;&97;&32;&116;&97;&98;&108;&101;&32;&97;&115;&32;&97;&32;&115;&101;&114;&105;&101;&115;&32;&111;&102;&32;&112;&97;&114;&97;&109;&101;&116;&101;&114;&115;&46;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&116;&97;&98;&108;&101;&40;&116;&41;
@@ &32;&32;&45;&45;&116;&97;&98;&108;&101;&32;&111;&102;&32;&97;&114;&103;&117;&109;&101;&110;&116;&32;&115;&116;&114;&105;&110;&103;&115;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&97;&114;&103;&116;&115;&44;&32;&105;&61;&32;&123;&125;&44;&32;&49;
@@ &32;&32;&102;&111;&114;&32;&107;&44;&32;&118;&32;&105;&110;&32;&112;&97;&105;&114;&115;&40;&116;&41;&32;&100;&111;
@@ &32;&32;&32;&32;&97;&114;&103;&116;&115;&91;&105;&93;&61;&101;&110;&99;&111;&100;&101;&40;&107;&41;&46;&46;&34;&61;&34;&46;&46;&101;&110;&99;&111;&100;&101;&40;&118;&41;
@@ &32;&32;&32;&32;&105;&61;&105;&43;&49;
@@ &32;&32;&101;&110;&100;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&116;&97;&98;&108;&101;&46;&99;&111;&110;&99;&97;&116;&40;&97;&114;&103;&116;&115;&44;&39;&38;&39;&41;
@@ &101;&110;&100;
@@
@@ &114;&101;&116;&117;&114;&110;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;
[[/folder]]

[[folder:tvtropes.lua]]
@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&116;&111;&32;&115;&101;&110;&100;&32;&116;&111;&32;&84;&86;&84;&114;&111;&112;&101;&115;&32;&115;&105;&116;&101;&46;
@@ &108;&111;&99;&97;&108;&32;&104;&116;&116;&112;&32;&61;&32;&114;&101;&113;&117;&105;&114;&101;&34;&115;&111;&99;&107;&101;&116;&46;&104;&116;&116;&112;&34;
@@
@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&116;&111;&32;&99;&114;&101;&97;&116;&101;&32;&112;&97;&103;&101;&32;&112;&111;&115;&116;&32;&100;&97;&116;&97;&46;
@@ &108;&111;&99;&97;&108;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&32;&61;&32;&114;&101;&113;&117;&105;&114;&101;&32;&34;&117;&114;&108;&101;&110;&99;&111;&100;&101;&34;
@@
@@ &108;&111;&99;&97;&108;&32;&116;&118;&116;&114;&111;&112;&101;&115;&61;&123;&125;
@@
@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&97;&117;&116;&104;&101;&110;&116;&105;&99;&97;&116;&101;&100;&32;&84;&86;&84;&114;&111;&112;&101;&115;&32;&85;&82;&76;&32;&102;&111;&114;&32;&116;&104;&101;&32;&103;&105;&118;&101;&110;&32;&112;&97;&103;&101;&46;
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&97;&117;&116;&104;&112;&97;&103;&101;&117;&114;&108;&40;&112;&97;&103;&101;&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&34;&104;&116;&116;&112;&58;&47;&47;&58;&102;&111;&97;&109;&121;&64;&116;&118;&116;&114;&111;&112;&101;&115;&46;&111;&114;&103;&47;&112;&109;&119;&105;&107;&105;&47;&112;&109;&119;&105;&107;&105;&46;&112;&104;&112;&47;&34;&46;&46;&112;&97;&103;&101;
@@ &101;&110;&100;
@@
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&102;&117;&108;&108;&110;&97;&109;&101;&40;&112;&97;&103;&101;&41;
@@ &32;&32;&45;&45;&82;&101;&113;&117;&105;&114;&101;&32;&112;&97;&103;&101;&110;&97;&109;&101;
@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&116;&121;&112;&101;&40;&112;&97;&103;&101;&41;&61;&61;&34;&115;&116;&114;&105;&110;&103;&34;&44;&34;&68;&101;&115;&116;&105;&110;&97;&116;&105;&111;&110;&32;&112;&97;&103;&101;&32;&110;&97;&109;&101;&32;&114;&101;&113;&117;&105;&114;&101;&100;&34;&41;
@@ &32;&32;&45;&45;&73;&102;&32;&110;&111;&32;&110;&97;&109;&101;&115;&112;&97;&99;&101;&32;&115;&112;&101;&99;&105;&102;&105;&101;&100;&44;&32;&97;&115;&115;&117;&109;&101;&32;&77;&97;&105;&110;
@@ &32;&32;&105;&102;&32;&110;&111;&116;&32;&115;&116;&114;&105;&110;&103;&46;&102;&105;&110;&100;&40;&112;&97;&103;&101;&44;&39;&47;&39;&41;&32;&116;&104;&101;&110;&32;&112;&97;&103;&101;&61;&34;&77;&97;&105;&110;&47;&34;&46;&46;&112;&97;&103;&101;&32;&101;&110;&100;
@@
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&112;&97;&103;&101;
@@ &101;&110;&100;
@@
@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&112;&111;&115;&116;&115;&32;&116;&104;&101;&32;&103;&105;&118;&101;&110;&32;&112;&97;&103;&101;&46;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;&112;&97;&103;&101;&44;&32;&98;&111;&100;&121;&44;&32;&97;&117;&116;&104;&111;&114;&44;&32;&114;&101;&97;&115;&111;&110;&41;
@@
@@ &32;&32;&112;&97;&103;&101;&61;&102;&117;&108;&108;&110;&97;&109;&101;&40;&112;&97;&103;&101;&41;
@@
@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&116;&121;&112;&101;&40;&98;&111;&100;&121;&41;&61;&61;&34;&115;&116;&114;&105;&110;&103;&34;&44;&34;&80;&97;&103;&101;&32;&98;&111;&100;&121;&32;&114;&101;&113;&117;&105;&114;&101;&100;&34;&41;
@@
@@ &32;&32;&108;&111;&99;&97;&108;&32;&114;&101;&115;&112;&111;&110;&115;&101;&32;&61;
@@ &32;&32;&32;&32;&123;&104;&116;&116;&112;&46;&114;&101;&113;&117;&101;&115;&116;&40;&97;&117;&116;&104;&112;&97;&103;&101;&117;&114;&108;&40;&112;&97;&103;&101;&41;&44;
@@ &32;&32;&32;&32;&32;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&116;&97;&98;&108;&101;&123;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&97;&99;&116;&105;&111;&110;&61;&34;&112;&111;&115;&116;&34;&44;&32;&112;&111;&115;&116;&61;&34;&115;&97;&118;&101;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&112;&97;&103;&101;&44;&32;&116;&101;&120;&116;&61;&98;&111;&100;&121;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&97;&117;&116;&104;&111;&114;&61;&97;&117;&116;&104;&111;&114;&32;&111;&114;&32;&34;&65;&110;&111;&110;&121;&109;&111;&117;&115;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&114;&101;&97;&115;&111;&110;&61;&114;&101;&97;&115;&111;&110;&32;&111;&114;&32;&34;&34;
@@ &32;&32;&32;&32;&32;&32;&125;&41;&125;
@@
@@ &32;&32;&45;&45;&69;&114;&114;&111;&114;&32;&111;&110;&32;&97;&110;&121;&32;&115;&111;&99;&107;&101;&116;&32;&101;&114;&114;&111;&114;&115;
@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&114;&101;&115;&112;&111;&110;&115;&101;&91;&49;&93;&44;&114;&101;&115;&112;&111;&110;&115;&101;&91;&50;&93;&41;
@@
@@ &32;&32;&45;&45;&73;&102;&32;&105;&116;&32;&100;&111;&101;&115;&110;&39;&116;&32;&114;&101;&116;&117;&114;&110;&32;&70;&111;&117;&110;&100;&44;&32;&114;&101;&116;&117;&114;&110;&32;&110;&105;&108;&44;&32;&116;&104;&101;&32;&115;&116;&97;&116;&117;&115;&44;&32;&97;&110;&100;&32;&116;&104;&101;&32;&98;&111;&100;&121;&58;
@@ &32;&32;&45;&45;&115;&111;&109;&101;&116;&105;&109;&101;&115;&32;&105;&116;&32;&106;&117;&115;&116;&32;&114;&101;&106;&101;&99;&116;&115;&32;&116;&104;&101;&32;&112;&97;&115;&115;&119;&111;&114;&100;&32;&102;&111;&114;&32;&115;&111;&109;&101;&32;&114;&101;&97;&115;&111;&110;&46;
@@ &32;&32;&105;&102;&32;&116;&111;&110;&117;&109;&98;&101;&114;&40;&114;&101;&115;&112;&111;&110;&115;&101;&91;&50;&93;&41;&126;&61;&51;&48;&50;&32;&116;&104;&101;&110;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&110;&105;&108;&44;&32;&114;&101;&115;&112;&111;&110;&115;&101;&91;&50;&93;&44;&32;&114;&101;&115;&112;&111;&110;&115;&101;&91;&49;&93;
@@ &32;&32;&101;&108;&115;&101;&32;&114;&101;&116;&117;&114;&110;&32;&116;&114;&117;&101;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@
@@ &45;&45;&84;&101;&99;&104;&110;&105;&99;&97;&108;&108;&121;&44;&32;&116;&104;&105;&115;&32;&105;&115;&32;&107;&105;&110;&100;&32;&111;&102;&32;&97;&32;&103;&101;&110;&101;&114;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&44;&32;&98;&117;&116;&32;&105;&116;&39;&115;&32;&100;&101;&115;&105;&103;&110;&101;&100;&32;&101;&120;&99;&108;&117;&115;&105;&118;&101;&108;&121;&32;&97;&114;&111;&117;&110;&100;
@@ &45;&45;&84;&86;&84;&114;&111;&112;&101;&115;&39;&32;&115;&111;&117;&114;&99;&101;&32;&99;&111;&110;&118;&101;&114;&116;&101;&114;&44;&32;&115;&111;&32;&105;&116;&39;&115;&32;&107;&101;&112;&116;&32;&105;&110;&32;&104;&101;&114;&101;&46;
@@ &108;&111;&99;&97;&108;&32;&104;&116;&109;&108;&50;&112;&108;&97;&105;&110;
@@ &100;&111;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&101;&110;&116;&115;&32;&61;&32;&123;&113;&117;&111;&116;&61;&39;&34;&39;&44;&32;&97;&109;&112;&61;&39;&38;&39;&44;&32;&108;&116;&61;&39;&60;&39;&44;&32;&103;&116;&61;&39;&62;&39;&125;
@@
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&104;&116;&109;&108;&50;&112;&108;&97;&105;&110;&40;&115;&114;&99;&41;
@@ &32;&32;&32;&32;&115;&114;&99;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&115;&114;&99;&44;&34;&60;&98;&114;&47;&62;&34;&44;&34;&92;&110;&34;&41;
@@ &32;&32;&32;&32;&115;&114;&99;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&115;&114;&99;&44;&34;&38;&40;&37;&119;&45;&41;&59;&34;&44;&101;&110;&116;&115;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&114;&99;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@
@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&103;&101;&116;&115;&32;&97;&32;&103;&105;&118;&101;&110;&32;&112;&97;&103;&101;&32;&115;&111;&117;&114;&99;&101;&46;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&103;&101;&116;&40;&112;&97;&103;&101;&41;
@@
@@ &32;&32;&112;&97;&103;&101;&61;&102;&117;&108;&108;&110;&97;&109;&101;&40;&112;&97;&103;&101;&41;
@@
@@ &32;&32;&108;&111;&99;&97;&108;&32;&98;&111;&100;&121;&44;&32;&99;&111;&100;&101;&32;&61;&32;&104;&116;&116;&112;&46;&114;&101;&113;&117;&101;&115;&116;&40;
@@ &32;&32;&32;&32;&97;&117;&116;&104;&112;&97;&103;&101;&117;&114;&108;&40;&112;&97;&103;&101;&41;&46;&46;&39;&63;&97;&99;&116;&105;&111;&110;&61;&115;&111;&117;&114;&99;&101;&39;&41;
@@
@@ &32;&32;&45;&45;&84;&114;&105;&103;&103;&101;&114;&32;&101;&114;&114;&111;&114;&32;&111;&110;&32;&115;&111;&99;&107;&101;&116;&32;&102;&97;&105;&108;&117;&114;&101;
@@ &32;&32;&97;&115;&115;&101;&114;&116;&40;&98;&111;&100;&121;&44;&99;&111;&100;&101;&41;
@@
@@ &32;&32;&45;&45;&82;&101;&116;&117;&114;&110;&32;&116;&104;&101;&32;&115;&111;&117;&114;&99;&101;&32;&99;&111;&110;&118;&101;&114;&116;&101;&100;&32;&98;&97;&99;&107;&32;&102;&114;&111;&109;&32;&116;&104;&101;&32;&72;&84;&77;&76;&32;&99;&111;&110;&118;&101;&114;&115;&105;&111;&110;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&104;&116;&109;&108;&50;&112;&108;&97;&105;&110;&40;&98;&111;&100;&121;&41;
@@ &101;&110;&100;
@@
@@ &114;&101;&116;&117;&114;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;
[[/folder]]

[[folder:tropersrepo.lua]]
@@ &108;&111;&99;&97;&108;&32;&116;&118;&116;&114;&111;&112;&101;&115;&32;&61;&32;&114;&101;&113;&117;&105;&114;&101;&32;&34;&116;&118;&116;&114;&111;&112;&101;&115;&34;
@@
@@ &108;&111;&99;&97;&108;&32;&116;&97;&114;&103;&101;&116;&32;&61;&32;&34;&84;&114;&111;&112;&101;&114;&115;&47;&83;&84;&85;&65;&82;&84;&34;
@@ &108;&111;&99;&97;&108;&32;&117;&115;&101;&114;&61;&34;&83;&84;&85;&65;&82;&84;&34;
@@
@@ &108;&111;&99;&97;&108;&32;&115;&99;&114;&105;&112;&116;&115;&61;&123;
@@ &32;&32;&34;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&108;&117;&97;&34;&44;
@@ &32;&32;&34;&116;&118;&116;&114;&111;&112;&101;&115;&46;&108;&117;&97;&34;&44;
@@ &32;&32;&34;&116;&114;&111;&112;&101;&114;&115;&114;&101;&112;&111;&46;&108;&117;&97;&34;&44;
@@ &32;&32;&34;&97;&114;&114;&100;&101;&118;&95;&114;&101;&99;&97;&112;&46;&108;&117;&97;&34;&44;
@@ &125;
@@
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&115;&99;&114;&105;&112;&116;&102;&111;&108;&100;&101;&114;&40;&110;&97;&109;&101;&44;&115;&99;&114;&105;&112;&116;&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&34;&91;&91;&102;&111;&108;&100;&101;&114;&58;&37;&115;&93;&93;&92;&110;&37;&115;&92;&110;&91;&91;&47;&102;&111;&108;&100;&101;&114;&93;&93;&34;&44;
@@ &32;&32;&32;&32;&110;&97;&109;&101;&44;&115;&99;&114;&105;&112;&116;&41;
@@ &101;&110;&100;
@@
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&114;&101;&118;&115;&101;&99;&116;&105;&111;&110;&40;&41;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&102;&111;&108;&100;&101;&114;&115;&61;&123;
@@ &32;&32;&32;&32;&34;&37;&37;&83;&84;&65;&82;&84;&83;&67;&82;&73;&80;&84;&83;&37;&37;&34;&44;
@@ &32;&32;&32;&32;&34;&91;&91;&102;&111;&108;&100;&101;&114;&99;&111;&110;&116;&114;&111;&108;&93;&93;&34;
@@ &32;&32;&125;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&104;&101;&97;&100;&101;&114;&115;&61;&35;&102;&111;&108;&100;&101;&114;&115;
@@
@@ &32;&32;&102;&111;&114;&32;&105;&61;&49;&44;&32;&35;&115;&99;&114;&105;&112;&116;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&115;&108;&105;&110;&101;&115;&61;&123;&125;
@@ &32;&32;&32;&32;&102;&111;&114;&32;&108;&105;&110;&101;&32;&105;&110;&32;&105;&111;&46;&108;&105;&110;&101;&115;&40;&115;&99;&114;&105;&112;&116;&115;&91;&105;&93;&41;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&101;&115;&99;&97;&112;&101;&100;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&108;&105;&110;&101;&44;&34;&91;&37;&87;&37;&83;&93;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&40;&99;&104;&97;&114;&41;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&38;&37;&105;&59;&34;&44;&115;&116;&114;&105;&110;&103;&46;&98;&121;&116;&101;&40;&99;&104;&97;&114;&41;&41;&32;&101;&110;&100;&41;
@@
@@ &32;&32;&32;&32;&32;&32;&115;&108;&105;&110;&101;&115;&91;&35;&115;&108;&105;&110;&101;&115;&43;&49;&93;&61;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&64;&64;&32;&37;&115;&34;&44;&101;&115;&99;&97;&112;&101;&100;&41;
@@ &32;&32;&32;&32;&101;&110;&100;
@@
@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&99;&111;&110;&116;&101;&110;&116;&61;&116;&97;&98;&108;&101;&46;&99;&111;&110;&99;&97;&116;&40;&115;&108;&105;&110;&101;&115;&44;&39;&92;&110;&39;&41;
@@ &32;&32;&32;&32;&102;&111;&108;&100;&101;&114;&115;&91;&105;&43;&104;&101;&97;&100;&101;&114;&115;&93;&61;&115;&99;&114;&105;&112;&116;&102;&111;&108;&100;&101;&114;&40;&115;&99;&114;&105;&112;&116;&115;&91;&105;&93;&44;&99;&111;&110;&116;&101;&110;&116;&41;
@@ &32;&32;&101;&110;&100;
@@
@@ &32;&32;&102;&111;&108;&100;&101;&114;&115;&91;&35;&102;&111;&108;&100;&101;&114;&115;&43;&49;&93;&61;&34;&37;&37;&69;&78;&68;&83;&67;&82;&73;&80;&84;&83;&37;&37;&34;
@@
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&116;&97;&98;&108;&101;&46;&99;&111;&110;&99;&97;&116;&40;&102;&111;&108;&100;&101;&114;&115;&44;&34;&92;&110;&92;&110;&34;&41;
@@ &101;&110;&100;
@@
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&112;&117;&115;&104;&40;&110;&111;&116;&101;&115;&41;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&103;&115;&115;&115;&99;&114;&105;&112;&116;&115;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&114;&101;&118;&115;&101;&99;&116;&105;&111;&110;&40;&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;
@@
@@ &32;&32;&112;&114;&105;&110;&116;&40;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&71;&101;&116;&116;&105;&110;&103;&32;&99;&117;&114;&114;&101;&110;&116;&32;&118;&101;&114;&115;&105;&111;&110;&32;&111;&102;&32;&37;&115;&46;&46;&46;&34;&44;&116;&97;&114;&103;&101;&116;&41;&41;
@@
@@ &32;&32;&108;&111;&99;&97;&108;&32;&99;&117;&114;&114;&101;&110;&116;&61;&116;&118;&116;&114;&111;&112;&101;&115;&46;&103;&101;&116;&40;&116;&97;&114;&103;&101;&116;&41;
@@
@@ &32;&32;&108;&111;&99;&97;&108;&32;&117;&112;&100;&97;&116;&101;&100;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&99;&117;&114;&114;&101;&110;&116;&44;
@@ &32;&32;&32;&32;&34;&37;&37;&37;&37;&83;&84;&65;&82;&84;&83;&67;&82;&73;&80;&84;&83;&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;&69;&78;&68;&83;&67;&82;&73;&80;&84;&83;&37;&37;&37;&37;&34;&44;
@@ &32;&32;&32;&32;&103;&115;&115;&115;&99;&114;&105;&112;&116;&115;&41;
@@
@@ &32;&32;&112;&114;&105;&110;&116;&40;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&80;&111;&115;&116;&105;&110;&103;&32;&110;&101;&119;&32;&118;&101;&114;&115;&105;&111;&110;&32;&111;&102;&32;&37;&115;&46;&46;&46;&34;&44;&116;&97;&114;&103;&101;&116;&41;&41;
@@
@@ &32;&32;&108;&111;&99;&97;&108;&32;&112;&111;&115;&116;&101;&100;
@@ &32;&32;&119;&104;&105;&108;&101;&32;&110;&111;&116;&32;&112;&111;&115;&116;&101;&100;&32;&100;&111;
@@ &32;&32;&32;&32;&112;&111;&115;&116;&101;&100;&61;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;&116;&97;&114;&103;&101;&116;&44;&117;&112;&100;&97;&116;&101;&100;&44;&117;&115;&101;&114;&44;&110;&111;&116;&101;&115;&41;
@@ &32;&32;&32;&32;&105;&102;&32;&110;&111;&116;&32;&112;&111;&115;&116;&101;&100;&32;&116;&104;&101;&110;&32;&112;&114;&105;&110;&116;&34;&32;&32;&82;&101;&116;&114;&121;&105;&110;&103;&46;&46;&46;&34;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@
@@ &45;&45;&69;&120;&101;&99;&117;&116;&105;&110;&103;&32;&99;&111;&100;&101;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ &112;&117;&115;&104;&32;&34;&65;&82;&71;&72;&32;&101;&110;&103;&108;&105;&115;&104;&32;&108;&97;&110;&103;&117;&97;&103;&101;&32;&105;&115;&32;&115;&117;&99;&104;&32;&109;&111;&118;&105;&110;&107;&32;&116;&97;&114;&103;&101;&116;&34;
@@
@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@ &45;&45;&101;&110;&99;&111;&100;&105;&110;&103;&58;&32;&85;&84;&70;&45;&56;
@@
@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&116;&111;&32;&112;&111;&115;&116;&32;&112;&97;&103;&101;&115;
@@ &108;&111;&99;&97;&108;&32;&116;&118;&116;&114;&111;&112;&101;&115;&61;&114;&101;&113;&117;&105;&114;&101;&32;&34;&116;&118;&116;&114;&111;&112;&101;&115;&34;
@@ &45;&45;&82;&101;&113;&117;&105;&114;&101;&100;&32;&102;&111;&114;&32;&101;&110;&99;&111;&100;&105;&110;&103;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&32;&97;&114;&116;&105;&99;&108;&101;&32;&116;&105;&116;&108;&101;&115;
@@ &108;&111;&99;&97;&108;&32;&117;&114;&108;&101;&110;&99;&111;&100;&101;&61;&114;&101;&113;&117;&105;&114;&101;&32;&34;&117;&114;&108;&101;&110;&99;&111;&100;&101;&34;
@@
@@ &45;&45;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&100;&97;&116;&97;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ &97;&100;&101;&112;&115;&61;&123;
@@ &32;&32;&123;
@@ &32;&32;&32;&32;&34;&80;&105;&108;&111;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&111;&112;&32;&66;&97;&110;&97;&110;&97;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&114;&105;&110;&103;&105;&110;&103;&32;&85;&112;&32;&66;&117;&115;&116;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&75;&101;&121;&32;&68;&101;&99;&105;&115;&105;&111;&110;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&86;&105;&115;&105;&116;&105;&110;&103;&32;&79;&117;&114;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&67;&104;&97;&114;&105;&116;&121;&32;&68;&114;&105;&118;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&121;&32;&77;&111;&116;&104;&101;&114;&44;&32;&84;&104;&101;&32;&67;&97;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&73;&110;&32;&71;&111;&100;&32;&87;&101;&32;&84;&114;&117;&115;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&116;&111;&114;&109;&105;&110;&103;&32;&116;&104;&101;&32;&67;&97;&115;&116;&108;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&80;&105;&101;&114;&32;&80;&114;&101;&115;&115;&117;&114;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&80;&117;&98;&108;&105;&99;&32;&82;&101;&108;&97;&116;&105;&111;&110;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&97;&114;&116;&97;&32;&67;&111;&109;&112;&108;&101;&120;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&101;&101;&102;&32;&67;&111;&110;&115;&111;&109;&109;&195;&169;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&104;&111;&99;&107;&32;&97;&110;&100;&32;&65;&119;&119;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&116;&97;&102;&102;&32;&73;&110;&102;&101;&99;&116;&105;&111;&110;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&105;&115;&115;&105;&110;&103;&32;&75;&105;&116;&116;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&65;&108;&116;&97;&114;&32;&69;&103;&111;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&74;&117;&115;&116;&105;&99;&101;&32;&73;&115;&32;&66;&108;&105;&110;&100;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&101;&115;&116;&32;&77;&97;&110;&32;&102;&111;&114;&32;&116;&104;&101;&32;&71;&79;&66;&34;&44;
@@ &32;&32;&32;&32;&34;&87;&104;&105;&115;&116;&108;&101;&114;&39;&115;&32;&77;&111;&116;&104;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&78;&111;&116;&32;&87;&105;&116;&104;&111;&117;&116;&32;&77;&121;&32;&68;&97;&117;&103;&104;&116;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&76;&101;&116;&32;&39;&69;&109;&32;&69;&97;&116;&32;&67;&97;&107;&101;&34;
@@ &32;&32;&125;&44;
@@ &32;&32;&123;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&79;&110;&101;&32;&87;&104;&101;&114;&101;&32;&77;&105;&99;&104;&97;&101;&108;&32;&76;&101;&97;&118;&101;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&79;&110;&101;&32;&87;&104;&101;&114;&101;&32;&84;&104;&101;&121;&32;&66;&117;&105;&108;&100;&32;&97;&32;&72;&111;&117;&115;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&194;&161;&65;&109;&105;&103;&111;&115;&33;&34;&44;
@@ &32;&32;&32;&32;&34;&71;&111;&111;&100;&32;&71;&114;&105;&101;&102;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&97;&100;&32;&83;&97;&99;&107;&34;&44;
@@ &32;&32;&32;&32;&34;&65;&102;&116;&101;&114;&110;&111;&111;&110;&32;&68;&101;&108;&105;&103;&104;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&119;&105;&116;&99;&104;&32;&72;&105;&116;&116;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&81;&117;&101;&101;&110;&32;&102;&111;&114;&32;&97;&32;&68;&97;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&66;&117;&114;&110;&105;&110;&103;&32;&76;&111;&118;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&82;&101;&97;&100;&121;&44;&32;&65;&105;&109;&44;&32;&77;&97;&114;&114;&121;&32;&77;&101;&34;&44;
@@ &32;&32;&32;&32;&34;&79;&117;&116;&32;&111;&110;&32;&97;&32;&76;&105;&109;&98;&34;&44;
@@ &32;&32;&32;&32;&34;&72;&97;&110;&100;&32;&116;&111;&32;&71;&111;&100;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&111;&116;&104;&101;&114;&98;&111;&121;&32;&88;&88;&88;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&73;&109;&109;&97;&99;&117;&108;&97;&116;&101;&32;&69;&108;&101;&99;&116;&105;&111;&110;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&119;&111;&114;&100;&32;&111;&102;&32;&68;&101;&115;&116;&105;&110;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&101;&97;&116;&32;&116;&104;&101;&32;&86;&101;&97;&108;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&112;&114;&105;&110;&103;&32;&66;&114;&101;&97;&107;&111;&117;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&82;&105;&103;&104;&116;&101;&111;&117;&115;&32;&66;&114;&111;&116;&104;&101;&114;&115;&34;&44;
@@ &32;&32;&125;&44;
@@ &32;&32;&123;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&67;&97;&98;&105;&110;&32;&83;&104;&111;&119;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&111;&114;&32;&66;&114;&105;&116;&105;&115;&104;&32;&69;&121;&101;&115;&32;&79;&110;&108;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&111;&114;&103;&101;&116;&45;&77;&101;&45;&78;&111;&119;&34;&44;
@@ &32;&32;&32;&32;&34;&78;&111;&116;&97;&112;&117;&115;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&114;&46;&32;&70;&34;&44;
@@ &32;&32;&32;&32;&34;&84;&104;&101;&32;&79;&99;&101;&97;&110;&32;&87;&97;&108;&107;&101;&114;&34;&44;
@@ &32;&32;&32;&32;&34;&80;&114;&105;&115;&111;&110;&32;&66;&114;&101;&97;&107;&45;&73;&110;&34;&44;
@@ &32;&32;&32;&32;&34;&77;&97;&107;&105;&110;&103;&32;&97;&32;&83;&116;&97;&110;&100;&34;&44;
@@ &32;&32;&32;&32;&34;&83;&46;&79;&46;&66;&46;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&97;&107;&105;&110;&39;&32;&73;&116;&34;&44;
@@ &32;&32;&32;&32;&34;&70;&97;&109;&105;&108;&121;&32;&84;&105;&101;&115;&34;&44;
@@ &32;&32;&32;&32;&34;&69;&120;&105;&116;&32;&83;&116;&114;&97;&116;&101;&103;&121;&34;&44;
@@ &32;&32;&32;&32;&34;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&65;&114;&114;&101;&115;&116;&101;&100;&34;
@@ &32;&32;&125;&44;
@@ &125;
@@ &45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ &45;&45;&73;&110;&116;&101;&114;&119;&105;&107;&105;&32;&100;&97;&116;&97;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ &108;&111;&99;&97;&108;&32;&116;&111;&107;&101;&110;&115;&61;&123;&125;
@@
@@ &100;&111;&32;&45;&45;&119;&105;&107;&105;&112;&101;&100;&105;&97;
@@ &32;&32;&45;&45;&78;&117;&109;&98;&101;&114;&115;&32;&102;&111;&114;&32;&101;&112;&105;&115;&111;&100;&101;&115;&32;&119;&105;&116;&104;&32;&97;&109;&98;&105;&103;&117;&111;&117;&115;&32;&116;&105;&116;&108;&101;&115;&44;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&45;&119;&105;&115;&101;&44;
@@ &32;&32;&45;&45;&119;&104;&111;&115;&101;&32;&97;&114;&116;&105;&99;&108;&101;&32;&116;&105;&116;&108;&101;&115;&32;&101;&110;&100;&32;&119;&105;&116;&104;&32;&34;&40;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&41;&34;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&49;&44;&50;&44;&56;&44;&49;&49;&44;&50;&48;&44;&50;&49;&44;&50;&50;&125;&44;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&49;
@@ &32;&32;&32;&32;&123;&53;&44;&54;&44;&56;&44;&57;&44;&49;&49;&44;&49;&50;&44;&49;&56;&125;&44;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&50;
@@ &32;&32;&32;&32;&123;&49;&48;&44;&49;&49;&44;&49;&50;&125;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&51;
@@ &32;&32;&125;
@@
@@ &32;&32;&45;&45;&99;&111;&110;&115;&116;&114;&117;&99;&116;&32;&108;&111;&111;&107;&117;&112;&32;&116;&97;&98;&108;&101;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&61;&123;&125;
@@ &32;&32;&102;&111;&114;&32;&115;&61;&49;&44;&35;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&91;&115;&93;&61;&123;&125;
@@ &32;&32;&32;&32;&102;&111;&114;&32;&105;&61;&49;&44;&35;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&91;&115;&93;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&91;&115;&93;&91;&100;&105;&115;&97;&109;&98;&105;&103;&101;&112;&115;&91;&115;&93;&91;&105;&93;&93;&61;&116;&114;&117;&101;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@
@@ &32;&32;&45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&32;&85;&82;&76;
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&119;&105;&107;&105;&112;&101;&100;&105;&97;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&112;&97;&103;&101;&110;&97;&109;&101;&44;&39;&32;&39;&44;&39;&95;&39;&41;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&115;&116;&114;&105;&110;&103;&40;&112;&97;&103;&101;&110;&97;&109;&101;&41;
@@ &32;&32;&32;&32;&105;&102;&32;&100;&105;&115;&97;&109;&98;&105;&103;&117;&97;&116;&101;&100;&91;&115;&93;&91;&101;&93;&32;&116;&104;&101;&110;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&84;&101;&99;&104;&110;&105;&99;&97;&108;&108;&121;&44;&32;&112;&97;&114;&101;&110;&116;&104;&101;&115;&101;&115;&32;&100;&111;&110;&39;&116;&32;&104;&97;&118;&101;&32;&116;&111;&32;&98;&101;&32;&112;&101;&114;&99;&101;&110;&116;&45;&101;&110;&99;&111;&100;&101;&100;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&102;&111;&114;&32;&72;&84;&84;&80;&32;&85;&82;&73;&115;&32;&98;&101;&99;&97;&117;&115;&101;&32;&116;&104;&101;&121;&39;&114;&101;&32;&117;&110;&117;&115;&101;&100;&32;&115;&117;&98;&45;&100;&101;&108;&105;&109;&115;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&112;&101;&114;&32;&115;&101;&99;&116;&105;&111;&110;&32;&50;&46;&50;&32;&111;&102;&32;&82;&70;&67;&32;&51;&57;&56;&54;&44;&32;&115;&111;&32;&119;&101;&32;&99;&111;&110;&99;&97;&116;&101;&110;&97;&116;&101;&32;&97;&102;&116;&101;&114;
@@ &32;&32;&32;&32;&32;&32;&45;&45;&116;&104;&101;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&112;&101;&114;&99;&101;&110;&116;&45;&101;&110;&99;&111;&100;&101;&115;&32;&97;&108;&108;&32;&115;&117;&98;&45;&100;&101;&108;&105;&109;&115;
@@ &32;&32;&32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&112;&97;&103;&101;&110;&97;&109;&101;&46;&46;&34;&95;&40;&65;&114;&114;&101;&115;&116;&101;&100;&95;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&41;&34;
@@ &32;&32;&32;&32;&101;&110;&100;
@@
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&34;&104;&116;&116;&112;&58;&47;&47;&101;&110;&46;&119;&105;&107;&105;&112;&101;&100;&105;&97;&46;&111;&114;&103;&47;&119;&105;&107;&105;&47;&34;&46;&46;&112;&97;&103;&101;&110;&97;&109;&101;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@
@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&85;&82;&76;&32;&111;&102;&32;&116;&104;&101;&32;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&87;&105;&107;&105;&97;&32;&101;&110;&116;&114;&121;
@@ &102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&119;&105;&107;&105;&97;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&112;&97;&103;&101;&110;&97;&109;&101;&44;&39;&32;&39;&44;&39;&95;&39;&41;
@@ &32;&32;&32;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&117;&114;&108;&101;&110;&99;&111;&100;&101;&46;&115;&116;&114;&105;&110;&103;&40;&112;&97;&103;&101;&110;&97;&109;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&34;&104;&116;&116;&112;&58;&47;&47;&97;&114;&114;&101;&115;&116;&101;&100;&100;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&46;&119;&105;&107;&105;&97;&46;&99;&111;&109;&47;&119;&105;&107;&105;&47;&34;&46;&46;&112;&97;&103;&101;&110;&97;&109;&101;
@@ &101;&110;&100;
@@
@@ &100;&111;&32;&45;&45;&66;&97;&108;&98;&111;&97;&32;&79;&98;&115;&101;&114;&118;&101;&114;&45;&80;&105;&99;&97;&121;&117;&110;&101;
@@ &32;&32;&45;&45;&83;&101;&97;&115;&111;&110;&32;&49;&32;&101;&112;&105;&115;&111;&100;&101;&115;&32;&116;&104;&97;&116;&32;&97;&114;&101;&32;&108;&105;&115;&116;&101;&100;&32;&97;&116;&32;&100;&105;&102;&102;&101;&114;&101;&110;&116;&32;&110;&117;&109;&98;&101;&114;&115;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&115;&49;&102;&108;&105;&112;&115;&61;&123;&32;&91;&53;&93;&61;&54;&44;&32;&91;&54;&93;&61;&53;&44;&32;&91;&55;&93;&61;&56;&44;&32;&91;&56;&93;&61;&55;&44;&32;&91;&49;&54;&93;&61;&49;&56;&44;&32;&91;&49;&55;&93;&61;&49;&54;&44;&32;&91;&49;&56;&93;&61;&49;&55;&32;&125;
@@
@@ &32;&32;&45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&101;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&85;&82;&76;&32;&111;&102;&32;&116;&104;&101;&32;&101;&112;&105;&115;&111;&100;&101;&39;&115;&32;&112;&97;&103;&101;&32;&111;&110;&32;&116;&104;&101;&45;&111;&112;&46;&99;&111;&109;
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&116;&104;&101;&111;&112;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&45;&45;&99;&111;&114;&114;&101;&99;&116;&32;&79;&117;&116;&79;&102;&79;&114;&100;&101;&114;&32;&83;&101;&97;&115;&111;&110;&32;&49;&32;&101;&112;&105;&115;&111;&100;&101;&115;
@@ &32;&32;&32;&32;&105;&102;&32;&115;&61;&61;&49;&32;&116;&104;&101;&110;&32;&101;&32;&61;&32;&115;&49;&102;&108;&105;&112;&115;&91;&101;&93;&32;&111;&114;&32;&101;&32;&101;&110;&100;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&104;&116;&116;&112;&58;&47;&47;&116;&104;&101;&45;&111;&112;&46;&99;&111;&109;&47;&101;&112;&105;&115;&111;&100;&101;&47;&37;&105;&37;&48;&50;&105;&34;&44;&115;&44;&101;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@
@@ &100;&111;&32;&45;&45;&73;&77;&68;&66;
@@ &32;&32;&45;&45;&119;&104;&121;&32;&104;&101;&108;&108;&111;&44;&32;&117;&110;&114;&101;&97;&100;&97;&98;&108;&101;&32;&98;&108;&111;&99;&107;&32;&111;&102;&32;&97;&114;&98;&105;&116;&114;&97;&114;&121;&32;&105;&110;&100;&105;&99;&101;&115;&44;&32;&105;&116;&32;&115;&117;&114;&101;&32;&115;&117;&99;&107;&115;
@@ &32;&32;&45;&45;&116;&104;&97;&116;&32;&73;&32;&104;&97;&118;&101;&32;&116;&111;&32;&117;&115;&101;&32;&121;&111;&117;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&116;&116;&110;&117;&109;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&32;&48;&53;&49;&53;&50;&51;&54;&44;&32;&48;&53;&49;&53;&50;&53;&54;&44;&32;&48;&53;&49;&53;&50;&49;&50;&44;&32;&48;&53;&49;&53;&50;&50;&51;&44;&32;&48;&53;&49;&53;&50;&53;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&49;&52;&44;&32;&48;&53;&49;&53;&50;&51;&49;&44;&32;&48;&53;&49;&53;&50;&50;&49;&44;&32;&48;&53;&49;&53;&50;&52;&55;&44;&32;&48;&53;&49;&53;&50;&51;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&51;&56;&44;&32;&48;&53;&49;&53;&50;&50;&54;&44;&32;&48;&53;&49;&53;&50;&49;&48;&44;&32;&48;&53;&49;&53;&50;&52;&52;&44;&32;&48;&53;&49;&53;&50;&52;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&50;&56;&44;&32;&48;&53;&49;&53;&50;&48;&56;&44;&32;&48;&53;&49;&53;&50;&50;&50;&44;&32;&48;&53;&49;&53;&50;&49;&49;&44;&32;&48;&53;&49;&53;&50;&53;&56;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&51;&50;&44;&32;&48;&53;&49;&53;&50;&50;&52;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&48;&53;&49;&53;&50;&53;&51;&44;&32;&48;&53;&49;&53;&50;&53;&52;&44;&32;&48;&53;&49;&53;&50;&48;&57;&44;&32;&48;&53;&49;&53;&50;&49;&57;&44;&32;&48;&53;&49;&53;&50;&52;&51;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&48;&55;&44;&32;&48;&53;&49;&53;&50;&52;&56;&44;&32;&48;&53;&49;&53;&50;&51;&57;&44;&32;&48;&53;&49;&53;&50;&49;&51;&44;&32;&48;&53;&49;&53;&50;&52;&48;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&51;&52;&44;&32;&48;&53;&49;&53;&50;&50;&48;&44;&32;&48;&53;&49;&53;&50;&50;&57;&44;&32;&48;&53;&49;&53;&50;&53;&49;&44;&32;&48;&53;&49;&53;&50;&53;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&50;&55;&44;&32;&48;&53;&49;&53;&50;&52;&53;&44;&32;&48;&53;&49;&53;&50;&52;&49;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&48;&53;&49;&53;&50;&53;&48;&44;&32;&48;&53;&49;&53;&50;&52;&57;&44;&32;&48;&53;&49;&53;&50;&49;&56;&44;&32;&48;&53;&49;&53;&50;&51;&51;&44;&32;&48;&53;&49;&53;&50;&51;&48;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&53;&50;&44;&32;&48;&53;&49;&53;&50;&51;&55;&44;&32;&48;&53;&49;&53;&50;&50;&53;&44;&32;&48;&53;&49;&53;&50;&52;&50;&44;&32;&48;&53;&49;&53;&50;&49;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&48;&53;&49;&53;&50;&49;&55;&44;&32;&48;&53;&49;&53;&50;&49;&53;&44;&32;&48;&55;&53;&55;&51;&56;&54;&44;&32;&125;
@@ &32;&32;&125;
@@
@@ &32;&32;&45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&85;&82;&76;&32;&102;&111;&114;&32;&116;&104;&101;&32;&101;&112;&105;&115;&111;&100;&101;&39;&115;&32;&73;&77;&68;&66;&32;&112;&97;&103;&101;
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&105;&109;&100;&98;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&104;&116;&116;&112;&58;&47;&47;&119;&119;&119;&46;&105;&109;&100;&98;&46;&99;&111;&109;&47;&116;&105;&116;&108;&101;&47;&116;&116;&37;&48;&55;&105;&47;&34;&44;&116;&116;&110;&117;&109;&115;&91;&115;&93;&91;&101;&93;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@
@@ &100;&111;&32;&45;&45;&72;&117;&108;&117;&44;&32;&121;&111;&117;&32;&107;&110;&111;&119;&44;&32;&106;&117;&115;&116;&32;&105;&110;&32;&99;&97;&115;&101;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&119;&97;&116;&99;&104;&110;&117;&109;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&32;&32;&32;&32;&53;&56;&57;&44;&32;&32;&49;&55;&56;&54;&44;&32;&32;&32;&53;&56;&53;&44;&32;&32;&49;&55;&56;&49;&44;&32;&32;&49;&55;&56;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&56;&48;&44;&32;&32;&32;&53;&57;&48;&44;&32;&32;&32;&53;&56;&56;&44;&32;&32;&32;&53;&56;&54;&44;&32;&32;&32;&53;&55;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&55;&54;&44;&32;&32;&32;&53;&55;&57;&44;&32;&32;&32;&53;&55;&55;&44;&32;&32;&32;&54;&52;&52;&44;&32;&32;&49;&55;&56;&51;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&57;&49;&44;&32;&32;&32;&53;&56;&50;&44;&32;&32;&32;&53;&56;&52;&44;&32;&32;&32;&53;&55;&56;&44;&32;&32;&32;&53;&56;&49;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&53;&56;&51;&44;&32;&32;&32;&53;&56;&55;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&32;&32;&54;&54;&52;&49;&44;&32;&32;&54;&54;&52;&52;&44;&32;&32;&54;&54;&52;&51;&44;&32;&32;&54;&54;&51;&56;&44;&32;&32;&54;&54;&51;&57;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&56;&56;&51;&44;&32;&49;&51;&50;&50;&54;&44;&32;&49;&50;&53;&54;&49;&44;&32;&49;&50;&54;&48;&57;&44;&32;&49;&50;&50;&57;&56;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&50;&55;&49;&44;&32;&49;&50;&57;&48;&49;&44;&32;&49;&51;&50;&52;&56;&44;&32;&49;&51;&50;&54;&55;&44;&32;&49;&51;&50;&55;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&51;&50;&48;&54;&44;&32;&49;&50;&50;&51;&50;&44;&32;&49;&50;&53;&51;&50;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&32;&32;&54;&54;&52;&48;&44;&32;&32;&54;&54;&52;&50;&44;&32;&32;&54;&54;&51;&53;&44;&32;&32;&54;&54;&51;&54;&44;&32;&32;&54;&54;&51;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&52;&57;&55;&44;&32;&49;&55;&49;&56;&57;&44;&32;&49;&50;&53;&50;&51;&44;&32;&49;&51;&49;&51;&57;&44;&32;&49;&50;&50;&50;&53;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&49;&50;&51;&49;&55;&44;&32;&49;&50;&49;&57;&52;&44;&32;&49;&50;&50;&49;&53;&125;&44;
@@ &32;&32;&125;
@@
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&104;&117;&108;&117;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&32;&32;&34;&104;&116;&116;&112;&58;&47;&47;&104;&117;&108;&117;&46;&99;&111;&109;&47;&119;&97;&116;&99;&104;&47;&37;&105;&34;&44;&32;&119;&97;&116;&99;&104;&110;&117;&109;&115;&91;&115;&93;&91;&101;&93;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@
@@ &100;&111;&32;&45;&45;&78;&101;&116;&102;&108;&105;&120;&32;&87;&97;&116;&99;&104;&32;&73;&110;&115;&116;&97;&110;&116;&108;&121;
@@ &32;&32;&45;&45;&73;&116;&39;&115;&32;&108;&97;&114;&103;&101;&108;&121;&32;&115;&101;&113;&117;&101;&110;&116;&105;&97;&108;&44;&32;&98;&117;&116;&32;&110;&111;&116;&32;&113;&117;&105;&116;&101;&46;
@@ &32;&32;&45;&45;&73;&32;&112;&114;&105;&110;&116;&101;&100;&32;&111;&117;&116;&32;&97;&108;&108;&32;&116;&104;&101;&32;&110;&117;&109;&98;&101;&114;&115;&32;&97;&110;&100;&32;&109;&111;&118;&101;&100;&32;&116;&104;&101;&109;&32;&97;&114;&111;&117;&110;&100;
@@ &32;&32;&45;&45;&116;&111;&32;&102;&105;&116;&32;&116;&104;&101;&32;&99;&111;&114;&114;&101;&99;&116;&32;&111;&114;&100;&101;&114;&32;&40;&119;&104;&105;&99;&104;&32;&105;&115;&32;&98;&111;&116;&104;&32;&105;&110;&99;&111;&110;&115;&105;&115;&116;&101;&110;&116;
@@ &32;&32;&45;&45;&105;&110;&32;&73;&68;&115;&32;&116;&111;&32;&78;&101;&116;&102;&108;&105;&120;&32;&111;&114;&100;&101;&114;&32;&97;&110;&100;&32;&78;&101;&116;&102;&108;&105;&120;&32;&116;&111;&32;&68;&86;&68;&32;&111;&114;&100;&101;&114;&41;&46;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&109;&111;&118;&105;&101;&105;&100;&115;&61;&123;
@@ &32;&32;&32;&32;&123;&32;&55;&48;&49;&51;&51;&54;&55;&51;&44;&32;&55;&48;&49;&51;&51;&54;&55;&52;&44;&32;&55;&48;&49;&51;&51;&54;&55;&53;&44;&32;&55;&48;&49;&51;&51;&54;&55;&55;&44;&32;&55;&48;&49;&51;&51;&54;&55;&54;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&55;&56;&44;&32;&55;&48;&49;&51;&51;&54;&56;&48;&44;&32;&55;&48;&49;&51;&51;&54;&55;&57;&44;&32;&55;&48;&49;&51;&51;&54;&56;&49;&44;&32;&55;&48;&49;&51;&51;&54;&56;&50;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&56;&51;&44;&32;&55;&48;&49;&51;&51;&54;&56;&52;&44;&32;&55;&48;&49;&51;&51;&54;&56;&53;&44;&32;&55;&48;&49;&51;&51;&54;&56;&54;&44;&32;&55;&48;&49;&51;&51;&54;&56;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&56;&56;&44;&32;&55;&48;&49;&51;&51;&54;&56;&57;&44;&32;&55;&48;&49;&51;&51;&54;&57;&48;&44;&32;&55;&48;&49;&51;&51;&54;&57;&49;&44;&32;&55;&48;&49;&51;&51;&54;&57;&50;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&54;&57;&51;&44;&32;&55;&48;&49;&51;&51;&54;&57;&52;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&55;&48;&49;&51;&51;&54;&57;&53;&44;&32;&55;&48;&49;&51;&51;&54;&57;&54;&44;&32;&55;&48;&49;&51;&51;&54;&57;&55;&44;&32;&55;&48;&49;&51;&51;&54;&57;&56;&44;&32;&55;&48;&49;&51;&51;&54;&57;&57;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&48;&48;&44;&32;&55;&48;&49;&51;&51;&55;&48;&49;&44;&32;&55;&48;&49;&51;&51;&55;&48;&50;&44;&32;&55;&48;&49;&51;&51;&55;&48;&51;&44;&32;&55;&48;&49;&51;&51;&55;&48;&52;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&48;&53;&44;&32;&55;&48;&49;&51;&51;&55;&48;&54;&44;&32;&55;&48;&49;&51;&51;&55;&48;&55;&44;&32;&55;&48;&49;&51;&51;&55;&48;&56;&44;&32;&55;&48;&49;&51;&51;&55;&49;&49;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&48;&57;&44;&32;&55;&48;&49;&51;&51;&55;&49;&48;&44;&32;&55;&48;&49;&51;&51;&55;&49;&50;&44;&32;&125;&44;
@@ &32;&32;&32;&32;&123;&32;&55;&48;&49;&51;&51;&55;&49;&51;&44;&32;&55;&48;&49;&51;&51;&55;&49;&52;&44;&32;&55;&48;&49;&51;&51;&55;&49;&53;&44;&32;&55;&48;&49;&51;&51;&55;&49;&54;&44;&32;&55;&48;&49;&51;&51;&55;&49;&55;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&49;&56;&44;&32;&55;&48;&49;&51;&51;&55;&50;&48;&44;&32;&55;&48;&49;&51;&51;&55;&49;&57;&44;&32;&55;&48;&49;&51;&51;&55;&50;&49;&44;&32;&55;&48;&49;&51;&51;&55;&50;&50;&44;
@@ &32;&32;&32;&32;&32;&32;&55;&48;&49;&51;&51;&55;&50;&51;&44;&32;&55;&48;&49;&51;&51;&55;&50;&52;&44;&32;&55;&48;&49;&51;&51;&55;&50;&53;&44;&32;&125;
@@ &32;&32;&125;
@@
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&116;&111;&107;&101;&110;&115;&46;&110;&101;&116;&102;&108;&105;&120;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&32;&32;&34;&104;&116;&116;&112;&58;&47;&47;&119;&119;&119;&46;&110;&101;&116;&102;&108;&105;&120;&46;&99;&111;&109;&47;&87;&105;&80;&108;&97;&121;&101;&114;&63;&109;&111;&118;&105;&101;&105;&100;&61;&37;&105;&34;&44;&109;&111;&118;&105;&101;&105;&100;&115;&91;&115;&93;&91;&101;&93;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@
@@ &45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ &45;&45;&65;&114;&114;&101;&115;&116;&101;&100;&32;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&32;&84;&86;&32;&84;&114;&111;&112;&101;&115;&32;&82;&101;&99;&97;&112;&32;&115;&116;&117;&102;&102;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@ &108;&111;&99;&97;&108;&32;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;
@@ &100;&111;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&116;&101;&109;&112;&108;&97;&116;&101;&61;&91;&61;&91;
@@ &37;&37;&83;&84;&65;&82;&84;&76;&73;&78;&75;&83;&37;&37;
@@ &45;&45;&45;&45;
@@ &73;&110;&116;&101;&114;&119;&105;&107;&105;&58;&32;&91;&91;&36;&119;&105;&107;&105;&112;&101;&100;&105;&97;&32;&87;&105;&107;&105;&112;&101;&100;&105;&97;&93;&93;&32;&45;&45;&32;&91;&91;&36;&119;&105;&107;&105;&97;&32;&87;&105;&107;&105;&97;&93;&93;&32;&45;&45;&32;&91;&91;&36;&116;&104;&101;&111;&112;&32;&66;&97;&108;&98;&111;&97;&32;&79;&98;&115;&101;&114;&118;&101;&114;&45;&80;&105;&99;&97;&121;&117;&110;&101;&93;&93;&32;&45;&45;&32;&91;&91;&36;&105;&109;&100;&98;&32;&73;&77;&68;&66;&93;&93;
@@
@@ &87;&97;&116;&99;&104;&32;&110;&111;&119;&58;&32;&91;&91;&36;&104;&117;&108;&117;&32;&72;&117;&108;&117;&93;&93;&32;&45;&45;&32;&91;&91;&36;&110;&101;&116;&102;&108;&105;&120;&32;&78;&101;&116;&102;&108;&105;&120;&93;&93;
@@ &45;&45;&45;&45;
@@ &37;&37;&69;&78;&68;&76;&73;&78;&75;&83;&37;&37;
@@ &93;&61;&93;
@@ &32;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&114;&101;&116;&117;&114;&110;&32;&40;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&101;&109;&112;&108;&97;&116;&101;&44;&34;&37;&36;&40;&37;&119;&43;&41;&34;&44;&102;&117;&110;&99;&116;&105;&111;&110;&40;&116;&111;&107;&101;&110;&41;&32;&114;&101;&116;&117;&114;&110;&32;&116;&111;&107;&101;&110;&115;&91;&116;&111;&107;&101;&110;&93;&40;&115;&44;&101;&41;&32;&101;&110;&100;&41;&41;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@
@@ &45;&45;&70;&117;&110;&99;&116;&105;&111;&110;&32;&116;&104;&97;&116;&32;&114;&101;&116;&117;&114;&110;&115;&32;&116;&104;&101;&32;&112;&97;&103;&101;&32;&110;&97;&109;&101;&32;&111;&102;&32;&116;&104;&101;&32;&101;&112;&105;&115;&111;&100;&101;&39;&115;&32;&84;&86;&84;&114;&111;&112;&101;&115;&32;&82;&101;&99;&97;&112;&32;&112;&97;&103;&101;&46;
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&114;&101;&99;&97;&112;&95;&112;&97;&103;&101;&110;&97;&109;&101;&40;&115;&44;&101;&41;
@@ &32;&32;&45;&45;&103;&101;&116;&32;&116;&104;&101;&32;&101;&112;&32;&116;&105;&116;&108;&101;
@@ &32;&32;&108;&111;&99;&97;&108;&32;&116;&105;&116;&108;&101;&61;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;
@@ &32;&32;&45;&45;&114;&101;&112;&108;&97;&99;&101;&32;&116;&104;&101;&32;&195;&169;&32;&105;&110;&32;&66;&101;&101;&102;&32;&67;&111;&110;&115;&111;&109;&109;&195;&169;
@@ &32;&32;&116;&105;&116;&108;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&105;&116;&108;&101;&44;&39;&195;&169;&39;&44;&39;&101;&39;&41;
@@ &32;&32;&45;&45;&116;&114;&97;&110;&115;&102;&111;&114;&109;&32;&116;&111;&32;&67;&97;&109;&101;&108;&67;&97;&115;&101;&100;&32;&87;&105;&107;&105;&87;&111;&114;&100;
@@ &32;&32;&116;&105;&116;&108;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&105;&116;&108;&101;&44;&39;&32;&40;&37;&108;&63;&41;&39;&44;&115;&116;&114;&105;&110;&103;&46;&117;&112;&112;&101;&114;&41;
@@ &32;&32;&45;&45;&82;&101;&109;&111;&118;&101;&32;&97;&108;&108;&32;&110;&111;&110;&45;&97;&108;&112;&104;&97;&110;&117;&109;&101;&114;&105;&99;&32;&99;&104;&97;&114;&97;&99;&116;&101;&114;&115;
@@ &32;&32;&116;&105;&116;&108;&101;&61;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&116;&105;&116;&108;&101;&44;&39;&37;&87;&39;&44;&39;&39;&41;
@@
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&34;&82;&101;&99;&97;&112;&47;&65;&114;&114;&101;&115;&116;&101;&100;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&83;&37;&105;&69;&37;&105;&37;&115;&34;&44;&115;&44;&101;&44;&116;&105;&116;&108;&101;&41;
@@ &101;&110;&100;
@@
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&112;&111;&115;&116;&95;&97;&100;&95;&114;&101;&99;&97;&112;&95;&115;&116;&97;&114;&116;&101;&114;&40;&115;&44;&101;&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;
@@ &32;&32;&32;&32;&114;&101;&99;&97;&112;&95;&112;&97;&103;&101;&110;&97;&109;&101;&40;&115;&44;&101;&41;&44;
@@ &32;&32;&32;&32;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;
@@ &32;&32;&32;&32;&32;&32;&34;&92;&110;&92;&110;&37;&115;&92;&110;&33;&84;&104;&101;&32;&39;&39;&65;&114;&114;&101;&115;&116;&101;&100;&68;&101;&118;&101;&108;&111;&112;&109;&101;&110;&116;&39;&39;&32;&101;&112;&105;&115;&111;&100;&101;&32;&92;&34;&37;&115;&92;&34;&32;&112;&114;&111;&118;&105;&100;&101;&115;&32;&101;&120;&97;&109;&112;&108;&101;&115;&32;&111;&102;&58;&92;&110;&92;&110;&34;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;&40;&115;&44;&101;&41;&44;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;&41;&44;
@@ &32;&32;&32;&32;&34;&83;&84;&85;&65;&82;&84;&34;&44;
@@ &32;&32;&32;&32;&34;&65;&100;&100;&105;&110;&103;&32;&105;&110;&116;&101;&114;&119;&105;&107;&105;&32;&108;&105;&110;&107;&115;&32;&97;&110;&100;&32;&101;&120;&97;&109;&112;&108;&101;&32;&104;&101;&97;&100;&101;&114;&32;&97;&117;&116;&111;&109;&97;&116;&105;&99;&97;&108;&108;&121;&32;&40;&65;&115;&107;&32;&109;&101;&32;&97;&98;&111;&117;&116;&32;&76;&117;&97;&41;&34;&41;
@@ &101;&110;&100;
@@
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&117;&112;&100;&97;&116;&101;&95;&108;&105;&110;&107;&115;&40;&114;&101;&97;&115;&111;&110;&41;
@@ &32;&32;&114;&101;&116;&117;&114;&110;&32;&102;&117;&110;&99;&116;&105;&111;&110;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&45;&45;&117;&110;&116;&105;&108;&32;&99;&111;&109;&109;&101;&110;&116;&32;&115;&121;&110;&116;&97;&120;&32;&105;&115;&32;&99;&104;&97;&110;&103;&101;&100;&44;&32;&65;&109;&105;&103;&111;&115;&32;&105;&115;&32;&109;&97;&110;&117;&97;&108;&45;&111;&110;&108;&121;
@@ &32;&32;&32;&32;&105;&102;&32;&115;&61;&61;&50;&32;&97;&110;&100;&32;&101;&61;&61;&51;&32;&116;&104;&101;&110;
@@ &32;&32;&32;&32;&32;&32;&112;&114;&105;&110;&116;&32;&34;&40;&83;&107;&105;&112;&112;&105;&110;&103;&32;&65;&109;&105;&103;&111;&115;&32;&98;&101;&99;&97;&117;&115;&101;&32;&116;&104;&101;&32;&108;&105;&110;&107;&115;&32;&103;&111;&32;&97;&108;&108;&32;&115;&99;&114;&101;&119;&121;&41;&34;
@@ &32;&32;&32;&32;&101;&108;&115;&101;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&110;&97;&109;&101;&61;&114;&101;&99;&97;&112;&95;&112;&97;&103;&101;&110;&97;&109;&101;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&112;&97;&103;&101;&97;&115;&105;&115;&61;&116;&118;&116;&114;&111;&112;&101;&115;&46;&103;&101;&116;&40;&112;&97;&103;&101;&110;&97;&109;&101;&41;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&103;&115;&117;&98;&115;&97;&102;&101;&108;&105;&110;&107;&115;&32;&61;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&97;&100;&95;&101;&112;&95;&108;&105;&110;&107;&115;&40;&115;&44;&101;&41;&44;&34;&37;&37;&34;&44;&34;&37;&37;&37;&37;&34;&41;
@@ &32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&115;&117;&99;&99;&101;&115;&115;
@@ &32;&32;&32;&32;&32;&32;&119;&104;&105;&108;&101;&32;&110;&111;&116;&32;&115;&117;&99;&99;&101;&115;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&108;&111;&99;&97;&108;&32;&99;&111;&100;&101;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&115;&117;&99;&99;&101;&115;&115;&44;&32;&99;&111;&100;&101;&32;&61;&32;&116;&118;&116;&114;&111;&112;&101;&115;&46;&112;&111;&115;&116;&40;&112;&97;&103;&101;&110;&97;&109;&101;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&32;&115;&116;&114;&105;&110;&103;&46;&103;&115;&117;&98;&40;&112;&97;&103;&101;&97;&115;&105;&115;&44;&34;&37;&37;&37;&37;&83;&84;&65;&82;&84;&76;&73;&78;&75;&83;&37;&37;&37;&37;&46;&45;&37;&37;&37;&37;&69;&78;&68;&76;&73;&78;&75;&83;&37;&37;&37;&37;&34;&44;&103;&115;&117;&98;&115;&97;&102;&101;&108;&105;&110;&107;&115;&41;&44;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&32;&32;&34;&83;&84;&85;&65;&82;&84;&34;&44;&114;&101;&97;&115;&111;&110;&41;
@@ &32;&32;&32;&32;&32;&32;&32;&32;&105;&102;&32;&110;&111;&116;&32;&115;&117;&99;&99;&101;&115;&115;&32;&116;&104;&101;&110;&32;&112;&114;&105;&110;&116;&40;&34;&82;&101;&116;&114;&121;&105;&110;&103;&46;&46;&46;&32;&34;&46;&46;&99;&111;&100;&101;&41;&32;&101;&110;&100;
@@ &32;&32;&32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@
@@ &108;&111;&99;&97;&108;&32;&102;&117;&110;&99;&116;&105;&111;&110;&32;&102;&111;&114;&95;&97;&108;&108;&95;&101;&112;&115;&40;&102;&41;
@@ &32;&32;&102;&111;&114;&32;&115;&61;&49;&44;&35;&97;&100;&101;&112;&115;&32;&100;&111;
@@ &32;&32;&32;&32;&102;&111;&114;&32;&101;&61;&49;&44;&35;&97;&100;&101;&112;&115;&91;&115;&93;&32;&100;&111;
@@ &32;&32;&32;&32;&32;&32;&112;&114;&105;&110;&116;&40;&115;&116;&114;&105;&110;&103;&46;&102;&111;&114;&109;&97;&116;&40;&39;&68;&111;&105;&110;&103;&32;&83;&101;&97;&115;&111;&110;&32;&37;&105;&32;&69;&112;&105;&115;&111;&100;&101;&32;&37;&105;&44;&32;&34;&37;&115;&34;&46;&46;&46;&39;&44;&115;&44;&101;&44;&97;&100;&101;&112;&115;&91;&115;&93;&91;&101;&93;&41;&41;
@@ &32;&32;&32;&32;&32;&32;&102;&40;&115;&44;&101;&41;
@@ &32;&32;&32;&32;&101;&110;&100;
@@ &32;&32;&101;&110;&100;
@@ &101;&110;&100;
@@ &45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;&45;
@@
@@ &45;&45;&79;&107;&97;&121;&44;&32;&112;&117;&116;&32;&121;&111;&117;&114;&32;&101;&120;&101;&99;&117;&116;&105;&110;&103;&32;&99;&111;&109;&109;&97;&110;&100;&115;&32;&100;&111;&119;&110;&32;&104;&101;&114;&101;&46;
[[/folder]]
Is there an issue? Send a MessageReason:
None


*{{Futurama}} (up to the four movies)

to:

*{{Futurama}} (up to through the four movies)

Changed: 45

Removed: 9816

Is there an issue? Send a MessageReason:
None



[[foldercontrol]]

[[folder:urlencode.lua]]
@@[=
local urlencode={}

--URL encode a string.
local function encode(str)
--Ensure all newlines are in CRLF form
str = string.gsub (str, "\r?\n", "\r\n")
--Percent-encode all non-unreserved characters
--as per RFC 3986, Section 2.3
--(except for space, which gets plus-encoded)
str = string.gsub (str, "([^%w%-%.%_%~ ])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
--Convert spaces to plus signs
return string.gsub (str, " ", "+")
end

--Make this function available as part of the module
urlencode.string = encode

--URL encode a table as a series of parameters.
function urlencode.table(t)
--table of argument strings
local argts, i= {}, 1
for k, v in pairs(t) do
argts[i]=encode(k).."="..encode(v)
i=i+1
end
return table.concat(argts,'&')
end

return urlencode

=]@@
[[/folder]]

[[folder:tvtropes.lua]]
@@[=
--Required to send to TVTropes site.
local http = require"socket.http"

--Required to create page post data.
local urlencode = require "urlencode"

local tvtropes={}

--Function that returns the authenticated TVTropes URL for the given page.
local function authpageurl(page)
return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page
end

local function fullname(page)
--Require pagename
assert(type(page)=="string","Destination page name required")
--If no namespace specified, assume Main
if not string.find(page,'/') then page="Main/"..page end

return page
end

--Function that posts the given page.
function tvtropes.post(page, body, author, reason)

page=fullname(page)

assert(type(body)=="string","Page body required")

local response =
{http.request(authpageurl(page),
urlencode.table{
action="post", post="save",
pagename=page, text=body,
author=author or "Anonymous",
reason=reason or ""
})}

--Error on any socket errors
assert(response[1],response[2])

--If it doesn't return Found, return nil, the status, and the body:
--sometimes it just rejects the password for some reason.
if tonumber(response[2])~=302 then
return nil, response[2], response[1]
else return true
end
end

--Technically, this is kind of a general function, but it's designed exclusively around
--TVTropes' source converter, so it's kept in here.
local html2plain
do
local ents = {quot='"', amp='&', lt='<', gt='>'}

function html2plain(src)
src=string.gsub(src,"<br/>","\n")
src=string.gsub(src,"&(%w-);",ents)
return src
end
end

--Function that gets a given page source.
function tvtropes.get(page)

page=fullname(page)

local body, code = http.request(
authpageurl(page)..'?action=source')

--Trigger error on socket failure
assert(body,code)

--Return the source converted back from the HTML conversion
return html2plain(body)
end

return tvtropes

=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=

--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]&61;]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]

to:

\n[[foldercontrol]]\n\n[[folder:urlencode.lua]]\n@@[=\nlocal urlencode={}\n\n--URL encode a string.\nlocal function encode(str)\n --Ensure all newlines are in CRLF form\n str = string.gsub (str, "\r?\n", "\r\n")\n --Percent-encode all non-unreserved characters\n --as per RFC 3986, Section 2.3\n --(except for space, which gets plus-encoded)\n str = string.gsub (str, "([^%w%-%.%_%~ ])",\n function (c) return string.format ("%%%02X", string.byte(c)) end)\n --Convert spaces to plus signs\n return string.gsub (str, " ", "+")\nend\n\n--Make this function available as part of the module\nurlencode.string = encode\n\n--URL encode a table as a series of parameters.\nfunction urlencode.table(t)\n --table of argument strings\n local argts, i= {}, 1\n for k, v in pairs(t) do\n argts[i]=encode(k).."="..encode(v)\n i=i+1\n end\n return table.concat(argts,'&')\nend\n\nreturn urlencode\n\n=]@@\n[[/folder]]\n\n[[folder:tvtropes.lua]]\n@@[=\n--Required to send to TVTropes site.\nlocal http = require"socket.http"\n\n--Required to create page post data.\nlocal urlencode = require "urlencode"\n\nlocal tvtropes={}\n\n--Function that returns the authenticated TVTropes URL for the given page.\nlocal function authpageurl(page)\n return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page\nend\n\nlocal function fullname(page)\n --Require pagename\n assert(type(page)=="string","Destination page name required")\n --If no namespace specified, assume Main\n if not string.find(page,'/') then page="Main/"..page end\n\n return page\nend\n\n--Function that posts the given page.\nfunction tvtropes.post(page, body, author, reason)\n\n page=fullname(page)\n\n assert(type(body)=="string","Page body required")\n\n local response =\n {http.request(authpageurl(page),\n urlencode.table{\n action="post", post="save",\n pagename=page, text=body,\n author=author or "Anonymous",\n reason=reason or ""\n })}\n\n --Error on any socket errors\n assert(response[1],response[2])\n\n --If it doesn't return Found, return nil, the status, and the body:\n --sometimes it just rejects the password for some reason.\n if tonumber(response[2])~=302 then\n return nil, response[2], response[1]\n else return true\n end\nend\n\n--Technically, this Putting scripts here is kind of a general function, but it's designed exclusively around
--TVTropes' source converter, so it's kept in here.
local html2plain
do
local ents = {quot='"', amp='&', lt='<', gt='>'}

function html2plain(src)
src=string.gsub(src,"<br/>","\n")
src=string.gsub(src,"&(%w-);",ents)
return src
end
end

--Function that gets a given page source.
function tvtropes.get(page)

page=fullname(page)

local body, code = http.request(
authpageurl(page)..'?action=source')

--Trigger error on socket failure
assert(body,code)

--Return the source converted back from the HTML conversion
return html2plain(body)
end

return tvtropes

=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=

--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]&61;]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]
neverending battle.
Is there an issue? Send a MessageReason:
None





]=]

to:

]=]]&61;]

Added: 9796

Changed: 22

Is there an issue? Send a MessageReason:
ARGH english language is such movink target


womp womp

to:

womp womp
[[foldercontrol]]

[[folder:urlencode.lua]]
@@[=
local urlencode={}

--URL encode a string.
local function encode(str)
--Ensure all newlines are in CRLF form
str = string.gsub (str, "\r?\n", "\r\n")
--Percent-encode all non-unreserved characters
--as per RFC 3986, Section 2.3
--(except for space, which gets plus-encoded)
str = string.gsub (str, "([^%w%-%.%_%~ ])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
--Convert spaces to plus signs
return string.gsub (str, " ", "+")
end

--Make this function available as part of the module
urlencode.string = encode

--URL encode a table as a series of parameters.
function urlencode.table(t)
--table of argument strings
local argts, i= {}, 1
for k, v in pairs(t) do
argts[i]=encode(k).."="..encode(v)
i=i+1
end
return table.concat(argts,'&')
end

return urlencode

=]@@
[[/folder]]

[[folder:tvtropes.lua]]
@@[=
--Required to send to TVTropes site.
local http = require"socket.http"

--Required to create page post data.
local urlencode = require "urlencode"

local tvtropes={}

--Function that returns the authenticated TVTropes URL for the given page.
local function authpageurl(page)
return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page
end

local function fullname(page)
--Require pagename
assert(type(page)=="string","Destination page name required")
--If no namespace specified, assume Main
if not string.find(page,'/') then page="Main/"..page end

return page
end

--Function that posts the given page.
function tvtropes.post(page, body, author, reason)

page=fullname(page)

assert(type(body)=="string","Page body required")

local response =
{http.request(authpageurl(page),
urlencode.table{
action="post", post="save",
pagename=page, text=body,
author=author or "Anonymous",
reason=reason or ""
})}

--Error on any socket errors
assert(response[1],response[2])

--If it doesn't return Found, return nil, the status, and the body:
--sometimes it just rejects the password for some reason.
if tonumber(response[2])~=302 then
return nil, response[2], response[1]
else return true
end
end

--Technically, this is kind of a general function, but it's designed exclusively around
--TVTropes' source converter, so it's kept in here.
local html2plain
do
local ents = {quot='"', amp='&', lt='<', gt='>'}

function html2plain(src)
src=string.gsub(src,"<br/>","\n")
src=string.gsub(src,"&(%w-);",ents)
return src
end
end

--Function that gets a given page source.
function tvtropes.get(page)

page=fullname(page)

local body, code = http.request(
authpageurl(page)..'?action=source')

--Trigger error on socket failure
assert(body,code)

--Return the source converted back from the HTML conversion
return html2plain(body)
end

return tvtropes

=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=
--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]=]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]

Changed: 22

Removed: 27410

Is there an issue? Send a MessageReason:
None


[[foldercontrol]]

[[folder:urlencode.lua]]
@@[=
local urlencode={}

--URL encode a string.
local function encode(str)
--Ensure all newlines are in CRLF form
str = string.gsub (str, "\r?\n", "\r\n")
--Percent-encode all non-unreserved characters
--as per RFC 3986, Section 2.3
--(except for space, which gets plus-encoded)
str = string.gsub (str, "([^%w%-%.%_%~ ])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
--Convert spaces to plus signs
return string.gsub (str, " ", "+")
end

--Make this function available as part of the module
urlencode.string = encode

--URL encode a table as a series of parameters.
function urlencode.table(t)
--table of argument strings
local argts, i= {}, 1
for k, v in pairs(t) do
argts[i]=encode(k).."="..encode(v)
i=i+1
end
return table.concat(argts,'&')
end

return urlencode

=]@@
[[/folder]]

[[folder:tvtropes.lua]]
@@[=
--Required to send to TVTropes site.
local http = require"socket.http"

--Required to create page post data.
local urlencode = require "urlencode"

local tvtropes={}

--Function that returns the authenticated TVTropes URL for the given page.
local function authpageurl(page)
return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page
end

local function fullname(page)
--Require pagename
assert(type(page)=="string","Destination page name required")
--If no namespace specified, assume Main
if not string.find(page,'/') then page="Main/"..page end

return page
end

--Function that posts the given page.
function tvtropes.post(page, body, author, reason)

page=fullname(page)

assert(type(body)=="string","Page body required")

local response =
{http.request(authpageurl(page),
urlencode.table{
action="post", post="save",
pagename=page, text=body,
author=author or "Anonymous",
reason=reason or ""
})}

--Error on any socket errors
assert(response[1],response[2])

--If it doesn't return Found, return nil, the status, and the body:
--sometimes it just rejects the password for some reason.
if tonumber(response[2])~=302 then
return nil, response[2], response[1]
else return true
end
end

--Technically, this is kind of a general function, but it's designed exclusively around
--TVTropes' source converter, so it's kept in here.
local html2plain
do
local ents = {quot='"', amp='&', lt='<', gt='>'}

function html2plain(src)
src=string.gsub(src,"<br/>","\n")
src=string.gsub(src,"&(%w-);",ents)
return src
end
end

--Function that gets a given page source.
function tvtropes.get(page)

page=fullname(page)

local body, code = http.request(
authpageurl(page)..'?action=source')

--Trigger error on socket failure
assert(body,code)

--Return the source converted back from the HTML conversion
return html2plain(body)
end

return tvtropes

=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=
--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]=]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]

%%ENDSCRIPTS%%"

return table.concat(folders,"\n\n")
end

local function push(notes)
local gssscripts=string.gsub(revsection(),"%%","%%%%")

print(string.format("Getting current version of %s...",target))

local current=tvtropes.get(target)

local updated=string.gsub(current,
"%%%%STARTSCRIPTS%%

[[foldercontrol]]

[[folder:urlencode.lua]]
@@[=
local urlencode={}

--URL encode a string.
local function encode(str)
--Ensure all newlines are in CRLF form
str = string.gsub (str, "\r?\n", "\r\n")
--Percent-encode all non-unreserved characters
--as per RFC 3986, Section 2.3
--(except for space, which gets plus-encoded)
str = string.gsub (str, "([^%w%-%.%_%~ ])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
--Convert spaces to plus signs
return string.gsub (str, " ", "+")
end

--Make this function available as part of the module
urlencode.string = encode

--URL encode a table as a series of parameters.
function urlencode.table(t)
--table of argument strings
local argts, i= {}, 1
for k, v in pairs(t) do
argts[i]=encode(k).."="..encode(v)
i=i+1
end
return table.concat(argts,'&')
end

return urlencode

=]@@
[[/folder]]

[[folder:tvtropes.lua]]
@@[=
--Required to send to TVTropes site.
local http = require"socket.http"

--Required to create page post data.
local urlencode = require "urlencode"

local tvtropes={}

--Function that returns the authenticated TVTropes URL for the given page.
local function authpageurl(page)
return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page
end

local function fullname(page)
--Require pagename
assert(type(page)=="string","Destination page name required")
--If no namespace specified, assume Main
if not string.find(page,'/') then page="Main/"..page end

return page
end

--Function that posts the given page.
function tvtropes.post(page, body, author, reason)

page=fullname(page)

assert(type(body)=="string","Page body required")

local response =
{http.request(authpageurl(page),
urlencode.table{
action="post", post="save",
pagename=page, text=body,
author=author or "Anonymous",
reason=reason or ""
})}

--Error on any socket errors
assert(response[1],response[2])

--If it doesn't return Found, return nil, the status, and the body:
--sometimes it just rejects the password for some reason.
if tonumber(response[2])~=302 then
return nil, response[2], response[1]
else return true
end
end

--Technically, this is kind of a general function, but it's designed exclusively around
--TVTropes' source converter, so it's kept in here.
local html2plain
do
local ents = {quot='"', amp='&', lt='<', gt='>'}

function html2plain(src)
src=string.gsub(src,"<br/>","\n")
src=string.gsub(src,"&(%w-);",ents)
return src
end
end

--Function that gets a given page source.
function tvtropes.get(page)

page=fullname(page)

local body, code = http.request(
authpageurl(page)..'?action=source')

--Trigger error on socket failure
assert(body,code)

--Return the source converted back from the HTML conversion
return html2plain(body)
end

return tvtropes

=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=
--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]=]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]

%%ENDSCRIPTS%%%%",
gssscripts)

print(string.format("Posting new version of %s...",target))

local posted
while not posted do
posted=tvtropes.post(target,updated,user,notes)
if not posted then print" Retrying..." end
end
end

--Executing code---------------------------------------------------------------

push "d'oh"



=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=
--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]=]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]

to:

[[foldercontrol]]

[[folder:urlencode.lua]]
@@[=
local urlencode={}

--URL encode a string.
local function encode(str)
--Ensure all newlines are in CRLF form
str = string.gsub (str, "\r?\n", "\r\n")
--Percent-encode all non-unreserved characters
--as per RFC 3986, Section 2.3
--(except for space, which gets plus-encoded)
str = string.gsub (str, "([^%w%-%.%_%~ ])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
--Convert spaces to plus signs
return string.gsub (str, " ", "+")
end

--Make this function available as part of the module
urlencode.string = encode

--URL encode a table as a series of parameters.
function urlencode.table(t)
--table of argument strings
local argts, i= {}, 1
for k, v in pairs(t) do
argts[i]=encode(k).."="..encode(v)
i=i+1
end
return table.concat(argts,'&')
end

return urlencode

=]@@
[[/folder]]

[[folder:tvtropes.lua]]
@@[=
--Required to send to TVTropes site.
local http = require"socket.http"

--Required to create page post data.
local urlencode = require "urlencode"

local tvtropes={}

--Function that returns the authenticated TVTropes URL for the given page.
local function authpageurl(page)
return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page
end

local function fullname(page)
--Require pagename
assert(type(page)=="string","Destination page name required")
--If no namespace specified, assume Main
if not string.find(page,'/') then page="Main/"..page end

return page
end

--Function that posts the given page.
function tvtropes.post(page, body, author, reason)

page=fullname(page)

assert(type(body)=="string","Page body required")

local response =
{http.request(authpageurl(page),
urlencode.table{
action="post", post="save",
pagename=page, text=body,
author=author or "Anonymous",
reason=reason or ""
})}

--Error on any socket errors
assert(response[1],response[2])

--If it doesn't return Found, return nil, the status, and the body:
--sometimes it just rejects the password for some reason.
if tonumber(response[2])~=302 then
return nil, response[2], response[1]
else return true
end
end

--Technically, this is kind of a general function, but it's designed exclusively around
--TVTropes' source converter, so it's kept in here.
local html2plain
do
local ents = {quot='"', amp='&', lt='<', gt='>'}

function html2plain(src)
src=string.gsub(src,"<br/>","\n")
src=string.gsub(src,"&(%w-);",ents)
return src
end
end

--Function that gets a given page source.
function tvtropes.get(page)

page=fullname(page)

local body, code = http.request(
authpageurl(page)..'?action=source')

--Trigger error on socket failure
assert(body,code)

--Return the source converted back from the HTML conversion
return html2plain(body)
end

return tvtropes

=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=
--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]=]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]

%%ENDSCRIPTS%%"

return table.concat(folders,"\n\n")
end

local function push(notes)
local gssscripts=string.gsub(revsection(),"%%","%%%%")

print(string.format("Getting current version of %s...",target))

local current=tvtropes.get(target)

local updated=string.gsub(current,
"%%%%STARTSCRIPTS%%

[[foldercontrol]]

[[folder:urlencode.lua]]
@@[=
local urlencode={}

--URL encode a string.
local function encode(str)
--Ensure all newlines are in CRLF form
str = string.gsub (str, "\r?\n", "\r\n")
--Percent-encode all non-unreserved characters
--as per RFC 3986, Section 2.3
--(except for space, which gets plus-encoded)
str = string.gsub (str, "([^%w%-%.%_%~ ])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
--Convert spaces to plus signs
return string.gsub (str, " ", "+")
end

--Make this function available as part of the module
urlencode.string = encode

--URL encode a table as a series of parameters.
function urlencode.table(t)
--table of argument strings
local argts, i= {}, 1
for k, v in pairs(t) do
argts[i]=encode(k).."="..encode(v)
i=i+1
end
return table.concat(argts,'&')
end

return urlencode

=]@@
[[/folder]]

[[folder:tvtropes.lua]]
@@[=
--Required to send to TVTropes site.
local http = require"socket.http"

--Required to create page post data.
local urlencode = require "urlencode"

local tvtropes={}

--Function that returns the authenticated TVTropes URL for the given page.
local function authpageurl(page)
return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page
end

local function fullname(page)
--Require pagename
assert(type(page)=="string","Destination page name required")
--If no namespace specified, assume Main
if not string.find(page,'/') then page="Main/"..page end

return page
end

--Function that posts the given page.
function tvtropes.post(page, body, author, reason)

page=fullname(page)

assert(type(body)=="string","Page body required")

local response =
{http.request(authpageurl(page),
urlencode.table{
action="post", post="save",
pagename=page, text=body,
author=author or "Anonymous",
reason=reason or ""
})}

--Error on any socket errors
assert(response[1],response[2])

--If it doesn't return Found, return nil, the status, and the body:
--sometimes it just rejects the password for some reason.
if tonumber(response[2])~=302 then
return nil, response[2], response[1]
else return true
end
end

--Technically, this is kind of a general function, but it's designed exclusively around
--TVTropes' source converter, so it's kept in here.
local html2plain
do
local ents = {quot='"', amp='&', lt='<', gt='>'}

function html2plain(src)
src=string.gsub(src,"<br/>","\n")
src=string.gsub(src,"&(%w-);",ents)
return src
end
end

--Function that gets a given page source.
function tvtropes.get(page)

page=fullname(page)

local body, code = http.request(
authpageurl(page)..'?action=source')

--Trigger error on socket failure
assert(body,code)

--Return the source converted back from the HTML conversion
return html2plain(body)
end

return tvtropes

=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=
--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]=]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]

%%ENDSCRIPTS%%%%",
gssscripts)

print(string.format("Posting new version of %s...",target))

local posted
while not posted do
posted=tvtropes.post(target,updated,user,notes)
if not posted then print" Retrying..." end
end
end

--Executing code---------------------------------------------------------------

push "d'oh"



=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=
--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]=]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]
womp womp

Added: 19476

Changed: 13

Removed: 1258

Is there an issue? Send a MessageReason:
Removing commit script


[[folder:tropersrepo.lua]]

to:

[[folder:tropersrepo.[[folder:arrdev_recap.lua]]



local tvtropes = require "tvtropes"

local target = "Tropers/STUART"
local user="STUART"

local scripts={
"urlencode.lua",
"tvtropes.lua",
"tropersrepo.lua",
"arrdev_recap.lua",
}

local function scriptfolder(name,script)
return string.format(
"[[folder:%s]]\n@@[=\n%s\n=]@@\n[[/folder]]",
name,script)
end

local function revsection()
local folders={
"%%STARTSCRIPTS%%",
"[[foldercontrol]]"
}
local headers=#folders

for i=1, #scripts do
local content=assert(io.open(scripts[i])):read"*a"
folders[i+headers]=scriptfolder(scripts[i],content)
end

folders[#folders+1]="%%ENDSCRIPTS%%"

return table.concat(folders,"\n\n")
end

local function push(notes)
local gssscripts=string.gsub(revsection(),"%%","%%%%")

print(string.format("Getting current version of %s...",target))

local current=tvtropes.get(target)

local updated=string.gsub(current,
"%%%%STARTSCRIPTS%%%%.-%%%%ENDSCRIPTS%%%%",
gssscripts)

print(string.format("Posting new version of %s...",target))

local posted
while not posted do
posted=tvtropes.post(target,updated,user,notes)
if not posted then print" Retrying..." end
end
end

--Executing code---------------------------------------------------------------

push "d'oh"



=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=


Added DiffLines:

%%ENDSCRIPTS%%"

return table.concat(folders,"\n\n")
end

local function push(notes)
local gssscripts=string.gsub(revsection(),"%%","%%%%")

print(string.format("Getting current version of %s...",target))

local current=tvtropes.get(target)

local updated=string.gsub(current,
"%%%%STARTSCRIPTS%%

[[foldercontrol]]

[[folder:urlencode.lua]]
@@[=
local urlencode={}

--URL encode a string.
local function encode(str)
--Ensure all newlines are in CRLF form
str = string.gsub (str, "\r?\n", "\r\n")
--Percent-encode all non-unreserved characters
--as per RFC 3986, Section 2.3
--(except for space, which gets plus-encoded)
str = string.gsub (str, "([^%w%-%.%_%~ ])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
--Convert spaces to plus signs
return string.gsub (str, " ", "+")
end

--Make this function available as part of the module
urlencode.string = encode

--URL encode a table as a series of parameters.
function urlencode.table(t)
--table of argument strings
local argts, i= {}, 1
for k, v in pairs(t) do
argts[i]=encode(k).."="..encode(v)
i=i+1
end
return table.concat(argts,'&')
end

return urlencode

=]@@
[[/folder]]

[[folder:tvtropes.lua]]
@@[=
--Required to send to TVTropes site.
local http = require"socket.http"

--Required to create page post data.
local urlencode = require "urlencode"

local tvtropes={}

--Function that returns the authenticated TVTropes URL for the given page.
local function authpageurl(page)
return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page
end

local function fullname(page)
--Require pagename
assert(type(page)=="string","Destination page name required")
--If no namespace specified, assume Main
if not string.find(page,'/') then page="Main/"..page end

return page
end

--Function that posts the given page.
function tvtropes.post(page, body, author, reason)

page=fullname(page)

assert(type(body)=="string","Page body required")

local response =
{http.request(authpageurl(page),
urlencode.table{
action="post", post="save",
pagename=page, text=body,
author=author or "Anonymous",
reason=reason or ""
})}

--Error on any socket errors
assert(response[1],response[2])

--If it doesn't return Found, return nil, the status, and the body:
--sometimes it just rejects the password for some reason.
if tonumber(response[2])~=302 then
return nil, response[2], response[1]
else return true
end
end

--Technically, this is kind of a general function, but it's designed exclusively around
--TVTropes' source converter, so it's kept in here.
local html2plain
do
local ents = {quot='"', amp='&', lt='<', gt='>'}

function html2plain(src)
src=string.gsub(src,"<br/>","\n")
src=string.gsub(src,"&(%w-);",ents)
return src
end
end

--Function that gets a given page source.
function tvtropes.get(page)

page=fullname(page)

local body, code = http.request(
authpageurl(page)..'?action=source')

--Trigger error on socket failure
assert(body,code)

--Return the source converted back from the HTML conversion
return html2plain(body)
end

return tvtropes

=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=
--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]=]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]

%%ENDSCRIPTS%%%%",
gssscripts)

print(string.format("Posting new version of %s...",target))

local posted
while not posted do
posted=tvtropes.post(target,updated,user,notes)
if not posted then print" Retrying..." end
end
end

--Executing code---------------------------------------------------------------

push "d'oh"



=]@@
[[/folder]]

[[folder:arrdev_recap.lua]]
@@[=
--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]=]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.

=]@@
[[/folder]]

Added: 10691

Changed: 170

Is there an issue? Send a MessageReason:
d'oh


[[folder:%s]]

to:

[[folder:%s]][[folder:urlencode.lua]]



%s

to:

%slocal urlencode={}

--URL encode a string.
local function encode(str)
--Ensure all newlines are in CRLF form
str = string.gsub (str, "\r?\n", "\r\n")
--Percent-encode all non-unreserved characters
--as per RFC 3986, Section 2.3
--(except for space, which gets plus-encoded)
str = string.gsub (str, "([^%w%-%.%_%~ ])",
function (c) return string.format ("%%%02X", string.byte(c)) end)
--Convert spaces to plus signs
return string.gsub (str, " ", "+")
end

--Make this function available as part of the module
urlencode.string = encode

--URL encode a table as a series of parameters.
function urlencode.table(t)
--table of argument strings
local argts, i= {}, 1
for k, v in pairs(t) do
argts[i]=encode(k).."="..encode(v)
i=i+1
end
return table.concat(argts,'&')
end

return urlencode



[[folder:%s]]

to:

[[folder:%s]][[folder:tvtropes.lua]]



%s

to:

%s--Required to send to TVTropes site.
local http = require"socket.http"

--Required to create page post data.
local urlencode = require "urlencode"

local tvtropes={}

--Function that returns the authenticated TVTropes URL for the given page.
local function authpageurl(page)
return "http://:foamy@tvtropes.org/pmwiki/pmwiki.php/"..page
end

local function fullname(page)
--Require pagename
assert(type(page)=="string","Destination page name required")
--If no namespace specified, assume Main
if not string.find(page,'/') then page="Main/"..page end

return page
end

--Function that posts the given page.
function tvtropes.post(page, body, author, reason)

page=fullname(page)

assert(type(body)=="string","Page body required")

local response =
{http.request(authpageurl(page),
urlencode.table{
action="post", post="save",
pagename=page, text=body,
author=author or "Anonymous",
reason=reason or ""
})}

--Error on any socket errors
assert(response[1],response[2])

--If it doesn't return Found, return nil, the status, and the body:
--sometimes it just rejects the password for some reason.
if tonumber(response[2])~=302 then
return nil, response[2], response[1]
else return true
end
end

--Technically, this is kind of a general function, but it's designed exclusively around
--TVTropes' source converter, so it's kept in here.
local html2plain
do
local ents = {quot='"', amp='&', lt='<', gt='>'}

function html2plain(src)
src=string.gsub(src,"<br/>","\n")
src=string.gsub(src,"&(%w-);",ents)
return src
end
end

--Function that gets a given page source.
function tvtropes.get(page)

page=fullname(page)

local body, code = http.request(
authpageurl(page)..'?action=source')

--Trigger error on socket failure
assert(body,code)

--Return the source converted back from the HTML conversion
return html2plain(body)
end

return tvtropes



[[folder:%s]]

to:

[[folder:%s]][[folder:tropersrepo.lua]]



%s

to:

%slocal tvtropes = require "tvtropes"

local target = "Tropers/STUART"
local user="STUART"

local scripts={
"urlencode.lua",
"tvtropes.lua",
"tropersrepo.lua",
"arrdev_recap.lua",
}

local function scriptfolder(name,script)
return string.format(
"[[folder:%s]]\n@@[=\n%s\n=]@@\n[[/folder]]",
name,script)
end

local function revsection()
local folders={
"%%STARTSCRIPTS%%",
"[[foldercontrol]]"
}
local headers=#folders

for i=1, #scripts do
local content=assert(io.open(scripts[i])):read"*a"
folders[i+headers]=scriptfolder(scripts[i],content)
end

folders[#folders+1]="%%ENDSCRIPTS%%"

return table.concat(folders,"\n\n")
end

local function push(notes)
local gssscripts=string.gsub(revsection(),"%%","%%%%")

print(string.format("Getting current version of %s...",target))

local current=tvtropes.get(target)

local updated=string.gsub(current,
"%%%%STARTSCRIPTS%%%%.-%%%%ENDSCRIPTS%%%%",
gssscripts)

print(string.format("Posting new version of %s...",target))

local posted
while not posted do
posted=tvtropes.post(target,updated,user,notes)
if not posted then print" Retrying..." end
end
end

--Executing code---------------------------------------------------------------

push "d'oh"





[[folder:%s]]

to:

[[folder:%s]][[folder:arrdev_recap.lua]]



%s

to:

%s--encoding: UTF-8

--Required to post pages
local tvtropes=require "tvtropes"
--Required for encoding Wikipedia article titles
local urlencode=require "urlencode"

--Arrested Development data----------------------------------------------------
adeps={
{
"Pilot",
"Top Banana",
"Bringing Up Buster",
"Key Decisions",
"Visiting Ours",
"Charity Drive",
"My Mother, The Car",
"In God We Trust",
"Storming the Castle",
"Pier Pressure",
"Public Relations",
"Marta Complex",
"Beef Consommé",
"Shock and Aww",
"Staff Infection",
"Missing Kitty",
"Altar Egos",
"Justice Is Blind",
"Best Man for the GOB",
"Whistler's Mother",
"Not Without My Daughter",
"Let 'Em Eat Cake"
},
{
"The One Where Michael Leaves",
"The One Where They Build a House",
"¡Amigos!",
"Good Grief",
"Sad Sack",
"Afternoon Delight",
"Switch Hitter",
"Queen for a Day",
"Burning Love",
"Ready, Aim, Marry Me",
"Out on a Limb",
"Hand to God",
"Motherboy XXX",
"The Immaculate Election",
"Sword of Destiny",
"Meat the Veals",
"Spring Breakout",
"Righteous Brothers",
},
{
"The Cabin Show",
"For British Eyes Only",
"Forget-Me-Now",
"Notapusy",
"Mr. F",
"The Ocean Walker",
"Prison Break-In",
"Making a Stand",
"S.O.B.s",
"Fakin' It",
"Family Ties",
"Exit Strategy",
"Development Arrested"
},
}
-------------------------------------------------------------------------------

--Interwiki data---------------------------------------------------------------
local tokens={}

do --wikipedia
--Numbers for episodes with ambiguous titles, Wikipedia-wise,
--whose article titles end with "(Arrested Development)"
local disambigeps={
{1,2,8,11,20,21,22}, --Season 1
{5,6,8,9,11,12,18}, --Season 2
{10,11,12} --Season 3
}

--construct lookup table
local disambiguated={}
for s=1,#disambigeps do
disambiguated[s]={}
for i=1,#disambigeps[s] do
disambiguated[s][disambigeps[s][i]]=true
end
end

--Function that returns the Wikipedia URL
function tokens.wikipedia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
if disambiguated[s][e] then
--Technically, parentheses don't have to be percent-encoded
--for HTTP URIs because they're unused sub-delims
--per section 2.2 of RFC 3986, so we concatenate after
--the function that percent-encodes all sub-delims
pagename=pagename.."_(Arrested_Development)"
end

return "http://en.wikipedia.org/wiki/"..pagename
end
end

--Function that returns the URL of the Arrested Development Wikia entry
function tokens.wikia(s,e)
local pagename=adeps[s][e]
pagename=string.gsub(pagename,' ','_')
pagename=urlencode.string(pagename)
return "http://arresteddevelopment.wikia.com/wiki/"..pagename
end

do --Balboa Observer-Picayune
--Season 1 episodes that are listed at different numbers
local s1flips={ [5]=6, [6]=5, [7]=8, [8]=7, [16]=18, [17]=16, [18]=17 }

--Function the returns the URL of the episode's page on the-op.com
function tokens.theop(s,e)
--correct OutOfOrder Season 1 episodes
if s==1 then e = s1flips[e] or e end
return string.format("http://the-op.com/episode/%i%02i",s,e)
end
end

do --IMDB
--why hello, unreadable block of arbitrary indices, it sure sucks
--that I have to use you
local ttnums={
{ 0515236, 0515256, 0515212, 0515223, 0515257,
0515214, 0515231, 0515221, 0515247, 0515235,
0515238, 0515226, 0515210, 0515244, 0515246,
0515228, 0515208, 0515222, 0515211, 0515258,
0515232, 0515224, },
{ 0515253, 0515254, 0515209, 0515219, 0515243,
0515207, 0515248, 0515239, 0515213, 0515240,
0515234, 0515220, 0515229, 0515251, 0515255,
0515227, 0515245, 0515241, },
{ 0515250, 0515249, 0515218, 0515233, 0515230,
0515252, 0515237, 0515225, 0515242, 0515216,
0515217, 0515215, 0757386, }
}

--Function that returns the URL for the episode's IMDB page
function tokens.imdb(s,e)
return string.format("http://www.imdb.com/title/tt%07i/",ttnums[s][e])
end
end

do --Hulu, you know, just in case
local watchnums={
{ 589, 1786, 585, 1781, 1785,
580, 590, 588, 586, 575,
576, 579, 577, 644, 1783,
591, 582, 584, 578, 581,
583, 587},
{ 6641, 6644, 6643, 6638, 6639,
12883, 13226, 12561, 12609, 12298,
12271, 12901, 13248, 13267, 13276,
13206, 12232, 12532},
{ 6640, 6642, 6635, 6636, 6637,
12497, 17189, 12523, 13139, 12225,
12317, 12194, 12215},
}

function tokens.hulu(s,e)
return string.format(
"http://hulu.com/watch/%i", watchnums[s][e])
end
end

do --Netflix Watch Instantly
--It's largely sequential, but not quite.
--I printed out all the numbers and moved them around
--to fit the correct order (which is both inconsistent
--in IDs to Netflix order and Netflix to DVD order).
local movieids={
{ 70133673, 70133674, 70133675, 70133677, 70133676,
70133678, 70133680, 70133679, 70133681, 70133682,
70133683, 70133684, 70133685, 70133686, 70133687,
70133688, 70133689, 70133690, 70133691, 70133692,
70133693, 70133694, },
{ 70133695, 70133696, 70133697, 70133698, 70133699,
70133700, 70133701, 70133702, 70133703, 70133704,
70133705, 70133706, 70133707, 70133708, 70133711,
70133709, 70133710, 70133712, },
{ 70133713, 70133714, 70133715, 70133716, 70133717,
70133718, 70133720, 70133719, 70133721, 70133722,
70133723, 70133724, 70133725, }
}

function tokens.netflix(s,e)
return string.format(
"http://www.netflix.com/WiPlayer?movieid=%i",movieids[s][e])
end
end

-------------------------------------------------------------------------------

--Arrested Development TV Tropes Recap stuff-----------------------------------
local ad_ep_links
do
local template=[=[
%%STARTLINKS%%
----
Interwiki: [[$wikipedia Wikipedia]] -- [[$wikia Wikia]] -- [[$theop Balboa Observer-Picayune]] -- [[$imdb IMDB]]

Watch now: [[$hulu Hulu]] -- [[$netflix Netflix]]
----
%%ENDLINKS%%
]=]
function ad_ep_links(s,e)
return (string.gsub(template,"%$(%w+)",function(token) return tokens[token](s,e) end))
end
end

--Function that returns the page name of the episode's TVTropes Recap page.
local function recap_pagename(s,e)
--get the ep title
local title=adeps[s][e]
--replace the é in Beef Consommé
title=string.gsub(title,'é','e')
--transform to CamelCased WikiWord
title=string.gsub(title,' (%l?)',string.upper)
--Remove all non-alphanumeric characters
title=string.gsub(title,'%W','')

return string.format("Recap/ArrestedDevelopmentS%iE%i%s",s,e,title)
end

local function post_ad_recap_starter(s,e)
return tvtropes.post(
recap_pagename(s,e),
string.format(
"\n\n%s\n!The ''ArrestedDevelopment'' episode \"%s\" provides examples of:\n\n",
ad_ep_links(s,e),adeps[s][e]),
"STUART",
"Adding interwiki links and example header automatically (Ask me about Lua)")
end

local function update_links(reason)
return function(s,e)
--until comment syntax is changed, Amigos is manual-only
if s==2 and e==3 then
print "(Skipping Amigos because the links go all screwy)"
else
local pagename=recap_pagename(s,e)
local pageasis=tvtropes.get(pagename)
local gsubsafelinks = string.gsub(ad_ep_links(s,e),"%%","%%%%")
local success
while not success do
local code
success, code = tvtropes.post(pagename,
string.gsub(pageasis,"%%%%STARTLINKS%%%%.-%%%%ENDLINKS%%%%",gsubsafelinks),
"STUART",reason)
if not success then print("Retrying... "..code) end
end
end
end
end

local function for_all_eps(f)
for s=1,#adeps do
for e=1,#adeps[s] do
print(string.format('Doing Season %i Episode %i, "%s"...',s,e,adeps[s][e]))
f(s,e)
end
end
end
-------------------------------------------------------------------------------

--Okay, put your executing commands down here.


Added DiffLines:

Is there an issue? Send a MessageReason:
dammit dammit dammit


[[/folder]]

to:

[[/folder]][[/folder]]
%%ENDSCRIPTS%%
Is there an issue? Send a MessageReason:
d'oh

Added: 136

Changed: 42

Is there an issue? Send a MessageReason:
Initial commits


%%hurf durf
%%ENDSCRIPTS%%

to:

%%hurf durf
%%ENDSCRIPTS%%

[[foldercontrol]]

[[folder:%s]]
@@[=
%s
=]@@
[[/folder]]

[[folder:%s]]
@@[=
%s
=]@@
[[/folder]]

[[folder:%s]]
@@[=
%s
=]@@
[[/folder]]

[[folder:%s]]
@@[=
%s
=]@@
[[/folder]]

Added: 80

Changed: 39

Removed: 51

Is there an issue? Send a MessageReason:
None


*{{Archer}} (all of its current season)
*TheATeam
*{{Community}} (all of its current season)

to:

*{{Archer}} (all of its current season)
*TheATeam
*{{Community}} (all of its current season)
*TheATeam (through season one)


Added DiffLines:

!!!Shows still in production:
*{{Community}} (one season)
*{{Archer}} (one season)
Is there an issue? Send a MessageReason:
None

Added DiffLines:

*TheATeam
Is there an issue? Send a MessageReason:
None


*{{Archer}} (all of season one)
*{{Community}} (all of season one)

to:

*{{Archer}} (all of season one)
its current season)
*{{Community}} (all of its current season)
*{{Reaper}} (through
season one)
Is there an issue? Send a MessageReason:
None

Added DiffLines:

!!Ones that I'm up to a certain point in:
*{{Archer}} (all of season one)
*{{Community}} (all of season one)

Added: 176

Changed: 45

Is there an issue? Send a MessageReason:
None


Northwestern 21-year old nerd kid in the games industry.



(This doesn't necessarily reflect my opinion on a show, just my persistence.)

to:

(This doesn't necessarily reflect my opinion on a show, show. I just my persistence.like to finish what I start, media-wise.)


Added DiffLines:

*{{Blackadder}} (including ''Back and Forth'')


Added DiffLines:

*LifeOnMars (the British one, obviously)
*LookAroundYou
*PeepShow


Added DiffLines:

*{{Spaced}}

Added: 293

Changed: 260

Is there an issue? Send a MessageReason:
None


I use this page for PRACTICAL purposes!

Use Tropers/STUARTDiscussion to talk to me, and maybe [[http://tvtropes.org/pmwiki/wiki_pm.php send a PM]] to notify.

to:

I use this page for PRACTICAL purposes!

Use Tropers/STUARTDiscussion to talk to me, and maybe [[http://tvtropes.org/pmwiki/wiki_pm.php send a PM]] to notify.notify.

!TV shows I've seen every episode of:

(This doesn't necessarily reflect my opinion on a show, just my persistence.)

*ArrestedDevelopment
*TheCritic
*{{Dollhouse}}
*{{Firefly}}
*[[{{Freakazoid}} Freakazoid!]]
*{{Futurama}} (up to the four movies)
*GilligansIsland
*PoliceSquad
*PushingDaisies
*TheWire

%%STARTSCRIPTS%%
%%hurf durf
%%ENDSCRIPTS%%
Is there an issue? Send a MessageReason:
None


I use this page for PRACTICAL purposes!

to:

I use this page for PRACTICAL purposes!purposes!

Use Tropers/STUARTDiscussion to talk to me, and maybe [[http://tvtropes.org/pmwiki/wiki_pm.php send a PM]] to notify.
Is there an issue? Send a MessageReason:
None


Click the edit button to start this new page.

to:

Click the edit button to start I use this new page. page for PRACTICAL purposes!

Top