rsyncy


Namersyncy JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://github.com/laktak/rsyncy
SummaryA status/progress bar for rsync.
upload_time2023-06-30 21:09:25
maintainer
docs_urlNone
authorChristian Zangl
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# rsyncy

A status/progress bar for [rsync](https://github.com/WayneD/rsync).

I love rsync but I always felt it was either too chatty when transferring lots of small files or did not show enough information for the large files in between. rsyncy is a wrapper to change this without having to modify rsync.

![gif of rsyncy -a a/ b](https://raw.githubusercontent.com/laktak/rsyncy/readme/readme/demo-y.gif "rsyncy -a a/ b")

## Status Bar

```
[########################::::::]  80% |      19.17G |      86.65MB/s | 0:03:18 | #306 | scan 46% (2410)\
```

The status bar shows the following information:

Description | Sample
--- | ---
Progress bar with percentage of the total transfer | `[########################::::::]  80%`
Bytes transferred | `19.17G`
Transfer speed | `86.65MB/s`
Elapsed time since starting rsync | `0:03:18`
Number of files transferred | `#306`
Files to scan/check<br>- percentage completed<br>- (number of files)<br>- spinner | `scan 46% (2410)\`

The spinner indicates that rsync is still checking if files need to be updated. Until this process completes the progress bar may decrease as new files are found.

## Limitations

Interactive ssh questions (host key, password) are happening outside of the piped content. That means that rsyncy does not know that ssh is waiting for input and will draw the status bar over it. If you have an idea on how to handle this case please let me know.

Workaround: connect once to your server via ssh to add it to the known_hosts file.

## Installation

```
pip3 install --user rsyncy

# or if you have pipx
pipx install rsyncy
```

Minimum Python version is 3.6.

On macOS you also need to `brew install rsync` because it ships with an rsync from 2006.

## Usage

`rsyncy` is a wrapper around `rsync`.

- You run `rsyncy` with the same arguments as it will pass them to `rsync` internally.
- Do not specify any `--info` arguments, rsyncy will automatically add `--info=progress2` and `-hv` internally.

```
# simple example
$ rsyncy -a FROM/ TO
```

Alternatively you can pipe the output from rsync to rsyncy (in which case you need to specify `--info=progress2 -hv` yourself).

```
$ rsync -a --info=progress2 -hv FROM/ TO | rsyncy
```

At the moment `rsyncy` itself has only one option, you can turn off colors via the `NO_COLOR=1` environment variable.



## lf support

`rsyncy-stat` can be used to view only the status output on [lf](https://github.com/gokcehan/lf) (or similar terminal file managers).

Example:

```
cmd paste-rsync %{{
    opt="$@"
    set -- $(cat ~/.local/share/lf/files)
    mode="$1"; shift
    case "$mode" in
        copy) rsyncy-stat -rltphv $opt "$@" . ;;
        move) mv -- "$@" .; lf -remote "send clear" ;;
    esac
}}
```

This shows the copy progress in the `>` line while rsync is running.

## Development

First record an rsync transfer with [pipevcr](https://github.com/laktak/pipevcr), then replay it to rsyncy when debugging.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/laktak/rsyncy",
    "name": "rsyncy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Christian Zangl",
    "author_email": "laktak@cdak.net",
    "download_url": "https://files.pythonhosted.org/packages/1a/99/145bb1c2fb5cb3e12917f23adc381739afe037939b444f132027368848cb/rsyncy-0.2.0.tar.gz",
    "platform": null,
    "description": "\n# rsyncy\n\nA status/progress bar for [rsync](https://github.com/WayneD/rsync).\n\nI love rsync but I always felt it was either too chatty when transferring lots of small files or did not show enough information for the large files in between. rsyncy is a wrapper to change this without having to modify rsync.\n\n![gif of rsyncy -a a/ b](https://raw.githubusercontent.com/laktak/rsyncy/readme/readme/demo-y.gif \"rsyncy -a a/ b\")\n\n## Status Bar\n\n```\n[########################::::::]  80% |      19.17G |      86.65MB/s | 0:03:18 | #306 | scan 46% (2410)\\\n```\n\nThe status bar shows the following information:\n\nDescription | Sample\n--- | ---\nProgress bar with percentage of the total transfer | `[########################::::::]  80%`\nBytes transferred | `19.17G`\nTransfer speed | `86.65MB/s`\nElapsed time since starting rsync | `0:03:18`\nNumber of files transferred | `#306`\nFiles to scan/check<br>- percentage completed<br>- (number of files)<br>- spinner | `scan 46% (2410)\\`\n\nThe spinner indicates that rsync is still checking if files need to be updated. Until this process completes the progress bar may decrease as new files are found.\n\n## Limitations\n\nInteractive ssh questions (host key, password) are happening outside of the piped content. That means that rsyncy does not know that ssh is waiting for input and will draw the status bar over it. If you have an idea on how to handle this case please let me know.\n\nWorkaround: connect once to your server via ssh to add it to the known_hosts file.\n\n## Installation\n\n```\npip3 install --user rsyncy\n\n# or if you have pipx\npipx install rsyncy\n```\n\nMinimum Python version is 3.6.\n\nOn macOS you also need to `brew install rsync` because it ships with an rsync from 2006.\n\n## Usage\n\n`rsyncy` is a wrapper around `rsync`.\n\n- You run `rsyncy` with the same arguments as it will pass them to `rsync` internally.\n- Do not specify any `--info` arguments, rsyncy will automatically add `--info=progress2` and `-hv` internally.\n\n```\n# simple example\n$ rsyncy -a FROM/ TO\n```\n\nAlternatively you can pipe the output from rsync to rsyncy (in which case you need to specify `--info=progress2 -hv` yourself).\n\n```\n$ rsync -a --info=progress2 -hv FROM/ TO | rsyncy\n```\n\nAt the moment `rsyncy` itself has only one option, you can turn off colors via the `NO_COLOR=1` environment variable.\n\n\n\n## lf support\n\n`rsyncy-stat` can be used to view only the status output on [lf](https://github.com/gokcehan/lf) (or similar terminal file managers).\n\nExample:\n\n```\ncmd paste-rsync %{{\n    opt=\"$@\"\n    set -- $(cat ~/.local/share/lf/files)\n    mode=\"$1\"; shift\n    case \"$mode\" in\n        copy) rsyncy-stat -rltphv $opt \"$@\" . ;;\n        move) mv -- \"$@\" .; lf -remote \"send clear\" ;;\n    esac\n}}\n```\n\nThis shows the copy progress in the `>` line while rsync is running.\n\n## Development\n\nFirst record an rsync transfer with [pipevcr](https://github.com/laktak/pipevcr), then replay it to rsyncy when debugging.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A status/progress bar for rsync.",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://github.com/laktak/rsyncy"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1a99145bb1c2fb5cb3e12917f23adc381739afe037939b444f132027368848cb",
                "md5": "8ce2ce2cee4ad56e915c61eda085e59d",
                "sha256": "f8c95c4b1b449582de860366d9c201d4f3f8fce7efec155449dfd21ffed637fa"
            },
            "downloads": -1,
            "filename": "rsyncy-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8ce2ce2cee4ad56e915c61eda085e59d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6546,
            "upload_time": "2023-06-30T21:09:25",
            "upload_time_iso_8601": "2023-06-30T21:09:25.974648Z",
            "url": "https://files.pythonhosted.org/packages/1a/99/145bb1c2fb5cb3e12917f23adc381739afe037939b444f132027368848cb/rsyncy-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-30 21:09:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "laktak",
    "github_project": "rsyncy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rsyncy"
}
        
Elapsed time: 0.12091s