doc: add documentation build infrastructure

This commit is contained in:
Qingping Hou
2016-02-04 10:24:39 -08:00
parent 9020b2e717
commit e2096ed8d9
9 changed files with 56 additions and 16 deletions

View File

@@ -1,3 +1,7 @@
--[[--
Miscellaneous helper functions for KOReader frontend.
]]
local util = {}
function util.stripePunctuations(word)
@@ -66,7 +70,9 @@ function util.secondsToClock(seconds, withoutSeconds)
end
end
-- returns number of keys in a table
--- Returns number of keys in a table.
---- @param T Lua table
---- @return number of keys in table T
function util.tableSize(T)
local count = 0
for _ in pairs(T) do count = count + 1 end