Changeset 2577
- Timestamp:
- 05/12/08 10:53:12 (4 months ago)
- Files:
-
- Trunk/Scripts/Mirroring_scripts/RunDaily.pl (modified) (2 diffs)
- Trunk/Scripts/Mirroring_scripts/Single_WebGUIForum.pm (modified) (6 diffs)
- Trunk/Scripts/Mirroring_scripts/VoxForge_config.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
Trunk/Scripts/Mirroring_scripts/RunDaily.pl
r2517 r2577 68 68 ### Main 69 69 #################################################################### 70 # !!!!!! 71 Update($parms) || confess "RunDaily-preprocessing error: $?"; 72 # !!!!!! 70 73 my $userSubmission = UserSubmission->new($parms); 71 74 my $repository = Repository->new($parms); … … 98 101 } 99 102 103 # !!!!!!! 104 sub Update { 105 my ($parms ) = @_; 106 my $debug = $$parms{"debug"}; 107 my $dir = $$parms{"MirroringScripts_dir"}; 108 my $HTKdir = $$parms{"HTK_dir"}; 109 my $Audio_scriptsdir = $$parms{"AudioScripts_dir"}; 110 # Cleanup dynamically created Audio makefiles 111 $command = ("cd $dir && rm -f *_dyn_makefile"); print "$command\n" if $debug; system($command) == 0 or die "system $command failed: $?"; 112 # update from svn repository server 113 $command = ("svn update /data/svn-mirror/Main/Trunk"); print "$command\n" if $debug;system($command) == 0 or die "system $command failed: $?"; 114 $command = ("svn update /data/svn-mirror/Main/Tags"); print "$command\n" if $debug;system($command) == 0 or die "system $command failed: $?"; 115 $command = ("svn update /data/svn-mirror/SpeechCorpus/Trunk"); print "$command\n" if $debug;system($command) == 0 or die "system $command failed: $?"; 116 $command = ("svn update /data/svn-mirror/Russian/Trunk"); print "$command\n" if $debug;system($command) == 0 or die "system $command failed: $?"; 117 $command = ("svn update /data/svn-mirror/de/Trunk"); print "$command\n" if $debug;system($command) == 0 or die "system $command failed: $?"; 118 $command = ("svn update /data/svn-mirror/Dutch/Trunk"); print "$command\n" if $debug;system($command) == 0 or die "system $command failed: $?"; 119 return 1; 120 } 121 # !!!!!! 100 122 1; Trunk/Scripts/Mirroring_scripts/Single_WebGUIForum.pm
r2516 r2577 28 28 #################################################################### 29 29 use VoxForge_config; 30 # !!!!!!31 #my $parms = VoxForge_config::getParms;32 30 my $parms = VoxForge_config->new(); 33 # !!!!!!34 31 use WebGUIForum; 35 32 … … 39 36 my $command; 40 37 my ($promptspath, $readmepath, $licensepath); 41 my ($path_original,$AudioDirName,$tarfile );38 my ($path_original,$AudioDirName,$tarfile,$pathtoTarfile); 42 39 #################################################################### 43 40 ### Directory 44 41 #################################################################### 45 if ( 0) { #upload tarfile as attachment to WebGUI; Dutch, German46 $path_original ="/home/kmaclean/temp 2";47 $tarfile =" test-march22-DEall2.zip"; # if undef then attachment does not get processed by LWP!42 if (1) { #upload tarfile as attachment to WebGUI; Italian, Hebrew 43 $path_original ="/home/kmaclean/temp"; 44 $tarfile ="HB-anonymous-20080511-fov[1068200919].zip"; # if undef then attachment does not get processed by LWP! 48 45 #my $prefix ="DE-"; # prefix to remove from submission 49 46 #################################################################### … … 52 49 # can't get this to work with Archive::Extract??: 53 50 my $newDirectoryName = $tarfile; 54 # !!!!!!55 #$newDirectoryName =~ s/$prefix//;56 51 $newDirectoryName =~ s/^EN-//; # ^ = beginning of a line; 57 52 $newDirectoryName =~ s/^NL-//; # Netherlands (Dutch) 58 53 $newDirectoryName =~ s/^DE-//; # German 59 54 $newDirectoryName =~ s/^RU-//; # Russian 60 # !!!!!! 55 $newDirectoryName =~ s/^HE-//; # Hebrew 56 $newDirectoryName =~ s/^IT-//; # Italian 61 57 $newDirectoryName =~ s/\[.*\]//; 62 58 rename("$path_original/$tarfile", "$path_original/$newDirectoryName") || confess "error:tar file not found, cannot rename: $?"; 63 59 $tarfile = $newDirectoryName; 64 60 } 65 print "tarfile2:$path_original/$tarfile\n"; 61 $pathtoTarfile="$path_original/$tarfile"; 62 print "tarfile2:$pathtoTarfile\n"; 66 63 my @suffixlist = ("tgz", "tar\.gz", "zip"); 67 64 my ($path,$suffix); … … 70 67 print "AudioDirName:$AudioDirName\n"; 71 68 72 my $ae = Archive::Extract->new( archive => "$path _original/$tarfile" );69 my $ae = Archive::Extract->new( archive => "$pathtoTarfile" ); 73 70 $ae->extract( to => "$path_original/$AudioDirName") or die $ae->error;; 74 71 75 } else { #no tarfile to upload, only a link to 1&1 voxforge repository; English only72 } else { #no tarfile to upload, only a link to 1&1 voxforge repository; English, Dutch, German, Russian only 76 73 ##########fix submission that did not work properly; no tarfile to upload since linking to voxforge1.org 77 $path_original ="/ home/kmaclean/temp2";78 $AudioDirName=" simcop2387-20080324-psl";79 $ tarfile = undef;74 $path_original ="/data/UserSubmissions/Quarantine"; 75 $AudioDirName="rocketman768-20080409-oip"; 76 $pathtoTarfile = undef; 80 77 } 81 78 #################################################################### 82 79 ### Main 83 80 #################################################################### 84 #UserSubmission::README->ValidateFileName($parms, "$path_original/$AudioDirName");85 81 my $readmeWithPath = UserSubmission::README->getFileWithPath($parms,"$path_original/$AudioDirName"); 86 82 print "!!!!!!readmeWithPath:$readmeWithPath\n"; … … 93 89 94 90 if (defined $tarfile) { 95 if ((-e "$path_original/$tarfile") and (-e "$path_original/$AudioDirName")) { 96 print "path $path_original/$AudioDirName.zip\n"; 91 if ((-e "$pathtoTarfile") and (-e "$path_original/$AudioDirName")) { 92 print "Main: path to tar file: $pathtoTarfile\n"; 93 print "Main: path to Audio Directory: $path_original/$AudioDirName\n"; 97 94 Update($parms, \%ProcessedUserSubmissions, 'speechsubmission', 'n@wp@$$') || confess "Single_WebGUIForumUpdate error: $?"; 98 95 } else { … … 124 121 #my ($content,$title)= WebGUIForum::getSubmissionContents($parms,$readmepath,$promptspath,$licensepath,$AudioDirName, $readme,$tarfile); 125 122 my ($content,$title)= WebGUIForum::getSubmissionContents($parms,$path_original ,$AudioDirName,$readme,$tarfile); 126 WebGUIForum::Upload($parms,$browser,$content,$title,$readme,$ tarfile);123 WebGUIForum::Upload($parms,$browser,$content,$title,$readme,$pathtoTarfile); 127 124 } 128 125 print "\nWebGUIForumUpdate.pm completed!\n****************************************************\n\n"; Trunk/Scripts/Mirroring_scripts/VoxForge_config.pm
r2507 r2577 130 130 $SpeechCorpus = "/data/svn-mirror/Russian/Trunk"; 131 131 } else { 132 confess "VoxForge_config error: no language selected\n";132 confess "VoxForge_config setSpeechCorpusLanguage error: language not selected or not supported\n"; 133 133 } 134 134 … … 154 154 #$$parms{"webguiUploadURL"} = 'http://www.voxforge.org/home/downloads/speech/voxforgeivr'; # for testing 155 155 $$parms{"webguiRepositoryURL"} = 'http://www.repository.voxforge1.org/downloads/de/Trunk/Audio/Original'; 156 } elsif ($language =~ /HB/) { 157 $$parms{"webguiUploadURL"} = 'http://www.voxforge.org/home/downloads/speech/hebrew'; 158 $$parms{"webguiRepositoryURL"} = 'Error: repository not set up yet'; 159 } elsif ($language =~ /IT/) { 160 $$parms{"webguiUploadURL"} = 'http://www.voxforge.org/home/downloads/speech/italian-speech-files'; 161 $$parms{"webguiRepositoryURL"} = 'Error: repository not set up yet'; 156 162 } elsif ($language =~ /NL/) { 157 163 $$parms{"webguiUploadURL"} = 'http://www.voxforge.org/home/downloads/speech/dutch'; … … 162 168 #$$parms{"webguiUploadURL"} = 'http://www.voxforge.org/home/downloads/speech/voxforgeivr'; # for testing 163 169 $$parms{"webguiRepositoryURL"} = 'http://www.repository.voxforge1.org/downloads/Russian/Trunk/Audio/Original'; 170 164 171 } else { 165 confess "VoxForge_config error: language not selected or not supported\n";172 confess "VoxForge_config setWebguiForumLanguage error: language not selected or not supported\n"; 166 173 } 167 174 }