Get the content, only the content: unenshittificator for the web.
Find a file
Vincent Jousse 8640aa75e8 feat: follow single_page_link urls (#31)
Reviewed-on: #31
Co-authored-by: Vincent Jousse <vincent@jousse.org>
Co-committed-by: Vincent Jousse <vincent@jousse.org>
2026-02-19 23:27:37 +01:00
.woodpecker ci: fix uv path 2025-01-03 09:24:19 +01:00
src/unmerdify feat: follow single_page_link urls (#31) 2026-02-19 23:27:37 +01:00
tests feat: follow single_page_link urls (#31) 2026-02-19 23:27:37 +01:00
.gitignore fix: implement strip_attr 2026-01-16 15:52:26 +01:00
.pre-commit-config.yaml chore: add pre-commit 2024-07-19 14:37:53 +02:00
.python-version chore: init pyproject 2024-07-19 12:41:07 +02:00
LICENSE Initial commit 2024-07-19 09:49:49 +02:00
pyproject.toml feat: add url testing script 2025-01-05 20:04:39 +01:00
README.md docs: fix README 2025-01-01 20:58:57 +01:00
requirements.txt chore: use uv instead of rye 2024-08-27 16:41:25 +02:00
uv.lock feat: add url testing script 2025-01-05 20:04:39 +01:00

This is still a work in progress and it's not usable for now.

unmerdify

Get the content, only the content: unenshittificator for the web.

Installation

Get ftr-site-config config

First you will need to clone https://github.com/fivefilters/ftr-site-config locally (it contains the rules needed for this code to work).

With uv

Be sure to have uv installed, then:

uv sync

Why uv? Because after using cargo for Rust, I'm now tired of using broken Python version management. requirements.txt sucks, managing multiple venvs sucks, managing multiple Python versions sucks, using pyproject.toml and uv is the way to go. If you still want to manage all this mess yourself, I'll try to keep a requirements.txt file up to date.

Why not rye? Because uv can do almost all what rye was used to do: https://github.com/astral-sh/rye/discussions/1342.

With pip

Manage your Python version, your virtualenv the way you want to and install the requirements.

pip install -r requirements.txt

Keep requirements up to date with uv

uv pip compile pyproject.toml -o requirements.txt

Usage

With uv

curl -s https://vincent.jousse.org/blog/fr/perso/pourquoi-abandonner-une-croyance-est-si-difficile/ | uv run unmerdify -l DEBUG tests/fixtures/fixtures_site_config/vincent.jousse.org.txt

With pip

curl -s https://vincent.jousse.org/blog/fr/perso/pourquoi-abandonner-une-croyance-est-si-difficile/ | python src/unmerdify -l DEBUG tests/fixtures/fixtures_site_config/vincent.jousse.org.txt

Tests

uv run pytest

Ideas

Should we clean urls in the parsed html? https://github.com/ClearURLs/Rules