From 0453a864ac98200a72c0c94a2f31ca83046ae51b Mon Sep 17 00:00:00 2001 From: Omkar Shelar Date: Thu, 2 Jul 2020 20:15:05 +0530 Subject: [PATCH] more detailed README --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ index.js | 3 ++- package.json | 2 +- 3 files changed, 44 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 7ea0647..7067340 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,43 @@ # file-hosting-cli CLI application for temporary file hosting. + + +**Application URL :** https://filehosting.omkarshelar.dev/ + +**Frontend Code :** https://github.com/omkarshelar/file-hosting-frontend + +**Backend Code :** https://github.com/omkarshelar/file-hosting-backend + +**CLI Code :** https://github.com/omkarshelar/file-hosting-cli (This Repo) + +Ephermal hosting for files. Upload files, get URL of the uploaded file. Share the URl with others! + +CLI application to automate file uploads. Can be used on the server or to automate file uploads using shell scripts. + + +You can run the application by running +''' +npm install -g fha +''' +OR +''' +npx fha +''' + +''' +Usage: [options] + +Options: + -V, --version output the version number + -f, --file Expiry time of the object in minutes + -e, --expire Expiry time of the object in minutes. Minimum + 5 minutes (default: 5) + -p, --password To password protect your file. + -h, --help display help for command +Example call: +$ fha -f hello.txt +$ fha -f hello.txt -e 30 +$ fha -f hello.txt -e 30 -p +''' + +The application needs an API Key to function to prevent misuse and keep hosting costs low, you can [contact me](https://omkarshelar.dev) for setting you own instance of the applcation using your own account diff --git a/index.js b/index.js index 190c20b..0714938 100755 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ const fs = require("fs"); const mime = require("mime"); const { program } = require("commander"); -program.version("1.1.0"); +program.version("1.2.0"); program.requiredOption( "-f, --file ", @@ -21,6 +21,7 @@ program.on("--help", () => { console.log("Example call:"); console.log("$ fha -f hello.txt"); console.log("$ fha -f hello.txt -e 30"); + console.log("$ fha -f hello.txt -e 30 -p"); }); // If no arguments more arguments sent to application, display help. diff --git a/package.json b/package.json index 42fb05d..7935c27 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@omkarshelar/fha-cli", - "version": "1.1.0", + "version": "1.2.0", "description": "", "main": "index.js", "scripts": {