Thursday, 18 January 2007

orage synchronisation (take #3)

Orage synchronisation now works (90% of the time anyway). Two refinements would be to check if the file downloaded from google is > 0 bytes in size (wget occasionally connects but gets a spurious 404 error and writes a zero byte length output file) before replacing the old file with the new file, and checking if orage is running, and stopping and restarting it if it is running

The first part is easy - modify the script to read something like

wget -nH -rK your_calendar_file_url -O ~/calendar/google.ics -a ~/calendar/google.log

if test -s google.ics


mv ~/.config/xfce4/orage/orage.ics ~/.config/xfce4/orage/orage.ics.old

mv ~/calendar/google.ics ~/.config/xfce4/orage/orage.ics


assuming you run this often enough the odd failed download shouldn't be a problem, otherwise you'd need to add some logic to retry the download

No comments: