[Freeswitch-svn] [commit] r5907 - freeswitch/trunk/docs/phrase
Freeswitch SVN
brian at freeswitch.org
Tue Oct 16 14:44:20 EDT 2007
Author: brian
Date: Tue Oct 16 14:44:20 2007
New Revision: 5907
Added:
freeswitch/trunk/docs/phrase/phrase.pl
Log:
phrase generate and verification tool in perl
Added: freeswitch/trunk/docs/phrase/phrase.pl
==============================================================================
--- (empty file)
+++ freeswitch/trunk/docs/phrase/phrase.pl Tue Oct 16 14:44:20 2007
@@ -0,0 +1,25 @@
+#!/usr/bin/perl
+#
+# Phrase verification and generation script.
+#
+
+use XML::Simple;
+use Data::Dumper;
+
+my $ref = XMLin("phrase.xml");
+
+foreach $language ( sort keys %{$ref}) {
+ foreach $item ( sort keys %{$ref->{$language}}) {
+ foreach $element ( sort keys %{$ref->{$language}->{$item}}) {
+ print "Language: $language, $item, $element\n";
+ #system("mkdir -p $language/$item");
+ foreach $foo (@{$ref->{$language}->{$item}->{$element}}) {
+ print "filename: $language/$item/$foo->{filename} contains phrase \"$foo->{phrase}\"\n";
+ # insert command to verify or generate files here
+ # system("say -o $language/$item/$foo->{filename} \"$foo->{phrase}\"");
+ }
+ }
+ }
+}
+
+
More information about the Freeswitch-svn
mailing list