[seed] docs: Add make functions helper script for generating module documentation
- From: Robert Carr <racarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [seed] docs: Add make functions helper script for generating module documentation
- Date: Mon, 18 May 2009 19:21:49 -0400 (EDT)
commit 687c5318e76c9f39eeb55f04604e0e751ab7aaa9
Author: Robert Carr <racarr svn gnome org>
Date: Mon May 18 18:41:27 2009 -0400
docs: Add make functions helper script for generating module documentation
---
doc/modules/make-functions.js | 40 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 40 insertions(+), 0 deletions(-)
diff --git a/doc/modules/make-functions.js b/doc/modules/make-functions.js
new file mode 100755
index 0000000..c01065b
--- /dev/null
+++ b/doc/modules/make-functions.js
@@ -0,0 +1,40 @@
+#!/usr/local/bin/seed
+Seed.include(Seed.argv[2]);
+
+function output_param (param){
+ Seed.printf("<varlistentry><term><parameter>%s</parameter></term>"+
+ "<listitem><simpara>%s</simpara></listitem></varlistentry>",
+ param.name,
+ param.description);
+
+}
+
+function output_function (func){
+ var start = Seed.printf("<refsect2 id=\"%s\" role=\"function\">"+
+ "<title>%s</title>"+
+ "<para>%s</para>",
+ func.id, func.title, func.description);
+
+ if (func.params || func.returns)
+ Seed.print("<variablelist role=\"params\">");
+ if (func.params != null){
+ for (var i = 0; i < func.params.length; i++){
+ output_param (func.params[i]);
+ }
+ }
+ if (func.returns != null){
+ Seed.printf("<varlistentry><term><emphasis>Returns</emphasis></term>"+
+ "<listitem><simpara>%s</simpara></listitem></varlistentry>",
+ func.returns);
+ }
+ if (func.params || func.returns)
+ Seed.print("</variablelist>");
+ Seed.print("</refsect2>");
+
+}
+
+Seed.print("<para>");
+for (var i = 0; i < funcs.length; i++){
+ output_function (funcs[i]);
+}
+Seed.print("</para>");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]