GitXplorerGitXplorer
D

bibliophile-backend

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
3cec8f63bfb098d00957ed659e989e635454bf7f

Switch from Travis to GitHub Actions

DDavidCain committed 4 years ago
Verified
812f121d65fd8173abd447f7cce4c2e22f98b2c9

Change default branch title at SFPL

DDavidCain committed 4 years ago
Verified
2d94d0f74ca20a21a1602e8eea08e8aa6d8b363b

Use a more generic query struct

DDavidCain committed 4 years ago
Verified
54beae9165b9a259fcaf09ea4f636a613be92221

Fix typo in Travis dist name

DDavidCain committed 4 years ago
Verified
66f8dca304ff3c0ef80f23cff28c8bcbc0b7f882

Extract the Goodreads ID when reporting books

DDavidCain committed 4 years ago
Verified
83e5bee116c48aab9b793df27ee35ee4bd3c2737

Coerce books with a blank ISBN to null

DDavidCain committed 4 years ago

README

The README file for this repository.

CI Code Coverage Code style: black

Bibliophile backend

This is a Python-based tool for finding books at the local library.

It parses your "to read" list from Goodreads.com and checks which items are available at a library of your choosing.

Looking for a GUI?

This repository is all you need to use the tool locally via the command line. For a web-based user interface, see Bibliophile.

Can I use this?

If you live near one of the ~190 public libraries using the BiblioCommons system, then running this software should work for you. It relies on undocumented APIs, so your mileage may vary.

  1. Apply for a Goodreads Developer Key.

  2. Obtain your Goodreads user id

  3. [Optional] Set both these values in your .bashrc

    export GOODREADS_USER_ID=123456789
    export GOODREADS_DEV_KEY=whatever-your-actual-key-is
  4. Install Poetry

  5. Run the script!

    make  # One-time setup of dependencies
    ./lookup.py --biblio seattle  # Set to your own city!

Make sure you adhere to the terms of Goodreads' API, and have fun.

Other options

You can choose to show only titles available at your local branch, select titles from another Goodreads shelf, etc. Pass --help to see all options:

usage: lookup.py [-h] [--branch BRANCH] [--shelf SHELF] [--biblio BIBLIO]
                 [--csv CSV]
                 [user_id] [dev_key]

See which books you want to read are available at your local library.

positional arguments:
  user_id          User's ID on Goodreads
  dev_key          Goodreads developer key. See https://www.goodreads.com/api

optional arguments:
  -h, --help       show this help message and exit
  --branch BRANCH  Only show titles available at this branch. e.g. 'Fremont
                   Branch'
  --shelf SHELF    Name of the shelf containing desired books
  --biblio BIBLIO  subdomain of bibliocommons.com (seattle, vpl, etc.)
  --csv CSV        Output results to a CSV of this name.

Cloud-based deployment

This may also be deployed as Lambda functions in AWS. See the Bibliophile README for instructions.