]> Dogcows Code - chaz/yoink/blobdiff - scripts/man2html.lua
remove some unused stlplus modules
[chaz/yoink] / scripts / man2html.lua
index e33a12622d2a1663536012e195d19a6a43ee2c47..c7663c5f976d7fe25f07d3ad85c3447e0784b304 100755 (executable)
@@ -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("(<title>).*(</title>)", "%1Yoink Manual%2")
        end,
-       function(t)                                             -- 2. Insert footer before </body>
+       function(t)                     -- 2. Insert footer before </body>
                return t:gsub("</body>", [[
 <p style="font-size: 9px; text-align: center;">
        This manual page was generated on ]]..os.date("%d %b %Y")..[[.
This page took 0.019479 seconds and 4 git commands to generate.