aboutsummaryrefslogtreecommitdiff
path: root/scripts/update_doc
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/update_doc')
-rwxr-xr-xscripts/update_doc108
1 files changed, 0 insertions, 108 deletions
diff --git a/scripts/update_doc b/scripts/update_doc
deleted file mode 100755
index ee824678..00000000
--- a/scripts/update_doc
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/usr/bin/lua
--- Copyright 2007-2012 Mitchell mitchell.att.foicica.com. See LICENSE.
-
-local all = false
-if #arg == 0 then all = true end
-
-local luadoc = all
-local manual = all
-local doxygen = all
-local adeptsense = all
-
-for _, doctype in ipairs(arg) do
- if doctype == 'luadoc' then
- luadoc = true
- elseif doctype == 'manual' then
- manual = true
- elseif doctype == 'doxygen' then
- doxygen = true
- elseif doctype == 'adeptsense' then
- adeptsense = true
- end
-end
-
--- Generate LuaDoc.
-if luadoc then
- os.execute('rm -r ../doc/api/*')
- os.execute('luadoc -d ../doc -doclet markdowndoc '..
- '../modules ../core ../lexers/lexer.lua')
-end
-
--- Generate the Manual.
-if manual then
- local HTML = [[
- <!doctype html>
- <html>
- <head>
- <title>%(title)</title>
- <link rel="stylesheet" href="../style.css" type="text/css" />
- <meta charset="utf-8" />
- </head>
- <body>
- <div id="content">
- <div id="nav">
- <div class="title">Manual</div>
- %(nav)
- </div>
- <div id="toc">
- <div class="title">Contents</div>
- %(toc)
- </div>
- <div id="main">
- %(main)
- </div>
- </div>
- </body>
- </html>
- ]]
-
- -- Get manual pages.
- local pages = {}
- local lfs = require 'lfs'
- for file in lfs.dir('../doc/manual/') do
- if file:find('^%d+_.-%.md$') then pages[#pages + 1] = file end
- end
- table.sort(pages)
- pages[#pages + 1] = '../../README.md'
- pages[#pages + 1] = '../../CHANGELOG.md'
- pages[#pages + 1] = '../../THANKS.md'
-
- -- Create the navigation list.
- local navfile = '../doc/manual/.nav.md'
- local f = io.open(navfile, 'wb')
- for _, page in ipairs(pages) do
- local name = page:match('^%A+(.-)%.md$'):gsub('(%l)(%u)', '%1 %2')
- if page:find('^%.%./') then page = page:match('^%A+(.+)$') end
- f:write('* [', name, '](', page:gsub('%.md$', '.html'), ')\n')
- end
- f:close()
- local p = io.popen('markdown "'..navfile..'"')
- local nav = p:read('*all')
- p:close()
-
- -- Write HTML.
- for _, page in ipairs(pages) do
- local name = page:match('^%A+(.-)%.md$'):gsub('(%l)(%u)', '%1 %2')
- local p = io.popen('markdown -f toc -T "../doc/manual/'..page..'"')
- local toc, main = p:read('*all'):match('^(.-\n</ul>\n)(.+)$')
- p:close()
- if page:find('^%.%./') then page = page:match('^%A+(.+)$') end
- f = io.open('../doc/manual/'..page:gsub('%.md$', '.html'), 'wb')
- local html = HTML:gsub('%%%(([^)]+)%)', {
- title = name..' - Textadept Manual', nav = nav, toc = toc, main = main
- })
- f:write(html)
- f:close()
- end
-end
-
--- Generate Doxygen documentation.
-if doxygen then
- os.execute('cd ../; doxygen Doxyfile')
-end
-
--- Create Lua adeptsense for textadept.
-if adeptsense then
- os.execute('luadoc -d ../modules/lua -doclet adeptsensedoc '..
- '../modules ../core ../lexers/lexer.lua')
-end