A simple CLI tool with some utilities
Show available commands.
Download a file from the web.
NOTE:
- The
url
must point directly to the file you want to download, e.g.https://www.(...)/cat.jpg
- It should start with either
http://
orhttps://
Where to store the file. Defaults to the current directory.
NOTE:
- Prefer Unix-style paths even if you're on Windows, e.g.
~/pics/
- If the directory doesn't exist, it will be created automatically. Also works for subdirectories.
Name of the file to be downloaded. Defaults to "file".
NOTE: If you don't specify the file extension, node-baka will try to guess based on the url
. You should avoid omitting it.
Compress a local file.
NOTE:
- The
source
path must point directly to the file you want to compress, e.g.~/docs/file.txt
Where to store the compressed file. Defaults to the current directory.
Name of the compressed file. Defaults to file._extension_
.
Encrypt the compressed file with the given password.
Extract a local file.
NOTE:
- The
source
path must point directly to the file you want to extract, e.g.~/docs/file.txt.gz
Where to store the extracted file. Defaults to the current directory.
Name of the extracted file. Defaults to file._extension_
.
Decrypt the compressed file with the given password, if necessary.
npm install -g node-baka
- Clone the repo:
git clone https://github.com/diego-c/node-baka.git
- Move to the repo's directory:
cd node-baka
- Install packages:
npm install or yarn install
- With Node:
npm start [command] [options]
oryarn start [command] [options]
- As an executable script:
./src/index.js [command] [options]
To run all tests: npm test
or yarn test
Check the documentation at node-baka docs
Issues and PRs are welcome. Please write accompanying tests with your PRs if have the time.