📖 Readtime-CLI
CLI to calculates the time some text takes the average human to read, based on Medium's read time forumula.
🧮 Algorithm
Medium's Help Center says,
Read time is based on the average reading speed of an adult (roughly 265 WPM). We take the total word count of a post and translate it into minutes, with an adjustment made for images. For posts in Chinese, Japanese and Korean, it's a function of number of characters (500 characters/min) with an adjustment made for images.
Double checking with real articles, the English algorithm is:
seconds = num_words / 265 * 60 + img_weight * num_images
With img_weight starting at 12 and decreasing one second with each image encountered, with a minium img_weight of 3 seconds.
Requirements
MacOS or Linux
Python 3.9+
Readtime-CLI stands on the shouders of giants:
🛠 Installation
Poetry
poetry add readtime-cli
Pip
virtualenv venv
. venv/bin/activate
pip install readtime-cli
💻 Usage
Version
readtime version
Calculate Read time Markdown files
readtime md FILE_PATH [OPTIONS]
Calculate Read time HTML files
readtime html FILE_PATH [OPTIONS]
Calculate Read time Text files
readtime text FILE_PATH [OPTIONS]
Options for all commands
--wpm INTEGER Word Per Minute [default: 265]
--language [en|pt-br] [default: Languages.en]
--help Show this message and exit.
Metadata
Release files for readtime-cli 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| readtime_cli-0.2.3.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| readtime_cli-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.9 kB
Release files / readtime_cli-0.2.3.tar.gz
| Download URL | readtime_cli-0.2.3.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3ef3bc664a1944f262ed3077231ff8b973e548cc489c88f575eb890f680ff62
|
|
BLAKE2b-256 checksum How to use checksums |
0fa188dd6394eadd1b7f902f8ec7ae132aa4b2a0931655e375c333bbc6c6a3b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / readtime_cli-0.2.3-py3-none-any.whl
| Download URL | readtime_cli-0.2.3-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c06d6514e0d95f7047aecb4b517868a12ab6cec3f324f8ce37f5ba393f6bfea
|
|
BLAKE2b-256 checksum How to use checksums |
a4ab7b5341c4111e7d08c86b3d3ca02e8f11ea643c817764adb43930eead38e6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|