]> diplodocus.org Git - nmh/blob - man/mhical.man
sbr/utils.c: Add HasSuffix(s, suffix).
[nmh] / man / mhical.man
1 .TH MHICAL %manext1% "January 4, 2015" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
5 .SH NAME
6 mhical \- manipulates an iCalendar event request
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B mhical
11 .RB [ \-help ]
12 .RB [ \-version ]
13 .RB [ \-form
14 .IR formatfile ]
15 .RB [ \-format
16 .IR formatstring ]
17 .RB [[ \-reply
18 .IR "accept" " | " "decline" " | " "tentative" "] |"
19 .BR \-cancel ]
20 .RB [ \-contenttype ]
21 .RB [ \-infile
22 .IR infile ]
23 .RB [ \-outfile
24 .IR outfile ]
25 .RB [ \-unfold ]
26 .RB [ \-debug ]
27 .ad
28 .SH DESCRIPTION
29 .B mhical
30 manipulates an iCalendar (.ics) event request, to display it, generate
31 a reply to it, or cancel it. iCalendar event requests and replies are
32 defined by RFC 5545.
33 .PP
34 .SH DISPLAY
35 The default operation is to display the iCalendar event request in a
36 human-readable format.
37 .SS "Format Program Selection"
38 For the display operation, the
39 .B \-format
40 .I string
41 and
42 .B \-form
43 .I formatfile
44 switches may be used to specify a format string or a format file to read.
45 If given a format string, it must be specified as a single argument to
46 the
47 .B \-format
48 switch. If given a format file name with
49 .BR \-form ,
50 the file is searched for using the normal
51 .B nmh
52 rules: absolute pathnames are accessed directly, tilde expansion is
53 done on usernames, and files are searched for in the user's
54 .I Mail
55 directory as specified in their profile. If not found there, the directory
56 .RI \*(lq %nmhetcdir% \*(rq
57 is checked.
58 .B mhical
59 defaults to using a format file named
60 .BR mhical.24hour ,
61 and will use the one installed in the
62 .RI \*(lq %nmhetcdir% \*(rq
63 directory if not found elsewhere.
64 .PP
65 The following format components are supported:
66 .PP
67 .RS 5
68 .fc ^ ~
69 .nf
70 .ta \w'description 'u
71 .BR ^method~^
72 .BR ^organizer~^
73 .BR ^summary~^
74 .BR ^description~^
75 .BR ^location~^
76 .BR ^dtstart~^
77 .BR ^dtend~^
78 .BR ^attendees~^
79 .fi
80 .RE
81 .PP
82 Those format names are case-sensitive. Each corresponds to the
83 iCalendar property of the same name as defined in RFC 5545, with the
84 exception of
85 .BR attendees .
86 That is a comma-delimited list of the common name (CN), if available,
87 or email address of Attendee properties. A maximum of 20 will be
88 displayed.
89 .SS Timezone
90 .B mhical
91 will display the event with times converted to the timezone specified
92 by the
93 .B TZ
94 environment variable, if it is set, see tzset(3). If not set, its
95 behavior is implementation defined, but may use the user's local
96 timezone.
97 .SH REPLY
98 The
99 .B \-reply
100 switch generates a reply from the event request. The required
101 action parameter must be one of
102 .IR "accept" ,
103 .IR "decline" ", or"
104 .IR "tentative" .
105 Delegation is not supported.
106 .SH CANCEL
107 The
108 .B \-cancel
109 switch generates an iCalendar event that can be used to cancel
110 the event request.
111 .SH INPUT/OUTPUT
112 By default,
113 .B mhical
114 reads from standard input and writes to standard output. The
115 .B \-infile
116 and
117 .BR \-outfile ,
118 respectively, switches can be used to override these defaults.
119 .PP
120 .SH MISCELLANEOUS SWITCHES
121 The
122 .B \-contenttype
123 switch instructs
124 .B mhical
125 to insert a Content-Type header at the beginning of its output,
126 for use by
127 .BR mhbuild .
128 It can only be used with
129 .B \-reply
130 and
131 .BR \-cancel .
132 .PP
133 The
134 .B \-unfold
135 switch echoes the event request, but with all lines unfolded.
136 .PP
137 The
138 .B \-debug
139 switch reveals minute details of the parse process.
140 .SH FILES
141 .B mhical
142 looks for format files in multiple locations: absolute pathnames are
143 accessed directly, tilde expansion is done on usernames, and files are
144 searched for in the user's
145 .I Mail
146 directory as specified in their profile. If not found there, the directory
147 .RI \*(lq %nmhetcdir% \*(rq
148 is checked.
149 .PP
150 .fc ^ ~
151 .nf
152 .ta \w'%nmhetcdir%/mhical.24hour 'u
153 ^%nmhetcdir%/mhical.24hour~^The default display template
154 ^%nmhetcdir%/mhical.12hour~^Display template that uses 12-hour clock
155 .fi
156 .fi
157 .SH "SEE ALSO"
158 .IR mhbuild (1),
159 .IR mh\-format (5),
160 .IR tzset (3),
161 .IR repl (1)
162 .SH DEFAULTS
163 .nf
164 .RB ` \-form "' defaults to mhical.24hour"
165 .RB ` \-infile "' defaults to standard input"
166 .RB ` \-outfile "' defaults to standard output"
167 .fi
168 .SH BUGS
169 .B mhical
170 supports only a very limited subset of RRULE formats. Specifically,
171 only a frequency of YEARLY and an interval of 1 are supported.