[siesta-commit] siesta/bin nacho,1.32,1.33

[prev] [thread] [next] [lurker] [Date index for 2002/10/01]

From: clampr
Subject: [siesta-commit] siesta/bin nacho,1.32,1.33
Date: 10:54 on 01 Oct 2002
Update of /cvsroot/siesta/siesta/bin
In directory usw-pr-cvs1:/tmp/cvs-serv2049

Modified Files:
	nacho 
Log Message:
cheesy run-mhonarc target


Index: nacho
===================================================================
RCS file: /cvsroot/siesta/siesta/bin/nacho,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- nacho	18 Sep 2002 16:27:12 -0000	1.32
+++ nacho	1 Oct 2002 09:54:51 -0000	1.33
@@ -6,6 +6,7 @@
 use Siesta::List;
 use Siesta::User;
 use POSIX qw/strftime/;
+use File::Path qw(mkpath);
 
 # All possible modes that we can do
 my @modes = qw(create-database
@@ -25,6 +26,7 @@
   set-plugin-config-user
   set-plugin-config-list
   set-plugin-config-userlist
+               run-mhonarc
   );
 
 # not enough arguments
@@ -55,7 +57,7 @@
 no strict qw(refs);
 
 # call the appropriate subroutine
-#eval { 
+#eval {
 &$mode(@ARGV);
 
 #die usage()."\n" if $@;
@@ -121,7 +123,7 @@
 
 Show all the users that are in the system.
 
-=cut 
+=cut
 
 # show all users
 sub show_users {
@@ -515,7 +517,7 @@
 
 =head2 add-plugin I<list_id> I<plugin> [ I<position> ]
 
-Add a plugin onto the end of a list or, if a position is supplied, 
+Add a plugin onto the end of a list or, if a position is supplied,
 then insert it somewhere in that list. 1 is the first position.
 
 =cut
@@ -639,7 +641,7 @@
 
 =head2 show-plugin-config-list I<plugin> I<list_id>
 
-List the current per-list options for this list and this plugin 
+List the current per-list options for this list and this plugin
 
 =cut
 
@@ -805,6 +807,24 @@
 
 }
 
+=item run-mhonarc
+
+invoke mhonarc to make webified archives (depends on the Archive plugin)
+
+=cut
+
+sub run_mhonarc {
+    $ENV{M2H_PATTERN} = '^[^\.]';
+    $ENV{M2H_SPAMMODE} = 1;
+    for my $list ( map { $_->id } Siesta->storage->get_lists ) {
+        my $input = $Siesta::Config::ARCHIVE . "/$list";
+        my $output = $Siesta::Config::ROOT . "/html/$list";
+        mkpath($output);
+        system qq{ mhonarc -outdir $output $input/cur/* $input/new/* };
+    }
+}
+
+
 sub usage {
     ( my $name = $0 ) =~ s!^.*[\\/]!!;
 
@@ -827,8 +847,6 @@
 (C)opyright 2002 the Siesta dev team.
 
 Distributed under the same terms as Perl itself.
-
-See the files named Artistic and COPYING for details.
 
 =cut
 



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