From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1f23f7fcb7c278169ee78393fedf253e@plan9.escet.urjc.es> To: 9fans@cse.psu.edu From: Fco.J.Ballesteros MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] wcal: new calendar program Date: Mon, 10 Jun 2002 12:38:23 +0200 Topicbox-Message-UUID: a8132344-eaca-11e9-9e20-41e7f4b1d025 Hi, since I've not been able to make the bitsy resume using the real time clock, despite following the manual, I thought I should motivate myself to get it done. Therefore, I implemented a calendar program that could understand more date formats and could show week views of calendar events. It includes a graphics view that I think is nice for the bitsy. I paste the manual page here. The source is at http://plan9.escet.urjc.es/export/wcal.tgz Enjoy (and don't blame me for your lost appointments if you start using it). WCAL(1) WCAL(1) NAME wcal - calendar SYNOPSIS wcal [ -chgw ] [ -f calendar... ] [ -s hh ] [ -e hh ] [ -a n ] [ date ] DESCRIPTION Wcal is a calendar program similar to calendar(1). Unlike the more venerable calendar, it tries to admit other date formats commonly used on agendas and can show week events in both graphical and text mode. Wcal reads the user calendar from /usr/$user/lib/calendar to learn of events of interest. Option -f can be used (multiple times) to supply different calendars. After reading the calendar wcal prints events scheduled for the dates of interest, one per line. By default, the only date of interest is today (or the optional date when sup- plied). However, wcal would also consider of interest the next n days if option -a is used to set look-ahead dates. This option is automatically set by wcal to include the next monday as a date of interest when today is Friday, Saturday, or Sunday. Options -w, -c, and -g instruct wcal to display events for the week that contains the date of interest (either today or the optional date). They only differ in the output format used. Option -w shows one event per line. Option -c colum- nates a time table for the week, at most 80 characters wide. Option -g displays a graphics view of the events in the week. Only events between 9h and 19h are shown, different starting and ending hours may be set using the options -s and -e. When using graphics, button 1 goes to the previous week when used on the left third of the window, it goes to the next week when used on the right third of the window, and quits otherwise. Date formats understood by wcal are as shown in the example calendar. It is required that the appointment text be sepa- rated from the date using a tab. EXAMPLE # Example calendar Mar 1 Current year assumed March 1 9:30 this is 9.30 1st of March, this year Mar 1 2001 9:30 guest what Page 1 Plan 9 (printed 6/10/02) WCAL(1) WCAL(1) March 2002 Any day in March. Mon All mondays (this year) Monday 9:30 The same at 9:30 Any 1 something at 1st of any month (this year) Any 2 9:30 same at 9:30 Mar 2 Any Anniversary 6/10 The 10th of June (this year). Jun/10/Any The same, any year. Mar Mon 9:30 All mondays in March, 9:30 March 3 Any 9:30 Whenever it's Mar 3rd, any year. 9:30 Any day at 9:30, this year. SOURCE /sys/src/cmd/wcal FILES /usr/$user/lib/calendar user calendar. SEE ALSO calendar(1), cal(1), date(1) BUGS Wcal should be more tolerant with date formats, yet it should warn about incorrect dates found in the calendar. In any case, date manipulation routines should be probably rethought and collected in a date library. Page 2 Plan 9 (printed 6/10/02)