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