[PR #180] [MERGED] [downloader] Redesign the check overview: one block, tier ladder, cost of full access #177

Closed
opened 2026-10-13 19:48:24 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/180
Author: @Glitchy-Sheep
Created: 9/13/2026
Status: ✅ Merged
Merged: 9/13/2026
Merged by: @Glitchy-Sheep

Base: main ← Head: feat/check-redesign


📝 Commits (5)

  • 8693580 feat: Compute what full access to a blog costs
  • 4bf0d4d feat: Draw check, dry-run and run statistics as terminal views
  • a3a3db7 docs: Describe the check overview block and what it costs
  • e7a0cb3 feat: Show the check overview as a tier ladder
  • 29a4a2b feat: Show the check overview as a tier ladder

📊 Changes

34 files changed (+1388 additions, -569 deletions)

View changed files

📝 CHANGELOG.md (+2 -1)
📝 README.md (+1 -1)
📝 boosty_downloader/application/blog_overview.py (+215 -7)
📝 boosty_downloader/application/use_cases/check_total_posts.py (+1 -1)
📝 boosty_downloader/application/use_cases/plan_download.py (+1 -1)
➖ boosty_downloader/cli/blog_overview_rendering.py (+0 -115)
📝 boosty_downloader/cli/cli_options.py (+9 -0)
📝 boosty_downloader/cli/commands/check.py (+12 -6)
📝 boosty_downloader/cli/commands/download.py (+8 -8)
➖ boosty_downloader/cli/download_plan_rendering.py (+0 -54)
➕ boosty_downloader/cli/views/__init__.py (+7 -0)
➕ boosty_downloader/cli/views/blog_overview.py (+239 -0)
➕ boosty_downloader/cli/views/download_plan.py (+67 -0)
➕ boosty_downloader/cli/views/media.py (+55 -0)
📝 boosty_downloader/cli/views/run_statistics.py (+27 -27)
➕ boosty_downloader/cli/views/text.py (+49 -0)
➕ test/fixtures/views/blog_overview_empty.txt (+3 -0)
➕ test/fixtures/views/blog_overview_locked.txt (+18 -0)
➕ test/fixtures/views/blog_overview_own.txt (+15 -0)
➕ test/fixtures/views/blog_overview_posts.txt (+29 -0)

...and 14 more files

📄 Description

📝 Summary

Stacked on #179: the diff here is only the redesign. GitHub retargets this PR to main once #179 merges.

The overview from #179 was printed as one log record: a Boosty_Downloader.SUCCESS ✔: prefix, a timestamp and every line indented under them - readable, but scattered. It is now one block between two rules, with aligned tables, and it says what full access to the blog costs.

🔧 What changes

─────────────────────────── boosty.to/example_author ───────────────────────────
11 posts, 11 accessible to you
2026-01-04 to 2026-08-21, last post 23 days ago

Access            Price          Posts   Locked for you
Free              -                  1                -
Tester            10 RUB/mo          2                -
Single purchase   100 RUB each       6                -
Single purchase   300 RUB each       2                -

Media in accessible posts
📷 images           11
📄 files            21
🎬 boosty videos     8
🔗 external videos   0
🎵 audio             2

Full access costs 10 RUB/mo (Tester) + 1200 RUB one-off (8 posts)
You already have access to everything
────────────────────────────────────────────────────────────────────────────────

On a blog you are not subscribed to, the last line becomes the tier ladder: To unlock the rest: 199 RUB/mo (Regular) opens 78 posts, 99999 RUB/mo (Billionaire) opens all 79 - each rung says what it opens, so a joke-priced top tier cannot hide the cheap one that opens most of the blog. Locked titles are capped at 20 with "and N more"; untitled posts read "(no title)".

download --dry-run and the closing run statistics use the same style: a titled rule, aligned tables, a closing rule.

🧩 How it works

  1. Data stays in the application layer. BlogOverview now carries full_access_cost and remaining_cost (UnlockCost: the tier ladder with cumulative post counts plus one-off purchases) and the author name. Boosty tiers nest - a higher tier opens every lower one - so the ladder counts cumulatively. No human-facing strings live there.
  2. Views only render. cli/views/ turns BlogOverview, DownloadPlan and RunStatistics into rich renderables (Rule, Table, Group, no frames). A view never touches the API, the cache or the console.
  3. Commands print. check and download are the only places that call console.print(view) - through the progress reporter's console, so nothing goes through the logger prefix.
  4. 🖼 became 📷: the picture glyph is text-presentation, rich counts it as one cell while terminals draw two, and the space after it got eaten.

🧪 Tests

  • View goldens in test/fixtures/views/*.txt: plain 80-column renders of the overview (own blog, foreign blog with locked posts, empty blog), the plan and the statistics. UPDATE_GOLDEN=1 uv run pytest test/unit/cli/views regenerates them.
  • Unit: the tier ladder (cumulative counts, single purchases, locked-only variant, a locked free tier still needs the subscription), the rendered ladder line, locked list cap and "(no title)", markup-safe author text, local-calendar "days ago", price/duration/plural helpers.
  • Live: check on an own blog and on a foreign one with 79 locked posts and a 99999 RUB gimmick tier, --dry-run, a cached rerun with the statistics block.

✅ Checklist

  • Tested live on a real blog (feature or fix)
  • Updated CLI --help and README if needed
  • Updated docs/ if the download flow or dev process changed
  • Added a line to ## Unreleased in CHANGELOG.md (or the ci/skip-changelog label if not user-facing)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Glitchy-Sheep/boosty-downloader/pull/180 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 9/13/2026 **Status:** ✅ Merged **Merged:** 9/13/2026 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `main` ← **Head:** `feat/check-redesign` --- ### 📝 Commits (5) - [`8693580`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/869358075f6de55eb9581d3b30b82ee63aaaa5b9) feat: Compute what full access to a blog costs - [`4bf0d4d`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/4bf0d4d6bcb9223c2e5c06773afd1ac32ed18789) feat: Draw check, dry-run and run statistics as terminal views - [`a3a3db7`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/a3a3db7843e91c7bc0320f8c1ed2e46cc586f0b6) docs: Describe the check overview block and what it costs - [`e7a0cb3`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/e7a0cb3683a7cbf5d3f7b7b72db20debcbfc1f07) feat: Show the check overview as a tier ladder - [`29a4a2b`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/29a4a2b9986df96303f4d54095e422a39a2acdc0) feat: Show the check overview as a tier ladder ### 📊 Changes **34 files changed** (+1388 additions, -569 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -1) 📝 `README.md` (+1 -1) 📝 `boosty_downloader/application/blog_overview.py` (+215 -7) 📝 `boosty_downloader/application/use_cases/check_total_posts.py` (+1 -1) 📝 `boosty_downloader/application/use_cases/plan_download.py` (+1 -1) ➖ `boosty_downloader/cli/blog_overview_rendering.py` (+0 -115) 📝 `boosty_downloader/cli/cli_options.py` (+9 -0) 📝 `boosty_downloader/cli/commands/check.py` (+12 -6) 📝 `boosty_downloader/cli/commands/download.py` (+8 -8) ➖ `boosty_downloader/cli/download_plan_rendering.py` (+0 -54) ➕ `boosty_downloader/cli/views/__init__.py` (+7 -0) ➕ `boosty_downloader/cli/views/blog_overview.py` (+239 -0) ➕ `boosty_downloader/cli/views/download_plan.py` (+67 -0) ➕ `boosty_downloader/cli/views/media.py` (+55 -0) 📝 `boosty_downloader/cli/views/run_statistics.py` (+27 -27) ➕ `boosty_downloader/cli/views/text.py` (+49 -0) ➕ `test/fixtures/views/blog_overview_empty.txt` (+3 -0) ➕ `test/fixtures/views/blog_overview_locked.txt` (+18 -0) ➕ `test/fixtures/views/blog_overview_own.txt` (+15 -0) ➕ `test/fixtures/views/blog_overview_posts.txt` (+29 -0) _...and 14 more files_ </details> ### 📄 Description ## 📝 Summary Stacked on #179: the diff here is only the redesign. GitHub retargets this PR to `main` once #179 merges. The overview from #179 was printed as one log record: a `Boosty_Downloader.SUCCESS ✔:` prefix, a timestamp and every line indented under them - readable, but scattered. It is now one block between two rules, with aligned tables, and it says what full access to the blog costs. ## 🔧 What changes ``` ─────────────────────────── boosty.to/example_author ─────────────────────────── 11 posts, 11 accessible to you 2026-01-04 to 2026-08-21, last post 23 days ago Access Price Posts Locked for you Free - 1 - Tester 10 RUB/mo 2 - Single purchase 100 RUB each 6 - Single purchase 300 RUB each 2 - Media in accessible posts 📷 images 11 📄 files 21 🎬 boosty videos 8 🔗 external videos 0 🎵 audio 2 Full access costs 10 RUB/mo (Tester) + 1200 RUB one-off (8 posts) You already have access to everything ──────────────────────────────────────────────────────────────────────────────── ``` On a blog you are not subscribed to, the last line becomes the tier ladder: `To unlock the rest: 199 RUB/mo (Regular) opens 78 posts, 99999 RUB/mo (Billionaire) opens all 79` - each rung says what it opens, so a joke-priced top tier cannot hide the cheap one that opens most of the blog. Locked titles are capped at 20 with "and N more"; untitled posts read "(no title)". `download --dry-run` and the closing run statistics use the same style: a titled rule, aligned tables, a closing rule. ## 🧩 How it works 1. **Data stays in the application layer.** `BlogOverview` now carries `full_access_cost` and `remaining_cost` (`UnlockCost`: the tier ladder with cumulative post counts plus one-off purchases) and the author name. Boosty tiers nest - a higher tier opens every lower one - so the ladder counts cumulatively. No human-facing strings live there. 2. **Views only render.** `cli/views/` turns `BlogOverview`, `DownloadPlan` and `RunStatistics` into rich renderables (`Rule`, `Table`, `Group`, no frames). A view never touches the API, the cache or the console. 3. **Commands print.** `check` and `download` are the only places that call `console.print(view)` - through the progress reporter's console, so nothing goes through the logger prefix. 4. 🖼 became 📷: the picture glyph is text-presentation, rich counts it as one cell while terminals draw two, and the space after it got eaten. ## 🧪 Tests - View goldens in `test/fixtures/views/*.txt`: plain 80-column renders of the overview (own blog, foreign blog with locked posts, empty blog), the plan and the statistics. `UPDATE_GOLDEN=1 uv run pytest test/unit/cli/views` regenerates them. - Unit: the tier ladder (cumulative counts, single purchases, locked-only variant, a locked free tier still needs the subscription), the rendered ladder line, locked list cap and "(no title)", markup-safe author text, local-calendar "days ago", price/duration/plural helpers. - Live: `check` on an own blog and on a foreign one with 79 locked posts and a 99999 RUB gimmick tier, `--dry-run`, a cached rerun with the statistics block. ## ✅ Checklist - [x] Tested live on a real blog (feature or fix) - [x] Updated CLI `--help` and README if needed - [x] Updated `docs/` if the download flow or dev process changed - [x] Added a line to `## Unreleased` in CHANGELOG.md (or the `ci/skip-changelog` label if not user-facing) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:48:24 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#177
No description provided.