Skip to content

Instantly share code, notes, and snippets.

View AndrewBennet's full-sized avatar

Andrew Bennet AndrewBennet

View GitHub Profile
@tternes
tternes / readinglist-googlebooksid-resolver.js
Created December 31, 2020 23:03
Simple script to resolve Google Books IDs in Reading List export files
// NOTE: filenames hardcoded!
const got = require('got')
const csv = require('csv')
const fs = require('fs')
async function fetchGoogleBookId(isbn) {
const queryUrl = `https://www.googleapis.com/books/v1/volumes?q=isbn:${isbn}`
const response = await got(queryUrl)
const json = JSON.parse(response.body)