dtcm_holidays
dtcm_holidays is a program to insert holidays into your CDE calendar database.
One of the most annoying deficiencies of many electronic calendars is that they don't know about holidays. The CDE calendar client dtcm(1) is no exception there. However, since the CDE calendar is based on the standard Open Group Calendaring and Scheduling API (CSA) it's easy to write a program for inserting holidays into your calendar.
dtcm_holidays is written in Perl using the Calendar::CSA and Date::Manip modules, which you can get from CPAN, and which you should install first.
Unfortunately, the Calendar::CSA module has not been updated in a long time, and it must be slightly modified to successfully build it with recent (5.6 and later) Perl versions. Since I was unable to contact the author, here is a patched version for you convenience (see below for details).
The current release of dtcm_holidays is 2.1. It adds support for week numbers and the SPECIAL_OCCASION and MISCELLANEOUS subtypes.
The holiday definitions are read from a "holiday definition file." The archive includes definitions for Germany and the U.S. (contributed by Richard L. Hamilton). If you write a definition file for your country, send it to me and I'll include it.
The documentation is included in the program in Perl POD format; to generate a man page, use the following command line:
pod2man dtcm_holidays > dtcm_holidays.1
Modifications in Calendar::CSA
The changes listed below are already included in the patched version; they're for reference only.
Unfortunately, building Calendar::CSA is currently a bit tricky. If
you're using Perl 5.6, you'll have to patch it. It's easy, though:
Just replace na
with PL_na
, and replace sv_undef
with
PL_sv_undef
in CSA.xs
and CsaUtils.c
. Simply use the following
command line:
perl -pi -e 's/, ?na)/, PL_na)/g; s/sv_undef/PL_sv_undef/g' *.c *.xs
Furthermore, on some platforms (definitely HP-UX 10.20), the
Calendar::CSA module has a dependency on X; in that case, change
Makefile.PL
to say something like:
'LIBS' => ['-L/usr/dt/lib -lcsa -lXt -lX11'],
(If you need -lDtSvc
, keep that, of course.)
Other programs using Calendar::CSA.
dtclock
dtclock is a simple digital clock intended to be used in the front panel of the CDE window manager, dtwm.
Its main advantages (at least for me) over other clocks are:
- Simple, no-frills display of information.
- Display format customizable without recompiling; all
strftime()
directives can be used. - Internationalized: You can have a localized display. (Currently only tested for 8-bit locales.)
Here are some sample screenshots (the first one is the default in the C locale):
- dtclock source only
- dtclock source and HP-UX 10.20 (PA-RISC1.1) binary
- dtclock source and HP-UX 11.00 (PA-RISC2.0) binary
- dtclock source and Solaris (SPARC) binary
- dtclock source and Linux (x86) binary
dtrlogin
dtrlogin is a dtksh front-end to rlogin, telnet, ssh, and similar remote-login commands. You can put frequently used connections into a configuration file and simply select them from the pop-up menu.
In the latest version, you can open the Hosts: menu using Meta-H and the connections in it can be selected using keyboard shortcuts, see the screenshot below:
Not yet ready
The following to programs are not yet ready for public release. However, I would appreciate comments and ideas; I can also send them to you if you want to test them (and promise to give me feedback).
dtunzip
dtunzip is a dtksh front-end to the Info-ZIP unzip tool. It allows you to extract one or more files from a ZIP archive, and to set various options. It would be nice to have some kind of previewing (using the CDE filetypes information), and dialog boxes for unzip prompts. I'm not sure, if this is possible, though. If you have any ideas, please contact me.