##---------------------------------------------------------------------------## ## File: ## $Id: mhusage.pl,v 2.26 2004/12/15 20:33:40 ehood Exp $ ## Author: ## Earl Hood mhonarc@mhonarc.org ## Description: ## Usage output. Just require the file to have usage info ## printed to STDOUT. ##---------------------------------------------------------------------------## ## MHonArc -- Internet mail-to-HTML converter ## Copyright (C) 1995-1999 Earl Hood, mhonarc@mhonarc.org ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA ##---------------------------------------------------------------------------## package mhonarc; sub mhusage { my($usefh, $close); local(*PAGER); PAGERCHECK: { if ($UNIX && (-t STDOUT) && (($ENV{'PAGER'} && open(PAGER, "| $ENV{'PAGER'}")) || (open(PAGER, '| more')))) { $usefh = \*PAGER; $close = 1; last PAGERCHECK; } $usefh = \*STDOUT; $close = 0; } my($curfh) = select($usefh); print <] ... $PROG -rmm [] ... $PROG -annotate [-notetext ] ... Description: MHonArc is a highly customizable Perl program for converting mail, encoded with MIME, into HTML archives. MHonArc supports the conversion of UUCP-style mailbox files and MH style mail folders. The -single option can be used to convert a single mail message to standard output. Read the full documentation included with the distribution, or at , for more complete usage information. Options: Only command-line options are summarized here. See documentation for information about resource file elements and environment variables. -add : Add message(s) to archive -afs : Skip archive directory permission check -addressmodifycode : Perl expressions for modifying addresses -annotate : Add an annotation to message(s) -archive : Generate archive related files (the default) -attachmentdir : Location to write attachments to -attachmenturl : Web URL to location of attachments -authsort : Sort messages by author -checknoarchive : Check for "no archive" flags in messages -conlen : Honor Content-Length fields -datefields : Fields to determine the date of a message -decodeheads : Decode decode-only charset data when reading mail -definevar : Define custom resource variables -dbfile : Name of MHonArc database file -dbfileperms : File permissions for database file (def: "0660" -- UMASK is still applied) -doc : Print link to doc at end of index page -docurl : URL to MHonArc documentation (def: "http://www.mhonarc.org/") -editidx : Edit/change index page(s) and messages, only -expiredate : Message cut-off date -expireage : Time from current when messages expire -fileperms : File permissions for archive files (def: "0666" -- UMASK is still applied) -folrefs : Print links to follow-ups/references -force : Perform archive operations even if unable to lock -fromfields : Fields to detemine whom the message is from -genidx : Output index to stdout based upon archive contents -gmtdatefmt : Format for GMT date -gzipexe : Pathname of Gzip executable (def: "gzip") -gzipfiles : Gzip files -gziplinks : Add ".gz" to filenames in links -help : This message -htmlext : Filename extension for generated HTML files (def: "html") -iconurlprefix : Prefix for icon URLs (def: "") -idxfname : Name of index page (def: "maillist.html") -idxprefix : Filename prefix for multi-page main index (def: "mail") -idxsize <#> : Maximum number of messages shown in indexes -keeponrmm : Do not delete message files when message is removed from archive. -lang : Set locale/language. -localdatefmt : Format for local date -lock : Do archive locking (default) -lockdelay <#> : Time delay, in seconds, between lock tries (def: "3") -locktries <#> : Maximum number of tries in locking an archive (def: "10") -mailtourl : URL to use for e-mail address hyperlinks (def: "mailto:\$TO\$") -main : Create a main index -maxpgs <#> : Maximum number of index pages -maxsize <#> : Maximum number of messages allowed in archive -mhpattern : Perl expression for message files in a directory (def: "^\\d+\$") -modifybodyaddresses : ADDRESSMODIFYCODE applies to text entities -modtime : Set modification time on files to message date -months : Month names -monthsabr : Abbreviated month names -msgpgs : Create message pages (the default) -msgprefix : Filename prefix for message HTML files (def: "msg") -msgexcfilter : Perl expression(s) for selective message exclusion -msgsep : Message separator (Perl) regex for mbox files (def: "^From ") -multipg : Generate multi-page indexes -news : Add links to newsgroups (the default) -newsurl : URL to use for newsgroup hyperlinks (def: "news:\$NEWSGROUP\$") -noarchive : Do not generate archive related files -noauthsort : Do not sort messages by author -nochecknoarchive : Ignore "no archive" flags in messages -noconlen : Ignore Content-Length fields (the default) -nodecodeheads : Leave message headers "as is" when read -nodoc : Do not print link to doc at end of index page -nofolrefs : Do not print links to follow-ups/references -nogzipfiles : Do not Gzip files (the default) -nogziplinks : Do not add ".gz" to filenames in links -nokeeponrmm : Delete message files when message is removed from archive. -nolock : Do not lock archive -nomailto : Do not add in mailto links for e-mail addresses -nomain : Do not create a main index -nomodtime : Do not set mod time on files to message date -nomsgpgs : Do not create message pages -nomultipg : Do not generate multi-page indexes -nonews : Do not add links to newsgroups -noposixstrftime : Do not use POSIX::strftime() to process time format (the default) -noreconvert : Do not reconvert existing messages (the default) -noreverse : List messages in normal order (the default) -nosaveresources : Do not save resource values in DB -nosort : Do not sort messages -nospammode : Do not obfuscate addresses -nosubjectthreads : Do not check subjects for threads -nosubjecttxt : Text to use if message has no subject -nosubsort : Do not sort messages by subject -notetext : Text data of annotation if -annotation specified -nothread : Do not create threaded index -notreverse : List threads in order (the default) -notsort : List threads by ordered processed -notsubsort : Do not list threads by subject -nourl : Do not make URL hyperlinks -otherindex : Other rcfile for extra index -outdir : Destination/location of HTML mail archive (def: ".") -pagenum : Output specified page if -genidx and -multipg -perlinc : List of paths to search for MIME filters -posixstrftime : Use POSIX::strftime() to process time formats -quiet : Suppress status messages during execution -rcfile : Resource file for MHonArc -reconvert : Reconvert existing messages -reverse : List messages in reverse order -rmm : Remove messages from archive -savemem : Write message data while processing -saveresources : Save resource values in DB (the default) -scan : List out archive contents to stdout -single : Convert a single message to HTML (no archive ops) -sort : Sort messages by date (the default) -spammode : Obfuscate addresses -stderr : File to send stderr messages to -stdin : File to treat as standard input -stdout : File to send stdout messages to -subjectarticlerxp : Regex for leading articles in subjects -subjectreplyrxp : Regex for leading reply string in subjects -subjectstripcode : Perl expressions for modifying subjects -subjectthreads : Check subjects for threads -subsort : Sort message by subject -thread : Create threaded index (the default) -tidxfname : Filename of threaded index page (def: "threads.html") -tidxprefix : Filename prefix for multi-page thread index (def: "thrd") -time : Print to stderr CPU time used to process mail -title : Title of main index page (def: "Mail Index") -tlevels <#> : Maximum # of nested lists in threaded index (def: "3") -treverse : List threads in reverse order -tslice <#:#:#> : Set size of thread slice listing -tslicelevels <#> : Maximum # of nested lists in thread slices (def: TLEVELS resource value) -tsort : List threads by date (the default) -tsubsort : List threads by subject -ttitle : Title of thread index page (def: "Mail Thread Index") -umask : Umask of MHonArc process (Unix only) -url : Make URL hyperlinks (the default) -v : Print version information -varregex : Perl regex matching resource variables -weekdays : Weekday names -weekdaysabr : Abbreviated weekday names The following options can be specified multiple times: -definevar, -notetext, -otherindex, -perlinc, -rcfile. Version: $VINFO EndOfUsage close($usefh) if $close; select($curfh); } ##---------------------------------------------------------------------------## 1;