22.7 Dependencies on URLs
Arbitrary files can be downloaded from the Internet and saved locally by specifying the URL. The files are saved to the package root directory, or can be renamed in the root directory, or located elsewhere under the root.
dependencies: files: - https://example.com/uluru.jpg # Download to root directory. - https://example.com/uluru.jpg: myuluru.jpg # Rename downloaded file. - https://example.com/uluru.jpg: images/ # Download into directory. - https://example.com/uluru.jpg: images/myuluru.jpg # Rename file.
A zip archive will be downloaded and unzipped automatically. If all files inside the zip archive are under a single top directory then that top directory is stripped when unzipping into the destination.
- https://example.com/abc.zip: res/ # Download, unzip, strip common root. - https://example.com/abc.zip: ./ # Download, unzip, strip common root.
A zip archive can be downloaded without unzipping it by naming the destination as a zip file:
- https://example.com/abc.zip: res/xyz.zip # Download to res/xyz.zip
A file stored on a Nextcloud server with a shared public link can be
downloaded by adding
/download to the share link, and usually then
providing a name for the file locally. This is often the scenario
where a pre-built model is being downloaded—these can be quite
- https://nextcloud.example.com/s/Xf27qo9zDyaBDGk/download: models/best.bin
Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.