benja-opazo/ublock-politics

Politics Filter for uBlock Origin

Python

0

5 commits

updated Jul 5, 2026

See the code

See what people are saying (1)

SourceMessageScoreDate

Attention is all you have

I did the same thing this year, and I agree it's been one of the best decisions I've made. I'm happier, and my mind feels calmer, with less noise. I've started reading a lot, and even writing (I started a blog, and one of my first posts was about exactly this, if you want you can check it out [1])…

0

Sep 22, 2026

README

ublock-politics

Curated uBlock Origin filter lists that mute political, current-events, war, and AI noise on social media.

You edit a clean, tiered word list (words/*.yml); a script wraps those words in site templates (sources/*.yml) and produces the subscribable filter lists in dist/. Words are decoupled from sites, so a site can be re-targeted without touching the vocabulary, and the vocabulary grows without touching site selectors.

Subscribe (in uBlock Origin)

Dashboard → Filter lists → scroll to Import… → paste a raw link below → Apply changes. You can stack several (e.g. us + cl). All files live in dist/.

Tiers are exclusive slices: each <region>-N list holds only that tier. The master (cl.txt / us.txt) is all tiers combined — subscribe to it to block everything, or stack individual tiers (e.g. cl-1 + cl-2) for an in-between strictness.

Site rules (whole-subreddit blocks, DOM/URL rules) are not region-specific — they're a separate list, independent of tier and region. Stack it with any region's word list for full coverage, or skip it to keep only word-based hiding.

🌐 Subreddits & site rules

  • All sites, all regions: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/subreddits.txt

🇨🇱 Chile

  • All tiers: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/cl.txt
  • Tier 1 only — safest: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/cl-1.txt
  • Tier 2 only: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/cl-2.txt
  • Tier 3 only: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/cl-3.txt
  • Tier 4 only — extreme FP: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/cl-4.txt

🇺🇸 United States

  • All tiers: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/us.txt
  • Tier 1 only — safest: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/us-1.txt
  • Tier 2 only: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/us-2.txt
  • Tier 3 only: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/us-3.txt
  • Tier 4 only — extreme FP: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/us-4.txt

Tier meaning:

  • 1 — unambiguously political / on-topic (e.g. boric, Trump).
  • 2 — strongly associated; some false positives (e.g. carabineros, MAGA).
  • 3 — tangential, playwords, or high false-positive (e.g. Elmo, LGBT).
  • 4 — extreme false positives; opt-in only (e.g. Historical, and the case-sensitive US / PC).

Some tier-4 terms are matched case-sensitively (all-caps only) so US blocks "US" but not the pronoun "us".

Develop

Requires uv.

uv sync                                  # create .venv, install deps
uv run python scripts/validate.py        # lint the YAML data
uv run python scripts/generate.py        # rebuild dist/ from words + sources
uv run python scripts/generate.py --check  # CI: fail if dist/ is stale

dist/ is generated — never edit it by hand. Edit the YAML and regenerate.

Layout

words/<region>.yml      vocabulary: categories of terms, each with a tier  (edit this)
sources/<site>.yml      per-site filter template using the {TERMS} placeholder
site-rules/<site>.yml   raw site-specific filters (subreddits, memes), tier-tagged
scripts/generate.py     words × sources × tier -> dist/<region>*.txt
                        site-rules × sources     -> dist/subreddits.txt
scripts/validate.py     lints tiers, regex, duplicates, templates
dist/                   generated, subscribable lists

Extending

  • Add/curate words.claude/skills/curate-words
  • Add a site or site-specific rule.claude/skills/site-filters
  • Fix a list a site broke.claude/skills/update-methodology

Contributors

benja-opazo

5 commits

benja-opazo/ublock-politics

Politics Filter for uBlock Origin

Python

0

5 commits

updated Jul 5, 2026

See the code

See what people are saying (1)

SourceMessageScoreDate

Attention is all you have

I did the same thing this year, and I agree it's been one of the best decisions I've made. I'm happier, and my mind feels calmer, with less noise. I've started reading a lot, and even writing (I started a blog, and one of my first posts was about exactly this, if you want you can check it out [1])…

0

Sep 22, 2026

README

ublock-politics

Curated uBlock Origin filter lists that mute political, current-events, war, and AI noise on social media.

You edit a clean, tiered word list (words/*.yml); a script wraps those words in site templates (sources/*.yml) and produces the subscribable filter lists in dist/. Words are decoupled from sites, so a site can be re-targeted without touching the vocabulary, and the vocabulary grows without touching site selectors.

Subscribe (in uBlock Origin)

Dashboard → Filter lists → scroll to Import… → paste a raw link below → Apply changes. You can stack several (e.g. us + cl). All files live in dist/.

Tiers are exclusive slices: each <region>-N list holds only that tier. The master (cl.txt / us.txt) is all tiers combined — subscribe to it to block everything, or stack individual tiers (e.g. cl-1 + cl-2) for an in-between strictness.

Site rules (whole-subreddit blocks, DOM/URL rules) are not region-specific — they're a separate list, independent of tier and region. Stack it with any region's word list for full coverage, or skip it to keep only word-based hiding.

🌐 Subreddits & site rules

  • All sites, all regions: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/subreddits.txt

🇨🇱 Chile

  • All tiers: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/cl.txt
  • Tier 1 only — safest: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/cl-1.txt
  • Tier 2 only: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/cl-2.txt
  • Tier 3 only: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/cl-3.txt
  • Tier 4 only — extreme FP: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/cl-4.txt

🇺🇸 United States

  • All tiers: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/us.txt
  • Tier 1 only — safest: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/us-1.txt
  • Tier 2 only: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/us-2.txt
  • Tier 3 only: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/us-3.txt
  • Tier 4 only — extreme FP: https://raw.githubusercontent.com/benja-opazo/ublock-politics/main/dist/us-4.txt

Tier meaning:

  • 1 — unambiguously political / on-topic (e.g. boric, Trump).
  • 2 — strongly associated; some false positives (e.g. carabineros, MAGA).
  • 3 — tangential, playwords, or high false-positive (e.g. Elmo, LGBT).
  • 4 — extreme false positives; opt-in only (e.g. Historical, and the case-sensitive US / PC).

Some tier-4 terms are matched case-sensitively (all-caps only) so US blocks "US" but not the pronoun "us".

Develop

Requires uv.

uv sync                                  # create .venv, install deps
uv run python scripts/validate.py        # lint the YAML data
uv run python scripts/generate.py        # rebuild dist/ from words + sources
uv run python scripts/generate.py --check  # CI: fail if dist/ is stale

dist/ is generated — never edit it by hand. Edit the YAML and regenerate.

Layout

words/<region>.yml      vocabulary: categories of terms, each with a tier  (edit this)
sources/<site>.yml      per-site filter template using the {TERMS} placeholder
site-rules/<site>.yml   raw site-specific filters (subreddits, memes), tier-tagged
scripts/generate.py     words × sources × tier -> dist/<region>*.txt
                        site-rules × sources     -> dist/subreddits.txt
scripts/validate.py     lints tiers, regex, duplicates, templates
dist/                   generated, subscribable lists

Extending

  • Add/curate words.claude/skills/curate-words
  • Add a site or site-specific rule.claude/skills/site-filters
  • Fix a list a site broke.claude/skills/update-methodology

Contributors

benja-opazo

5 commits

Languages

Python

100.0%