gh-downloader v0.0.21
Github Downloader
Why make a NPM Package instead of a shell script?
- To support different Operating Systems and have a single codebase for the project
Features
- Download any repo
- Download any file in a repo
- Download any directory in a repo
- Save the downloaded contents in any given directory
- Default download directory is the present working directory from which the command is executed
Installation
Download and Install Subversion
- Windows Installation https://tortoisesvn.net/downloads.html
- macOS Installation
brew install subversion
- Linux(Ubuntu) Installation
sudo apt install subversion
Install the npm package
npm i gh-downloader -g
Usage
ghdl -V #to get the version of the downloader
ghdl -h #to get the help menu
ghdl <url> #download in present working directory
ghdl <url> --save-here <path_to_download> #download in the given path
(or)
ghdl <url> -sh <path_to_download> #download in the given path
Examples
Downloading a repo
ghdl https://github.com/muhesh-kumar/playlist-descriptor
Downloading a repo and saving it in an arbitrary path
ghdl https://github.com/muhesh-kumar/playlist-descriptor -sh ../test/
Downloading a directory from a repo
ghdl https://github.com/muhesh-kumar/playlist-descriptor/tree/main/static
Downloading a directory from a repo and saving it in an arbitrary path
ghdl https://github.com/muhesh-kumar/playlist-descriptor/tree/main/static -sh bin/
Downloading a file from a repo
ghdl https://github.com/muhesh-kumar/playlist-descriptor/tree/main/static/style.css
Downloading a file from a repo and saving it in an arbitrary path
ghdl https://github.com/muhesh-kumar/playlist-descriptor/tree/main/static/style.css -sh ~/Desktop