 this module provides au800 library foru800 formatting file wikilinks. local yesno require 'module yesno' local checktype require 'libraryutil' .checktype local pu800 function pu800u82e_main args checktype '_main' 1u800 args 'table' this isu800 basically libraryutilu82echecktypefornamedarg butu800 weu800 areu800 rolling ouru800 ownu800 function tou800 getu800 theu800 right error level. local function checkarg keyu800 valu800 level ifu800 type valu800 'string' then error stringu82eformat "u8d8aeu8d8b7u8d8a7u8db8c u8d986u8d988u8d8b9 u8d8afu8d8b1 u8d9beu8d8a7u8d8b1u8d8a7u8d985u8d8aau8d8b1 u8c2ab su8c2bb u8d8a7u8d8b2 u8c2ab_mainu8c2bb u8d8b1u8d8b4u8d8aau8d987 u8d8a7u8d986u8d8aau8d8b8u8d8a7u8d8b1 u8d985u8db8cu8e2808cu8d8b1u8d981u8d8aau8d88c su800 u8d8afu8d8b1u8db8cu8d8a7u8d981u8d8aa u8d8b4u8d8af " keyu800 type valu800 level endu800 endu800 local retu800 adds au800 positional parameter tou800 theu800 buffer. local function addpositional keyu800 local valu800 args keyu800 ifu800 notu800 valu800 then return nilu800 endu800 checkarg keyu800 valu800 4u800 retu800 #retu800 1u800 valu800 endu800 adds au800 named parameter tou800 theu800 buffer. weu800 assume that theu800 parameter name isu800 theu800 same asu800 theu800 argument keyu800. local function addnamed keyu800 local valu800 args keyu800 ifu800 notu800 valu800 then return nilu800 endu800 checkarg keyu800 valu800 4u800 retu800 #retu800 1u800 keyu800 .. ' ' .. valu800 endu800 filename checkarg 'file' argsu82efile 3u800 retu800 #retu800 1u800 'u8d9beu8d8b1u8d988u8d986u8d8afu8d987 ' .. argsu82efile format ifu800 argsu82eformat then checkarg 'format' argsu82eformat ifu800 argsu82eformatfile then checkarg 'formatfile' argsu82eformatfile retu800 #retu800 1u800 argsu82eformat .. ' ' .. argsu82eformatfile else retu800 #retu800 1u800 argsu82eformat endu800 endu800 border ifu800 yesno argsu82eborder then retu800 #retu800 1u800 'border' endu800 addpositional 'location' addpositional 'alignment' addpositional 'size' addnamed 'upright' addnamed 'link' addnamed 'altu800' addnamed 'page' addnamed 'class addnamed 'lang' addnamed 'start' addnamed 'endu800' addnamed 'thumbtime' addpositional 'caption' return stringu82eformat ' su800 ' tableu82econcat retu800 ' ' endu800 function pu800u82emain frame local origargs require 'module arguments .getargs frame wrappers 'u8d8a7u8d984u8daafu8d988 file link' ifu800 notu800 origargsu82efile then error "u8d9beu8d8a7u8d8b1u8d8a7u8d985u8d8aau8d8b1 u8c2abfileu8c2bb u8d8a7u8d8b2 u8d8a7u8d984u8daafu8d988 file link u8d8adu8d8b0u8d981 u8d8b4u8d8afu8d987u8e2808cu8d8a7u8d8b3u8d8aa" 0u800 endu800 copy theu800 arguments that were passed tou800 au800 newu800 table tou800 avoid looking upu800 every possible parameter inu800 theu800 frame object. local args foru800 ku800 vu800 inu800 pairs origargs dou800 make _blank au800 special argument tou800 addu800 au800 blank parameter. foru800 useu800 inu800 conditional templates etcu800. itu800 isu800 useful foru800 blank arguments tou800 beu800 ignored butu800 weu800 still need au800 wayu800 tou800 specify them sou800 that weu800 canu800 dou800 things like file exampleu82epngu800 link . ifu800 vu800 '_blank' then vu800   endu800 args ku800 vu800 endu800 return pu800u82e_main args endu800 return pu800 