MHonArc Resources: ANNOTATE

[Prev: AFS] | [Resources][TOC] | [Next: ARCHIVE]

# ANNOTATE

- Syntax
- Description
- Default Setting
- Resource Variables
- Examples
- Version
- See Also

## Syntax

Envariable

  `M2H_ANNOTATE=`[ `0` | `1` ]

Element

  N/A

Command-line Option

  `-annotate`

## Description

ANNOTATE is used to add an annotation to a message, or multiple messages. Annotation text is specified by the NOTETEXT resource. The messages to apply the annotation to are specify as arguments to the command-line. Messages can be specified by message-id or message number.

See Examples below on how to use ANNOTATE. See the NOTE resource on how to display annotations in archive pages.

## Default Setting

Off.

## Resource Variables

N/A

## Examples

The following adds an annotation to message 15 of an archive:

    prompt> mhonarc -annotate -outdir /home/httpd/docs/mail \
    	-notetext "This is an annotation" 15

Multiple `-notetext` can be specified if you want to keep the command-line cleaner for larger annotations. The following adds an annotation to the messages with a message-id of `<34D622C8.C37760AB@example.com>` and message number of 23:

    prompt> mhonarc -annotate -outdir /home/httpd/docs/mail \
    	-notetext "<p>This is the start of an annotation." \
    	-notetext "Here is some more text." \
    	-notetext "Here is some more text (again)." \
    	-notetext "The End.</p>" \
    	"34D622C8.C37760AB@example.com" 23

All `-notetext` options text will be concatenated together to form the complete text of the annotation. Also, the text is treated as HTML markup, so HTML tagging can be used to provide formatting.

Using the `-notetext` is convienent for small annotations, but it can be cumbersome for large ones. An alternative is to not specify `-notetext`. If not present, MHonArc will read the text of the annotation from standard input. For example:

    prompt> mhonarc -annotate -outdir /home/httpd/docs/mail 28 72
    Reading database ...
    Annotating messages in out ...
    Please enter note text (terminated with EOF char):
    <p>Here is some annotation text.  This will be applied to
    messages 28 and 72.  To tell MHonArc I am done with this text,
    I will terminate the text with my system's EOF character.
    ^D

The `^D` represents the EOF character and is not part of the annotation text. On Unix systems, this is normally Ctrl-D (holding down the Control key and pressing the D key). Under Windows, it is normally Ctrl-Z.

The standard input method of specify annotation data allows annotation text to come for a file the output of another process. Here is an example of using the contents of a file as the text:

    prompt> mhonarc -annotate -outdir /home/httpd/docs/mail < somefile.html

Which is equivalent to:

    prompt> cat somefile.html | mhonarc -annotate -outdir /home/httpd/docs/mail

The first version utilizes the command-line shell's ability to redirect a file's contents into a command's standard input. The second version is piping the output of the cat command to MHonArc. By the way, cat is a program that concatenates files and prints them to standard output (standard on Unix-based systems).

## Version

2.3.0

## See Also

NOTE, NOTEDIR, NOTETEXT

[Prev: AFS] | [Resources][TOC] | [Next: ARCHIVE]