<commit_before>======================================================
Nuxeo Drive - Desktop synchronization client for Nuxeo
======================================================

This is an ongoing development project for desktop synchronization
of local folders with remote Nuxeo workspaces.

Watch this `screencast`_ to get 6 min overview of this project.

.. _`screencast`: http://www.nuxeo.com/blog/development/2013/04/nuxeo-drive-desktop-synchronization/

See `USERDOC/Nuxeo Drive <http://doc.nuxeo.com/x/04HQ>`_ for complete up-to-date documentation.


License
=======

The source code of Nuxeo Drive is available under the
GNU Lesser General Public License v2.1 described in LICENSE.txt.

Though, Nuxeo Drive depends on the `PyQt <http://www.riverbankcomputing.co.uk/software/pyqt/intro>`_ component that is available
under the following licenses:

- GNU General Public License v2
- GNU General Public License v3
- PyQt Commercial License
- PyQt Embedded License

Therefore the binary packages resulting of the assembly of the
Nuxeo Drive source code and all the third-party libraries that it
depends on, among which PyQt, are available under one of the licenses
listed above. Indeed, the binary packages are subject to the licenses
of the sources from which they have been built. As the GNU General
Public Licenses and the PyQt Commercial License are stronger than the
GNU Lesser General Public License, these are the ones that apply.

Thus any code written on the top of Nuxeo Drive must be distributed
under the terms of one of the licenses available for PyQt.


Install
=======

Installing Nuxeo Drive needs two components: a server addon for Nuxeo and a
desktop program on the user's computer.


Server-side marketplace package
-------------------------------

**Stable releases for Nuxeo Drive** are available as a marketplace package from Nuxeo Connect:

  https://connect.nuxeo.com/nuxeo/site/marketplace/package/nuxeo-drive

You can also fetch the **latest development version** of the
`marketplace package <http://qa.nuxeo.org/jenkins/job/addons_nuxeo-drive-master-marketplace>`_
for the Nuxeo master branch from the Continuous Integration server (use at your own risk).

The marketplace package can be installed using the Admin Center /
Update Center / Local Packages interface of a Nuxeo server.

Alternatively, from the command line::

  $NUXEO_HOME/bin/nuxeoctl stop
  $NUXEO_HOME/bin/nuxeoctl mp-install --nodeps marketplace-<version>.zip
  $NUXEO_HOME/bin/nuxeoctl start


Windows Desktop Client
----------------------

Once the marketplace package is installed, the windows desktop client package
can be downloaded from the ``Home > Nuxeo Drive`` tab.

You can also fetch the latest development version for
``nuxeo-drive-<version>-win32.msi``
windows installer from the `Continuous Integration <http://qa.nuxeo.org/jenkins/job/nuxeo-drive-msi/>`_.

Once you installed the package (Administrator rights required) the new folder
holding the ``ndrive.exe`` and ``ndrivew.exe`` programs will be added to your
``Path`` environment variable automatically.

You can start the ``Nuxeo Drive`` program from the "Start..." menu.

All the necessary dependencies (such as the Python interpreter and the QT /
PyQt for the client side user interface) are included in this folder and
should not impact any alternative version possibly already installed on your
computer.


Mac OSX Desktop Client
----------------------

Once the marketplace package is installed, the OSX desktop client package
can be downloaded from the ``Home > Nuxeo Drive`` tab.

You can also fetch the latest development version for
`OS X
<https://qa.nuxeo.org/jenkins/job/nuxeo-drive-dmg>`_
from the Continous Integration.


Ubuntu/Debian (and other Linux variants) Client
-----------------------------------------------
The ``.deb`` package of the client is not yet available. In the mean time you can install it from source.

First note that Nuxeo Drive uses `Extended file attributes <http://en.wikipedia.org/wiki/Extended_file_attributes>`_ through the `xattr <https://pypi.python.org/pypi/xattr/>`_ Python wrapper.

On Linux, FreeBSD, and Mac OS X, xattrs are enabled in the default kernel.

On Linux, depending on the distribution, you may need a special mount option (user_xattr) to enable them for a given file system, e.g.::

    sudo mount -oremount,user_xattr /dev/sda3

Then install the required system and Python packages and the Nuxeo Drive code itself::

    sudo apt-get install python-pip python-dev python-qt4 libffi-dev
    sudo pip install -U -r https://raw.github.com/nuxeo/nuxeo-drive/master/requirements.txt
    sudo pip install -U -r https://raw.github.com/nuxeo/nuxeo-drive/master/unix-requirements.txt
    sudo pip install -U git+https://github.com/nuxeo/nuxeo-drive.git

Waiting for `NXP-13633 <https://jira.nuxeo.com/browse/NXP-13633>`_ to be resolved you need to run this command for Nuxeo Drive to work fine::

    sudo mkdir /usr/local/lib/python2.7/dist-packages/alembic/versions

Waiting for `NXDRIVE-62 <https://jira.nuxeo.com/browse/NXDRIVE-62>`_ to be resolved you need to run these commands for Nuxeo Drive to work fine::

    # increase inotify file watch limit
    ofile=/proc/sys/fs/inotify/max_user_instances
    sudo sh -c "echo 8192 > $ofile"
    cat $ofile


Configuration and usage
=======================

Regular usage
-------------

1. Launch the Nuxeo Drive program (e.g. from the start menu under Windows).

2. A new icon should open in the system tray and a popup menu should open asking
   the user for the URL of the Nuxeo server and credentials.

3. In the Nuxeo web interface, mark workspaces and folders for synchronization.<commit_msg>NXDRIVE-219: Update Linux installation procedure<commit_after>======================================================
Nuxeo Drive - Desktop synchronization client for Nuxeo
======================================================

This is an ongoing development project for desktop synchronization
of local folders with remote Nuxeo workspaces.

Watch this `screencast`_ to get 6 min overview of this project.

.. _`screencast`: http://www.nuxeo.com/blog/development/2013/04/nuxeo-drive-desktop-synchronization/

See `USERDOC/Nuxeo Drive <http://doc.nuxeo.com/x/04HQ>`_ for complete up-to-date documentation.


License
=======

The source code of Nuxeo Drive is available under the
GNU Lesser General Public License v2.1 described in LICENSE.txt.

Though, Nuxeo Drive depends on the `PyQt <http://www.riverbankcomputing.co.uk/software/pyqt/intro>`_ component that is available
under the following licenses:

- GNU General Public License v2
- GNU General Public License v3
- PyQt Commercial License
- PyQt Embedded License

Therefore the binary packages resulting of the assembly of the
Nuxeo Drive source code and all the third-party libraries that it
depends on, among which PyQt, are available under one of the licenses
listed above. Indeed, the binary packages are subject to the licenses
of the sources from which they have been built. As the GNU General
Public Licenses and the PyQt Commercial License are stronger than the
GNU Lesser General Public License, these are the ones that apply.

Thus any code written on the top of Nuxeo Drive must be distributed
under the terms of one of the licenses available for PyQt.


Install
=======

Installing Nuxeo Drive needs two components: a server addon for Nuxeo and a
desktop program on the user's computer.


Server-side marketplace package
-------------------------------

**Stable releases for Nuxeo Drive** are available as a marketplace package from Nuxeo Connect:

  https://connect.nuxeo.com/nuxeo/site/marketplace/package/nuxeo-drive

You can also fetch the **latest development version** of the
`marketplace package <http://qa.nuxeo.org/jenkins/job/addons_nuxeo-drive-master-marketplace>`_
for the Nuxeo master branch from the Continuous Integration server (use at your own risk).

The marketplace package can be installed using the Admin Center /
Update Center / Local Packages interface of a Nuxeo server.

Alternatively, from the command line::

  $NUXEO_HOME/bin/nuxeoctl stop
  $NUXEO_HOME/bin/nuxeoctl mp-install --nodeps marketplace-<version>.zip
  $NUXEO_HOME/bin/nuxeoctl start


Windows Desktop Client
----------------------

Once the marketplace package is installed, the windows desktop client package
can be downloaded from the ``Home > Nuxeo Drive`` tab.

You can also fetch the latest development version for
``nuxeo-drive-<version>-win32.msi``
windows installer from the `Continuous Integration <http://qa.nuxeo.org/jenkins/job/nuxeo-drive-msi/>`_.

Once you installed the package (Administrator rights required) the new folder
holding the ``ndrive.exe`` and ``ndrivew.exe`` programs will be added to your
``Path`` environment variable automatically.

You can start the ``Nuxeo Drive`` program from the "Start..." menu.

All the necessary dependencies (such as the Python interpreter and the QT /
PyQt for the client side user interface) are included in this folder and
should not impact any alternative version possibly already installed on your
computer.


Mac OSX Desktop Client
----------------------

Once the marketplace package is installed, the OSX desktop client package
can be downloaded from the ``Home > Nuxeo Drive`` tab.

You can also fetch the latest development version for
`OS X
<https://qa.nuxeo.org/jenkins/job/nuxeo-drive-dmg>`_
from the Continous Integration.


Ubuntu/Debian (and other Linux variants) Client
-----------------------------------------------
The ``.deb`` package of the client is not yet available. In the mean time you can install it from source.

First note that Nuxeo Drive uses `Extended file attributes <http://en.wikipedia.org/wiki/Extended_file_attributes>`_ through the `xattr <https://pypi.python.org/pypi/xattr/>`_ Python wrapper.

On Linux, FreeBSD, and Mac OS X, xattrs are enabled in the default kernel.

On Linux, depending on the distribution, you may need a special mount option (user_xattr) to enable them for a given file system, e.g.::

    sudo mount -oremount,user_xattr /dev/sda3

Then install the required system and Python packages and the Nuxeo Drive code itself::

    sudo apt-get install python-pip python-dev python-qt4 libffi-dev
    sudo pip install -U -r https://raw.github.com/nuxeo/nuxeo-drive/master/requirements.txt
    sudo pip install -U -r https://raw.github.com/nuxeo/nuxeo-drive/master/unix-requirements.txt
    sudo pip install -U git+https://github.com/nuxeo/nuxeo-drive.git

Waiting for `NXDRIVE-62 <https://jira.nuxeo.com/browse/NXDRIVE-62>`_ to be resolved you need to run these commands for Nuxeo Drive to work fine::

    # increase inotify file watch limit
    ofile=/proc/sys/fs/inotify/max_user_instances
    sudo sh -c "echo 8192 > $ofile"
    cat $ofile


Configuration and usage
=======================

Regular usage
-------------

1. Launch the Nuxeo Drive program (e.g. from the start menu under Windows).

2. A new icon should open in the system tray and a popup menu should open asking
   the user for the URL of the Nuxeo server and credentials.

3. In the Nuxeo web interface, mark workspaces and folders for synchronization.
{'fraction_non_alphanumeric': 0.11638316920322292, 'fraction_numerical': 0.0063563115487914055, 'mean_word_length': 3.8717836894897513, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 30, 'https://': 15, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6359323', 'n_tokens_mistral': 3349, 'n_tokens_neox': 3022, 'n_words': 1353}