watchsync


Namewatchsync JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/rlizana/watchsync
SummaryA Python-based tool for real-time file monitoring and synchronization, designed to replicate changes between local or remote locations.
upload_time2025-01-06 12:37:39
maintainerNone
docs_urlNone
authorRoberto Lizana
requires_python<4.0,>=3.12
licenseAGPL-3.0
keywords rsync watchdog real-time synchronization watchfiles sync inotify file monitoring file synchronization file replication file sync file watcher
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# WatchSync

WatchSync is a tool for synchronizing files when they are created or modified across different storage locations. A file can also be a local directory that, when detected as modified or created, is synchronized with the configured storage locations. A storage location can be a local or remote directory where a copy of the files will be sent.

The purpose of this tool is to have a backup of files in different storage locations to avoid losing important information. It is a file replication solution that is very easy to configure and use.

## Features

- Automatic synchronization of files and directories.
- Support for multiple local and remote storage locations.
- Easy to configure and use.
- Uses `rsync` for efficient file synchronization.

## Installation

### Requirements

WatchSync uses `rsync` for file synchronization, so it must be installed on the system. On Debian-based systems, it can be installed with the following command:

```bash
sudo apt install rsync
```

### As a package
Install the package with pip:
```bash
pip install watchsync
```

### From source code
Clone the repository:
```bash
git clone https://github.com/rlizana/watchsync.git
cd watchsync
```

Install dependencies and build the package:
```bash
poetry install
```

Install the package globally:
```bash
poetry build
pip install dist/watchsync-*.whl
```

## Usage

WatchSync uses a daemon to monitor file changes and synchronize them with storage locations. A storage location can be a local directory, a remote server, or a git repository.

To start the daemon, use `watchsync start`, and to stop it, use `watchsync stop`. If you want to restart the daemon to reread configuration changes, use `watchsync reload`.

### Storage Locations
To manage storage locations, use the command `watchsync store`.

You can list storage locations with `watchsync store list`, add a storage location with `watchsync store add NAME TYPE PATH`, and remove one with `watchsync store del NAME`.

Alternatively, you can edit the configuration file `~/.config/watchsync/config.yaml` to add storage locations manually, but note that the daemon will not pick up changes until you restart it after making modifications.

### Files
To manage the files being monitored, use the command `watchsync file`.

You can list files with `watchsync file list`, add a file with `watchsync file add PATH`, and remove a file with `watchsync file del PATH`.

## Development

This project is developed using TDD. Therefore, any changes or improvements to be added must first include a failing unit test, and then the necessary code must be written to make the test pass.

Install the development dependencies:
```bash
poetry install --with dev
poetry run pre-commit install
```

To run unit tests:
```bash
poetry run python3 -m unittest discover -s tests
```

