voxforge.org
VoxForge Dev

Changeset 2577

Show
Ignore:
Timestamp:
05/12/08 10:53:12 (4 months ago)
Author:
kmaclean
Message:

update mirroring scripts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Trunk/Scripts/Mirroring_scripts/RunDaily.pl

    r2517 r2577  
    6868### Main 
    6969#################################################################### 
     70# !!!!!! 
     71Update($parms) || confess "RunDaily-preprocessing error: $?"; 
     72# !!!!!! 
    7073my $userSubmission = UserSubmission->new($parms); 
    7174my $repository = Repository->new($parms); 
     
    98101} 
    99102 
     103# !!!!!!! 
     104sub 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# !!!!!! 
    1001221; 
  • Trunk/Scripts/Mirroring_scripts/Single_WebGUIForum.pm

    r2516 r2577  
    2828#################################################################### 
    2929use VoxForge_config; 
    30 # !!!!!!  
    31 #my $parms = VoxForge_config::getParms; 
    3230my $parms = VoxForge_config->new(); 
    33 # !!!!!! 
    3431use WebGUIForum;  
    3532 
     
    3936my $command; 
    4037my ($promptspath, $readmepath, $licensepath); 
    41 my ($path_original,$AudioDirName,$tarfile); 
     38my ($path_original,$AudioDirName,$tarfile,$pathtoTarfile); 
    4239#################################################################### 
    4340### Directory 
    4441#################################################################### 
    45 if (0) { #upload tarfile as attachment to WebGUI; Dutch, German 
    46         $path_original ="/home/kmaclean/temp2"; 
    47         $tarfile ="test-march22-DEall2.zip";  # if undef then attachment does not get processed by LWP! 
     42if (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! 
    4845        #my $prefix  ="DE-"; # prefix to remove from submission 
    4946        #################################################################### 
     
    5249        # can't get this to work with Archive::Extract??: 
    5350                my $newDirectoryName = $tarfile; 
    54                 # !!!!!! 
    55                 #$newDirectoryName =~ s/$prefix//; 
    5651                $newDirectoryName =~ s/^EN-//;  # ^ = beginning of a line; 
    5752                $newDirectoryName =~ s/^NL-//;  # Netherlands (Dutch)                                    
    5853                $newDirectoryName =~ s/^DE-//;  # German                                                         
    5954                $newDirectoryName =~ s/^RU-//;  # Russian 
    60                 # !!!!!! 
     55                $newDirectoryName =~ s/^HE-//;  # Hebrew 
     56                $newDirectoryName =~ s/^IT-//;  # Italian 
    6157                $newDirectoryName =~ s/\[.*\]//; 
    6258                rename("$path_original/$tarfile", "$path_original/$newDirectoryName")  || confess "error:tar file not found, cannot rename: $?";         
    6359                $tarfile  = $newDirectoryName; 
    6460        } 
    65         print "tarfile2:$path_original/$tarfile\n"; 
     61        $pathtoTarfile="$path_original/$tarfile"; 
     62        print "tarfile2:$pathtoTarfile\n"; 
    6663        my @suffixlist = ("tgz", "tar\.gz", "zip"); 
    6764        my ($path,$suffix);      
     
    7067        print "AudioDirName:$AudioDirName\n"; 
    7168         
    72         my $ae = Archive::Extract->new( archive => "$path_original/$tarfile" ); 
     69        my $ae = Archive::Extract->new( archive => "$pathtoTarfile" ); 
    7370        $ae->extract( to => "$path_original/$AudioDirName") or die $ae->error;; 
    7471 
    75 } else { #no tarfile to upload, only a link to 1&1 voxforge repository; English only 
     72} else { #no tarfile to upload, only a link to 1&1 voxforge repository; English, Dutch, German, Russian only 
    7673        ##########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; 
    8077} 
    8178#################################################################### 
    8279### Main 
    8380#################################################################### 
    84 #UserSubmission::README->ValidateFileName($parms, "$path_original/$AudioDirName"); 
    8581my $readmeWithPath = UserSubmission::README->getFileWithPath($parms,"$path_original/$AudioDirName"); 
    8682print "!!!!!!readmeWithPath:$readmeWithPath\n"; 
     
    9389 
    9490if (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"; 
    9794                Update($parms, \%ProcessedUserSubmissions, 'speechsubmission', 'n@wp@$$') || confess "Single_WebGUIForumUpdate error: $?"; 
    9895        } else { 
     
    124121                        #my ($content,$title)= WebGUIForum::getSubmissionContents($parms,$readmepath,$promptspath,$licensepath,$AudioDirName, $readme,$tarfile); 
    125122                        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); 
    127124        } 
    128125        print "\nWebGUIForumUpdate.pm completed!\n****************************************************\n\n"; 
  • Trunk/Scripts/Mirroring_scripts/VoxForge_config.pm

    r2507 r2577  
    130130                $SpeechCorpus = "/data/svn-mirror/Russian/Trunk"; 
    131131        } else { 
    132                 confess "VoxForge_config error: no language selected\n"; 
     132                confess "VoxForge_config setSpeechCorpusLanguage error: language not selected or not supported\n"; 
    133133        } 
    134134         
     
    154154                #$$parms{"webguiUploadURL"} = 'http://www.voxforge.org/home/downloads/speech/voxforgeivr';  # for testing 
    155155                $$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';             
    156162        } elsif ($language =~ /NL/) { 
    157163                $$parms{"webguiUploadURL"} = 'http://www.voxforge.org/home/downloads/speech/dutch'; 
     
    162168                #$$parms{"webguiUploadURL"} = 'http://www.voxforge.org/home/downloads/speech/voxforgeivr';  # for testing                
    163169                $$parms{"webguiRepositoryURL"} = 'http://www.repository.voxforge1.org/downloads/Russian/Trunk/Audio/Original';           
     170                 
    164171        } 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"; 
    166173        } 
    167174}