Content comsumption analyzer CLI.
  • Python 96%
  • Nix 2.8%
  • Shell 0.7%
  • Dockerfile 0.5%
Find a file
Gabriel Santos de Souza 3b65c67b00
Some checks failed
CI / ci (ubuntu-latest) (push) Failing after 1s
Documentation / documentation (push) Failing after 1s
CI / ci (macos-latest) (push) Has been cancelled
CI / ci (windows-latest) (push) Has been cancelled
refactor(handlers/file.py): clean up dead cache code
2026-04-28 11:10:19 -03:00
.devcontainer build(devcontainer.json): enable format on save 2026-04-14 11:46:54 -03:00
.github ci: add commitizen and reuse support for review action 2026-04-23 18:18:23 -03:00
docs Revert "docs(environment_variables.md): document CONSUMO_CONFIG_FILE" 2026-04-28 11:01:33 -03:00
LICENSES docs: make project reuse compliant 2026-04-23 17:56:48 -03:00
nix docs: make project reuse compliant 2026-04-23 17:56:48 -03:00
scripts build(dist.py): fix license path 2026-04-24 17:20:03 -03:00
src/consumo refactor(handlers/file.py): clean up dead cache code 2026-04-28 11:10:19 -03:00
tests Revert "feat: add config_file option" 2026-04-28 11:01:13 -03:00
.editorconfig feat: init 2026-03-08 15:25:10 -03:00
.envrc bump: version 0.4.1 → 0.4.2 2026-03-20 08:33:41 -03:00
.gitignore docs: start working on documentation 2026-03-18 19:23:06 -03:00
.python-version feat: init 2026-03-08 15:25:10 -03:00
CHANGELOG.md bump: version 0.14.0 → 0.14.1 2026-04-24 17:25:24 -03:00
pyproject.toml style(pyproject.toml): ignore D103 2026-04-28 11:08:50 -03:00
README.md docs(README.md): remove pydantic badge 2026-04-18 20:50:14 -03:00
REUSE.toml docs: make project reuse compliant 2026-04-23 17:56:48 -03:00
uv.lock bump: version 0.14.0 → 0.14.1 2026-04-24 17:25:24 -03:00
zensical.toml docs: make project reuse compliant 2026-04-23 17:56:48 -03:00

consumo: Content Consumption Analyzer

Codecov Downloads License 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.

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 validate1.
  • Test Driven Development2.

  1. King, A. (2019) Parse, dont validate. Alexis Kings 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). ↩︎