Spahni Stein Rechtsanwälte
 
Navigation
Wichtige Links

Some useful programs for download

These are some of my programs, mostly shell scripts.

Disclaimer: These programs are in the public domain (with the exception of dbtool and timon which are distributed under the GPL2 GNU Public Licence). All others may be freely copied, distributed and changed. However, no guarantee is given that they are useful for any purpose or that they will run on any particular machine without damaging hard- and software. Enjoy at your own risk!


ASCII-file to TeX Converter

Program Name: totex

This is a bash Shell-Script running under Linux and eventually some other flavours of Un*x (untested). It makes use of the sed stream editor which should be part of user's system.

totex tries to figure out how to format a plain ascii-file in a way to make it look nice when subsequently processed with TeX. It is intended to process a wide variety of texts the user could download from the internet. The problem is to find titles, alineas and paragraphs. The script probably needs some editing to reflect personal preferences. Don't forget to set the downloaded file to executable:
chmod a+x totex

Usage: totex [-t] filename
where the option [-t] will call TeX after conversion.

Download totex and report any stories of success or failure to thomas@spahni.ch.


Extract UU-encoded files from Mail & News

Program Name: uuesplit

Another Shell-Script for bash/Linux. When you have saved a couple of UU-encoded files to a news od mail folder, then this file must be split before uudecode can be run. This script will do exctly this, using a brute force approach (not very fast on *big* files).

Usage: uuesplit filename-of-folder

Download uuesplit and report any stories of success or failure to thomas@spahni.ch.


Calculate Position of the Sun

Program Name: sunpos

The program calculates the apparent position of the sun for a given local position of the observer. Besides azimuth and elevation, data for right ascension, declination and ecliptic longitude are given as well. Nutation data display can be enabled.

The scope of this program is to provide an easy determination of the relative solar position for photographers, pilots, environmentalists and others. Accuracy is within 2 - 3 seconds of time. For a determination of sunrise / sunset the effects of atmospheric refraction must be taken into account. If high accuracy is desired then more advanced methods of computation should be used.

The program is written in "C" and must be compiled on the users machine. It was tested under Linux/gcc and contains very few machine specific code. The code contains a 'Makefile' appended as a comment. This Makefile can be extracted after downloading and be saved as a separate file using your editor.

Usage: sunpos

Download sunpos.c and report any stories of success or failure to thomas@spahni.ch.


Delay and Date Calculation with Shell Scripts

Program Names: jd, dow, dt, delay, easter

This is a package of 5 shell scripts to handle delay and date calculation easily from the command line. They should run on any Linux/UN*X system with a "bash" or original "Bourne Shell".

These programs do:

All five shell scripts can be downloaded by clicking the following links, but don't forget to set the downloaded file to executable like "chmod a+x jd".

Download jd,  dow,  dt,  delay  and   easter
and report any stories of success or failure to thomas@spahni.ch.


Calculate relative humidity

Program Name: relhumidity

This is an example how to use the bc calculator in a shell script. The program calculates relative humidity from temperature and dewpoint.

View the code relhumidity.html or download relhumidity and report any stories of success or failure to thomas@spahni.ch.


Calculate dewpoint

Program Name: dewpoint

This is an example how to use the bc calculator in a shell script. The program calculates dewpoint from temperature and relative humidity.

View the code dewpoint.html or download dewpoint and report any stories of success or failure to thomas@spahni.ch.


Show nesting level of braces in a TeX file

Program Name: nesting

Show the contents of the input file on STDOUT, each line preceded by a number indicating the nesting level of braces '{}' valid at the end of the respective line.

TeX syntax is used. Braces in comments are not taken into account.

Download the source package with a right click on nesting-1.0.tar.bz2.


Text based user frontend for the MySQL database

Program Name: dbtool

dbtool is basically a shell script for interactive access to MySQL. Menus are presented in nice windows thanks to the dialog utility. A patched version of dialog-0.6z supporting some basic editing functions is included in the package. It should still be compatible with the original version but not with newer versions of dialog.


Time accounting and invoicing system

Program Name: timon

timon is a shell script making use of the MySQL database. timon means Time Is MONey. Time and expenses spent on projects for various clients may be stored and detailed invoicing is generated from the data.

This code is still alpha, but it's actively maintained and works pretty well. Expect new versions frequently. You need MySQL 4.0.6 or better and the TeTeX package to run 'timon'. Some basic knowledge of TeX is required to design your own letterheads for invoicing.


Mommsen: Römische Geschichte (transcription from HTML to TeX)

Program Name: mommsen.sh

Theodor Mommsen's famous work "Römische Geschichte" (Roman History) has been made publicly available in HTML format at Project Gutenberg. A similar version is available at www.zeno.org. My script will convert the sources from Project Gutenberg into TeX language for typesetting and printing. It makes extensive use of the sed editor and regular expressions.


Back to the Top
Back to my Homepage