Skip to main content

Content consumption analyzer CLI

Project description

consumo: Content Consumption Analyzer

Codecov Downloads License Pydantic v2 PyPI Package

GIF showcasing the program being used, by revealing it would take 21 minutes and 18 seconds to read the entire license at the standard 265 words per minute.

VHS

Introduction

consumo is a command-line interface (CLI) built with Typer that calculates the time to consume either online or offline media. It can be used for sorting media by duration for later consumption or by deciding if something can be viewed today or at a later date.

It's designed with broad support in mind. When it comes to online media, it supports video platforms by directly getting the duration of the linked video; online hosted files by extracting the duration from their metadata; articles and text in general by using the Medium formula to calculate the total consumption time based on text, using a (customizable) words per minute (WPM) count; image count; video duration of the videos on the page. For further details, see: How Medium Calculates Read Time.

For offline media, multiple backends are used to calculate the reading time. However, by design, local HTML files have full feature parity with online pages.

Installation

Python

$ python3 -m pip install consumo # python -m pip install consumo

pip

$ pip3 install consumo # pip install consumo

Context

I'm pretty unorganized. No matter how much I try to tidy things up, I always manage to make a mess somewhere else. In this case, I host in my own machine a FreshRSS container which should ideally be my only source of online content and things should be saved there. However, after hoarding 30+ tabs on my phone with random links from the web, I decided to make a file like this on my computer:

https://en.wikipedia.org/wiki/Python_(programming_language)
https://en.wikipedia.org/wiki/High-level_programming_language
https://en.wikipedia.org/wiki/General-purpose_programming_language
https://en.wikipedia.org/wiki/Code_readability
https://en.wikipedia.org/wiki/Significant_indentation
https://en.wikipedia.org/wiki/Type_system#DYNAMIC
https://en.wikipedia.org/wiki/Garbage_collection_(computer_science)
https://en.wikipedia.org/wiki/Programming_paradigm
https://en.wikipedia.org/wiki/Structured_programming
https://en.wikipedia.org/wiki/Procedural_programming
https://en.wikipedia.org/wiki/Object-oriented_programming
https://en.wikipedia.org/wiki/Functional_programming
...

Repeat until you get over a hundred links (and multiple websites other than Wikipedia). Needless to say, I felt overwhelmed and thought: "LLMs can view webpages. Maybe I can give this list of links to one so it can sort them by duration for a better experience?"

I tried multiple models, but none were able to do that. Maybe there's something like this out there already, but I forgot to search for it. But thankfully that sparkled a great idea for a project: consumo!

Philosophies

  • Dependency Injection.
  • Parse, don't validate[^1].
  • Test Driven Development[^2].

[^1]: King, A. (2019) Parse, don’t validate. Alexis King’s Blog. Available at: https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/ (Accessed: September 29, 2025).

[^2]: Beck, K. (2003) Test-driven development: By example. Boston: Addison-Wesley (The Addison-Wesley signature series).

Project details


Download files

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

Source Distribution

consumo-0.13.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

consumo-0.13.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file consumo-0.13.0.tar.gz.

File metadata

  • Download URL: consumo-0.13.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for consumo-0.13.0.tar.gz
Algorithm Hash digest
SHA256 89c9711e21687cb48f85bf9e8bbcd448f26a0d0780fa3a60c9742fa6b9d10231
MD5 db968f65b37fca4c0a9bbf7cd5a437ad
BLAKE2b-256 1090cfdcf51c3ed631e49919d3c0856097165ad0b2e96e608155a43a40afee9d

See more details on using hashes here.

File details

Details for the file consumo-0.13.0-py3-none-any.whl.

File metadata

  • Download URL: consumo-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.14 {"installer":{"name":"uv","version":"0.9.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for consumo-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d12a8acaa9658cdfbf18cd4599a836a49bf6376dc51a11a2c28b8b228a4ffdae
MD5 22e3446e1dc1b230dd7f21d2e3a8666d
BLAKE2b-256 7181b65b61266baafdcd3af39b37501922e6c0a4d1d3a8417abb8c80996ea349

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