#!/bin/sh - # # gpscal Version 1.1.1 - December 15 1993 # # PostScript program to print calendars. # Doesn't deal well with September 1752 or before. # Includes Greek Orthodox holidays (stable and Easter based) # # Author: # Dimitri Konstantas CUI Geneva, Oct 1993. (dimitri@cui.unige.ch) # # This calendar is a modification of pscal from Pipeline Associates, Inc. # Information for Greek Holidays was extracted from Manolis M. Tsangaris gcal # # set ENVAR to PRINTER for BSD spooler, LPDEST for USG spooler # # Note: Oi giortes : Ag. Georgiou (23/4), Euagelistou Markou (25/4), # Agias Eirhnhs (5/5) einei imi-kinities: An pesoun prin apo # to pasxa metaferontai ws exis: # Agiou Georgiou: thn deytera tou Pasca # Euagg. Markou: thn triti tou Pasca (+2) # Agias Eirhnhs: Tin teterti tou pasxa (+3) (not confirmed) # # ---------------------------------------------------------------------- # HOW TO PRINT THE CALENDAR. # # Gpscal allows you to print isolated months. # In order to print February 1994, for example, # you give # gpscal 2 1994 # # if the currect year IS 1994 you can simply give # gpscal 2 # # This will print a simple English calendar on the (postscript) # printer PostScript. If your printer has a different name then # you can either use # gpscal -P lw3 2 1994 # # In order to print a Greek calendar (that is days and months are in # Greek) you give # gpscal -g 2 1994 # # If in addition you want the Greek holidays to be printed (both # stable and easter-depended) you give # gpscal -g -e 2 1994 # # This will print a greek calendar with the major Greek holidays, # all written in Greek. # Ommiting the -g option (gpscal -e 2 1994) will print an English # calendar (names of months and weekdays in English) with the Greek # holidays (in Greek always) # # A simple shell script for printing all the months of th year is the # follwoing: # # #!/bin/csh # foreach i (1 2 3 4 5 6 7 8 9 10 11 12 ) # gpscal -e -g -Plw3 $i 1994 # end # # If you have problems or questions feel free to contact me :-) # dimitri@cui.unige.ch # # ENVAR=PRINTER PATH=/usr/ucb:/bin:/usr/bin eval test \$$ENVAR || eval $ENVAR=PostScript export $ENVAR USAGE="Usage: pscal [ -Rrt ] [-g] [-e] [-P printer] [ -F hfont ] [ -f font ] [ month [ year ] ]" TFONT=Times-Bold DFONT=Helvetica-Bold DTFONT=Symbol DTFONT2=Times-Roman GREEKHOLIDAYS=0 GREEK=0 ROTATE=90 LPR="lpr" while test $# != 0 do case $1 in -P) test $# -lt 2 && { echo "$USAGE" 1>&2; exit 1; } eval $ENVAR="$2"; shift 2;; -P*) eval $ENVAR=`echo $1 | sed -n 1s/-.//p`; shift 1;; -F) test $# -lt 2 && { echo "$USAGE" 1>&2; exit 1; } TFONT="$2"; shift 2;; -F*) TFONT=`echo $1 | sed -n 1s/-.//p`; shift 1;; -f) test $# -lt 2 && { echo "$USAGE" 1>&2; exit 1; } DFONT="$2"; shift 2;; -f*) DFONT=`echo $1 | sed -n 1s/-.//p`; shift 1;; -t) LPR=cat; shift 1;; -r) ROTATE=90; shift 1;; -R) ROTATE=0; shift 1;; -e) GREEKHOLIDAYS=1 ; shift 1 ;; -g) GREEK=1 ; shift 1 ;; --|-) break;; -*) echo "$USAGE" 1>&2; exit 1;; *) break esac done test $# -gt 2 && { echo "$USAGE" 1>&2; exit 1; } case $# in 0) set `date`; case $# in 7) YEAR=$7;; 6) YEAR=$6;; esac MONTH=`case $2 in Jan) echo 1;;Feb) echo 2;;Mar) echo 3;;Apr) echo 4;; May) echo 5;;Jun) echo 6;;Jul) echo 7;;Aug) echo 8;; Sep) echo 9;;Oct) echo 10;;Nov) echo 11;;Dec) echo 12;;esac`;; 1) MONTH=$1; set `date`; case $# in 7) YEAR=$7;; 6) YEAR=$6;; esac ;; 2) MONTH=$1; YEAR=$2;; esac test $YEAR -lt 100 && YEAR=`expr $YEAR + 1900` $LPR <