Skip to content

Instantly share code, notes, and snippets.


rjames86/Backup Secret

Last active Sep 3, 2015
What would you like to do?
import contacts
import sys, os
import console
sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')]
from dropboxlogin import get_client
from datetime import datetime
# Update this path here for the backup
# location in your Dropbox account.
BACKUP_PATH = '/Backups/Contacts'
TODAY ='%Y-%m-%d')
dropbox_client = get_client()
VCARD = "".join(person.vcard for person in contacts.get_all_people())
dropbox_client.put_file(BACKUP_PATH + '/contacts {}.vcf'.format(TODAY), VCARD)
print 'Backup complete!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.