Skip to main content

A simple command line utility for displaying the amount of time left in a download.

Project description

Timeleft is a simple command line utility for displaying the amount of time left in a download. In the command line, one simply needs to input the file size remaining and the average download speed expected. Timeleft will output the time remaining in units that are easy to read.

Usage

$ timeleft 100MB 100MBps
1.0 second
$ timeleft 100MB 100mbps
8.0 seconds
$ timeleft 100MB 100mb/s
8.0 seconds
$ timeleft 100MB 1kbps
9.0 days, 11.0 hours, 33.0 minutes, 20.0 seconds
$ 3.4GB 3.4MBps
17.0 minutes, 4.0 seconds
$ timeleft 1.5YB 10gbps
28561641.0 years, 172.0 days, 10.0 hours, 21.0 minutes, 39.25 seconds
$ timeleft 100GB 100GBPS
1.0 second

As shown in the examples above, Timeleft can take a variety of inputs to produce a human-readable output. Arguments can be input in any order: the only requirement for arguments is that one has file size units and the other has download speed units.

Features

  • Both bits and bytes are supported as file and speed units are supported (don’t let your ISP pull the wool over your eyes there). Accordingly, Timeleft is case-sensitive in that it distinguishes between B and b (i.e., 1MB = 8 Mb; all other characters should be case independent).

  • Speed units can take the format of B/s or Bps (e.g., both 1MBps and 1MB/s are accepted).

  • Sizes prefixes ranging from bits all the way up to yottabytes (280 bytes) are currently supported.

  • The output format only shows the largest unit necessary to display the time remaining (i.e., “0.0 minutes, 23.0 seconds” will never occur).

Dependencies

Timeleft is tested on Python 2.7 and 3.5 but should work on all versions 2.6 and above. There are no dependencies outside of the standard library. Testing (optionally included) is handled with Pytest.

Installation

To install Timeleft, simply:

$ pip install timeleft

Alternatively, if you would like to install from source:

$ pip install git+https://github.com/swareham/timeleft.git

Pip will automatically add the “timeleft” executable to your path and you will be ready to go!

Credits

0.0.2 (2016-04-23)

  • First Public Release

  • Updated to use a module hierarchy

  • Added ability to install via pip

  • Updated error handling

0.0.1 (2015-06-29)

  • Original Implementation

  • Personal Utility

  • Unpublished

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

timeleft-0.2.tar.gz (5.8 kB view details)

Uploaded Source

timeleft-0.2.linux-x86_64.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timeleft-0.2-py2.py3-none-any.whl (8.1 kB view details)

Uploaded Python 2Python 3

File details

Details for the file timeleft-0.2.tar.gz.

File metadata

  • Download URL: timeleft-0.2.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for timeleft-0.2.tar.gz
Algorithm Hash digest
SHA256 463e03d00b883dba964544c5dd0a73fb5142b0217cf2e5141deb91eb36d29c59
MD5 070f8fbf13f2f529712cfb6aa32b42b7
BLAKE2b-256 e26ab6c40894d8f63662105c1f863253ba7abcbcc678c624ed801d627ba6085c

See more details on using hashes here.

File details

Details for the file timeleft-0.2.linux-x86_64.tar.gz.

File metadata

File hashes

Hashes for timeleft-0.2.linux-x86_64.tar.gz
Algorithm Hash digest
SHA256 1220b5784a05498e0e3cdca40478e3f52680fd10df4b1b542ea7a29d4361ec07
MD5 c4c51e53621e5df01024e0f1520e1c6f
BLAKE2b-256 bdd98c660f76bcca0ddbafae80f7a1445221bb0a47cca2deca0ff39fc38573f4

See more details on using hashes here.

File details

Details for the file timeleft-0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for timeleft-0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ec9b4c68f7278da701d97b0ca2fa133cc9329940b913581f0de09e198d0437b8
MD5 fa9c9dd1fda2eff33d4a4ccb535b9055
BLAKE2b-256 36f3e6d4678c157545028a50236bd28bdebe03b736d2c4426b60a9f6d22d2fc8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page