Commit 4ad31a54 by Luc Didry

Display help if no useful options provided (ie no download/upload/etc)

parent 6041bdab
# Main developper
- Luc Didry, <https://fiat-tux.fr>, <https://luc.frama.io>, on [Diaspora*](https://framasphere.org/people/b13eb6b0beac0131e7e32a0000053625)
- Luc Didry, <https://fiat-tux.fr>, <https://luc.frama.io>, on [Diaspora*](https://framasphere.org/people/b13eb6b0beac0131e7e32a0000053625), on [Mastodon](https://framapiaf.org/@framasky)
# Contributor
- ValVin, <https://blog.valvin.fr>, on [Diaspora*](https://framasphere.org/people/1f5811905567013347142a0000053625), on [Twitter](https://twitter.com/_valvin)
- ValVin, <https://blog.valvin.fr>, on [Diaspora*](https://framasphere.org/people/1f5811905567013347142a0000053625), on [Twitter](https://twitter.com/_valvin), on [Mastodon](https://framapiaf.org/@valvin)
Revision history for Lufi cli program
0.0.2 2017-07-20
- Update README instructions
- Display help if no useful options provided (ie no download/upload/etc)
0.0.1 2017-07-19
- Download files
- Upload files
......
......@@ -5,19 +5,19 @@ You will need NodeJS for it to work.
## How to install
It will be available as a NPM package, so you will just have to do:
It is available as a NPM package, so you will just have to do:
```
npm install -g lufi
npm install -g lufi-cli
```
## How to use
Just do `lufi -h` and you will know.
Just do `lufi-cli -h` and you will know.
## How to use from this repository
* Ensure you are running a recent node version (current stable v7.2.1). You can easyly upgrade node using `n` package and its command `n stable`
* Ensure you are running a recent node version (current stable v7.2.1, successfully tested with v6.11.0). You can easyly upgrade node using `n` package and its command `n stable`
* Install dependencies using `npm install`
* Run `./bin/lufi.js -h`
......
......@@ -39,7 +39,7 @@ if (!fileExists(filesInfosFile)) {
}
program
.version('0.0.1')
.version('0.0.2')
.option('-u, --upload <files>', 'a comma-separated list of files to upload', list)
.option('-s, --server <url>', 'the server where you want to upload your files to')
.option('-e, --expiration <integer>', 'in how many days your file will expire (may be sooner due to server limits)', parseInt)
......@@ -103,6 +103,8 @@ if (program.purgeExpired) {
} else {
process.exit(0);
}
} else {
program.help();
}
/*
......
{
"name": "lufi-cli",
"version": "0.0.1",
"version": "0.0.2",
"description": "Upload, fetch and delete files to and from a Lufi instance",
"main": "index.js",
"repository": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment