From 3c0e4e64704c0ce35a18d3cdea696ae9e6e69006 Mon Sep 17 00:00:00 2001 From: Fredric N Date: Sat, 22 Jan 2011 14:37:14 +0100 Subject: [PATCH] Changed the documentation structure --- .gitignore | 2 -- docs/.gitignore | 2 ++ docs/Makefile | 15 +++++++++------ docs/technical/.gitignore | 2 ++ docs/{ => technical}/api-notify.txt | 0 docs/{ => technical}/fscrawl.txt | 0 docs/technical/genindex.sh | 21 +++++++++++++++++++++ docs/{ => technical}/log.txt | 0 docs/{ => technical}/path.txt | 0 docs/{ => technical}/queue.txt | 0 docs/{ => technical}/rbtree.txt | 0 docs/{ => technical}/strbuf.txt | 0 docs/{ => technical}/xalloc.txt | 0 13 files changed, 34 insertions(+), 8 deletions(-) create mode 100644 docs/.gitignore create mode 100644 docs/technical/.gitignore rename docs/{ => technical}/api-notify.txt (100%) rename docs/{ => technical}/fscrawl.txt (100%) create mode 100755 docs/technical/genindex.sh rename docs/{ => technical}/log.txt (100%) rename docs/{ => technical}/path.txt (100%) rename docs/{ => technical}/queue.txt (100%) rename docs/{ => technical}/rbtree.txt (100%) rename docs/{ => technical}/strbuf.txt (100%) rename docs/{ => technical}/xalloc.txt (100%) diff --git a/.gitignore b/.gitignore index 2fe9dc3..90c8fbe 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,3 @@ archived Makefile.local.mk test/test_* nbproject -docs/*.html -docs/index.txt diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..6af0f18 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,2 @@ +*.html +index.txt diff --git a/docs/Makefile b/docs/Makefile index 3e18b44..3cc770b 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,9 +1,8 @@ ASCIIDOC = asciidoc -SOURCE_DOCS = $(subst index.txt,,$(wildcard *.txt)) - -HTML_DOCS = index.html $(patsubst %.txt,%.html,$(SOURCE_DOCS)) +DOCS = $(filter-out index.txt, $(wildcard *.txt)) +TECH_DOCS = $(filter-out technical/index.txt, $(wildcard technical/*.txt)) ifndef VERBOSE QUIET_ASCIIDOC = @echo ' ' GEN $@; @@ -12,13 +11,17 @@ endif .PHONY : clean all : html -html : $(HTML_DOCS) +html : index.html +technical : technical/index.html %.html : %.txt $(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 -o $@ $< -index.txt : $(SOURCE_DOCS) +index.txt : $(patsubst %.txt,%.html,$(DOCS)) $(QUIET_SCRIPT)$(shell ./genindex.sh index.txt) +technical/index.txt : $(patsubst %.txt,%.html,$(TECH_DOCS)) + $(QUIET_SCRIPT)cd technical && ./genindex.sh index.txt + clean : - $(RM) index.txt *.html + $(RM) index.txt *.html technical/index.txt technical/*.html diff --git a/docs/technical/.gitignore b/docs/technical/.gitignore new file mode 100644 index 0000000..6af0f18 --- /dev/null +++ b/docs/technical/.gitignore @@ -0,0 +1,2 @@ +*.html +index.txt diff --git a/docs/api-notify.txt b/docs/technical/api-notify.txt similarity index 100% rename from docs/api-notify.txt rename to docs/technical/api-notify.txt diff --git a/docs/fscrawl.txt b/docs/technical/fscrawl.txt similarity index 100% rename from docs/fscrawl.txt rename to docs/technical/fscrawl.txt diff --git a/docs/technical/genindex.sh b/docs/technical/genindex.sh new file mode 100755 index 0000000..91d013a --- /dev/null +++ b/docs/technical/genindex.sh @@ -0,0 +1,21 @@ + +#!/bin/sh + +if [ $# -lt 1 ]; then + exit 1 +fi + +( + echo "Archived API Documentation" + echo "--------------------------" + + for DOC in `ls *.txt`; do + if [ "$DOC" = "$1" ]; then + continue + fi + display=$(sed -e 1q "${DOC}") + link=${DOC%.txt}.html + echo "* link:${link}[${display}]" + done + +) > $1 diff --git a/docs/log.txt b/docs/technical/log.txt similarity index 100% rename from docs/log.txt rename to docs/technical/log.txt diff --git a/docs/path.txt b/docs/technical/path.txt similarity index 100% rename from docs/path.txt rename to docs/technical/path.txt diff --git a/docs/queue.txt b/docs/technical/queue.txt similarity index 100% rename from docs/queue.txt rename to docs/technical/queue.txt diff --git a/docs/rbtree.txt b/docs/technical/rbtree.txt similarity index 100% rename from docs/rbtree.txt rename to docs/technical/rbtree.txt diff --git a/docs/strbuf.txt b/docs/technical/strbuf.txt similarity index 100% rename from docs/strbuf.txt rename to docs/technical/strbuf.txt diff --git a/docs/xalloc.txt b/docs/technical/xalloc.txt similarity index 100% rename from docs/xalloc.txt rename to docs/technical/xalloc.txt