booksbooksbooks
I use GoodReads for my book reccomendations and I buy my books mostly from TheBookshop.ie. I made this project to be able to automatically check if books on my "shopping list" are available on TheBookshop. Still in active development and if there is not an official release version then don't expect even master to work properly all of the time (I do use it myself at the moment so it should work).
This is going to be my ultimate book procurement tool. I save a list of my recommended books that I'm interested in from GoodReads (and a list of all of the books that I own) and this application searches for not only all of the previously mentioned books but also any other books in any series that are found in that long list. So even if right now I'm only starting a series I can looking out to buy any of the books in the series to have for when I need them.
Usage
Setting Flags
A good few levers can be pulled from the http://localhost:2945/settings page to customise your experience
- If more books are found from an author who's in your shelf then add those books to the available list
- If a book is in a series then lookup all other books in that series
- Use discord webhooks for updates (very handy) about when books become available
- Alert when a book that was previously marked as available is no longer for sale
- Send an alert only when the total cost of the available books has exceeded €20 which means the order is eligible for free shipping
- Filter out specific authors from future search results so their books won't ever show up as available
Security
Unsanitised user input is written straight to the redis instance and is rendered as raw HTML and although its not entirely sensitive your supplied discord webhook is accessable through the settings page. Do not publically host this service. I'm currently running this on a cloud VPS (that has all ports blocked) and I can access it on my home network through a tailscale setup.
Testing
Have the local instance of redis running on port 6379 and away you go. Why hardcode in the redis to be local? Because its a test and it doesn't matter, its always going to be local. Use go test -v ./...
in the base directory to run everything. I prefer using gotestsum since its a bit nicer and I use this alias alias gotall='gotestsum --format=testname -- -v ./...'
to run all tests and alias gotestcov='go test -v -p 1 ./... -cover -coverprofile=coverage.out --tags=service && go tool cover -html=coverage.out -o coverage.html && firefox coverage.html'
to get coverage and open the output in firefox