diff --git a/LICENSE b/LICENSE index 6486b87..ab35c0e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014 Markus Unterwaditzer & contributors +Copyright (c) 2014-2015 Markus Unterwaditzer & contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/setup.py b/setup.py index dc91380..4da6fad 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,8 @@ # -*- coding: utf-8 -*- ''' - vdirsyncer - ~~~~~~~~~~ - - vdirsyncer is a synchronization tool for vdir. See the README for more - details. - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. +Vdirsyncer is a synchronization tool for vdir. See the README for more details. ''' + import ast import re diff --git a/tests/__init__.py b/tests/__init__.py index 1d754a6..9e53dda 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,12 +1,6 @@ # -*- coding: utf-8 -*- ''' - tests - ~~~~~ - - Test suite for vdirsyncer. - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. +Test suite for vdirsyncer. ''' from vdirsyncer.utils.compat import text_type diff --git a/tests/conftest.py b/tests/conftest.py index 5e48a41..058c6c8 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,12 +1,6 @@ # -*- coding: utf-8 -*- ''' - tests.conftest - ~~~~~~~~~~~~~~ - - General-purpose fixtures for vdirsyncer's testsuite. - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. +General-purpose fixtures for vdirsyncer's testsuite. ''' import pytest diff --git a/tests/storage/__init__.py b/tests/storage/__init__.py index a0f255d..e0d7263 100644 --- a/tests/storage/__init__.py +++ b/tests/storage/__init__.py @@ -1,11 +1,5 @@ # -*- coding: utf-8 -*- -''' - tests.storage - ~~~~~~~~~~~~~ - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import random import pytest diff --git a/tests/storage/dav/__init__.py b/tests/storage/dav/__init__.py index c2af08c..40a96af 100644 --- a/tests/storage/dav/__init__.py +++ b/tests/storage/dav/__init__.py @@ -1,8 +1 @@ # -*- coding: utf-8 -*- -''' - tests.storage.dav - ~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' diff --git a/tests/storage/dav/servers/__init__.py b/tests/storage/dav/servers/__init__.py index 1837537..40a96af 100644 --- a/tests/storage/dav/servers/__init__.py +++ b/tests/storage/dav/servers/__init__.py @@ -1,8 +1 @@ # -*- coding: utf-8 -*- -''' - tests.storage.dav.servers - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' diff --git a/tests/storage/dav/test_main.py b/tests/storage/dav/test_main.py index 78fa8bd..84ff076 100644 --- a/tests/storage/dav/test_main.py +++ b/tests/storage/dav/test_main.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - tests.storage.dav.test_main - ~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import datetime import os diff --git a/tests/storage/test_filesystem.py b/tests/storage/test_filesystem.py index 25339c6..5328121 100644 --- a/tests/storage/test_filesystem.py +++ b/tests/storage/test_filesystem.py @@ -1,12 +1,4 @@ - # -*- coding: utf-8 -*- -''' - tests.storage.filesystem - ~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import os diff --git a/tests/storage/test_http.py b/tests/storage/test_http.py index d3d74cf..b6a508f 100644 --- a/tests/storage/test_http.py +++ b/tests/storage/test_http.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - tests.storage.test_http - ~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import pytest diff --git a/tests/storage/test_http_with_singlefile.py b/tests/storage/test_http_with_singlefile.py index c063a32..7ac5fe2 100644 --- a/tests/storage/test_http_with_singlefile.py +++ b/tests/storage/test_http_with_singlefile.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - tests.storage.test_http_with_singlefile - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import pytest diff --git a/tests/storage/test_memory.py b/tests/storage/test_memory.py index a5b8e54..77b2cdb 100644 --- a/tests/storage/test_memory.py +++ b/tests/storage/test_memory.py @@ -1,12 +1,4 @@ - # -*- coding: utf-8 -*- -''' - tests.storage.test_memory - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import pytest diff --git a/tests/storage/test_singlefile.py b/tests/storage/test_singlefile.py index a70c22d..ce28588 100644 --- a/tests/storage/test_singlefile.py +++ b/tests/storage/test_singlefile.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - tests.storage.test_singlefile - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import pytest diff --git a/tests/test_cli.py b/tests/test_cli.py index be40510..c95b8c7 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,11 +1,5 @@ # -*- coding: utf-8 -*- -''' - tests.test_cli - ~~~~~~~~~~~~~~ - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import io from textwrap import dedent diff --git a/tests/test_doubleclick.py b/tests/test_doubleclick.py index b143966..98eef96 100644 --- a/tests/test_doubleclick.py +++ b/tests/test_doubleclick.py @@ -1,11 +1,5 @@ # -*- coding: utf-8 -*- -''' - tests.test_doubleclick - ~~~~~~~~~~~~~~~~~~~~~~ - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' from click.testing import CliRunner from vdirsyncer.doubleclick import _ctx_stack, click, ctx as global_ctx diff --git a/tests/test_sync.py b/tests/test_sync.py index b8eb7a0..bc2baf5 100644 --- a/tests/test_sync.py +++ b/tests/test_sync.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - tests.test_sync - ~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import pytest diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py index db5791c..40a96af 100644 --- a/tests/utils/__init__.py +++ b/tests/utils/__init__.py @@ -1,8 +1 @@ # -*- coding: utf-8 -*- -''' - tests.utils - ~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' diff --git a/tests/utils/test_main.py b/tests/utils/test_main.py index e775dee..e5802c2 100644 --- a/tests/utils/test_main.py +++ b/tests/utils/test_main.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - tests.utils.test_main - ~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import os import stat diff --git a/tests/utils/test_vobject.py b/tests/utils/test_vobject.py index a29dd66..5ae680e 100644 --- a/tests/utils/test_vobject.py +++ b/tests/utils/test_vobject.py @@ -1,11 +1,5 @@ # -*- coding: utf-8 -*- -''' - tests.utils.vobject - ~~~~~~~~~~~~~~~~ - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' from textwrap import dedent import icalendar diff --git a/vdirsyncer/__init__.py b/vdirsyncer/__init__.py index 8d96b14..e3de494 100644 --- a/vdirsyncer/__init__.py +++ b/vdirsyncer/__init__.py @@ -1,13 +1,6 @@ # -*- coding: utf-8 -*- ''' - vdirsyncer - ~~~~~~~~~~ - - vdirsyncer is a synchronization tool for vdir. See the README for more - details. - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. +vdirsyncer is a synchronization tool for vdir. See the README for more details. ''' __version__ = '0.4.1' diff --git a/vdirsyncer/cli/__init__.py b/vdirsyncer/cli/__init__.py index 070d70a..17970f0 100644 --- a/vdirsyncer/cli/__init__.py +++ b/vdirsyncer/cli/__init__.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.cli - ~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import functools import sys diff --git a/vdirsyncer/cli/tasks.py b/vdirsyncer/cli/tasks.py index 5a336a8..20960b8 100644 --- a/vdirsyncer/cli/tasks.py +++ b/vdirsyncer/cli/tasks.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.cli.tasks - ~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import functools import json diff --git a/vdirsyncer/cli/utils.py b/vdirsyncer/cli/utils.py index d652c6b..dcb51e1 100644 --- a/vdirsyncer/cli/utils.py +++ b/vdirsyncer/cli/utils.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.cli.utils - ~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import errno import hashlib diff --git a/vdirsyncer/doubleclick.py b/vdirsyncer/doubleclick.py index b2db1f1..ff3fcef 100644 --- a/vdirsyncer/doubleclick.py +++ b/vdirsyncer/doubleclick.py @@ -1,26 +1,18 @@ # -*- coding: utf-8 -*- ''' - vdirsyncer.doubleclick - ~~~~~~~~~~~~~~~~~~~~~~ +Utilities for writing threaded applications with click: - Utilities for writing threaded applications with click. +- There is a global ``ctx`` object to be used. - Two objects are useful: +- The ``click`` object's attributes are supposed to be used instead of the + click package's content. - - There is a global ``ctx`` object to be used. + - It wraps some UI functions such that they don't produce overlapping + output or prompt the user at the same time. - - The ``click`` object's attributes are supposed to be used instead of the - click package's content. - - - It wraps some UI functions such that they don't produce overlapping - output or prompt the user at the same time. - - - It wraps BaseCommand subclasses such that their invocation changes the - ctx global, and also changes the shortcut decorators to use the new - classes. - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. + - It wraps BaseCommand subclasses such that their invocation changes the + ctx global, and also changes the shortcut decorators to use the new + classes. ''' import functools diff --git a/vdirsyncer/exceptions.py b/vdirsyncer/exceptions.py index d5b4712..a4d960e 100644 --- a/vdirsyncer/exceptions.py +++ b/vdirsyncer/exceptions.py @@ -1,13 +1,7 @@ # -*- coding: utf-8 -*- ''' - vdirsyncer.exceptions - ~~~~~~~~~~~~~~~~~~~~~ - - Contains exception classes used by vdirsyncer. Not all exceptions are here, - only the most commonly used ones. - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. +Contains exception classes used by vdirsyncer. Not all exceptions are here, +only the most commonly used ones. ''' diff --git a/vdirsyncer/log.py b/vdirsyncer/log.py index 3c2a779..68110a9 100644 --- a/vdirsyncer/log.py +++ b/vdirsyncer/log.py @@ -1,11 +1,5 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.log - ~~~~~~~~~~~~~~ - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import logging import sys diff --git a/vdirsyncer/storage/__init__.py b/vdirsyncer/storage/__init__.py index 672a5dd..c2422c3 100644 --- a/vdirsyncer/storage/__init__.py +++ b/vdirsyncer/storage/__init__.py @@ -1,15 +1,9 @@ # -*- coding: utf-8 -*- ''' - vdirsyncer.storage - ~~~~~~~~~~~~~~~~~~ - - There are storage classes which control the access to one vdir-collection - and offer basic CRUD-ish methods for modifying those collections. The exact - interface is described in `vdirsyncer.storage.base`, the `Storage` class - should be a superclass of all storage classes. - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. +There are storage classes which control the access to one vdir-collection and +offer basic CRUD-ish methods for modifying those collections. The exact +interface is described in `vdirsyncer.storage.base`, the `Storage` class should +be a superclass of all storage classes. ''' from .dav import CaldavStorage, CarddavStorage diff --git a/vdirsyncer/storage/base.py b/vdirsyncer/storage/base.py index 0ff4aee..52a9c1f 100644 --- a/vdirsyncer/storage/base.py +++ b/vdirsyncer/storage/base.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.storage.base - ~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import functools diff --git a/vdirsyncer/storage/dav.py b/vdirsyncer/storage/dav.py index fa63f63..2f64bc8 100644 --- a/vdirsyncer/storage/dav.py +++ b/vdirsyncer/storage/dav.py @@ -1,11 +1,5 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.storage.dav - ~~~~~~~~~~~~~~~~~~~~~~ - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import datetime from lxml import etree diff --git a/vdirsyncer/storage/filesystem.py b/vdirsyncer/storage/filesystem.py index 8d0a616..b8d81db 100644 --- a/vdirsyncer/storage/filesystem.py +++ b/vdirsyncer/storage/filesystem.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.storage.filesystem - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import errno import os diff --git a/vdirsyncer/storage/http.py b/vdirsyncer/storage/http.py index d3e7498..bcad99c 100644 --- a/vdirsyncer/storage/http.py +++ b/vdirsyncer/storage/http.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.storage.http - ~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' from .base import Item, Storage from ..exceptions import NotFoundError diff --git a/vdirsyncer/storage/memory.py b/vdirsyncer/storage/memory.py index 87ef77d..90d0767 100644 --- a/vdirsyncer/storage/memory.py +++ b/vdirsyncer/storage/memory.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.storage.memory - ~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import random diff --git a/vdirsyncer/storage/singlefile.py b/vdirsyncer/storage/singlefile.py index b5525f2..28d03d0 100644 --- a/vdirsyncer/storage/singlefile.py +++ b/vdirsyncer/storage/singlefile.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.storage.singlefile - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import collections import os diff --git a/vdirsyncer/sync.py b/vdirsyncer/sync.py index 117f390..825bea7 100644 --- a/vdirsyncer/sync.py +++ b/vdirsyncer/sync.py @@ -1,19 +1,13 @@ # -*- coding: utf-8 -*- ''' - vdirsyncer.sync - ~~~~~~~~~~~~~~~ +The function in `vdirsyncer.sync` can be called on two instances of `Storage` +to synchronize them. Due to the abstract API storage classes are implementing, +the two given instances don't have to be of the same exact type. This allows us +not only to synchronize a local vdir with a CalDAV server, but also synchronize +two CalDAV servers or two local vdirs. - The function in `vdirsyncer.sync` can be called on two instances of - `Storage` to synchronize them. Due to the abstract API storage classes are - implementing, the two given instances don't have to be of the same exact - type. This allows us not only to synchronize a local vdir with a CalDAV - server, but also synchronize two CalDAV servers or two local vdirs. - - The algorithm is based on the blogpost "How OfflineIMAP works" by Edward Z. - Yang. http://blog.ezyang.com/2012/08/how-offlineimap-works/ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. +The algorithm is based on the blogpost "How OfflineIMAP works" by Edward Z. +Yang. http://blog.ezyang.com/2012/08/how-offlineimap-works/ ''' import itertools diff --git a/vdirsyncer/utils/__init__.py b/vdirsyncer/utils/__init__.py index b6772dc..7b38b8a 100644 --- a/vdirsyncer/utils/__init__.py +++ b/vdirsyncer/utils/__init__.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.utils - ~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import os import threading diff --git a/vdirsyncer/utils/compat.py b/vdirsyncer/utils/compat.py index 0316c38..2d33065 100644 --- a/vdirsyncer/utils/compat.py +++ b/vdirsyncer/utils/compat.py @@ -1,11 +1,4 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.utils.compat - ~~~~~~~~~~~~~~~~~~~~~~~ - - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import sys diff --git a/vdirsyncer/utils/vobject.py b/vdirsyncer/utils/vobject.py index 14735a1..4b24053 100644 --- a/vdirsyncer/utils/vobject.py +++ b/vdirsyncer/utils/vobject.py @@ -1,11 +1,5 @@ # -*- coding: utf-8 -*- -''' - vdirsyncer.utils.vobject - ~~~~~~~~~~~~~~~~~~~~~~~~ - :copyright: (c) 2014 Markus Unterwaditzer & contributors - :license: MIT, see LICENSE for more details. -''' import hashlib from itertools import chain, tee