11 Commits

Author SHA1 Message Date
8f4767966a feat(listing): add per-page methods with HasNext flag
GalleryPage / ScrapsPage / FavoritesPage return a ListingPage struct
carrying the page items, the 1-based page number, and a HasNext flag
that mirrors FA's "next page" link. This lets external scrapers drive
their own pagination loop (checkpoint resume, parallel workers,
custom throttling) without re-implementing the page-walking code.

The existing iter.Seq2-shaped methods now share the same per-page
primitive internally so behaviour stays in lock-step.
v0.0.5
2026-06-02 22:28:49 +02:00
a2fc1b7e32 feat(listing): populate Tags and CategorizedTags from figure data-tags
FA's beta listing pages emit each submission's tag list on the
figure's <img data-tags="..."> attribute, mixing prefixed system tags
(s_/c_/a_/u_/t_) with the unprefixed keyword list. Reading it during
gallery-page parse lets callers classify favorites/gallery/scraps/
browse/search/inbox items at scrape time, avoiding a /view/{id}
round-trip per submission.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
v0.0.4
2026-06-02 21:53:56 +02:00
bc2d27f702 chore: add fixture-refresh helper script
scripts/refresh-user-fixture.sh wraps the TestRefreshFixtures
invocation: validates required env vars, warns on missing CF
credentials, runs the refresh, and re-runs the user parser tests
against the new fixture.
v0.0.3
2026-06-02 21:30:28 +02:00
2d6e73a800 test(actions): make TestFindFavLinks resilient to capture state
Asserts exactly one of fav/unfav is set with a well-formed URL,
instead of hardcoding the +Fav direction. The previous test broke
whenever the capturing account favourited the target submission.
Also points the test at submission 12345678 (the documented default
FA_TEST_SUB_ID) so it matches what TestRefreshFixtures captures by
default.
2026-06-02 21:29:38 +02:00
79e8a35732 test: refresh fixtures with full target coverage
Picks up testdata/html files that were previously skipped by
TestRefreshFixtures because their optional env vars were unset:
gallery_page_last, search_results, note_view, plus a fresh
submission.html / gallery_page1 captured against the right targets.
2026-06-02 21:29:31 +02:00
5cb196940d chore: remove SDK_ISSUES.md
The umbrella audit (#4) had no open SDK issues remaining; the file is
no longer load-bearing.
2026-06-02 21:23:59 +02:00
25800bc753 test: refresh authenticated HTML fixtures
Re-captures testdata/html/*.html against the live site with valid
session cookies; the previous user.html was the logged-out interstitial,
which broke TestParseUser_RealFixture entirely. Bumps the expected
Stats.Views in that test to match the new fixture.
2026-06-02 21:23:52 +02:00
20fcad7fbb feat(submission): parse FA's prefixed system tags into CategorizedTags
FA renders its species/character/artist/type system tags as tag-block
anchors with a data-tag-name carrying a single-letter prefix
(s_/c_/a_-u_/t_) and a sibling tag-invalid span instead of a /search/
link. The existing keyword pass skips them, so they were lost.

Adds a Submission.CategorizedTags field exposing the four buckets with
the prefix stripped, plus an examples/categorized_tags runnable demo.
2026-06-02 21:15:30 +02:00
02479212bc chore: fix .gitignore filename typo
Renames .gitingore to .gitignore so the rules actually apply; .idea/
was leaking into the working tree as a result.
2026-06-02 21:15:04 +02:00
0ae20aa68d inital commit v0.0.2 2026-05-26 20:21:55 +02:00
965f9d6ad4 inital commit v.0.0.1 2026-05-25 22:27:18 +02:00