X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=scripts%2Fman2html.lua;fp=scripts%2Fman2html.lua;h=c7663c5f976d7fe25f07d3ad85c3447e0784b304;hp=e33a12622d2a1663536012e195d19a6a43ee2c47;hb=574af38ed616d1adfa5e6ce35f67cda1f707f89d;hpb=6c9943707d4f33035830eba0587a61a34eaecbc2 diff --git a/scripts/man2html.lua b/scripts/man2html.lua index e33a126..c7663c5 100755 --- a/scripts/man2html.lua +++ b/scripts/man2html.lua @@ -18,13 +18,13 @@ end ----- function die(...) print("die:", ...); os.exit(1) end -function isReadable(file) return os.execute("test -r "..file) == 0 end +function readable(file) return os.execute("test -r "..file) == 0 end arg.hideEmail = false arg.output = "yoink.html" arg.input = "yoink.6" -if not isReadable(arg.input) then arg.input = "build/doc/yoink.6" end +if not readable(arg.input) then arg.input = "build/doc/yoink.6" end do local t = { @@ -42,7 +42,11 @@ do showhelp(); os.exit(1) end skip = t[v](args, i) - if tonumber(skip) then skip = skip + 1 else skip = 1 end + if tonumber(skip) then + skip = skip + 1 + else + skip = 1 + end end skip = skip - 1 end @@ -51,10 +55,10 @@ end parseArgs(arg) filters = { - function(t) -- 1. Edit page title + function(t) -- 1. Edit page title return t:gsub("().*()", "%1Yoink Manual%2") end, - function(t) -- 2. Insert footer before + function(t) -- 2. Insert footer before return t:gsub("", [[

This manual page was generated on ]]..os.date("%d %b %Y")..[[.