{"id":18728393,"url":"https://github.com/manenko/boot-download","last_synced_at":"2025-11-12T04:30:15.887Z","repository":{"id":206078937,"uuid":"95376274","full_name":"manenko/boot-download","owner":"manenko","description":"Boot task for downloading remote files via HTTP(S).","archived":false,"fork":false,"pushed_at":"2017-07-16T20:20:12.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T14:18:00.916Z","etag":null,"topics":["boot","boot-clj","build-tool","clojure","download"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/manenko.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-06-25T17:50:14.000Z","updated_at":"2017-07-16T21:19:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"f1265515-5034-45c0-bc23-1ddc7609f5d7","html_url":"https://github.com/manenko/boot-download","commit_stats":null,"previous_names":["manenko/boot-download"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manenko%2Fboot-download","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manenko%2Fboot-download/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manenko%2Fboot-download/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manenko%2Fboot-download/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manenko","download_url":"https://codeload.github.com/manenko/boot-download/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239599077,"owners_count":19665911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boot","boot-clj","build-tool","clojure","download"],"created_at":"2024-11-07T14:21:03.126Z","updated_at":"2025-11-12T04:30:15.465Z","avatar_url":"https://github.com/manenko.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"=============\nboot-download\n=============\n\n|clojars|  |license|\n\n`Boot`_ task to download a file from the given url.\n\n\n-----\nTasks\n-----\n\n.. code-block:: clojure\n\n   (download-file [u url         VAL str \"The location of the remote file.\"\n                   o output-file VAL str \"The location used to save the file. Optional.\"])\n\nDownloads a single file from the given url and adds it to the fileset\nas an asset.\n\nIf the output file path is not set then the task will get the file\nname from the url and store the file under that name in the fileset\nroot directory.\n\n    .. caution::\n       The task will fail if the :code:`output-file` was not specified AND the\n       url has parameters (i.e. :code:`http://example.org/file?p=foo\u0026q=bar`).\n\n\n---------\nFunctions\n---------\n\n~~~~~~~~~~~~~~~~~~~~~~~~\nget-all-downloaded-files\n~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block:: clojure\n\n   (get-all-downloaded-files [fileset])\n\nGets a seq of files (as :code:`TmpFile` objects) downloaded by the\n:code:`download-file` task.\n\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\nget-all-files-downloaded-from\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code-block:: clojure\n\n   (get-all-files-downloaded-from [fileset url])\n\nGets a seq of files (as :code:`TmpFile` objects) downloaded from the\ngiven url by the :code:`download-file` task.\n\nIt could happen that the :code:`fileset` has a few files downloaded\nfrom the same url. That's why this function returns a seq instead of a\nsingle object (or :code:`nil`). The sequence will be empty, if there\nis no files downloaded from the given url.\n\nYou can use this function to get :code:`TmpFile` of the downloaded\nfile, when you don't know its path, i.e. you didn't provide\n:code:`output-file` option.\n\n\n~~~~~~~~~~~~~~~~\nget-download-url\n~~~~~~~~~~~~~~~~\n\n.. code-block:: clojure\n\n   (get-download-url [tmpfile])\n\nGets a url the given :code:`TmpFile` was downloaded from.\n\n\n-----\nUsage\n-----\n\n~~~~~~~~~~\nbuild.boot\n~~~~~~~~~~\n\n.. code-block:: clojure\n\n   (deftask download-electron\n     []\n     (let [root \"https://github.com/electron/electron/releases/download\"]\n       (comp\n        (download-file :url         (str root \"/v1.7.4/electron-v1.7.4-linux-x64.zip\")\n                       :output-file \"downloads/electron-v1.7.4-linux-x64.zip\")\n        (extract-from-zip :archive    \"downloads/electron-v1.7.4-linux-x64.zip\"\n                          :output-dir \"extracted/electron/v1.7.4/linux-x64\")\n        (target))))\n\n\n~~~~~~~\nConsole\n~~~~~~~\n\nDownload a file and save it in target directory:\n\n.. code-block:: text\n\n    boot download-file --url https://raw.githubusercontent.com/manenko/boot-download/master/README.rst --output-file downloads/doc/boot-download.rst target\n\n\n-------\nLicense\n-------\n\nCopyright © 2017 Oleksandr Manenko.\n\nDistributed under the Eclipse Public License either version 1.0 or (at your option) any later version.\n\n.. _Boot: https://github.com/boot-clj/boot\n\n.. |clojars| image:: https://img.shields.io/clojars/v/manenko/boot-download.svg\n    :alt: Clojars\n    :scale: 100%\n    :target: https://clojars.org/manenko/boot-download\n\n.. |license| image:: https://img.shields.io/badge/License-EPL%201.0-red.svg\n    :alt: License: EPL-1.0\n    :scale: 100%\n    :target: https://opensource.org/licenses/EPL-1.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanenko%2Fboot-download","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanenko%2Fboot-download","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanenko%2Fboot-download/lists"}