|
Quick StartThis section will give you a "quick start" on using MHonArc. Converting mailSince MHonArc supports MH mail folders and UUCP/Unix mailbox files, the term "mail folder" will represent the MH mail folder or mailbox file you want to process. To convert your mail folder to an HTML archive, use the following: shell> mhonarc path/inbox Where path represents the path to the directory that contains the mail folder inbox. If you are in the directory that contains inbox, then you can leave out the "path/".
You may specify more than one mail folder to process on the command-line: shell> mhonarc path/inbox1 path/inbox2 ... You may also specify standard input, "-", as the source of mail folder. This is useful if want to use MHonArc in a pipe: shell> mhonarc -- - path/inbox The "--" (two hyphens) is required to terminate command-line option parsing so "-" will not be treated as the start of an option. The example also illustrates that you can still specify regular mail folders with standard input. In this example, MHonArc will process standard input and then path/inbox. When MHonArc finishes, the following files will be created:
The actual filenames may differ depending on the settings of various resources. All the files created will be put into the current working directory, by default. You can control the destination of the output location by using the -outdir option.
Here is a sample session converting a mail folder: shell> mhonarc ~/mail/inbox Converting messages to . Reading /mnt/ehood/mail/inbox .......... Writing mail ... Writing ./maillist.html ... Writing ./threads.html ... Writing database ... 10 messages By default, MHonArc prints out information about its progress. This can be disabled with the -quiet option. Adding Messages to an ArchiveIf you have new messages you want to add to an existing archive, you must utilizing the -add command-line option. With the -add, you can do the following:
Adding a mail folder to an archive in the current working directory can be done like the following: shell> mhonarc -add <path>/mailfolder If you are not in the same directory as the archive, then you can specify the location of the archive to add to with the -outdir option.
If no mail folder arguments are specified, then MHonArc will attempt to add a single message read in from standard input. Example shell> mhonarc -add < single.msg Or, from a pipe: shell> cat single.msg | mhonarc -add Converting a single messageMHonArc has the ability to process a single mail message independent of creating, or modifying, an archive. To convert a single message to HTML use the -single command-line option. The message to process can be specified by a filename on the command-line, or by reading the message from standard input if no file is specified. The filtered message is sent to standard output. All formatting options apply to the single message as with messages being processed for an archive, with the exception of formatting related specificly to archive processing, like index links and mail thread links. Examples
$Date: 2001/12/24 14:38:07 $ MHonArc Copyright © 1997-1999, Earl Hood, mhonarc@mhonarc.org |