rev 1342 - trunk/siesta/bin

[prev] [thread] [next] [lurker] [Date index for 2003/08/13]

From: richardc
Subject: rev 1342 - trunk/siesta/bin
Date: 16:47 on 13 Aug 2003
Author: richardc
Date: 2003-08-13 16:47:52 +0100 (Wed, 13 Aug 2003)
New Revision: 1342

Modified:
   trunk/siesta/bin/nacho2
Log:
sync the new mariachi invoker


Modified: trunk/siesta/bin/nacho2
===================================================================
--- trunk/siesta/bin/nacho2	2003-08-13 15:17:44 UTC (rev 1341)
+++ trunk/siesta/bin/nacho2	2003-08-13 15:47:52 UTC (rev 1342)
@@ -148,22 +148,17 @@
             },
         };
 
-    $COMMANDS{'run-mariachi'} =  {
-            action => sub {
-                for my $list ( map { $_->name } Siesta::List->retrieve_all ) {
-                    my $input;
-                    my $output;
-                    {
-                        no warnings;
-                        $input  = $Siesta::Config::ARCHIVE . "/$list";
-                        $output = $Siesta::Config::ROOT . "/mariachi-html/$list";
-                    }
-                    mkpath($output);
-                    print "invoking mariachi for $list\n";
-                    system 'mariachi', '-i', $input, '-o', $output, '-n', $list;
-                }
-            }
-           };
+    $COMMANDS{'run-mariachi'} = {
+        action => sub {
+            for my $archive (Siesta::Plugin->search( name => 'Archive' )) {
+                $archive = $archive->promote;
+                my $input  = $archive->pref('path');
+                my $name   = $archive->list->name;
+                my $output = $Siesta::Config::ROOT . "/mariachi-html/$name";
+                print "invoking mariachi for $name\n";
+                system 'mariachi', '-i', $input, '-o', $output, '-n', $name;
+            },
+        };
 
     $COMMANDS{'create-backup'} = {
         optional => [qw/ list=s /],
@@ -572,7 +567,7 @@
 }
 
 sub _plugin_list_options {
-        my %opts = @_;
+    my %opts = @_;
 
     my $list = Siesta::List->load($opts{list})
       or die "describe-plugin: Not a valid list $opts{list}\n";
@@ -605,7 +600,7 @@
     foreach my $option ( keys %{$options} ) {
         print " - ", $option, " : ", $plugin->pref($option), "\n";
     }
-        print $plugin->name," is set personal\n" if $plugin->personal();
+    print $plugin->name," is set personal\n" if $plugin->personal();
 }
 
 #####
@@ -627,7 +622,7 @@
 }
 
 use Siesta::Config;
-BEGIN{
+BEGIN {
     my $database;
     my $config;
 
@@ -687,7 +682,7 @@
 
     if (scalar @ARGV != 0) {
         print "#################\n";
-                print "## end of command\n";
+        print "## end of command\n";
         print "#################\n";
 
         return 1;

Generated at 13:57 on 01 Jul 2004 by mariachi 0.52