Script to sync your read books from Audible to Goodreads and StoryGraph.
Note
This is intended to be run from macOS.
Download the latest release of the gem. Install it via:
gem install good-audible-story-sync.gem
There should now be a good-audible-story-sync
executable in your path. Run it via:
good-audible-story-sync
You will be prompted to log in to Audible and Storygraph. The tool saves your encrypted login credentials in a SQLite database and stores the encryption key in the macOS keychain, under the name 'good_audible_story_sync_encryption_key'.
After signing into Audible, it will create a new device that you can see on your Amazon Installed on Devices page for Audible. This allows accessing your Audible library information, such as which books you finished reading and when.
Usage: good-audible-story-sync [options]
-d DATABASE_FILE, Path to Sqlite database file. Defaults to good_audible_story_sync.db.
--database-file
-e EXPIRATION_DAYS, Max number of days to use cached data, such as Audible library, before refreshing. Defaults to 1.
--expiration-days
% good-audible-story-sync
🔐 Looking for 'good_audible_story_sync_encryption_key' in cheshire137's keychain...
ℹ️ Using GoodAudibleStorySync encryption key from keychain
⚙️ Parsing options...
ℹ️ Ensuring table audible_books exists...
ℹ️ Ensuring table storygraph_books exists...
ℹ️ Ensuring table goodreads_books exists...
ℹ️ Ensuring table credentials exists...
ℹ️ Ensuring table sync_times exists...
a) display Audible library
p) display Audible user profile
g) display Goodreads library
s) display Storygraph library
l) look up book on Storygraph
c) update Storygraph library cache
f) mark finished books on Storygraph
q) quit
Choose an option:
Built using Ruby version 3.3.6 on macOS.
bundle install
bin/good-audible-story-sync
Run srb tc
to run the Sorbet type checker.
Update VERSION
in version.rb.
git tag v0.0.x main # use the same version string as in `VERSION`
git push origin tag v0.0.x
This will trigger a workflow that builds the gem and creates a new release.
gem build good_audible_story_sync.gemspec
This will create a file like project_pull_mover-0.0.1.gem which you can then install:
gem install good_audible_story_sync-0.0.1.gem
- mkb79's Python Audible library for providing an example of how to authenticate with Audible and use its API, including the unofficial API docs.
- mechanize gem for letting me automate Storygraph and Goodreads even without an API.