download-latest


Namedownload-latest JSON
Version 0.2.0 PyPI version JSON
download
home_pagehttps://gitlab.com/jagaro/download-latest
SummaryDownload a file only if the remote file has changed.
upload_time2023-10-13 01:24:02
maintainer
docs_urlNone
authorJāgaro
requires_python>=3.7,<4.0
licenseGPL-3.0-or-later
keywords curl download wget
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Download Latest

Download a file only if the remote file has changed.

## Example

```sh
URL='https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US'
ARCHIVE="firefox.tar.bz2"

dl "$URL" "$ARCHIVE"

if [ -f "$ARCHIVE.new" ]; then
  echo "New version detected"
  tar -xjf "$ARCHIVE"
fi
```

## Install

```sh
pip install download-latest
```

[See the install guide](INSTALL.md) for more information.

## Usage

```
usage: download-latest [ -h | --help ] [OPTIONS] URL [FILE]

Download URL to FILE only if remote file has changed.

positional arguments:
  URL                url to download
  FILE               path to output (deduced if not specified, see below)

options:
  -h, --help         show this help message and exit
  -V, --version      show program's version number and exit
  -n, --dry-run      do not download (default: false)
  -f, --force        do not check for changes (default: false)
  -q, --quiet        suppress output (default: false)
  -v, --verbose      increase output (default: false)
  -c, --color        enable colorized output
  -C, --no-color     disable colorized output
  -p, --progress     enable the progress meter
  -P, --no-progress  disable the progress meter
  --backend BACKEND  how to download (default: auto)

BACKEND can be one of 'auto', 'curl', 'wget', or 'python'. If 'auto' is
selected, 'curl' will be chosen if available, then 'wget', then 'python'.

If the color or progress options are not specified, they are determined
from the TTY.

If FILE is not specified, it will be deduced by the filename part of the
URL. If no filename can be deduce, e.g., https://example.com/, then the
program will exit with an error.

Additional files may be generated:

FILE.new       present when download occured, otherwise absent
FILE.download  in-progress download
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://gitlab.com/jagaro/download-latest",
    "name": "download-latest",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "curl,download,wget",
    "author": "J\u0101garo",
    "author_email": "jagaro@dayam.org",
    "download_url": "https://files.pythonhosted.org/packages/c2/38/624a6fb4c07608f846c45f127b9589a86d3c5cbbf28ac76220b940d156d3/download_latest-0.2.0.tar.gz",
    "platform": null,
    "description": "# Download Latest\n\nDownload a file only if the remote file has changed.\n\n## Example\n\n```sh\nURL='https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US'\nARCHIVE=\"firefox.tar.bz2\"\n\ndl \"$URL\" \"$ARCHIVE\"\n\nif [ -f \"$ARCHIVE.new\" ]; then\n  echo \"New version detected\"\n  tar -xjf \"$ARCHIVE\"\nfi\n```\n\n## Install\n\n```sh\npip install download-latest\n```\n\n[See the install guide](INSTALL.md) for more information.\n\n## Usage\n\n```\nusage: download-latest [ -h | --help ] [OPTIONS] URL [FILE]\n\nDownload URL to FILE only if remote file has changed.\n\npositional arguments:\n  URL                url to download\n  FILE               path to output (deduced if not specified, see below)\n\noptions:\n  -h, --help         show this help message and exit\n  -V, --version      show program's version number and exit\n  -n, --dry-run      do not download (default: false)\n  -f, --force        do not check for changes (default: false)\n  -q, --quiet        suppress output (default: false)\n  -v, --verbose      increase output (default: false)\n  -c, --color        enable colorized output\n  -C, --no-color     disable colorized output\n  -p, --progress     enable the progress meter\n  -P, --no-progress  disable the progress meter\n  --backend BACKEND  how to download (default: auto)\n\nBACKEND can be one of 'auto', 'curl', 'wget', or 'python'. If 'auto' is\nselected, 'curl' will be chosen if available, then 'wget', then 'python'.\n\nIf the color or progress options are not specified, they are determined\nfrom the TTY.\n\nIf FILE is not specified, it will be deduced by the filename part of the\nURL. If no filename can be deduce, e.g., https://example.com/, then the\nprogram will exit with an error.\n\nAdditional files may be generated:\n\nFILE.new       present when download occured, otherwise absent\nFILE.download  in-progress download\n```\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Download a file only if the remote file has changed.",
    "version": "0.2.0",
    "project_urls": {
        "Homepage": "https://gitlab.com/jagaro/download-latest",
        "Repository": "https://gitlab.com/jagaro/download-latest"
    },
    "split_keywords": [
        "curl",
        "download",
        "wget"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c7f0681e4b8981051a72d248a689c9d54fc9827cda5f4d8a4f39214443f7853f",
                "md5": "582d7b7c169f2ae7ebf7765e7b1b9d1b",
                "sha256": "ca25d8e377b0f7be74447df7d2f6b493bfd17cbf2fd2a87d6a0e1698c5b3ec6e"
            },
            "downloads": -1,
            "filename": "download_latest-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "582d7b7c169f2ae7ebf7765e7b1b9d1b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 35081,
            "upload_time": "2023-10-13T01:24:00",
            "upload_time_iso_8601": "2023-10-13T01:24:00.203642Z",
            "url": "https://files.pythonhosted.org/packages/c7/f0/681e4b8981051a72d248a689c9d54fc9827cda5f4d8a4f39214443f7853f/download_latest-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c238624a6fb4c07608f846c45f127b9589a86d3c5cbbf28ac76220b940d156d3",
                "md5": "08ec4e222dd41e63761c8bd902167287",
                "sha256": "c0d5b94f5141b6b29ee666f48d3b80b19247a2cdf3433343a312f7b97afa6f50"
            },
            "downloads": -1,
            "filename": "download_latest-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "08ec4e222dd41e63761c8bd902167287",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 31683,
            "upload_time": "2023-10-13T01:24:02",
            "upload_time_iso_8601": "2023-10-13T01:24:02.058087Z",
            "url": "https://files.pythonhosted.org/packages/c2/38/624a6fb4c07608f846c45f127b9589a86d3c5cbbf28ac76220b940d156d3/download_latest-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-13 01:24:02",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "jagaro",
    "gitlab_project": "download-latest",
    "lcname": "download-latest"
}
        
Elapsed time: 2.99913s