aboutsummaryrefslogtreecommitdiff
path: root/scripts/update_doc
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-06-17 21:40:46 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2010-06-17 21:40:46 -0400
commit44d46d022675756783e3c007923a77446d52b7e7 (patch)
tree833da6536abe6d4934a86503e80b07a8749a7566 /scripts/update_doc
parent75efa82b280d1240667c1207f411ccef65149222 (diff)
downloadtextadept-44d46d022675756783e3c007923a77446d52b7e7.tar.gz
textadept-44d46d022675756783e3c007923a77446d52b7e7.zip
Renamed core/.*.lua to core/.*.luadoc documentation files.
Diffstat (limited to 'scripts/update_doc')
-rwxr-xr-xscripts/update_doc17
1 files changed, 16 insertions, 1 deletions
diff --git a/scripts/update_doc b/scripts/update_doc
index f5518e02..8f9ee6c0 100755
--- a/scripts/update_doc
+++ b/scripts/update_doc
@@ -1,10 +1,25 @@
#!/usr/bin/lua
-- Copyright 2007-2010 Mitchell mitchell<att>caladbolg.net. See LICENSE.
+-- Rename *.lua.doc to *.lua so LuaDoc detects them.
+local lfs = require 'lfs'
+for file in lfs.dir('../core') do
+ if file:match('^%..-%.luadoc$') then
+ os.rename('../core/'..file, '../core/'..file:match('^%..-%.lua'))
+ end
+end
+
-- Generate LuaDoc.
os.execute('rm -rf ../doc/modules/')
os.execute('cd ../; luadoc -d doc/ --nofiles modules/ core/ lexers/lexer.lua')
+-- Revert to *.lua.doc
+for file in lfs.dir('../core') do
+ if file:match('^%..-%.lua$') then
+ os.rename('../core/'..file, '../core/'..file..'doc')
+ end
+end
+
-- Insert Markdown in modules into LuaDoc.
local p = io.popen('grep -r "\\-\\- Markdown:" ../*')
for file in p:lines() do
@@ -81,7 +96,7 @@ for mdfile in p:lines() do
<div id="about">
<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div>
- </div>
+ </div>
</body>
</html>
]]