Skip to content

ficbook credits only authors and co-authors - #6

Merged
pruffit merged 2 commits into
mainfrom
fix/ficbook-authors
Oct 17, 2026
Merged

pruffit merged 2 commits into
mainfrom
fix/ficbook-authors

Conversation

@pruffit

@pruffit pruffit commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

The ficbook adapter took every /authors/ link on the page as an author. Two kinds of people leaked into the file name and the EPUB/FB2 metadata:

Now the names come from the role badges in the header: a badge reading автор, соавтор, переводчик or сопереводчик credits the link in its own block. The three-name cap is gone: the selection is exact. If there are no badges, a[itemprop="author"] is the fallback. Co-authors cannot rely on itemprop, because ficbook marks only the main author with it.

Checked:

  • live pages, 2026-10-17: a single author (7562115), author + beta (three works), author + co-author + beta; a translation with translator + co-translator + beta (8605591). All are credited correctly.
  • a new adapter test covers one author, author + co-author + beta, a translation, and the no-badge fallback. The rewards in it have their live shape (a.reward-giver-name in the header aside). It fails on the old code with "Автор, Дарительница, Читатель", which is the reported bug.
  • npm run check passes: typecheck, build and 26 + 20 + 35 tests.

Closes #2

🤖 Generated with Claude Code

pruffit and others added 2 commits October 17, 2026 10:25
The author list took every /authors/ link on the page: the beta from the work
header and reward givers rendered inside it ended up in the file name and the
EPUB metadata. Names now come from the role badges (author, co-author), with
itemprop="author" as the fallback. Checked against live pages on 2026-10-17.

Closes #2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On a translation the badges read translator and co-translator, so the
co-translator fell through to the itemprop fallback and was dropped. The
three-name cap goes: the selection is exact now. Tests cover translations,
the no-badge fallback and rewards in their live shape.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pruffit
pruffit merged commit 18d9ee1 into main Oct 17, 2026
1 check passed
@pruffit
pruffit deleted the fix/ficbook-authors branch October 17, 2026 06:37
@pruffit pruffit mentioned this pull request Oct 17, 2026
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ficbook: commenters from the rewards sidebar end up among the book's authors

1 participant