Skip to content

feat: add Hardcover reading goal module#112

Open
komadorirobin wants to merge 1 commit intodoctorhetfield-cmd:mainfrom
komadorirobin:pr/hardcover-module
Open

feat: add Hardcover reading goal module#112
komadorirobin wants to merge 1 commit intodoctorhetfield-cmd:mainfrom
komadorirobin:pr/hardcover-module

Conversation

@komadorirobin
Copy link
Copy Markdown
Contributor

Adds desktop_modules/module_hardcover.lua, a new homescreen module that fetches the user's active reading goal from hardcover.app and displays it as a widget on the SimpleUI homescreen.

Features:

  • GraphQL API fetch (POST https://api.hardcover.app/v1/graphql)
  • Goal selection: active today, nearest future, or most recently ended
  • Caching via G_reader_settings with configurable TTL (default 60 min)
  • Two layout types: Card (full) and Row (compact single-line)
  • Per-module Scale and Text Size controls
  • Show/hide section label toggle in settings
  • API key entry with automatic Bearer-prefix stripping
  • Manual refresh and configurable cache TTL in settings menu
  • Exports M._getCached and M.ensureFresh() for use by other modules (e.g. module_reading_stats can show goal progress as a stat card)
  • HTTP via ssl.https (LuaSec) with curl fallback

Requires a free hardcover.app account and API key
(hardcover.app > Settings > Hardcover API).

Adds desktop_modules/module_hardcover.lua, a new homescreen module
that fetches the user's active reading goal from hardcover.app and
displays it as a widget on the SimpleUI homescreen.

Features:
- GraphQL API fetch (POST https://api.hardcover.app/v1/graphql)
- Goal selection: active today, nearest future, or most recently ended
- Caching via G_reader_settings with configurable TTL (default 60 min)
- Two layout types: Card (full) and Row (compact single-line)
- Per-module Scale and Text Size controls
- Show/hide section label toggle in settings
- API key entry with automatic Bearer-prefix stripping
- Manual refresh and configurable cache TTL in settings menu
- Exports M._getCached and M.ensureFresh() for use by other modules
  (e.g. module_reading_stats can show goal progress as a stat card)
- HTTP via ssl.https (LuaSec) with curl fallback

Requires a free hardcover.app account and API key
(hardcover.app -> Settings -> Developer).
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.

1 participant