From 55c33d749bfe95106c65bc843465b584aa587107 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Thu, 27 Feb 2014 18:12:04 +0100 Subject: [PATCH] Add example config --- README.md | 8 ++++++++ config.example | 33 +++++++++++++++++++++++++++++++++ vdirsyncer/cli.py | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 config.example diff --git a/README.md b/README.md index 9fe2028..4026628 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,14 @@ This is work-in-progress. A basic syncronization utility for [vdir](https://github.com/untitaker/vdir). Should be able to sync both CardDAV and CalDAV in the end. +## How to run + +Copy `config.example` to `~/.vdirsyncer/config` and edit it. You can use the +`VDIRSYNCER_CONFIG` environment variable to change the path vdirsyncer will +read the config from. + +Run `vdirsyncer --help`. + ## A little bit about the code architecture There are storage classes which control the access to one vdir-collection and diff --git a/config.example b/config.example new file mode 100644 index 0000000..214ca88 --- /dev/null +++ b/config.example @@ -0,0 +1,33 @@ +[general] +status_path=~/.vdirsyncer/status/ + +[pair bob] +# This syncronizes only a single collection/calendar/addressbook +a = bob_local +b = bob_remote + +[storage bob_local] +# This represents only a single collection/calendar/addressbook +type = filesystem +path = ~/.watdo/tasks/somecalendar/ +#fileext = .ics + +[storage bob_remote] +# This represents only a single collection/calendar/addressbook +type = caldav +url = https://owncloud.example.com/remote.php/caldav/calendars/bob/somecalendar/ +username = # blabla +password = # blabla + +# Specify a time range which should be syncronized. Either both start_date and +# end_date or neither have to be set. The default is to syncronize everything. +# The following example syncronizes from one year in the past to one year in +# the future. + +# All Python expressions are allowed here. The global namespace contains +# everything from the datetime module. The expression has to evaluate to a +# datetime. +#start_date = datetime.now() - timedelta(days=365) + +# Here, start_date is also in the namespace. +#end_date = datetime.now() + timedelta(days=365) diff --git a/vdirsyncer/cli.py b/vdirsyncer/cli.py index 7384335..244bd56 100644 --- a/vdirsyncer/cli.py +++ b/vdirsyncer/cli.py @@ -123,6 +123,8 @@ def _main(env, file_cfg): @sync_command.main('[pairs...]') def sync_main(context, pairs=None): + '''Syncronize the given pairs. If no pairs are given, all will be + syncronized.''' if pairs is None: pairs = list(all_pairs) actions = []