From b3c26bdc0688aff1a1c5bc4d0f964be244b0039e Mon Sep 17 00:00:00 2001
From: mitchell <70453897+667e-11@users.noreply.github.com>
Date: Sat, 10 Mar 2012 21:19:26 -0500
Subject: Replaced doc/gen_manual.lua with new unversioned tool.
---
doc/.footer.md | 1 +
doc/.header.md | 8 ++++
doc/footer.md | 1 -
doc/gen_manual.lua | 80 ------------------------------------
doc/header.md | 8 ----
doc/markdowndoc.lua | 4 +-
doc/style.css | 116 ----------------------------------------------------
7 files changed, 11 insertions(+), 207 deletions(-)
create mode 100644 doc/.footer.md
create mode 100644 doc/.header.md
delete mode 100644 doc/footer.md
delete mode 100644 doc/gen_manual.lua
delete mode 100644 doc/header.md
delete mode 100644 doc/style.css
(limited to 'doc')
diff --git a/doc/.footer.md b/doc/.footer.md
new file mode 100644
index 00000000..dd3c4c8a
--- /dev/null
+++ b/doc/.footer.md
@@ -0,0 +1 @@
+-> (c) 2007-2012 Mitchell mitchell.att.foicica.com <-
diff --git a/doc/.header.md b/doc/.header.md
new file mode 100644
index 00000000..84995ac0
--- /dev/null
+++ b/doc/.header.md
@@ -0,0 +1,8 @@
+#  Textadept
+
+* [Home](http://foicica.com/textadept) |
+* [Download](http://foicica.com/textadept/download) |
+* [Lua API](http://foicica.com/textadept/api) |
+* [Source](http://foicica.com/hg/textadept) |
+* [Language Modules](http://foicica.com/hg) |
+* [Mailing List](http://foicica.com/lists)
diff --git a/doc/footer.md b/doc/footer.md
deleted file mode 100644
index 1920715b..00000000
--- a/doc/footer.md
+++ /dev/null
@@ -1 +0,0 @@
--> (c) 2012 Mitchell mitchell.att.foicica.com <-
diff --git a/doc/gen_manual.lua b/doc/gen_manual.lua
deleted file mode 100644
index 47c1bb8c..00000000
--- a/doc/gen_manual.lua
+++ /dev/null
@@ -1,80 +0,0 @@
--- Copyright 2007-2012 Mitchell mitchell.att.foicica.com. See LICENSE.
-
-local HTML = [[
-
-
-
- %(title)
-
-
-
-
-
-
-
-
Manual
- %(nav)
-
-
-
Contents
- %(toc)
-
-
- %(main)
-
-
-
-
-
-]]
-local template = {}
-
--- Get manual pages.
-local pages = {}
-local lfs = require 'lfs'
-for file in lfs.dir('.') 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 header and footer.
-local p = io.popen('markdown header.md')
-template.header = p:read('*all')
-p:close()
-p = io.popen('markdown footer.md')
-template.footer = p:read('*all')
-p:close()
-
--- Create the navigation list.
-local navfile = '.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()
-p = io.popen('markdown '..navfile)
-template.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')
- template.title = name..' - Textadept Manual'
- p = io.popen('markdown -f toc -T '..page)
- template.toc, template.main = p:read('*all'):match('^(.-\n\n)(.+)$')
- p:close()
- if page:find('^%.%./') then page = page:match('^%A+(.+)$') end
- f = io.open(page:gsub('%.md$', '.html'), 'wb')
- local html = HTML:gsub('%%%(([^)]+)%)', template)
- f:write(html)
- f:close()
-end
diff --git a/doc/header.md b/doc/header.md
deleted file mode 100644
index 84995ac0..00000000
--- a/doc/header.md
+++ /dev/null
@@ -1,8 +0,0 @@
-#  Textadept
-
-* [Home](http://foicica.com/textadept) |
-* [Download](http://foicica.com/textadept/download) |
-* [Lua API](http://foicica.com/textadept/api) |
-* [Source](http://foicica.com/hg/textadept) |
-* [Language Modules](http://foicica.com/hg) |
-* [Mailing List](http://foicica.com/lists)
diff --git a/doc/markdowndoc.lua b/doc/markdowndoc.lua
index 8a661138..6c181a7b 100644
--- a/doc/markdowndoc.lua
+++ b/doc/markdowndoc.lua
@@ -120,10 +120,10 @@ function M.start(doc)
-- Create the header and footer, if given a template.
local header, footer = '', ''
if M.options.template_dir ~= 'luadoc/doclet/html/' then
- local p = io.popen('markdown "'..M.options.template_dir..'header.md"')
+ local p = io.popen('markdown "'..M.options.template_dir..'.header.md"')
template.header = p:read('*all')
p:close()
- p = io.popen('markdown "'..M.options.template_dir..'footer.md"')
+ p = io.popen('markdown "'..M.options.template_dir..'.footer.md"')
template.footer = p:read('*all')
p:close()
end
diff --git a/doc/style.css b/doc/style.css
deleted file mode 100644
index 6a1a31e3..00000000
--- a/doc/style.css
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Copyright 2012 Mitchell mitchell.att.foicica.com. */
-
-* {
- border: 0 solid #999999;
- margin: 0;
- padding: 0;
-}
-
-a {
- color: #1a66b3;
- text-decoration: none;
-}
-a:hover { text-decoration: underline; }
-a:visited { color: #661a66; }
-
-body {
- background-color: #e6e6e6;
- color: #333333;
-}
-
-code {
- font-size: larger;
-}
-
-h1 { margin: 0 0 1em 0; }
-h2, h3, h4, h5, h6 { margin: 1em 0 1em 0; }
-h1 { font-size: 1.3em; }
-h2 { font-size: 1.1em; }
-h3 { font-size: 1em; }
-h4 { font-size: 0.9em; }
-h5 { font-size: 0.8em; }
-
-hr {
- border: 1px solid #cccccc;
- margin: 1em 0 1em 0;
-}
-
-li > code, p > code { color: #808080; }
-
-pre {
- color: #808080;
- margin: 0 2.5em 0 2.5em;
-}
-
-table, th, td {
- border-width: 1px;
- border-collapse: collapse;
- margin-left: 1em;
- padding: 0.25em;
-}
-
-ul { list-style-type: disc; }
-
-#content { font-size: 1.2em; }
-
-#header h1 {
- background-color: #cccccc;
- border-width: 0 0 1px 0;
- padding: 0.25em;
- margin: 0;
-}
-#header ul {
- border-width: 0 0 1px 0;
- list-style: none;
- margin-bottom: 1.5em;
- padding: 0.25em;
-}
-#header li {
- color: #808080;
- display: inline;
-}
-
-#nav {
- border-width: 1px 1px 1px 0;
- float: left;
- margin-bottom: 1.5em;
- width: 10em;
-}
-#nav ul {
- list-style-type: none;
- margin: 0.25em 0.25em 0.25em 0.5em;
-}
-#nav ul ul { margin: 0 0.25em 0 1em; }
-
-#toc {
- border-width: 1px 0 1px 1px;
- float: right;
- margin: 0 0 1em 1em;
-}
-#toc ul {
- color: #808080;
- margin: 0.25em 0.25em 0.25em 1.25em;
-}
-#toc ul ul { margin: 0 0.25em 0 1em; }
-
-#nav h2, #toc h2 {
- border-width: 0 0 1px 0;
- background-color: #cccccc;
- font-size: 1em;
- font-weight: normal;
- margin: 0;
- padding: 0.25em;
-}
-
-#main { margin-left: 11em; }
-#main p { margin: 1em; }
-#main ol, #main ul { margin-left: 2.5em; }
-#main ol p, #main ul p { margin-left: 0; }
-
-#footer {
- background-color: #cccccc;
- border-width: 1px 0 0 0;
- clear: both;
- padding: 0.25em;
- margin-top: 1.5em;
-}
--
cgit v1.2.3