File: hebhtml

package info (click to toggle)
remind 03.03.01-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,096 kB
  • sloc: ansic: 17,507; sh: 3,962; perl: 828; lisp: 343; makefile: 178
file content (41 lines) | stat: -rw-r--r-- 1,224 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
# HTML calendar shell script
#
# This file is part of REMIND.
# Copyright (C) 1992-2018 by Dianne Skoll

echo "Content-Type: text/html"
echo ""

if [ "$1 $2" = " " ] ; then
$REMIND - <<'EOR'
set thismon monnum(today())
set thisyear year(today())
set nextmon iif(thismon+1 > 12, 1, thismon+1)
set nextyear iif(nextmon==1, thisyear+1, thisyear)
set lastmon iif(thismon-1 < 1, 12, thismon-1)
set lastyear iif(lastmon==12, thisyear-1, thisyear)
set nextmon mon(nextmon)
set lastmon mon(lastmon)
BANNER %
REM RUN $REMIND -iHTML=1 -p $DIR/hebdate.rem %m %y | $DIR/rem2html --forwurl "cal_dispatch?hebhtml+[nextmon]+[nextyear]" --backurl "cal_dispatch?hebhtml+[lastmon]+[lastyear]"
EOR

else

$REMIND - "$1" "$2" <<'EOR'
set thismon monnum(today())
set thisyear year(today())
set nextmon iif(thismon+1 > 12, 1, thismon+1)
set nextyear iif(nextmon==1, thisyear+1, thisyear)
set lastmon iif(thismon-1 < 1, 12, thismon-1)
set lastyear iif(lastmon==12, thisyear-1, thisyear)
set nextmon mon(nextmon)
set lastmon mon(lastmon)
BANNER %
REM RUN $REMIND -iHTML=1 -p $DIR/hebdate.rem %m %y | $DIR/rem2html --forwurl "cal_dispatch?hebhtml+[nextmon]+[nextyear]" --backurl "cal_dispatch?hebhtml+[lastmon]+[lastyear]"
EOR

fi

exit 0