From 6ccba568dd6111b29a4d688d58ae18fdaac164bc Mon Sep 17 00:00:00 2001 From: timvisee Date: Mon, 2 Apr 2018 17:50:36 +0200 Subject: [PATCH] Better report file info --- IDEAS.md | 13 ++++++------- cli/src/action/info.rs | 4 +++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/IDEAS.md b/IDEAS.md index c7a7e97..99cd150 100644 --- a/IDEAS.md +++ b/IDEAS.md @@ -1,18 +1,18 @@ # Ideas -- custom file name when uploading +- Endpoints: + - exists + - metadata + - delete - allow creating non existent directories with the `-f` flag - only allow file extension renaming on upload with `-f` flag - no interact flag - `-y` flag for assume yes - `-f` flag for forcing (no interact?) - Box errors -- Info endpoint, to view file info - On download, mention a wrong or missing password with a HTTP 401 response - Automatically get owner token, from file history when setting password - Implement error handling everywhere properly -- Quick upload/download without `upload` or `download` subcommands. -- Set file password -- Set file download count +- Quick upload/download without `upload` or `download` subcommands? - Flag to explicitly delete file after download - Check remote version and heartbeat using `/__version__` - Check whether the file still exists everywhere @@ -24,13 +24,12 @@ - Allow file/directory archiving on upload - Allow unarchiving on download - Allow hiding the progress bar, and/or showing simple progress -- Enter password through pinetry - Remember all uploaded files, make files listable - Incognito mode, to not remember files `--incognito` - Document all code components - Dotfile for default properties - Host configuration file for host tags, to easily upload to other hosts -- Generate manual pages +- Generate man pages - Automated releases through CI - Release binaries on GitHub - Ubuntu PPA package diff --git a/cli/src/action/info.rs b/cli/src/action/info.rs index 389b2fe..d900ddf 100644 --- a/cli/src/action/info.rs +++ b/cli/src/action/info.rs @@ -36,7 +36,9 @@ impl<'a> Info<'a> { // Execute the info fetch action let info = ApiInfo::new(&file, None).invoke(&client)?; - println!("{:#?}", info); + // Print the result + println!("Downloads: {} of {}", info.download_count(), info.download_limit()); + println!("TTL: {}", info.ttl_millis()); Ok(()) }