summaryrefslogtreecommitdiffstats
path: root/utils/rockbox_api/generate.php
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-10-06 22:19:54 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-10-06 22:19:54 +0000
commit20fb47ec778abe215ca69692434ff753596319e6 (patch)
tree69665298c0f58c07a1aa9677d33ad395ad9ccd13 /utils/rockbox_api/generate.php
parent34148b9a2173b0bd80b4acd18d23216ae54cb865 (diff)
downloadrockbox-20fb47ec778abe215ca69692434ff753596319e6.tar.gz
rockbox-20fb47ec778abe215ca69692434ff753596319e6.tar.bz2
rockbox-20fb47ec778abe215ca69692434ff753596319e6.zip
Commit FS#9462: an semi-automatic plugin API documentation generator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18722 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'utils/rockbox_api/generate.php')
-rwxr-xr-xutils/rockbox_api/generate.php63
1 files changed, 63 insertions, 0 deletions
diff --git a/utils/rockbox_api/generate.php b/utils/rockbox_api/generate.php
new file mode 100755
index 0000000000..29dd69588a
--- /dev/null
+++ b/utils/rockbox_api/generate.php
@@ -0,0 +1,63 @@
+#!/usr/bin/php
+<?
+require_once("functions.php");
+
+echo '# Auto generated documentation by Rockbox plugin API generator v2'."\n";
+echo '# Made by Maurus Cuelenaere'."\n";
+echo <<<MOO
+# __________ __ ___.
+# Open \______ \ ____ ____ | | _\_ |__ _______ ___
+# Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+# Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+# Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+# \/ \/ \/ \/ \/
+# \$Id$
+#
+# Generated from $svn\x61pps/plugin.h
+#
+# Format:
+# \\group memory and strings
+# \\conditions defined(HAVE_BACKLIGHT)
+# \\param fmt
+# \\return
+# \\description
+# \\see func1 func2 [S[apps/plugin.c]]
+#
+# Markup:
+# [W[wiki url]]
+# [S[svn url]]
+# [F[function]]
+# [[url]]
+# %BR%
+# =code=
+
+MOO;
+
+foreach(get_newest() as $line)
+{
+ echo "\n".clean_func($line["func"])."\n";
+
+ if(strlen($line["group"]) > 0)
+ echo " \\group ".$line["group"]."\n";
+
+ if(strlen($line["cond"]) > 2)
+ echo " \\conditions "._simplify($line["cond"])."\n";
+
+ foreach(get_args($line["func"]) as $param)
+ {
+ if(strlen($param) > 0 && $param != "...")
+ {
+ $param = split_var($param);
+ $param = $param[1];
+ echo " \\param $param\n";
+ }
+ }
+
+ if(get_return($line["func"]) !== false)
+ echo " \\return\n";
+
+ echo " \\description\n";
+}
+
+echo "\n# END\n";
+?> \ No newline at end of file