The content of this document may be incorrect or outdated.
Print this article Edit this article
Calendar Reminders Using KonsoleKalendar
Overview
Part of the set of KDE
desktop, KOrganizer is a desktop
calendaring utility for managing meetings and appointments, much like
the equivalent application on the PC running Microsoft Windows, Microsoft
Outlook.
Using an easy to use graphical interface, KOrganaizer has the ability to juggle the daily work schedule by settings appointments and tasks, both single instances and ones that recur on a daily, weekly and monthly basis. A built-in alarm manager will remind you when a meeting or task is coming due with popup messages on the display along with an audible alert of music or sounds.
Those with Microsoft Outlook experience and its calendar and task scheduling will find the look and feel of KOrganizer very familiar.
While KOrganizer work well on the desktop, it also has a command line interface that allows scripting to enhance its functionality. Thus comes the command line program konsolekalendar.
KonsoleKalendar
Beginning in KDE version 3.2, a simple, command-line interface to KOrganizer's database is available called KonsoleKalendar.
One cool aspect of KonsoleKalendar is the ability to check on your schedule without being in on the graphical desktop. By typing the command konsolecalendar, today's schedule appears:
tools% konsolekalendar
Date: Wed Feb 2 2005
01:30 pm - 02:30 pm
Summary:
Meeting with Prof. Stimpy
Description:
Meet with professor to discuss lab results
UID:
libkcal-281610507.284
----------------------------------
tools%
E-Mail Reminders
It would be cool if KOrganizer could send reminders in the early morning about today's appointment schedule. It can!! All that is needed is a short shell script to create a message, then send it through e-mail to yourself. Plus, a cron job will run the script every night.
The first step is to create a script to compose and send an e-mail message. Here is an example script:
#!/bin/sh
# Create a temporary file - it removes itself when the script exits
OUTPUT=/tmp/reminder$$
trap 'rm -f $OUTPUT' 0 1 2 15
# Ask if calendar has any appointments today and save to file
konsolekalendar 2>/dev/null >$OUTPUT
# If there is any output in the file, mail results to self
if [ -s $OUTPUT ]
then
# We also are setting a subject line with today's day...
Mail -s "Schedule for `date '+%A %B %d'`" $LOGNAME <$OUTPUT
fi
# Done!!
Put the script in your home directory and remember the name of the file. Be sure to make the script executable. Here is an example where the name of the script is called reminder:
tools% chmod +x reminder
tools%
Next, add a job to your crontab file. The command to edit your crontab file is crontab -e. Add the following line:
30 3 * * * ./reminder
This will request that cron run your script at 3:30am every morning.
Web Page
Another cool thing to do with KonsoleKalendar is to create a web page with your schedule for everyone to see and enjoy. Run KonsoleKalendar with the option --export-type=html and place the results on your web page. This too could be done automatically every night.
tools% konsolekalendar --export-type=html >reminder.html
tools% cadaver https://engineering.purdue.edu/people/im.a.wonderful.1
Looking up hostname... Connecting to server... connected.
Using secure connection: TLSv1
Authentication required for Zope on server `engineering.purdue.edu':
Username: iwonderful
Password: secret
dav:/people/im.a.wonderful.1/> put reminder.html
Uploading reminder.html to `/people/im.a.wonderful.1/reminder.html':
Progress: [=============================>] 100.0% of 1566 bytes succeeded.
dav:/people/im.a.wonderful.1/> quit
Connection to `engineering.purdue.edu' closed.
tools%
Here is the results:
Appointments for Wed Feb 2 2005
Start Time End Time Event Categories Attendees Wednesday 02 February 2005 01:30 pm 02:30 pm Meeting with Prof. Stimpy Meet with professor to discuss lab results
Personal This page was created with KonsoleKalendar
Last Modified:
Dec 19, 2016 11:12 am US/Eastern
Created:
Aug 9, 2006 12:59 pm GMT-4
by
admin
JumpURL: