MHonArc
view release on metacpan or search on metacpan
lib/mhopt.pl view on Meta::CPAN
'archive', # Create an archive (the default)
'conlen', # Honor Content-Length fields
'checknoarchive',
# Check for 'no archive' flag in messages
'datefields=s', # Fields that contains the date of a message
'dbfile=s', # Database/state filename for mhonarc archive
'dbfileperms=i', # Octal permission to set DBFILE
'debug', # Turn on debugging
'decodeheads', # Decode all 1522 encoded data in message headers
'definevar|definevars=s@',
# Define custom resource variables
'doc', # Print link to doc at end of index page
'docurl=s', # URL to mhonarc documentation
'editidx', # Change index page layout only
'expiredate=s', # Message cut-off date
'expireage=i', # Time in seconds from current if message expires
'fasttempfiles', # Do not use random filenames for temporary files
'followsymlinks',
# Follow/allow symlinks when create files
'fileperms=i', # Octal permission to create files
'folrefs', # Print links to explicit follow-ups/references
'footer=s', # File containing user text for bottom of index page
# (option no longer applicable)
'force', # Perform archive operation even if unable to lock
'fromfields=s', # Fields that contains the 'from' of a message
'genidx', # Generate an index based upon archive contents
'gmtdatefmt=s', # Date specification for GMT date
'gzipexe=s', # Pathname of Gzip executable
'gzipfiles', # Gzip files
'gziplinks', # Add ".gz" extensions to files
'header=s', # File containing user text for top of index page
# (option no longer applicable)
'htmlext=s', # Extension for HTML files
'iconurlprefix=s',
# Prefix for icon urls
'idxfname=s', # Filename of index page
'idxprefix=s', # Filename prefix for multi-page main index
'idxsize=i', # Maximum number of messages shown in indexes
'keeponrmm', # Do not delete message files on archive remove
'lang=s', # Set locale/language
'localdatefmt=s',
# Date specification for local date
'lock', # Do archive locking (default)
'lockdelay=i', # Time delay in seconds between lock tries
'lockmethod=s', # Set the method of locking
'locktries=i', # Number of tries in locking an archive
'mailtourl=s', # URL to use for e-mail address hyperlinks
'main', # Create a main index
'maxpgs=i', # Maximum number of index pages
'maxsize=i', # Maximum number of messages allowed in archive
'mbox', # Use mailbox format (ignored now)
'mh', # Use MH mail folders format (ignored now)
'mhpattern=s', # Regular expression for message files in a directory
'modifybodyaddresses',
# addressmodifycode applies to text entities
'modtime', # Set modification time on files to message date
'months=s', # Month names
'monthsabr=s', # Abbreviated month names
'msgexcfilter=s',
# Perl expression(s) for selective message exclusion
'msgpgs', # Create message pages
'msgsep=s', # Message separator for mailbox files
'msgprefix=s', # Filename prefix for message files
'multipg', # Generate multi-page indexes
'news', # Add links to newsgroups
'newsurl=s', # URL to use for news hyperlinks
'noauthsort', # Do not sort by author
'noarchive', # Do not create an archive
'nochecknoarchive',
# Do not check for 'no archive' flag in messages
'noconlen', # Ignore Content-Length fields
'nodecodeheads',
# Do not decode 1522 encoded data in message headers
'nodoc', # Do not print link to doc at end of index page
'nofasttempfiles',
# Use random filenames for temporary files
'nofollowsymlinks',
# Do not follow symlinks when creating files
'nofolrefs', # Do not print links to explicit follow-ups/references
'nogzipfiles', # Do not Gzip files
'nogziplinks', # Do not add '.gz' extensions to files
'nokeeponrmm', # Delete message files on archive remove
'nolock', # Do no archive locking
'nomailto', # Do not add in mailto links for e-mail addresses
'nomain', # Do not create a main index
'nomsgpgs', # Do not create message pages
'nomodtime', # Do no set modification time on files to message date
'nomultipg', # Do not generate multi-page indexes
'nonews', # Do not add links to newsgroups
'noposixstrftime',
# Use own implementation for time format process
'noprintxcomments',
# Do not print X- comments
'noreverse', # List messages in normal order
'nosaveresources',
# Do not save resource values in db
'nosort', # Do not sort
'nospammode', # Do not run in (anti)spam mode
'nosubsort', # Do not sort by subject
'nosubjectthreads',
# Do not do subject based threading
'nosubjecttxt=s',
# Text to use if message has no subject
'notedir', # Location of notes
'notetext=s@', # Text data of note
'nothread', # Do not create threaded index
'notreverse', # List oldest thread first
'notsubsort|tnosubsort',
# Do not list threads by subject
'notsort|tnosort',
# List threads by ordered processed
'nourl', # Do not make URL hyperlinks
'otherindex|otherindexes=s@',
# List of other rcfiles for extra indexes
'outdir=s', # Destination of HTML files
'pagenum=s', # Page to output if -genidx
'perlinc=s@', # List of paths to search for MIME filters
'posixstrftime',
# Use POSIX strftime()
'printxcomments',
# Print X- comments
'quiet', # No status messages while running
'rcfile=s@', # Resource file for mhonarc
'reconvert!', # Reconvert existing messages
'varregex=s', # Regex matching resource variables
'reverse', # List messages in reverse order
'rmm', # Remove messages from an archive
'savemem', # Write message data while processing
'saveresources',
# Save resource values in db
'scan', # List out archive contents to terminal
'single', # Convert a single message to HTML
'sort', # Sort messages in increasing date order
'spammode', # Run in (anti)spam mode
'stderr=s', # Set file for stderr
'stdin=s', # Set file for stdin
'stdout=s', # Set file for stdout
'subjectarticlerxp=s',
# Regex for leading articles in subjects
'subjectreplyrxp=s',
# Regex for leading reply string in subjects
'subjectstripcode=s',
# Perl expression for modifying subjects
'subjectthreads',
# Check subjects for threads
'subsort', # Sort message by subject
lib/mhopt.pl view on Meta::CPAN
$LocalDateFmt = $opt{'localdatefmt'} if $opt{'localdatefmt'};
$AddressModify = $opt{'addressmodifycode'} if $opt{'addressmodifycode'};
$SubArtRxp = $opt{'subjectarticlerxp'} if $opt{'subjectarticlerxp'};
$SubReplyRxp = $opt{'subjectreplyrxp'} if $opt{'subjectreplyrxp'};
$SubStripCode = $opt{'subjectstripcode'} if $opt{'subjectstripcode'};
$MsgExcFilter = $opt{'msgexcfilter'} if defined($opt{'msgexcfilter'});
$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'};
## See if note text defined on command-line
if (defined $opt{'notetext'}) {
$NoteText = join(" ", @{$opt{'notetext'}});
} else {
$NoteText = undef;
}
## Parse any rc variable definition from command-line
if (defined($opt{'definevar'})) {
my @array = ();
foreach (@{$opt{'definevar'}}) {
push(@array, &parse_vardef_str($_));
}
%CustomRcVars = (%CustomRcVars, @array);
}
$CONLEN = 1 if $opt{'conlen'};
$CONLEN = 0 if $opt{'noconlen'};
$MAIN = 1 if $opt{'main'};
$MAIN = 0 if $opt{'nomain'};
$MODTIME = 1 if $opt{'modtime'};
$MODTIME = 0 if $opt{'nomodtime'};
$MULTIIDX = 1 if $opt{'multipg'};
$MULTIIDX = 0 if $opt{'nomultipg'};
$NODOC = 0 if $opt{'doc'};
$NODOC = 1 if $opt{'nodoc'};
$NOMAILTO = 1 if $opt{'nomailto'};
$NONEWS = 0 if $opt{'news'};
$NONEWS = 1 if $opt{'nonews'};
$NOURL = 0 if $opt{'url'};
$NOURL = 1 if $opt{'nourl'};
$SLOW = 1 if $opt{'savemem'};
$THREAD = 1 if $opt{'thread'};
$THREAD = 0 if $opt{'nothread'};
$TREVERSE = 1 if $opt{'treverse'};
$TREVERSE = 0 if $opt{'notreverse'};
$DoFolRefs = 1 if $opt{'folrefs'};
$DoFolRefs = 0 if $opt{'nofolrefs'};
$GzipFiles = 1 if $opt{'gzipfiles'};
$GzipFiles = 0 if $opt{'nogzipfiles'};
$GzipLinks = 1 if $opt{'gziplinks'};
$GzipLinks = 0 if $opt{'nogziplinks'};
$NoMsgPgs = 0 if $opt{'msgpgs'};
$NoMsgPgs = 1 if $opt{'nomsgpgs'};
$SaveRsrcs = 1 if $opt{'saveresources'};
$SaveRsrcs = 0 if $opt{'nosaveresources'};
$SpamMode = 1 if $opt{'spammode'};
$SpamMode = 0 if $opt{'nospammode'};
$KeepOnRmm = 1 if $opt{'keeponrmm'};
$KeepOnRmm = 0 if $opt{'nokeeponrmm'};
$PrintXComments = 1 if $opt{'printxcomments'};
$PrintXComments = 0 if $opt{'noprintxcomments'};
$CheckNoArchive = 1 if $opt{'checknoarchive'};
$CheckNoArchive = 0 if $opt{'nochecknoarchive'};
$FastTempFiles = 1 if $opt{'fasttempfiles'};
$FastTempFiles = 0 if $opt{'nofasttempfiles'};
$FollowSymlinks = 1 if $opt{'followsymlinks'};
$FollowSymlinks = 0 if $opt{'nofollowsymlinks'};
$POSIXstrftime = 1 if $opt{'posixstrftime'};
$POSIXstrftime = 0 if $opt{'noposixstrftime'};
$AddrModifyBodies = 1 if $opt{'modifybodyaddresses'};
$AddrModifyBodies = 0 if $opt{'nomodifybodyaddresses'};
$DecodeHeads = 1 if $opt{'decodeheads'};
$DecodeHeads = 0 if $opt{'nodecodeheads'};
$readmail::DecodeHeader = $DecodeHeads;
## Clear main flag if genidx and thread specified
$MAIN = 0 if $IDXONLY && $THREAD;
@DateFields = split(/[:;]/, $opt{'datefields'}) if $opt{'datefields'};
@FromFields = split(/[:;]/, $opt{'fromfields'}) if $opt{'fromfields'};
foreach (@FromFields) { s/\s//g; tr/A-Z/a-z/; }
($TSliceNBefore, $TSliceNAfter, $TSliceInclusive) =
split(/[:;]/, $opt{'tslice'})
if $opt{'tslice'};
@Months = split(/:/, $opt{'months'}) if defined($opt{'months'});
@months = split(/:/, $opt{'monthsabr'}) if defined($opt{'monthsabr'});
@Weekdays = split(/:/, $opt{'weekdays'}) if defined($opt{'weekdays'});
@weekdays = split(/:/, $opt{'weekdaysabr'})
if defined($opt{'weekdaysabr'});
$MULTIIDX = 0 if !$IDXSIZE;
## Set umask
if ($UNIX) {
$UMASK = $opt{'umask'} if defined($opt{'umask'});
eval { umask oct($UMASK); };
}
$FilePerms = $opt{'fileperms'} if defined($opt{'fileperms'});
$FilePermsOct = oct($FilePerms);
$DbFilePerms = $opt{'dbfileperms'} if defined($opt{'dbfileperms'});
$DbFilePermsOct = oct($DbFilePerms);
## Get sort method
$AUTHSORT = 1 if $opt{'authsort'};
$AUTHSORT = 0 if $opt{'noauthsort'};
$SUBSORT = 1 if $opt{'subsort'};
$SUBSORT = 0 if $opt{'nosubsort'};
( run in 1.948 second using v1.01-cache-2.11-cpan-df04353d9ac )