MHICAL(1mh)

πŸ“¦
version 1.8 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– MHICAL πŸ’– β€” aka mhical(1mh), nmh's lil iCalendar event wrangler πŸ—“οΈβœ¨

okay bestie, sit down, grab a boba, because this one is literally the tool that handles your .ics event requests and it's lowkey iconic 🫢


✨ NAME ✨

mhical β€” nmh's manipulator of iCalendar event requests. yes that's the whole job description and she ate πŸ’…


🌸 SYNOPSIS 🌸

mhical [-help] [-version] [-form formatfile] [-format formatstring]
     [[-reply accept | decline | tentative] | -cancel] [-attendee
     address] [-contenttype] [-infile infile] [-outfile outfile]
     [-unfold] [-debug]

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically, mhical manipulates an iCalendar (.ics) event request β€” it can display it, generate a reply to it, or cancel it. iCalendar event requests and replies are defined by RFC 5545, no cap πŸ“œ

The default operation is to display the iCalendar event request in a human-readable format. periodt.

For the display operation, the -format string and -form formatfile switches may be used to specify a format string or a format file to read. If you're giving a format string, it must be specified as a single argument to the -format switch (one argument, don't be splitting it up bestie πŸ™ˆ). If you're giving a format file name with -form, the file is searched for using the normal nmh rules:

  • absolute pathnames are accessed directly
  • tilde expansion is done on usernames
  • files are searched for in the user's Mail directory as specified in their profile

If it's not found there, the directory /etc/nmh is checked. mhical defaults to using a format file named mhical.24hour, and will use the one installed in the /etc/nmh directory if not found elsewhere. πŸ’«

The following format components are supported:

  • method
  • organizer
  • summary
  • description
  • location
  • dtstart
  • dtend
  • attendees

Those format names are case-sensitive β€” lowercase gang only, do not try to be cute with the caps. Each one corresponds to the iCalendar property of the same name as defined in RFC 5545, with the exception of attendees. That one is a comma-delimited list of the common name (CN), if available, or email address of Attendee properties. A maximum of 20 will be displayed. twenty. that's the limit. don't push her 😭

⏰ Timezone ⏰

mhical will display the event with times converted to the timezone specified by the TZ environment variable, if it is set β€” see tzset(3). If TZ is not set, its behavior is implementation defined, but it may use the user's local timezone. so like... it's giving "we'll see" 🌍

πŸ’Œ Reply πŸ’Œ

The -reply switch generates a reply from the event request. The required action parameter must be one of:

  • accept
  • decline
  • tentative

Delegation is not supported. sorry delegation stans, not today 🚫

If one of your mailboxes matches more than one attendee in the request, the -attendee switch must be used to select the one to use in the reply. The -attendee switch can also be used to specify the attendee address if no attendees match any of your mailboxes. basically it's the "who am i in this situation" switch and honestly relatable 🫠

❌ Cancel ❌

The -cancel switch generates an iCalendar event that can be used to cancel the event request. it's the "nvm" button and she works πŸŽ€

πŸ“₯ Input/Output πŸ“€

By default, mhical reads from standard input and writes to standard output. The -infile and -outfile, respectively, switches can be used to override these defaults. classic. love that for her.

🧚 Miscellaneous Switches 🧚

The -contenttype switch instructs mhical to insert a Content-Type header at the beginning of its output, for use by mhbuild. It can only be used with -reply and -cancel. so don't try it solo, it will not vibe with you πŸ’€

The -unfold switch echoes the event request, but with all lines unfolded. flat. smooth. unfolded. ✨

The -debug switch reveals minute details of the parse process. it's giving overthinking out loud, and honestly? we respect the transparency πŸ”


πŸ“ FILES πŸ“

mhical looks for format files in multiple locations:

  • absolute pathnames are accessed directly
  • tilde expansion is done on usernames
  • files are searched for in the user's Mail directory as specified in their profile

If not found there, the directory /etc/nmh is checked.

  • /etc/nmh/mhical.24hour β€” The default display template πŸ‘‘
  • /etc/nmh/mhical.12hour β€” Display template that uses 12-hour clock πŸ•›

πŸ‘€ SEE ALSO πŸ‘€

mhbuild(1), mh-format(5), mh-profile(5), tzset(3), repl(1)

go read those too, iykyk πŸ“š


πŸŽ€ DEFAULTS πŸŽ€

  • -form defaults to mhical.24hour
  • -infile defaults to standard input
  • -outfile defaults to standard output

πŸ› BUGS πŸ›

mhical supports only a very limited subset of RRULE formats. Specifically, only a frequency of YEARLY and an interval of 1 are supported. that's it. that's the whole menu. πŸ’€

mhical produces output with just newlines instead of carriage return-newline combinations. This is intentional, to fit with typical nmh convention. not a bug, a lifestyle choice, and we're obsessed with her consistency 🌈


fr fr bestie, this is mhical from nmh-1.8, dated 2015-01-04 πŸ’– she's been serving iCalendar realness since way back and she's still the moment. mwah πŸ’…βœ¨πŸŽ€
πŸ“¦ where this page comes from