Add a Makefile to generate classes doc in various formats
All the generated documentation is put in doc/_build.
This commit is contained in:
parent
aeb5ea5934
commit
410e418aea
9 changed files with 64 additions and 24 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -24,9 +24,8 @@ tools/editor/editor_icons.cpp
|
|||
make.bat
|
||||
log.txt
|
||||
|
||||
# Documentation generated by doxygen or scripts
|
||||
doc/doxygen/
|
||||
doc/html/
|
||||
# Documentation generated by doxygen or from classes.xml
|
||||
doc/_build/
|
||||
|
||||
# Javascript specific
|
||||
*.bc
|
||||
|
|
|
@ -58,7 +58,7 @@ PROJECT_LOGO = ../logo.png
|
|||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = ./doxygen/
|
||||
OUTPUT_DIRECTORY = ./_build/doxygen/
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||
# directories (in 2 levels) under the output directory of each output format and
|
||||
|
|
47
doc/Makefile
Normal file
47
doc/Makefile
Normal file
|
@ -0,0 +1,47 @@
|
|||
BASEDIR = $(CURDIR)
|
||||
CLASSES = $(BASEDIR)/base/classes.xml
|
||||
OUTPUTDIR = $(BASEDIR)/_build
|
||||
TOOLSDIR = $(BASEDIR)/tools
|
||||
|
||||
.ONESHELL:
|
||||
|
||||
clean:
|
||||
rm -rf $(OUTPUTDIR)
|
||||
|
||||
doku:
|
||||
rm -rf $(OUTPUTDIR)/doku
|
||||
mkdir -p $(OUTPUTDIR)/doku
|
||||
pushd $(OUTPUTDIR)/doku
|
||||
python2 $(TOOLSDIR)/makedoku.py $(CLASSES)
|
||||
popd
|
||||
|
||||
doxygen:
|
||||
rm -rf $(OUTPUTDIR)/doxygen
|
||||
mkdir -p $(OUTPUTDIR)/doxygen
|
||||
doxygen Doxyfile
|
||||
|
||||
html:
|
||||
rm -rf $(OUTPUTDIR)/html
|
||||
mkdir -p $(OUTPUTDIR)/html
|
||||
pushd $(OUTPUTDIR)/html
|
||||
python2 $(TOOLSDIR)/makehtml.py -multipage $(CLASSES)
|
||||
popd
|
||||
|
||||
markdown:
|
||||
rm -rf $(OUTPUTDIR)/markdown
|
||||
mkdir -p $(OUTPUTDIR)/markdown
|
||||
pushd $(OUTPUTDIR)/markdown
|
||||
python2 $(TOOLSDIR)/makemd.py $(CLASSES)
|
||||
popd
|
||||
|
||||
rst:
|
||||
rm -rf $(OUTPUTDIR)/rst
|
||||
mkdir -p $(OUTPUTDIR)/rst
|
||||
pushd $(OUTPUTDIR)/rst
|
||||
echo "TODO"
|
||||
popd
|
||||
|
||||
textile:
|
||||
rm -rf $(OUTPUTDIR)/textile
|
||||
mkdir -p $(OUTPUTDIR)/textile
|
||||
python3 $(TOOLSDIR)/makedocs.py --input $(CLASSES) --output $(OUTPUTDIR)/textile
|
|
@ -1,16 +0,0 @@
|
|||
#! /bin/bash
|
||||
here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
godotHome=$(dirname "$here")
|
||||
docTarget=${here}/html/class_list
|
||||
|
||||
throw() {
|
||||
echo "$@" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
[ -d "$docTarget" ] || mkdir -p "$docTarget" || throw "Could not create doc target $docTarget"
|
||||
|
||||
cd "$docTarget"
|
||||
python ${here}/makehtml.py -multipage ${here}/base/classes.xml
|
||||
cd "$here"
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
# TODO:
|
||||
# * Refactor code.
|
||||
# * Adapt this script for generating content in other markup formats like
|
||||
# DokuWiki, Markdown, etc.
|
||||
# reStructuredText, Markdown, DokuWiki, etc.
|
||||
#
|
||||
# Also check other TODO entries in this script for more information on what is
|
||||
# left to do.
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
|
@ -8,7 +11,7 @@ for arg in sys.argv[1:]:
|
|||
input_list.append(arg)
|
||||
|
||||
if len(input_list) < 1:
|
||||
print("usage: makedoku.py <class_list.xml>")
|
||||
print("usage: makedoku.py <classes.xml>")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
from xml.sax.saxutils import escape, unescape
|
||||
|
@ -29,7 +32,7 @@ for arg in sys.argv[1:]:
|
|||
input_list.append(arg)
|
||||
|
||||
if len(input_list) < 1:
|
||||
print("usage: makehtml.py <class_list.xml>")
|
||||
print("usage: makehtml.py <classes.xml>")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
|
@ -9,7 +10,7 @@ for arg in sys.argv[1:]:
|
|||
input_list.append(arg)
|
||||
|
||||
if len(input_list) < 1:
|
||||
print 'usage: makedoku.py <class_list.xml>'
|
||||
print 'usage: makemd.py <classes.xml>'
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue