tools: delete Lua documentation helper cruft
The tools were useful to generate documentation from the Lua sources. However, most Lua functions are defined in Haskell, and the even documentation of functions written in Lua has been updated manually for quite a while now. The unused helper scripts, which have bit-rot to the point that they now produce broken links, are therefore removed.
This commit is contained in:
parent
24da280000
commit
9ffa8100d7
3 changed files with 0 additions and 95 deletions
8
Makefile
8
Makefile
|
@ -113,14 +113,6 @@ man/pandoc.1: MANUAL.txt man/pandoc.1.before man/pandoc.1.after
|
|||
--variable footer="pandoc $(version)" \
|
||||
-o $@
|
||||
|
||||
doc/lua-filters.md: tools/ldoc.ltp data/pandoc.lua tools/update-lua-docs.lua
|
||||
cp $@ $@.tmp
|
||||
pandoc -t markdown --columns=64 --atx-headers \
|
||||
-f markdown -t markdown --standalone\
|
||||
--lua-filter tools/update-lua-docs.lua \
|
||||
-o $@ $@.tmp
|
||||
rm $@.tmp
|
||||
|
||||
README.md: README.template MANUAL.txt tools/update-readme.lua
|
||||
pandoc --lua-filter tools/update-readme.lua --reference-links \
|
||||
--reference-location=section -t gfm $< -o $@
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
# local iter = ldoc.modules.iter
|
||||
# local M = ldoc.markup
|
||||
|
||||
<h1>Module $(module.name)</h1>
|
||||
|
||||
<p>$(M(module.summary))</p>
|
||||
|
||||
# for kind, items in module.kinds() do
|
||||
|
||||
<h2>$(kind)</h2>
|
||||
<dl>
|
||||
# for item in items() do ldoc.item = item -- provides context for M()
|
||||
<dt><span id="$(item.name)"><code>$(ldoc.display_name(item))</code></span></dt>
|
||||
<dd>
|
||||
<p>$(item.summary)</p>
|
||||
# if item.params and #item.params > 0 then
|
||||
$(module.kinds:type_of(item).subnames):
|
||||
<dl>
|
||||
# for p in iter(item.params) do
|
||||
<dt><code>$(p)</code>:</dt>
|
||||
<dd>$(M(item.params.map[p]))</dd>
|
||||
# end -- for
|
||||
</dl>
|
||||
# end -- if params
|
||||
# if item.ret then
|
||||
<p>Returns: $(item.ret[1])</p>
|
||||
# end -- if returns
|
||||
# if item.usage then
|
||||
<p>Usage:</p>
|
||||
<pre><code>$(item.usage[1])</code></pre>
|
||||
# end -- if usage
|
||||
# if item.see then
|
||||
See also: <a href="#$(item.see[1].label)">$(item.see[1].label)</a>
|
||||
|
||||
# end -- if see
|
||||
# end -- for items
|
||||
</dl>
|
||||
# end -- for kinds
|
|
@ -1,49 +0,0 @@
|
|||
local in_module_section = false
|
||||
|
||||
-- Generate tmp folder
|
||||
local tmp_folder = os.tmpname()
|
||||
os.remove(tmp_folder)
|
||||
os.execute("mkdir -p " .. tmp_folder)
|
||||
|
||||
function extend(list1, list2)
|
||||
for i = 1, #list2 do
|
||||
list1[#list1 + 1] = list2[i]
|
||||
end
|
||||
end
|
||||
|
||||
function module_blocks(module_filenames)
|
||||
local blocks = {}
|
||||
for _, filename in pairs(module_filenames) do
|
||||
os.execute("ldoc -q -l tools -d " .. tmp_folder .. " " .. filename)
|
||||
local module_file = io.open(tmp_folder .. "/index.html")
|
||||
local module_html = module_file:read("*a")
|
||||
local module_doc = pandoc.read(module_html, "html")
|
||||
extend(blocks, module_doc.blocks)
|
||||
end
|
||||
return blocks
|
||||
end
|
||||
|
||||
function Header (el)
|
||||
if in_module_section then
|
||||
if el.level == 1 or
|
||||
-- special case for Module pandoc
|
||||
(el.level == 2 and el.identifier == 'helper-functions') then
|
||||
in_module_section = false
|
||||
return el
|
||||
else
|
||||
return {}
|
||||
end
|
||||
elseif el.identifier == "module-pandoc" then
|
||||
in_module_section = true
|
||||
return module_blocks{'data/pandoc.lua'}
|
||||
elseif el.identifier == "module-pandoc.list" then
|
||||
in_module_section = true
|
||||
return module_blocks{'data/pandoc.List.lua'}
|
||||
end
|
||||
end
|
||||
|
||||
function Block (el)
|
||||
if in_module_section then
|
||||
return {}
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue