Added script to generate a cache of polygen info
authorEnrico Zini <enrico@enricozini.org>
Thu, 13 Aug 2009 13:32:15 +0000 (14:32 +0100)
committerEnrico Zini <enrico@enricozini.org>
Thu, 13 Aug 2009 13:32:15 +0000 (14:32 +0100)
src/Makefile.am
src/update-polygen-info [new file with mode: 0755]

index fd28b098bfaab5d99e2ba395197c4383a4c35659..0e83d1da5447082b5075ce7dbd4319e3a3a264e4 100644 (file)
@@ -66,5 +66,5 @@ zavai_LDADD = \
 #      gee-1.0.vapi \
 #      $(NULL)
 
 #      gee-1.0.vapi \
 #      $(NULL)
 
-EXTRA_DIST = $(zavai_VAPIS) sat-monitor
+EXTRA_DIST = $(zavai_VAPIS) sat-monitor update-polygen-info
 #$(libgee_la_VALASOURCES) gee-1.0.vapi gee.vala.stamp
 #$(libgee_la_VALASOURCES) gee-1.0.vapi gee.vala.stamp
diff --git a/src/update-polygen-info b/src/update-polygen-info
new file mode 100755 (executable)
index 0000000..eaaf94f
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+TARGET=~/.zavai/polygen-info
+
+exec > $TARGET
+
+cd /usr/share/polygen
+find . -name "*.grm" | sort | while read NAME
+do
+       TITLE=`polygen -info $NAME | grep ^title: | head -1 | sed -re 's/^[^:]+: *//'`
+       NAME=${NAME:2}
+       NAME=${NAME%.grm}
+       echo "$NAME $TITLE"
+done