The KonsoleKalendar Handbook
 

The KonsoleKalendar Handbook

Tuukka Pasanen <illuusio@mailcity.com>

Allen Winter <awinterz@users.sourceforge.net>

Reviewer: Malcolm Hunter
Revision 1.0.0 (2003-11-28)

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".

KonsoleKalendar is a command line interface to KDE calendars.


Chapter 1. Introduction
 

Chapter 1. Introduction

KonsoleKalendar is a command line interface to KDE calendars. It lets you view, insert, remove, or modify calendar events by way of the command line or from a scripting language. Additionally, KonsoleKalendar can create a new KDE calendar, export a KDE calendar to a variety of other formats, and import another KDE calendar.

In its basic mode, KonsoleKalendar displays the list of events in your default calendar for the current day (from 7:00 to 17:00).

Main features of KonsoleKalendar:

  • View calendar entries from a start date/time to end date/time

  • Insert (add) calendar entries

  • Remove (delete) calendar entries

  • Modify (change) calendar entries

  • Create a new calendar

  • Export calendar entries to other file formats

  • Import an existing KDE calendar

KonsoleKalendar is not another graphical user interface to a KDE calendar (i.e. KOrganizer). KonsoleKalendar is intended solely for uses where a graphical user interface is not practical or possible.

KonsoleKalendar does not provide a full-featured language for making queries of the user's calendar: nor is it the intention of the authors to ever write such a capability. Primitive command line options are provided for accessing calendar events within a consecutive range of dates/time stamps.

Chapter 2. Features
 

Chapter 2. Features

In this chapter you'll learn about the main features of KonsoleKalendar and how to control them using the command line parameters (remember that KonsoleKalendar is not a graphical user interface; it is a command line program only).

You'll learn about inserting, deleting, and changing calendar events, and how to export events to other file formats. The creation and importation of KDE calendars will also be covered in this chapter.

Viewing Events

In its default mode, or by using the --view option, KonsoleKalendar will list all events within the range of a specified date/time.

To view all of today's events (from 7:00 to 17:00), simply run:

% konsolekalendar

In this next example, we view all events for the week of August 18-22:

% konsolekalendar --view --date 2003-08-18  --end-date 2003-08-22

Inserting Events
 

Inserting Events

KonsoleKalendar can insert events into a KDE calendar or calendar resource using the --add command line argument.

In the following example, an event starting on 2003-06-04 (June 4, 2003) at 1000 and ending at 1200 with summary "Doctor Visit" will be inserted into the user's default calendar resource:

% konsolekalendar --add --date 2003-06-04 --time 10:00 \
--end-time 12:00 --summary "Doctor Visit"

In this example, a birthday event is added into the user's default calendar resource:

% konsolekalendar --add --date 2003-06-06 --summary "My Birthday" \
--description "Party Time"

Note

The current version of KonsoleKalendar does not support inserting “free” events (free events are events that take up no space in the day; i.e., the time is not marked as busy). Birthdays, holidays, anniversaries, etc. should ideally be inserted as free events. We hope for the next KonsoleKalendar release to have a “free” event feature.

Here a one week vacation is inserted into a shared vacation calendar:

% konsolekalendar --add --file vacation.ics --date 2003-08-01 \
--end-date 2003-08-07 --summary "Vacation" --description "Nobody will ever find me!"

Removing Entries
 

Removing Entries

KonsoleKalendar supports the removal of entries in a calendar file or resource using the --delete command line argument. Calendar entries to be removed are specified exactly by their Unique-string identifier (UID) using the --uid option. UIDs are found by first viewing the event, using the --view option.

Warning

When you delete something from the calendar you cannot undo it! In other words, when you delete an entry you cannot reverse the deletion. It's gone for good.

Here we delete a calendar entry with UID KonsoleKalendar-1887551750.196:

% konsolekalendar --delete --uid KonsoleKalendar-1887551750.196

Modifying Entries
 

Modifying Entries

KonsoleKalendar supports the modification of existing entries in a calendar file or resource using the --change command line argument. Calendar entries to be modified are specified exactly by their Unique-string identifier (UID) using the --uid option. UIDs are found by first viewing the event, using the --view option.

Changing behaves in the same way as inserting: you can change an event's start date and time, end date and time, description, and summary.

Example: Here we change the summary and description of a calendar entry with UID KonsoleKalendar-1887551750.196:

% konsolekalendar --change --uid KonsoleKalendar-1887551750.196 --summary "Get my head examined" --description "don't go to that doctor anymore!"

Creating a New Calendar File
 

Creating a New Calendar File

KonsoleKalendar can be used to create a new KDE calendar file. Since you cannot insert an entry into a calendar that does not exist, you must create the file first using the --create and --file command line arguments.

Create a calendar file named /data/share/calendars/vacation.ics:

% konsolekalendar --create --file /data/share/calendars/vacation.ics

Exporting to Other Formats
 

Exporting to Other Formats

KonsoleKalendar can export a KDE calendar to other well known formats. Exporting is a special form of viewing. By default, events are viewed in “KonsoleKalendar text” format. To change the viewing format use the --export-type command line argument.

To see a list of all supported export formats, use the --export-list option, as in:

% konsolekalendar --export-list

Export Formats
 

Export Formats

Some, but not necessarily all, of the supported formats are described in the this section.

KonsoleKalendar Text Format

KonsoleKalendar Text Format is KonsoleKalendar's native format and is designed to be comfortable to read and to be parseable by follow-on scripts.

The KonsoleKalendar Text Format is:

Date and time information:
1. row Date:	YYYY-MM-DD
2. row 		HH:MM
Summary:
3. row Summary:
4. row 		Summary text.
Description:
5. row Description:
6. row		Description text
UID:
7. row UID:
8. row 		UID.

Date:   2003-11-01
        8:00 - 9:00
Summary:
        Staff Meeting
Description:
        Meet in the big conference room with the entire staff.
UID:
        KonsoleKalendar-1128954167.1013

Comma-Separated Values (CSV) Format

Comma-Separated Value Format displays the event values in the same order as KonsoleKalendar Text format. The only difference is that all the information is on the same row with each field separated by a comma. The resulting exported files can be imported directly into spreadsheet programs like KSpread, OpenOffice.org Calc, and Microsoft® Excel. Also, CSV format is easy to parse with follow-on scripts.

The Comma-Separated Value (CSV) format is:

YYYY-MM-DD,HH:MM,YYYY-MM-DD,HH:MM,Summary,Description,UID

2003-11-01,08:00,2003-11-01,09:00,Staff Meeting,Meet in the big conference \
room with the entire staff.,KonsoleKalendar-1128954167.1013

HTML Format

The HTML export format will produce a valid HTML file that can be published to the WWW. This export format is not suitable for follow-on script parsing, but is very nice for publishing calendars for easy public viewing.

TODO: Insert screenshot here

Importing Calendars
 

Importing Calendars

KonsoleKalendar can import an ICS calendar file into a KDE calendar. All events from the calendar being imported from will be inserted, including identical events. In the next KonsoleKalendar release identical events will not be inserted.

To import calendar file another.ics into calendar current.ics run:

% konsolekalendar --import another.ics --file current.ics

Chapter 3. Command Line Arguments
 

Chapter 3. Command Line Arguments

KonsoleKalendar supports the following options:

OptionDescription
--help, --help-allShows help about the program options.
--authorShows the program author information.
-v, --versionShows the program version information.
--licenseShows the program license information.
--verbosePrint helpful runtime messages.
--dryrunPrint what would have been done, but do not execute. Do not change any files; do not insert, remove, modify any existing files, nor create any new files.
--file calendar-fileSpecify a calendar file to use.

If not specified then your default KOrganizer resource is used.

Major Operation Modes: 
--viewPrint calendar events in specified export format.
--addInsert an event into the calendar.
--changeModify an existing calendar event.
--deleteRemove an existing calendar event.
--createCreate a new calendar file if one does not exist.
--import import-fileImport this calendar to the main calendar.
Operation modifiers: 
--allView all calendar entries.
--uid UIDView, delete, or change the event with this Unique-string IDentifier.
--date dateStart at this day [YYYY-MM-DD]. Default date is Today
--timeStart at this time [HH:MM]. Default time is 07:00.
--end-date end-dateEnd at this day [YYYY-MM-DD]. Default is set by --date.
--end-time end-timeEnd at this time [HH:MM]. Default time is 17:00
--epoch-start epoch-timeStart at this time [seconds since epoch].
--epoch-end epoch-timeEnd at this time [seconds since epoch].
--summary summaryAdd summary to event (works with add and change).
--description descriptionAdd description to event (works with add and change).
Export options: 
--export-type export-typeExport file type. Default export file type is Text
--export-file export-fileExport to file. By default, output is written to standard output.
--export-listPrint list of export types supported and exit.
Chapter 4. Questions and Answers
 

Chapter 4. Questions and Answers

This document may have been updated since your installation. You can find the latest version at http://docs.kde.org/current/kdepim/.

4.1. What configuration files does KonsoleKalendar use?
4.2. What are the application names of KonsoleKalendar?
4.3. What is the date specification format?
4.4. What is the time specification format?
4.5. Will KonsoleKalendar insert a new event that is identical to one that already exists in the calendar?
4.6. How does KonsoleKalendar determine if an event is identical to one that already exists in the calendar?
4.7. How do I have my question added to this FAQ?
4.1.

What configuration files does KonsoleKalendar use?

None.

4.2.

What are the application names of KonsoleKalendar?

KonsoleKalendar's application name is konsolekalendar.

4.3.

What is the date specification format?

KonsoleKalendar will reject dates specified on the command line unless they are specified according to ISO 8601 standards, namely: YYYY-MM-DD. Where YYYY represents a four-digit year (like 2003), MM represents a two-digit month (01,02,..,12), and DD represents a two-digit day (01,02,...,31).

KonsoleKalendar always exports dates according to the ISO 8601 format.

4.4.

What is the time specification format?

KonsoleKalendar will reject times specified on the command line unless they are specified according to ISO 8601 standards, namely: HH:MM:SS. Where HH represents a two-digit hour (01,02,...,24), MM represents a two-digit minute (01,02,..,60), and SS represents a two-digit second (01,02,...,60).

KonsoleKalendar always exports times according to the ISO 8601 format.

4.5.

Will KonsoleKalendar insert a new event that is identical to one that already exists in the calendar?

No. See next question.

4.6.

How does KonsoleKalendar determine if an event is identical to one that already exists in the calendar?

KonsoleKalendar checks the specified start date and time, end date and time, and summary against all events in the calendar. An event match is determined if all three values match to an existing event.

4.7.

How do I have my question added to this FAQ?

Send your questions to <illuusio@lycos.com>.

Chapter 5. Credits and License
 

Chapter 5. Credits and License

KonsoleKalendar Program copyright 2002,2003:

Documentation copyright 2003:

This documentation is licensed under the terms of the GNU Free Documentation License.

This program is licensed under the terms of the GNU General Public License.

Appendix A. Installation
 

Appendix A. Installation

How to obtain KonsoleKalendar

KonsoleKalendar is part of the KDE project http://www.kde.org/.

KonsoleKalendar can be found in the kdepim package on ftp://ftp.kde.org/pub/kde/, the main FTP site of the KDE project.

KonsoleKalendar comes included with KDE3 and is not available separately.

Requirements
 

Requirements

KonsoleKalendar requires the standard KDE libraries to be installed (the kdelibs package). To compile from source, you also need the Qt™ and kdelibs development packages.

You can find a list of changes in the ChangeLog file.

Compilation and installation
 

Compilation and installation

This section provides a quick overview of the build process. Please read Compiling KDE 3.2.x for complete instructions.

If you cannot obtain a suitable precompiled binary package, you need to compile KonsoleKalendar yourself from source files. Get the source package file kdepim-x.x.tar.bz2. Unpack it in a new folder using a command similar to tar xvfj package.tar.bz2, and change to the folder which has been created.

In order to compile and install KonsoleKalendar on your system, type the following in the base directory of the KonsoleKalendar distribution:

% ./configure
% make
% make install

Since KonsoleKalendar uses autoconf and automake you should have no trouble compiling it. Should you run into problems please report them to the KDE mailing lists.

Note

If you have more than one version of KDE installed (e.g. KDE2 and KDE3), this may possibly install KonsoleKalendar into the wrong KDE folder. If necessary, you can give the KDE folder as a parameter to ./configure. For example, if your KDE is installed in /opt/kde3:

./configure --prefix=/opt/kde3

Configuration
 

Configuration

No special configuration is required to set up KonsoleKalendar to run on the KDE desktop.