README.md 1.4 KB
Newer Older
1 2 3 4 5 6
Unmaintained
============

This project is unmaintained, and made available for reference purposes
only. Feel free to fork and use, but don't expect any updates or support.

Koen Martens's avatar
Koen Martens committed
7 8 9 10 11
Dependencies
============

sudo apt-get install python-icalendar
sudo apt-get install python-lxml
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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75

Running
=======

The following script was used to power hypevents.net:

```
#!/bin/sh
set -eu

while true; do

echo ${PATH}
echo `pwd`

OUTPUT="/var/www/hypevents.net"
cd ~/hypevents

echo "=======> `date`"
echo "       > start fetch"

./main.py -f

now=`date +%s`
last=`expr ${now} + 2592000`
first=`expr ${now} - 86400`

echo "now ${now} last ${last}"

echo "write json"

./main.py -w -e json -o "${OUTPUT}/events.json.new" -a `date -r ${first} +%Y-%m-%d` -b `date -r ${last} +%Y-%m-%d`

mv ${OUTPUT}/events.json.new ${OUTPUT}/events.json

echo "write lsl"

./main.py -w -e lsl -o "${OUTPUT}/events.lsl.new" -a "`date`"
./main.py -w -e lsl2 -o "${OUTPUT}/events.lsl2.new" -a "`date`"

mv ${OUTPUT}/events.lsl.new ${OUTPUT}/events.lsl
mv ${OUTPUT}/events.lsl2.new ${OUTPUT}/events.lsl2

echo "write html"

./main.py -w -e html -o "html/events.html" -a "`date`"

cd html

gmake

cp style.css "${OUTPUT}/style.css.new"
cp scr.js "${OUTPUT}/scr.js.new"
cp index.html "${OUTPUT}/index.html.new"

mv "${OUTPUT}/style.css.new" "${OUTPUT}/style.css"
mv "${OUTPUT}/scr.js.new" "${OUTPUT}/scr.js"
mv "${OUTPUT}/index.html.new" "${OUTPUT}/index.html"

sleep 300

done
```