Created
April 21, 2017 01:15
-
-
Save grimsy/5bf94e8b8e1e35e1c327b6d5cdfed19a to your computer and use it in GitHub Desktop.
auto imports ics files from realestate.com.au into a dedicated google calendar (using gcalcli). set up a cron to find *.ics in Downloads folder and call this script with the full path to the file as an argument.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ADDRESS=`cat $1 | grep SUMMARY | sed -e 's/SUMMARY\://g' | sed -e 's/\ -\ Inspection//g'` | |
sed -i "/SUMMARY:*/a LOCATION:$ADDRESS" $1 | |
/usr/local/bin/gcalcli --calendar "House Inspections" import $1 && rm $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment