File: gendocs.py

package info (click to toggle)
bam 0.5.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,552 kB
  • sloc: ansic: 21,261; python: 731; makefile: 45; sh: 35; cpp: 30
file content (34 lines) | stat: -rw-r--r-- 1,300 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
from tinydoc import *
import os

os.system("dot -Tpng docs/depgraph.dot > docs/depgraph.png")


info = DocInfo()
info.name = "Bam Manual"
info.logo = "bam_logo.png"
info.note = "This manual is a work in progress and is not complete."
info.copyright = "Copyright © 2010 Magnus Auvinen. Freely available under the terms of the zlib/libpng license."

outputs = [HTMLOutput("docs/bam.html", info)]

group = 0
root = Node("root")
root.nodes += [ParseTextFile(Node("Introduction"), "docs/introduction.txt")]
root.nodes += [ParseTextFile(Node("Building Bam"), "docs/building.txt")]
root.nodes += [ParseTextFile(Node("Quick Start"), "docs/quickstart.txt")]
root.nodes += [ParseTextFile(Node("Custom Actions"), "docs/actions.txt")]
root.nodes += [ParseFile(Node("Command Line Reference"), "src/main.c")]
root.nodes += [ParseFile(Node("Function Reference"), "src/base.lua").Sorted()]
root.nodes += [ParseFile(Node("Tool Reference"), "src/tools.lua").Sorted()]
root.nodes += [ParseTextFile(Node("Quirks"), "docs/quirks.txt")]
root.nodes += [ParseTextFile(Node("License"), "COPYING", True)]
#notes.nodes +=[Node("C/C++ Dependency Checker")]
#notes.nodes +=[Node("Spaces in Paths")]

# render files
for o in outputs:
	o.file = open(o.output_name(), "w")
	o.render(root)
	o.file.close()