[telepathy-spec/master] Add a compact interfaces list
Davyd Madeley
davyd at madeley.id.au
Fri Mar 27 07:18:36 PDT 2009
---
doc/templates/errors.html | 1 +
doc/templates/fullindex.html | 1 +
doc/templates/generic-types.html | 1 +
doc/templates/index.html | 1 +
doc/templates/interface.html | 4 ++-
doc/templates/interfaces.html | 50 ++++++++++++++++++++++++++++++++++++++
tools/doc-generator.py | 8 ++++++
7 files changed, 65 insertions(+), 1 deletions(-)
create mode 100644 doc/templates/interfaces.html
diff --git a/doc/templates/errors.html b/doc/templates/errors.html
index 6811a73..a31054c 100644
--- a/doc/templates/errors.html
+++ b/doc/templates/errors.html
@@ -9,6 +9,7 @@
<div class="header">
<h1>Errors</h1>
<a href="index.html">Interface Index</a>
+ (<a href="interfaces.html">Compact</a>)
| <a href="#summary">Summary</a>
| <a href="#errors">Errors</a>
</div>
diff --git a/doc/templates/fullindex.html b/doc/templates/fullindex.html
index e1d13bb..c842ec5 100644
--- a/doc/templates/fullindex.html
+++ b/doc/templates/fullindex.html
@@ -30,6 +30,7 @@
<div class="header">
<h1>Full Index</h1>
<a href="index.html">Interface Index</a>
+ (<a href="interfaces.html">Compact</a>)
#for $a in map(chr, xrange(ord('A'), ord('Z')+1))
#if $a in $letters
| <a href="#$a">$a</a>
diff --git a/doc/templates/generic-types.html b/doc/templates/generic-types.html
index 89eeb8c..0bb209e 100644
--- a/doc/templates/generic-types.html
+++ b/doc/templates/generic-types.html
@@ -9,6 +9,7 @@
<div class="header">
<h1>Generic Types</h1>
<a href="index.html">Interface Index</a>
+ (<a href="interfaces.html">Compact</a>)
| <a href="#summary">Summary</a>
| <a href="#types">Types</a>
</div>
diff --git a/doc/templates/index.html b/doc/templates/index.html
index e7e5667..efc38d4 100644
--- a/doc/templates/index.html
+++ b/doc/templates/index.html
@@ -9,6 +9,7 @@
<div class="header">
<h1>$spec.title</h1>
<a href="#interfaces">Interfaces</a>
+ (<a href="interfaces.html">Compact</a>)
| <a href="generic-types.html">Generic Types</a>
| <a href="errors.html">Errors</a>
| <a href="fullindex.html">Full Index</a>
diff --git a/doc/templates/interface.html b/doc/templates/interface.html
index ac25804..f3b7c66 100644
--- a/doc/templates/interface.html
+++ b/doc/templates/interface.html
@@ -8,7 +8,9 @@
<body>
<div class="header">
<h1>Interface $interface.name</h1>
- <a href="index.html">Interface Index</a> | <a href="#summary">Summary</a>
+ <a href="index.html">Interface Index</a>
+ (<a href="interfaces.html">Compact</a>)
+ | <a href="#summary">Summary</a>
#if $interface.docstring: | <a href="#description">Description</a>
#if $interface.methods: | <a href="#methods">Methods</a>
#if $interface.signals: | <a href="#signals">Signals</a>
diff --git a/doc/templates/interfaces.html b/doc/templates/interfaces.html
new file mode 100644
index 0000000..a93334c
--- /dev/null
+++ b/doc/templates/interfaces.html
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" "">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title>$spec.title &mdash v$spec.version</title>
+ <link rel="stylesheet" href="style.css" type="text/css"/>
+ </head>
+ <body>
+ <div class="header">
+ <h1>$spec.title</h1>
+ <a href="index.html">Full</a>
+ | <a href="generic-types.html">Generic Types</a>
+ | <a href="errors.html">Errors</a>
+ | <a href="fullindex.html">Full Index</a>
+ </div>
+
+ <div class="main">
+ <b>Version $spec.version</b>
+
+ <a name="interfaces"></a>
+ <h3>Interfaces</h3>
+ <ul>
+ #for $interface in $spec.interfaces
+ #if $interface.causes_havoc
+ <li class="causes-havoc">
+ #elif $interface.deprecated
+ <li class="deprecated">
+ #else
+ <li>
+ #end if
+ <a href="$interface.get_url()">$interface.name</a>
+ #if $interface.causes_havoc
+ (unstable)
+ #elif $interface.deprecated
+ (deprecated)
+ #end if
+ </li>
+ #end for
+ </ul>
+
+ <a name="other"></a>
+ <h3>Other</h3>
+ <ul>
+ <li><a href="generic-types.html">Generic Types</a></li>
+ <li><a href="errors.html">Errors</a></li>
+ </ul>
+
+ </div>
+ </body>
+</html>
diff --git a/tools/doc-generator.py b/tools/doc-generator.py
index c4ed5c0..568061c 100755
--- a/tools/doc-generator.py
+++ b/tools/doc-generator.py
@@ -98,6 +98,14 @@ out = open(os.path.join(output_path, 'errors.html'), 'w')
print >> out, unicode(t).encode('utf-8')
out.close()
+# write out the interfaces list
+namespace = { 'spec': spec }
+template_def = load_template('interfaces.html')
+t = Template(template_def, namespaces=namespace)
+out = open(os.path.join(output_path, 'interfaces.html'), 'w')
+print >> out, unicode(t).encode('utf-8')
+out.close()
+
# write out the fullindex
namespace = { 'spec': spec }
template_def = load_template('fullindex.html')
--
1.5.6.5
More information about the telepathy-commits
mailing list