summaryrefslogtreecommitdiff
path: root/tools/fmt-bindings
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-07-30 14:07:49 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-07-30 14:07:49 +0000
commitc2c637db8338b87dc176d3b9ff03d241c225d346 (patch)
tree4fea02b9227dce6ad765eb9a8b68456b0a84d867 /tools/fmt-bindings
parent69cf67f99a3b7711ac4697246935c317a4f09ace (diff)
this is just a (re)start on a tool to produce bindings cheatsheets (original was lost in the Great Berlin Disk Crash
git-svn-id: svn://localhost/ardour2/branches/3.0@5444 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'tools/fmt-bindings')
-rwxr-xr-xtools/fmt-bindings43
1 files changed, 43 insertions, 0 deletions
diff --git a/tools/fmt-bindings b/tools/fmt-bindings
new file mode 100755
index 0000000000..8aed63dacc
--- /dev/null
+++ b/tools/fmt-bindings
@@ -0,0 +1,43 @@
+#!/usr/bin/perl
+
+$in_group_def = 0;
+$group_name;
+$group_text;
+$group_key;
+%group_names;
+%group_text;
+
+while (<>) {
+ next if /^\;/;
+
+ if (/^%/) {
+
+ if ($in_group_def) {
+ chop $group_text;
+ $group_names{$group_key} = $group_name;
+ $group_text{$group_key} = $group_text;
+ }
+
+ s/^%//;
+ chop;
+ ($group_key,$group_name) = split (/\s+/, $_, 2);
+ $group_text = "";
+ $in_group_def = 1;
+ next;
+ }
+
+ if ($in_group_def) {
+ next if (/^[ \t]+$/);
+ $group_text .= $_;
+ $group_text;
+ next;
+ }
+
+ next;
+}
+
+foreach $k (keys %group_names) {
+ print "GROUP: ", $k, " ", $group_names{$k}, "\n\t", $group_text{$k}, "\n";
+}
+
+exit 0;