#!/bin/bash
# downloadfromphone - download calendar and todo from phone (downloadfromphone is part of vcalone)
# (c) 2005 Tero Karvinen http://www.iki.fi/karvinen/vcalone
# GNU General Public License GPL v2
# Requires: gammu, bash

# TODO: error checking

if [ ! -z "$1" ]
then
	echo "usage: downloadfromphone";
	exit 1;
fi

echo "ALL" |gammu --backup download-tmp.vcs;
vcalone download-tmp.vcs > korga.vcs;
rm download-tmp.vcs;
echo "Downloaded calendar from phone as korga.vcs. ";
echo "Now edit it with 'korgnizer korga.vcs'. Save (save as ics iCalendar? yes).";
echo "Finally, upload it back to phone with 'upload2phone'.";

#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
#
#    See also:
#    http://www.gnu.org/licenses/gpl.html

