Skip to content

opatry/my-bookshelf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

486 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Build and Deploy Status

My Readings

This repository is the source of a static site generator used to share the books I've read.
Each book is rated and can be marked as a favorite.
The content is displayed in a filterable, sortable, and paginated table.

A dedicated section for recent readings is also available for convenience.

Most of the content is written in [Mโ†“] Markdown and served by nanoc.

The website is available at https://lecture.opatry.net/, hosted on ๐Ÿ”ฅ Firebase Hosting.

You can sort by multiple columns by holding the Shift key.

On the Last Readings page, you can filter to show only favorites (indicated by a heart icon on the right).

Alternatively, you can browse by date using the calendar.

An RSS feed is also available, for those who still believe in it!

๐Ÿ›  Requirements & Initial Setup

$ gem install bundler
$ bundle install
$ bundle exec nanoc compile

This project also requires ImageMagick for resizing and automated image processing. It was convenient at first, but has become a bit cumbersome due to the transition from ImageMagick 6 to 7.

To avoid compatibility issues (since version 7 changed command-line names and some parameter orders), most Linux distributions remain on version 6. However, version 7 is the way forward. On macOS, version 6 can still be installed (brew install imagemagick@6), but it's not a long-term option.

Version 7 was released around 2016 (see 7.0.1-0 tag or the release archive). As of 2025, this project now fully relies on version 7. While 6.x releases are still available, they are considered legacy, which puts the project in an awkward state.

The main website for ImageMagick can be found at https://imagemagick.org. The most recent version available is ImageMagick 7.1.2-8. The source code for this software can be accessed through a repository. In addition, we maintain a legacy version of ImageMagick, version 6. Read our porting guide for comprehensive details on transitioning from version 6 to version 7.

$ brew install imagemagick@7

For Linux, follow the build instructions from source.

Firebase Hosting

Firebase CLI Reference

Install CLI Tools

$ npm install

Deploy

$ ./node_modules/.bin/firebase deploy --only hosting

Fetch Google Books convenience script

You can fetch data for a single book (it will create a new file if one doesn't exist):

./fetch_book.sh "Book Title" "Author"

Or process a batch from a text file, following the format:

title | author | rating | description

Each line represents a book entry. The rating can be a number from [1..10] or in X/Y format (normalized to a 10-point scale). Run the script without arguments for usage details.

โš ๏ธ The Google Books API is not very accurate, and its database is incomplete. Always verify results and logs.

Covers in particular are often poor. You can find better alternatives using Google Images or Amazon links in the logs.

This script requires a GOOGLE_BOOKS_API_KEY environment variable, which can be created in the Credentials section of the Google Cloud Platform console.

Google Books API Auth

Uses OAuth 2.0 or an API key.

See https://developers.google.com/books/docs/v1/using

Add credentials (Web type, allowing redirect URI customization and port specification):

Store the resulting JSON file in the project's resources.

Enable the Google Books API:

or directly:

API Reference: