From 9488c2c813ffb1afca549516f70c1430983020e3 Mon Sep 17 00:00:00 2001 From: Brian West Date: Tue, 16 Oct 2007 18:44:20 +0000 Subject: [PATCH] phrase generate and verification tool in perl git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5907 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- docs/phrase/phrase.pl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 docs/phrase/phrase.pl diff --git a/docs/phrase/phrase.pl b/docs/phrase/phrase.pl new file mode 100644 index 0000000000..e4ed22ec39 --- /dev/null +++ b/docs/phrase/phrase.pl @@ -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}\""); + } + } + } +} + +