localp={}functionp.author(frame)localpframe=frame:getParent()localargs=pframe.argslocaltname="Gutenberg author"-- name of calling template. Change if template is renamed.localid=nil-- author name, or number. Name goes to search page, number goes direct to author page localname=nil-- display name on Wikipedia (default: article title)localurl=nillocaltagline="at [[Project Gutenberg]]"localurlheadname="https://www.gutenberg.org/author/"localurlheadnumb="https://www.gutenberg.org/ebooks/author/"localurlhead=nil-- Argument |id=id=trimArg(args[1])ortrimArg(args.id)ifnotidthenerror("Parameter id is missing. See [[Template:"..tname.."]] documentation")elseiftonumber(id)then-- it's a numberurlhead=urlheadnumbelseurlhead=urlheadnameid=mw.ustring.gsub(id," ","+")endend-- Argument |name=name=trimArg(args[2])ortrimArg(args.name)ifnotnamethenname=mw.title.getCurrentTitle().text:gsub('%s+%([^%(]-%)$','')-- Current page name without the final parenthesesend-- Argument |coda=iftrimArg(args.coda)thentagline=tagline.." "..trimArg(args.coda)endurl="["..urlhead..id.." Warks bi "..name.."] "..taglinereturnurlendfunctionp.Australia(frame)localpframe=frame:getParent()localargs=pframe.argslocaltname="Gutenberg Australia"-- name of calling template. Change if template is renamed.localid=nil-- ID. eg. http://gutenberg.net.au/plusfifty-n-z.html#shanks .. the ID = plusfifty-n-z.html#shanks-- ID is the same for linking an individual book title, or all books by the author.localname=nil-- display name on Wikipedia (default: article title)localauthor=nil-- flag if an author (default: no)localurl=nillocalurlhead="http://gutenberg.net.au/"localprefix=""localtagline="at [[Project Gutenberg Australia]]"localitalic="''"-- Argument |id=id=trimArg(args[1])ortrimArg(args.id)ifnotidthenerror("Parameter id is missin. See [[Template:"..tname.."]] documentation")end-- Argument |name=name=trimArg(args[2])ortrimArg(args.name)ifnotnamethenname=mw.title.getCurrentTitle().text:gsub('%s+%([^%(]-%)$','')-- Current page name without the final parenthesesend-- Argument |author=author=trimArg(args.author)ifauthorthenifmw.ustring.lower(author)=="yes"thenprefix="Warks bi "italic=""endend-- Argument |coda=iftrimArg(args.coda)thentagline=tagline.." "..trimArg(args.coda)endurl="["..urlhead..id.." "..prefix..italic..name..italic.."] "..taglinereturnurlendfunctionp.Canada(frame)localpframe=frame:getParent()localargs=pframe.argslocaltname="FadedPage"-- name of calling template. Change if template is renamed.localid=nil-- ID for author, eg. http://fadedpage.com/csearch.php?author=Shortt%2C%20Adam .. the id = Shortt, Adam-- ID for book titles, eg. http://fadedpage.com/showbook.php?pid=20160704 .. the id = 20160704localname=nil-- display name on Wikipedia (default: article title)localauthor=nil-- flag if an author (default: no)localurl=nillocalurlhead="https://fadedpage.com/"localurlbook="showbook.php?pid="localurlauth="csearch.php?author="localprefix=""localtagline="at [[Distributed Proofreaders Canada|Faded Page]] (Canadae)"localitalic="''"-- Argument |id=id=trimArg(args[1])ortrimArg(args.id)ifnotidthenerror("Parameter id is missing. See [[Template:"..tname.."]] documentation")end-- Argument |name=name=trimArg(args[2])ortrimArg(args.name)ifnotnamethenname=mw.title.getCurrentTitle().text:gsub('%s+%([^%(]-%)$','')-- Current page name without the final parenthesesend-- Argument |author=author=trimArg(args.author)ifauthorthenifmw.ustring.lower(author)=="yes"thenid=mw.uri.encode(id,"PATH")-- handle spaces within id argument stringprefix="Warks bi "italic=""url="["..urlhead..urlauth..id.." "..prefix..italic..name..italic.."] "..taglinereturnurlendendurl="["..urlhead..urlbook..id.." "..prefix..italic..name..italic.."] "..taglinereturnurlendfunctiontrimArg(arg)ifarg==""orarg==nilthenreturnnilelsereturnmw.text.trim(arg)endendreturnp