forked from talmage/fixdavicalics
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexportDAViCal.sh
More file actions
executable file
·15 lines (11 loc) · 908 Bytes
/
exportDAViCal.sh
File metadata and controls
executable file
·15 lines (11 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash
#
# Run this script as user postgres to extract
# talmage's address book and calendars from
# DAViCal.
#
psql davical -Atc "SELECT array_to_string(array(SELECT caldav_data FROM caldav_data WHERE dav_name LIKE '/talmage/addresses/%'),'');" > talmage_addressbook.vcf
psql davical -Atc "SELECT array_to_string(array(SELECT caldav_data FROM caldav_data WHERE dav_name LIKE '/talmage/calendar/%'),'');" > talmage_calendar.ics
psql davical -Atc "SELECT array_to_string(array(SELECT caldav_data FROM caldav_data WHERE dav_name LIKE '/talmage/workCalendar/%'),'');" > workCalendar.ics
psql davical -Atc "SELECT array_to_string(array(SELECT caldav_data FROM caldav_data WHERE dav_name LIKE '/talmage/churchCalendar/%'),'');" > churchCalendar.ics
psql davical -Atc "SELECT array_to_string(array(SELECT caldav_data FROM caldav_data WHERE dav_name LIKE '/talmage/datesOfNote/%'),'');" > datesOfNote.ics