Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am shombando on github.
* I am sbando (https://keybase.io/sbando) on keybase.
* I have a public key ASBzeRtf4A35patx6D0UKA5mO1UvssNxcGXl6IJ4jZNCzAo
To claim this, I am signing this object:
@shombando
shombando / gen-epub.ts
Last active September 15, 2023 17:11 — forked from kebot/gen-epub.ts
Generate Epub for Omnivore Articles
// get a list of articles based on search endpoint
import { gql, GraphQLClient } from 'npm:graphql-request'
import sanitizeHtml from 'npm:sanitize-html'
import epub, { Chapter } from 'npm:epub-gen-memory'
const OMNIVORE_API_KEY = ''
const OMNIVORE_ENDPOINT = 'https://api-prod.omnivore.app/api/graphql'
const graphQLClient = new GraphQLClient(OMNIVORE_ENDPOINT, {
headers: {