Skip to content

feat(bangla): add Golper City (golpercity.blogspot.com) plugin - #2748

Merged
rajarsheechatterjee merged 4 commits into
lnreader:masterfrom
tmfahad39:feat/golpercity
Oct 24, 2026
Merged

rajarsheechatterjee merged 4 commits into
lnreader:masterfrom
tmfahad39:feat/golpercity

Conversation

@tmfahad39

Copy link
Copy Markdown
Contributor

What

  • Adds the first Bangla-language plugin: Golper City (golpercity.blogspot.com), a Bangla novel blog (Golpo Hub's story host).
  • Registers Bangla in scripts/languages.js (build:manifest only walks folders listed there, so Bangla needed a row).

How it works

  • Best modeled on plugins/english/seireitranslations.ts (same Blogger/JSON-feed mechanics): labels are novels, posts are chapters in publish order via the atom-in-JSON feed, chapter text from div.post-body.
  • Genre/junk labels (e.g. ফ্যান্টাসি গল্প, Web Novel Link, এসাইনমেন্ট) are excluded from the novel list.
  • Icon: 96x96 PNG at public/static/src/bn/golpercity/icon.png.

Validation performed

  • npm run check:plugin -- plugins/bangla/golpercity.ts → all 4 live checks PASS (17 novels, search OK, 36 chapters for ভ্যাম্পায়ার কুইন সিজন ওয়ান, 5812-char chapter text).
  • prettier --check and npm run lint: no issues from the new files.
  • npm run build:compile passes.
  • npm run build:manifest output verified to include golpercity (320 plugins; Bangla category present).

Authored with the OpenCode AI agent (Co-Authored-By trailer in commits).

tmfahad39 and others added 2 commits October 24, 2026 01:22
Scrapes the Bangla novel blog Golper City using the Blogger JSON feed:
labels are novels, posts are chapters in publish order.

Co-Authored-By: opencode <ai@opencode.dev>
Needed so plugins/bangla plugins are picked up by build:manifest.

Co-Authored-By: opencode <ai@opencode.dev>
@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes reach one new reading source and its build listing.

Fix the cover URL check before merging so EPUB export can finish.

Findings

  1. P1 Cover URLs break EPUB export ▶
  2. P2 Empty chapters hide errors ▶

Summary

Adds Golper City as a Bangla source using Blogger labels for novels and feed posts for chapters.

  • Golper City novels appear in Bangla lists and search.
  • Golper City chapters open in reading order with cleaned post text.

Reviews (1) · Last reviewed commit: "chore(bangla): register Bangla language ..." · Reviewed by Greptile

Comment on lines +206 to +209
resolveUrl(path: string): string {
const url = new URL(path, this.site);
if (url.origin !== this.site)
throw new Error('Golper City: invalid page address.');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Cover URLs break EPUB export

resolveUrl rejects external cover URLs. useEpubExport passes the novel's cover through this method before creating the file. Blogger thumbnails—and the defaultCover fallback—have a different origin, so the export throws after fetching the chapters. Allow absolute cover URLs here, and keep the same-origin check in the chapter-request path.

Knowledge Base Used: Plugin authoring contract

'script,style,iframe,noscript,form,.sharethis-inline-reaction-buttons',
)
.remove();
return content.html() || '';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Empty chapters hide errors

If an HTTP-success error page or changed layout has no div.post-body, parseChapter returns an empty string instead of an error. The reader accepts that result, and EPUB export substitutes “No content available.” Check that readable text or images remain after cleanup and throw when neither exists.

Suggested change
return content.html() || '';
if (!content.text().trim() && !content.find('img').length)
throw new Error('Golper City: no readable chapter content was found.');
return content.html() || '';

Knowledge Base Used: Plugin authoring contract

tmfahad39 and others added 2 commits October 24, 2026 03:21
- Keep the API's leading <h1> in chapter bodies so readers see the
  chapter title (including its number) in the chapter header.
- Add filter support to popularNovels/searchNovels via the search
  API: languages, status, sort_by, sort_order and adult content,
  with popular = popularity desc and Latest = last_updated desc.
- Bump version to 1.1.0.

Co-Authored-By: opencode <ai@opencode.dev>
@rajarsheechatterjee
rajarsheechatterjee merged commit 136dc39 into lnreader:master Oct 24, 2026
3 checks passed
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.

2 participants