With coverage:
```bash
poetry run coverage run -m unittest discover -s tests
poetry run coverage report
```
Or you can run the command
```bash
poetry run watchsync
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rlizana/watchsync",
    "name": "watchsync",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "rsync, watchdog, real-time, synchronization, watchfiles, sync, inotify, file monitoring, file synchronization, file replication, file sync, file watcher",
    "author": "Roberto Lizana",
    "author_email": "rober.lizana@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/e8/e4/b98e102988f769a0adf45fab8602fe53fb156c656f0fc7dbcc6aeb6b2d92/watchsync-0.1.1.tar.gz",
    "platform": null,
    "description": "\n# WatchSync\n\nWatchSync is a tool for synchronizing files when they are created or modified across different storage locations. A file can also be a local directory that, when detected as modified or created, is synchronized with the configured storage locations. A storage location can be a local or remote directory where a copy of the files will be sent.\n\nThe purpose of this tool is to have a backup of files in different storage locations to avoid losing important information. It is a file replication solution that is very easy to configure and use.\n\n## Features\n\n- Automatic synchronization of files and directories.\n- Support for multiple local and remote storage locations.\n- Easy to configure and use.\n- Uses `rsync` for efficient file synchronization.\n\n## Installation\n\n### Requirements\n\nWatchSync uses `rsync` for file synchronization, so it must be installed on the system. On Debian-based systems, it can be installed with the following command:\n\n```bash\nsudo apt install rsync\n```\n\n### As a package\nInstall the package with pip:\n```bash\npip install watchsync\n```\n\n### From source code\nClone the repository:\n```bash\ngit clone https://github.com/rlizana/watchsync.git\ncd watchsync\n```\n\nInstall dependencies and build the package:\n```bash\npoetry install\n```\n\nInstall the package globally:\n```bash\npoetry build\npip install dist/watchsync-*.whl\n```\n\n## Usage\n\nWatchSync uses a daemon to monitor file changes and synchronize them with storage locations. A storage location can be a local directory, a remote server, or a git repository.\n\nTo start the daemon, use `watchsync start`, and to stop it, use `watchsync stop`. If you want to restart the daemon to reread configuration changes, use `watchsync reload`.\n\n### Storage Locations\nTo manage storage locations, use the command `watchsync store`.\n\nYou can list storage locations with `watchsync store list`, add a storage location with `watchsync store add NAME TYPE PATH`, and remove one with `watchsync store del NAME`.\n\nAlternatively, you can edit the configuration file `~/.config/watchsync/config.yaml` to add storage locations manually, but note that the daemon will not pick up changes until you restart it after making modifications.\n\n### Files\nTo manage the files being monitored, use the command `watchsync file`.\n\nYou can list files with `watchsync file list`, add a file with `watchsync file add PATH`, and remove a file with `watchsync file del PATH`.\n\n## Development\n\nThis project is developed using TDD. Therefore, any changes or improvements to be added must first include a failing unit test, and then the necessary code must be written to make the test pass.\n\nInstall the development dependencies:\n```bash\npoetry install --with dev\npoetry run pre-commit install\n```\n\nTo run unit tests:\n```bash\npoetry run python3 -m unittest discover -s tests\n```\n\nWith coverage:\n```bash\npoetry run coverage run -m unittest discover -s tests\npoetry run coverage report\n```\nOr you can run the command\n```bash\npoetry run watchsync\n```\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0",
    "summary": "A Python-based tool for real-time file monitoring and synchronization, designed to replicate changes between local or remote locations.",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/rlizana/watchsync",
        "Repository": "https://github.com/rlizana/watchsync"
    },
    "split_keywords": [
        "rsync",
        " watchdog",
        " real-time",
        " synchronization",
        " watchfiles",
        " sync",
        " inotify",
        " file monitoring",
        " file synchronization",
        " file replication",
        " file sync",
        " file watcher"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "830cd53c4c11e17798911ff560c37589397c574271917dd48096c699dab8fda1",
                "md5": "882dbf52d5906bb7bd890bb755802892",
                "sha256": "633cc94c55a1ba8616cf7b0b759a5259e9b5eab737d3dca54488ea9a975cdc1a"
            },
            "downloads": -1,
            "filename": "watchsync-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "882dbf52d5906bb7bd890bb755802892",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 31137,
            "upload_time": "2025-01-06T12:37:36",
            "upload_time_iso_8601": "2025-01-06T12:37:36.493348Z",
            "url": "https://files.pythonhosted.org/packages/83/0c/d53c4c11e17798911ff560c37589397c574271917dd48096c699dab8fda1/watchsync-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e8e4b98e102988f769a0adf45fab8602fe53fb156c656f0fc7dbcc6aeb6b2d92",
                "md5": "f53a9c046e38a6c8595391f101388df5",
                "sha256": "f9c6a13011340672e511bde108c41120d53f799aa416196fb13905d6bb4d99a7"
            },
            "downloads": -1,
            "filename": "watchsync-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "f53a9c046e38a6c8595391f101388df5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 48246,
            "upload_time": "2025-01-06T12:37:39",
            "upload_time_iso_8601": "2025-01-06T12:37:39.264494Z",
            "url": "https://files.pythonhosted.org/packages/e8/e4/b98e102988f769a0adf45fab8602fe53fb156c656f0fc7dbcc6aeb6b2d92/watchsync-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-06 12:37:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rlizana",
    "github_project": "watchsync",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "watchsync"
}
        
Elapsed time: 0.41751s