Removes the specified resource or the download directory.
Removes the specified resource or the download directory.
(defprofile name profile)Defines a cavia profile.
e.g.:
(defprofile prof
{:resources [{:id :resource1
:url "http://example.com/resource1"
:sha256 "0123456789abcdef01234567890abcdef01234567890abcdef01234567890abc"}
{:id :resource2
:url "http://example.com/resource2"
:sha1 "123456789abcdef01234567890abcdef01234567"
:auth {:type :basic, :user "user", :password "password"}}
{:id :resource3
:url "ftp://example.com/resource3"
:sha256 "23456789abcdef01234567890abcdef01234567890abcdef01234567890abcde"
:auth {:user "user", :password "password"}}
{:id :resource4
:url "https://bucket-name.s3.region.amazonaws.com/resource4"
:sha1 "3456789abcdef01234567890abcdef0123456789"
:protocol :s3
:auth {:access-key-id "accesskey", :secret-access-key "secretkey"}}
{:id :resource5
:url "http://example.com/resource5.gz"
:sha512 "456789abcdef01234567890abcdef0123456789abcdef01234567890abcdef01234567890abcdebcdef01234567890abcdef01234567890abcdebcdef0123456"
:packed :gzip}]
:download-to ".cavia"})
Defines a cavia profile.
e.g.:
(defprofile prof
{:resources [{:id :resource1
:url "http://example.com/resource1"
:sha256 "0123456789abcdef01234567890abcdef01234567890abcdef01234567890abc"}
{:id :resource2
:url "http://example.com/resource2"
:sha1 "123456789abcdef01234567890abcdef01234567"
:auth {:type :basic, :user "user", :password "password"}}
{:id :resource3
:url "ftp://example.com/resource3"
:sha256 "23456789abcdef01234567890abcdef01234567890abcdef01234567890abcde"
:auth {:user "user", :password "password"}}
{:id :resource4
:url "https://bucket-name.s3.region.amazonaws.com/resource4"
:sha1 "3456789abcdef01234567890abcdef0123456789"
:protocol :s3
:auth {:access-key-id "accesskey", :secret-access-key "secretkey"}}
{:id :resource5
:url "http://example.com/resource5.gz"
:sha512 "456789abcdef01234567890abcdef0123456789abcdef01234567890abcdef01234567890abcdebcdef01234567890abcdef01234567890abcdebcdef0123456"
:packed :gzip}]
:download-to ".cavia"})Returns true if the specified resource exists on local.
Returns true if the specified resource exists on local.
Downloads missing resources to the local directory.
Downloads missing resources to the local directory.
Returns the local path of the specified resource. Returns nil if the resource is not defined in your profile. Note that this function will return the path even if the resource has not been downloaded yet.
Returns the local path of the specified resource. Returns nil if the resource is not defined in your profile. Note that this function will return the path even if the resource has not been downloaded yet.
Returns true if the resource's real hash is same as the defined hash.
Returns true if the resource's real hash is same as the defined hash.
Checks existence and hash of the downloaded resource, printing alert message when the resource does not exist or the hash is invalid.
Checks existence and hash of the downloaded resource, printing alert message when the resource does not exist or the hash is invalid.
(with-profile profile & body)The specified profile will be used in cavia processes when each profile will not be provided.
e.g.:
(with-profile prof
(cavia/clean!)
(cavia/get!))
The specified profile will be used in cavia processes when each profile will
not be provided.
e.g.:
(with-profile prof
(cavia/clean!)
(cavia/get!))(with-verbosity m & body)Controls verbosity of normal :message or :download progress or both. Take
care that with-verbosity cannot control error and warning messages.
For example, the following code suppresses normal messages but displays download progress.
(with-verbosity {:message false
:download true}
(cavia/get!))
Controls verbosity of normal `:message` or `:download` progress or both. Take
care that `with-verbosity` cannot control error and warning messages.
For example, the following code suppresses normal messages but displays
download progress.
(with-verbosity {:message false
:download true}
(cavia/get!))(without-print & body)DEPRECATED: use cavia.core/with-verbosity instead.
Restrains printing log, progress, and other messages. Take care that it does not restrain error and warning messages.
DEPRECATED: use `cavia.core/with-verbosity` instead. Restrains printing log, progress, and other messages. Take care that it does not restrain error and warning messages.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |