Commit 900bfe15 authored by Sriram Karra's avatar Sriram Karra

Default sync recipe cannot include Google as a store

Fixes: https://github.com/skarra/ASynK/issues/88
parent 421a3e9c
......@@ -97,6 +97,7 @@ invoke ASynK. Remember to use the --recursive flag while cloning.
contacts folder will get synched to "My Contacts" on Google Contacts. (You
will be prompted for your google username and password).
On any non-windows platform your ~/.bbdb will be synced to google.
On any non-windows platform if you have a ~/.bbdb will simply be "backed
up" to /tmp/asynk.bbdb.
For further usage help, try "python asynk.py -h"
......@@ -409,7 +409,7 @@ class Asynk:
logging.critical(traceback.format_exc())
return False
if not pname in ['defgcol', 'defgcbb']:
if not pname in ['defolbb', 'defbbbb']:
conf.set_default_profile(pname)
return True
......@@ -536,11 +536,11 @@ class Asynk:
if not pname:
def_pname = conf.get_default_profile()
if not def_pname:
# Use the defgcbb on Unix and defgcol profile on Windows
# Use the defbbbb on Unix and defolbb profile on Windows
if platform.system() == 'Windows':
pname = 'defgcol'
pname = 'defolbb'
else:
pname = 'defgcbb'
pname = 'defbbbb'
elif conf.profile_exists(def_pname):
pname = def_pname
else:
......
......@@ -822,22 +822,21 @@ illegal options, etc.
@section Basic Usage: using the default sync profiles
@kbd{$ ./asynk.py --op=sync [--dry-run] [--log=debug]}
The most common use case is to sync your ~/.bbdb file with google contacts or
your default outlook contacts folder with google contacts. ASynK comes
preconfigured to easily do those "out of the box".
ASynK comes with two default profiles to help you get a quick feel for the
sync features.
When you run the above mentioned command on a windows box a default profile
called @kbd{defgcol} kicks in and your outlook/google contacts are synched
up. On any non-windows platform, your ~/.bbdb is attempted to be synched to
google contacts. You are promoted on the terminal for a username and a
password. The username is cached by ASynK and you will not be promoted for
subsequent runs. Your password is never stored, and you will be promoted for
it every time you run ASynK.
If you want to select your bbdb file, or google contacts group to sync to, or
set up additional sync profiles you should read through the following
sections, or if you are feeling particularly adventurous, edit the file
~/.asynk/state.json (definitely not recommended for a first time user, though)
called @kbd{defolbb} kicks in and contacts in your ~/.bbdb file are
bi-directionally synced to your default Outlook folder.
On any non-windows platform, your ~/.bbdb is merely ``synched'' to another
BBDB file in /tmp/asynk.bbdb. The default profile that kicks in is
@kbd{defbbbb}
Note: In earlier versions the default profiles helped you sync easily to your Google
account, but due to some changes that Google made to its authentication flow,
a simple no-frills sync is no longer possible. Setting up Google sync is
covered elsewhere in this documentation.
@section Explore Folders and Create Synk Profile
@enumerate
......
......@@ -22,7 +22,7 @@
// This absolutely has to be the same as the version of the
// config.json file. If they are different it will help us
// identify if any migration has to be performed - in the future.
'file_version' : 4,
'file_version' : 5,
// The default profile. It will contain the name of one of the
// profile keys once the user makes at a sync or at least sets up
......@@ -34,16 +34,16 @@
// The following is an example of what a profile could like. This
// sample profile will not be written to the state.json file
'defgcol' : {
'defolbb' : {
"coll_1" : {
"dbid" : "gc",
"dbid" : "ol",
"stid" : null,
"foid" : null,
},
"coll_2" : {
"dbid" : "ol",
"stid" : null,
"dbid" : "bb",
"stid" : "~/.bbdb",
"foid" : null,
},
......@@ -57,24 +57,24 @@
// Direction in which to resolve conflicts if the same
// entry is modified both locally and in the google
// cloud. Value should be one of the two dbids (in this
// instance, either 'gc' or 'ol')
'conflict_resolve' : 'gc',
// instance, either 'bb' or 'ol')
'conflict_resolve' : 'ol',
// The GID used to compute the custom property tag that is
// used to store the sync tag.
'olgid' : 0x9001,
}, // profiles['defgcol']
}, // profiles['defolbb']
'defgcbb' : {
'defbbbb' : {
"coll_1" : {
"dbid" : "gc",
"stid" : null,
"foid" : null,
"dbid" : "bb",
"stid" : "~/.bbdb",
"foid" : "default",
},
"coll_2" : {
"dbid" : "bb",
"stid" : "~/.bbdb",
"stid" : "/tmp/asynk.bbdb",
"foid" : "default",
},
......@@ -84,16 +84,11 @@
// Default direction in which to perform Sync. Values can
// be one of ['SYNC1WAY' or 'SYCN2WAY'].
'sync_dir' : "SYNC2WAY",
// Direction in which to resolve conflicts if the same
// entry is modified both locally and in the google
// cloud. Value should be one of the two dbids (in this
// instance, either 'gc' or 'bb')
'conflict_resolve' : 'gc',
'conflict_resolve' : 'bb',
// The GID used to compute the custom property tag that is
// used to store the sync tag.
'olgid' : null,
}, // profiles['defgcbb']
}, // profiles['defbbbb']
}, // 'profiles'
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment