Skip to content

Goodreads yearly reading challenge progress tracker - #1149

Merged
matslina merged 9 commits into
tidbyt:mainfrom
panderson54:main
Mar 2, 2023
Merged

Goodreads yearly reading challenge progress tracker#1149
matslina merged 9 commits into
tidbyt:mainfrom
panderson54:main

Conversation

@panderson54

Copy link
Copy Markdown
Contributor

About:

This app displays the progress of the user towards their yearly reading challenge goals as tracked by the Goodreads site. Goodreads is integrated into kindle devices so the desired workflow is someone finishes a book on their kindle and automatically sees the progress on their tidbyt within one day.

Display:

The app displays different graphics tracking your progress from 0 - 13 books, the average person reads 12 books a year so this seemed a natural stopping point. I may at a later point add more animations or some sort of dynamic image.

bookdemo

Getting Data:

Goodreads had killed off its public API in 2020. Given what I am calling a challenge ID (not a user ID nor as far as I can tell derived from your users ID) https://www.goodreads.com/user_challenges/{challenge_id} will serve up any public profile's yearly reading challenge. The app makes a GET request to https://www.goodreads.com/user_challenges/{challenge_id and parses the returned HTML using starlark's regex libary to pull reading progress and goals from a div entitled 'progressText'.

Parsing HTML is more fragile than making a real API call, this page has been stable and Goodreads is not frequently updated but this is obviously more fragile than a proper API call. Should Amazon/Goodreads allow public API calls again I will update this app to use a more stable endpoint.

gencode and copying over original code for gooreads app.
Ran the following Pixlet commands to verify output:
Profile
Format
lint
check

Moved to a secret key for my own Goodreads challenge ID

Removed testing code
Changed the schema text
Added a readme.md
@tidbyt-bot

tidbyt-bot commented Feb 20, 2023

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@panderson54

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

Comment thread apps/readingchallenge/reading_challenge.star
Comment thread apps/readingchallenge/reading_challenge.star Outdated
Updated the cache naming to append the challengeID

Move information about where to find the challenge ID into the app description rather than the schema description
@panderson54
panderson54 requested review from matslina and removed request for betterengineering February 22, 2023 06:47
Comment thread apps/readingchallenge/reading_challenge.star Outdated
Comment thread apps/readingchallenge/reading_challenge.star Outdated
@matslina
matslina merged commit 8d1c736 into tidbyt:main Mar 2, 2023
@tidbyt tidbyt locked as resolved and limited conversation to collaborators Mar 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants