Go to file
2016-03-22 16:05:51 -07:00
bin Move tests into tests dir in package root 2016-01-30 09:22:38 -05:00
docs Add travis note to pypi notes 2013-11-06 15:00:36 -05:00
examples Use simplified imports 2013-07-04 23:25:29 -04:00
resync fixed conflict when using str as argument of ListBase.parse 2016-03-22 16:05:51 -07:00
tests Hack for py2.6 2016-03-07 14:56:42 -05:00
.gitignore First pass at python3 compatibility 2016-03-07 11:15:01 -05:00
.travis.yml Remember to install extra stuff for tests... 2016-03-07 12:14:47 -05:00
CHANGES.md Use defusedxml for safer XML parsing 2016-01-30 08:52:55 -05:00
LICENSE.txt Add Apache License 2.0 2013-05-08 16:37:48 -04:00
MANIFEST.in created init skeleton 2012-12-05 15:43:58 -05:00
README Fix travis-ci link 2016-03-22 16:04:44 -07:00
README.rst See what .rst does on github... 2013-05-09 11:11:22 -04:00
setup.py Add 3.x for travis and coveralls 2016-03-07 11:56:23 -05:00
TODO.md Add better support for links in Resource objects 2014-06-18 14:23:51 +03:00

======
resync
======

.. image:: https://travis-ci.org/resync/resync.png?branch=master
  :target: https://travis-ci.org/resync/resync
  :alt: Build status

**resync** is a ResourceSync client and library in python. `ResourceSync 
<http://www.openarchives.org/rs/>`_ is a synchronization framework for 
the web consisting of various capabilities that allow third party 
systems to remain synchronized with a server's evolving resources. 
The capabilities can be combined in a modular manner to meet local 
or community requirements.

Client usage
------------

Typical client usage to synchronize from a source at 
``http://source.example.com/`` to a set of local files would be::

    resync http://source.example.com/

which will create or update a local directory ``./source.example.com``. 
Alternatively, the destination directory may be specified explicitly::

    resync http://source.example.com/ /tmp/my_copy

Option details and a number of different modes are described with::

    resync -h

Library usage
-------------

Typical library use in a source (create and output a Resource List)::

    from resync import Resource,ResourceList

    rl = ResourceList()
    rl.add( Resource('http://example.com/res1', lastmod='2013-01-01') )
    rl.add( Resource('http://example.com/res2', lastmod='2013-01-02') )
    print rl.as_xml()

Typical library use in a destination (get and examine a Capability List):: 

    from resync import CapabilityList

    # Read Capability List and show supported capabilities
    cl = CapabilityList()
    cl.read("https://raw.github.com/resync/resync/1.0/resync/test/testdata/examples_from_spec/resourcesync_ex_2_6.xml")
    for resource in cl:
        print "supports %s (at %s)" % (resource.capability,resource.uri)

Installation
------------

The client and library are designed to work with Python 2.6 or 2.7.

**Automatic installation**::

    easy_install resync

rsync is listed in `PyPI
<http://pypi.python.org/pypi/resync>`_ and can be installed with 
``pip`` or ``easy_install``. 

**Manual installation from github**::

    cd /tmp
    git clone git://github.com/resync/resync.git
    cd resync/
    python setup.py build
    sudo python setup.py install

This will install the library code in the appropriate place within 
your python setup, and the client ``resync`` in an appropriate system 
path (perhaps ``/usr/local/bin`` or ``/usr/bin`` depending on your system).

The source code is maintained on `Github
<https://github.com/resync/resync>`_
and there may be branches/versions available there that are not 
yet packaged for PyPI.

See also
--------

`ResourceSync simulator
<http://github.com/resync/simulator>`_

Contributors
------------

Thanks to:
`Bernhard Haslhofer
<https://github.com/behas>`_,
`Robert Sanderson
<https://github.com/azaroth42>`_

Copyright and License
---------------------

Copyright 2012--2016 Simeon Warner

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
   
See LICENSE.txt