mhonarc-commits
[Top] [All Lists]

mhonarc/MHonArc CHANGES lib/mhdb.pl lib/mhinit....

2003-09-30 21:32:34
CVSROOT:	/cvsroot/mhonarc
Module name:	mhonarc
Branch: 	
Changes by:	Earl Hood <earl(_at_)earlhood(_dot_)com>	03/10/01 00:30:42

Modified files:
	MHonArc        : CHANGES 
	MHonArc/lib    : mhdb.pl mhinit.pl mhopt.pl mhrcfile.pl 
	                 mhrcvars.pl mhusage.pl 

Log message:
	Added ATTACHMENTDIR and ATTACHMENTURL resources.

Patches:
Index: mhonarc/MHonArc/CHANGES
diff -u mhonarc/MHonArc/CHANGES:1.119 mhonarc/MHonArc/CHANGES:1.120
--- mhonarc/MHonArc/CHANGES:1.119	Tue Sep 30 16:53:58 2003
+++ mhonarc/MHonArc/CHANGES	Wed Oct  1 00:30:41 2003
@@ -15,6 +15,11 @@
 ============================================================================
 2003/MM/DD	(2.X.X)
 
+* New resources:
+
+    ATTACHMENTDIR	Directory to save attachments.
+    ATTACHMENTURL	Web URL to attachment directory.
+
 * Attachment filenames have changed from the numeric-style
   <ext><#####>.<ext> to <ext><XXXXXXXXXX>.<ext> where <XXXXXXXXXX>
   is a random string.  The change corresponds with a change to the
@@ -2592,4 +2597,4 @@
 
 =======================================================================
 Earl Hood, mhonarc(_at_)mhonarc(_dot_)org
-$Id: CHANGES,v 1.119 2003/09/30 20:53:58 ehood Exp $
+$Id: CHANGES,v 1.120 2003/10/01 04:30:41 ehood Exp $
Index: mhonarc/MHonArc/lib/mhdb.pl
diff -u mhonarc/MHonArc/lib/mhdb.pl:2.33 mhonarc/MHonArc/lib/mhdb.pl:2.34
--- mhonarc/MHonArc/lib/mhdb.pl:2.33	Sat Aug  2 02:15:37 2003
+++ mhonarc/MHonArc/lib/mhdb.pl	Wed Oct  1 00:30:41 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##	$Id: mhdb.pl,v 2.33 2003/08/02 06:15:37 ehood Exp $
+##	$Id: mhdb.pl,v 2.34 2003/10/01 04:30:41 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -148,6 +148,8 @@
 print_var($db,'AddressModify',  \$AddressModify)
 				unless $IsDefault{'AddressModify'};
 print_var($db,'AddrModifyBodies', \$AddrModifyBodies);
+print_var($db,'AttachmentDir',  \$AttachmentDir);
+print_var($db,'AttachmentUrl',  \$AttachmentUrl);
 print_var($db,'CheckNoArchive', \$CheckNoArchive);
 print_var($db,'DOCURL',         \$DOCURL);
 print_var($db,'NODOC',          \$NODOC);
Index: mhonarc/MHonArc/lib/mhinit.pl
diff -u mhonarc/MHonArc/lib/mhinit.pl:2.48 mhonarc/MHonArc/lib/mhinit.pl:2.49
--- mhonarc/MHonArc/lib/mhinit.pl:2.48	Sat Aug  2 02:15:37 2003
+++ mhonarc/MHonArc/lib/mhinit.pl	Wed Oct  1 00:30:41 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##	$Id: mhinit.pl,v 2.48 2003/08/02 06:15:37 ehood Exp $
+##	$Id: mhinit.pl,v 2.49 2003/10/01 04:30:41 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -444,6 +444,11 @@
 @months   = $ENV{'M2H_MONTHSABR'}   ? split(/:/, $ENV{'M2H_MONTHSABR'})   : ();
 @Weekdays = $ENV{'M2H_WEEKDAYS'}    ? split(/:/, $ENV{'M2H_WEEKDAYS'})    : ();
 @weekdays = $ENV{'M2H_WEEKDAYSABR'} ? split(/:/, $ENV{'M2H_WEEKDAYSABR'}) : ();
+
+##	Location to put attachments.
+
+$AttachmentDir = $ENV{'M2H_ATTACHMENTDIR'};
+$AttachmentUrl = $ENV{'M2H_ATTACHMENTURL'} || '';
 
 ##	Many of the following are set during runtime after the
 ##	database and resources have been read.  The variables are
Index: mhonarc/MHonArc/lib/mhopt.pl
diff -u mhonarc/MHonArc/lib/mhopt.pl:2.54 mhonarc/MHonArc/lib/mhopt.pl:2.55
--- mhonarc/MHonArc/lib/mhopt.pl:2.54	Sat Aug  2 02:15:37 2003
+++ mhonarc/MHonArc/lib/mhopt.pl	Wed Oct  1 00:30:41 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##      $Id: mhopt.pl,v 2.54 2003/08/02 06:15:37 ehood Exp $
+##      $Id: mhopt.pl,v 2.55 2003/10/01 04:30:41 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -46,6 +46,10 @@
 	'addressmodifycode=s',
 			# Perl expression for modifying displayed addresses
 	'annotate',	# Add a note to message(s)
+	'attachmentdir=s',
+			# Pathname to attachment files directory
+	'attachmenturl=s',
+			# URL to attachment files directory
 	'authsort',	# Sort by author
 	'archive',	# Create an archive (the default)
 	'conlen',	# Honor Content-Length fields
@@ -538,6 +542,9 @@
     $NoSubjectTxt  = $opt{'nosubjecttxt'}	if $opt{'nosubjecttxt'};
 
     $IdxPageNum  = $opt{'pagenum'}   if defined($opt{'pagenum'});
+
+    $AttachmentDir = $opt{'attachmentdir'}  if defined($opt{'attachmentdir'});
+    $AttachmentUrl = $opt{'attachmenturl'}  if defined($opt{'attachmenturl'});
 
     ## Determine location of message note files
     $NoteDir = $opt{'notedir'}	if $opt{'notedir'};
Index: mhonarc/MHonArc/lib/mhrcfile.pl
diff -u mhonarc/MHonArc/lib/mhrcfile.pl:2.37 mhonarc/MHonArc/lib/mhrcfile.pl:2.38
--- mhonarc/MHonArc/lib/mhrcfile.pl:2.37	Tue Aug 12 23:56:28 2003
+++ mhonarc/MHonArc/lib/mhrcfile.pl	Wed Oct  1 00:30:41 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##	$Id: mhrcfile.pl,v 2.37 2003/08/13 03:56:28 ehood Exp $
+##	$Id: mhrcfile.pl,v 2.38 2003/10/01 04:30:41 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -115,6 +115,18 @@
       FMTSW: {
 	if ($elem eq 'addressmodifycode') {	# Code to strip subjects
 	    $AddressModify = &get_elem_content($handle, $elem, $chop);
+	    last FMTSW;
+	}
+	if ($elem eq 'attachmentdir') {		# Attachments directory
+	    if ($line = &get_elem_last_line($handle, $elem)) {
+		$AttachmentDir = $line;
+	    }
+	    last FMTSW;
+	}
+	if ($elem eq 'attachmenturl') {		# Attachments URL
+	    if ($line = &get_elem_last_line($handle, $elem)) {
+		$AttachmentUrl = $line;
+	    }
 	    last FMTSW;
 	}
 	if ($elem eq 'authorbegin') {		# Begin for author group
Index: mhonarc/MHonArc/lib/mhrcvars.pl
diff -u mhonarc/MHonArc/lib/mhrcvars.pl:2.25 mhonarc/MHonArc/lib/mhrcvars.pl:2.26
--- mhonarc/MHonArc/lib/mhrcvars.pl:2.25	Tue Feb  4 18:31:19 2003
+++ mhonarc/MHonArc/lib/mhrcvars.pl	Wed Oct  1 00:30:42 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##	$Id: mhrcvars.pl,v 2.25 2003/02/04 23:31:19 ehood Exp $
+##	$Id: mhrcvars.pl,v 2.26 2003/10/01 04:30:42 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -603,6 +603,11 @@
 	## -------------------------------- ##
 	## Miscellaneous resource variables ##
 	## -------------------------------- ##
+    	if ($var eq 'ATTACHMENTURL') {
+	    $isurl = 0;
+	    $tmp = $AttachmentUrl;
+	    last REPLACESW;
+	}
     	if ($var eq 'DOCURL') {
 	    $isurl = 0;
 	    $tmp = $DOCURL;
Index: mhonarc/MHonArc/lib/mhusage.pl
diff -u mhonarc/MHonArc/lib/mhusage.pl:2.23 mhonarc/MHonArc/lib/mhusage.pl:2.24
--- mhonarc/MHonArc/lib/mhusage.pl:2.23	Sat Aug  2 02:15:37 2003
+++ mhonarc/MHonArc/lib/mhusage.pl	Wed Oct  1 00:30:42 2003
@@ -1,6 +1,6 @@
 ##---------------------------------------------------------------------------##
 ##  File:
-##      $Id: mhusage.pl,v 2.23 2003/08/02 06:15:37 ehood Exp $
+##      $Id: mhusage.pl,v 2.24 2003/10/01 04:30:42 ehood Exp $
 ##  Author:
 ##      Earl Hood       mhonarc(_at_)mhonarc(_dot_)org
 ##  Description:
@@ -68,6 +68,8 @@
   -addressmodifycode <exp> : Perl expressions for modifying addresses
   -annotate                : Add an annotation to message(s)
   -archive                 : Generate archive related files (the default)
+  -attachmentdir <path>    : Location to write attachments to
+  -attachmenturl <url>     : Web URL to location of attachments
   -authsort                : Sort messages by author
   -checknoarchive          : Check for "no archive" flags in messages
   -conlen                  : Honor Content-Length fields

---------------------------------------------------------------------
To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the
message text UNSUBSCRIBE MHONARC-COMMITS