doc: Construct html index for documentation
authorKeith Packard <keithp@keithp.com>
Sat, 14 Nov 2015 07:36:02 +0000 (23:36 -0800)
committerKeith Packard <keithp@keithp.com>
Sat, 14 Nov 2015 07:36:02 +0000 (23:36 -0800)
This gets uploaded to keith's machine as an easy way to see what's available.

Signed-off-by: Keith Packard <keithp@keithp.com>
doc/Makefile
doc/easymini.txt
doc/make-am-html [new file with mode: 0755]

index b0c09ff..939969a 100644 (file)
@@ -3,24 +3,24 @@
 #
 
 RELNOTES_INC=\
-       release-notes-0.7.1.inc \
-       release-notes-0.8.inc \
-       release-notes-0.9.inc \
-       release-notes-0.9.2.inc \
-       release-notes-1.0.1.inc \
-       release-notes-1.1.inc \
-       release-notes-1.1.1.inc \
-       release-notes-1.2.inc \
-       release-notes-1.2.1.inc \
-       release-notes-1.3.inc \
-       release-notes-1.3.1.inc \
-       release-notes-1.3.2.inc \
-       release-notes-1.4.inc \
-       release-notes-1.4.1.inc \
-       release-notes-1.4.2.inc \
-       release-notes-1.5.inc \
+       release-notes-1.6.1.inc \
        release-notes-1.6.inc \
-       release-notes-1.6.1.inc
+       release-notes-1.5.inc \
+       release-notes-1.4.2.inc \
+       release-notes-1.4.1.inc \
+       release-notes-1.4.inc \
+       release-notes-1.3.2.inc \
+       release-notes-1.3.1.inc \
+       release-notes-1.3.inc \
+       release-notes-1.2.1.inc \
+       release-notes-1.2.inc \
+       release-notes-1.1.1.inc \
+       release-notes-1.1.inc \
+       release-notes-1.0.1.inc \
+       release-notes-0.9.2.inc \
+       release-notes-0.9.inc \
+       release-notes-0.8.inc \
+       release-notes-0.7.1.inc
 
 IMAGES=\
        altosui.png \
@@ -183,6 +183,8 @@ ONEFILE_TXT_FILES=\
 ONEFILE_RAW_FILES=$(ONEFILE_TXT_FILES:.txt=.raw)
 ONEFILE_PDF_FILES=$(ONEFILE_TXT_FILES:.txt=.pdf)
 
+AM_HTML=am.html
+
 HTML=altusmetrum.html micropeak.html telegps.html easymini.html $(RELNOTES_HTML) $(ONEFILE_HTML_FILES)
 
 HTML_REVHISTORY=\
@@ -268,15 +270,18 @@ publish:  $(DOC) $(FONTS)
         git commit -F - /home/bdale/web/altusmetrum/AltOS/doc/* /home/bdale/web/altusmetrum/AltOS/doc/fonts/* ; \
         git push)
 
-publish-keithp:        $(DOC) $(FONTS)
-       scp -p $(DOC) keithp.com:~keithp/public_html/altos
+publish-keithp:        am.html $(DOC) $(FONTS)
+       scp -p am.html $(DOC) keithp.com:~keithp/public_html/altos
        scp -p $(FONTS) keithp.com:~keithp/public_html/altos/fonts
 
 clean:
-       rm -f $(HTML) $(HTML_REVHISTORY) $(PDF) $(TEMPLATES_XSL) $(RAW_FILES) $(TELEGPS_RAW_FILES) $(MICROPEAK_RAW_FILES)
+       rm -f am.html $(HTML) $(HTML_REVHISTORY) $(PDF) $(TEMPLATES_XSL) $(RAW_FILES) $(TELEGPS_RAW_FILES) $(MICROPEAK_RAW_FILES)
 
 distclean: clean
        rm -f $(HTML) $(PDF)
 
 $(PDF): $(PDF_CONFIG_FILES)
 $(HTML): $(HTML_CONFIG_FILES)
+
+am.html: Makefile make-am-html $(HTML)
+       sh ./make-am-html $(HTML) > $@
index ddb1837..1a75b92 100644 (file)
@@ -1,4 +1,4 @@
-= EasyMini
+= EasyMini Owner's Manual
 :doctype: book
 :numbered:
 :altusmetrum: 1
diff --git a/doc/make-am-html b/doc/make-am-html
new file mode 100755 (executable)
index 0000000..ad8cb0a
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+cat << 'EOF'
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content=
+"text/html; charset=utf-8" />
+<title>Altus Metrum Documentation</title>
+<link rel="stylesheet" type="text/css" href="am.css" />
+<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
+</head>
+<body>
+<h1>Altus Metrum Documentation</h1>
+EOF
+
+for i in "$@"; do
+       echo '<p>'
+       grep '<title>' $i | head -1 | sed -e 's/.*<title>//' -e 's;</title>.*;;'
+       pdf=`basename "$i" .html`.pdf
+       echo '<a href="'$i'">html</a>'
+       echo '<a href="'$pdf'">pdf</a>'
+       echo '</p>'
+done
+
+cat << 'EOF'
+</body>
+</html>
+EOF