Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/notwoods/tea-book
e-Book generator for my tea menu
https://github.com/notwoods/tea-book
deno epub notion svg
Last synced: 2 months ago
JSON representation
e-Book generator for my tea menu
- Host: GitHub
- URL: https://github.com/notwoods/tea-book
- Owner: NotWoods
- Created: 2023-02-08T08:11:38.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-12T18:32:06.000Z (8 months ago)
- Last Synced: 2024-10-06T14:54:28.135Z (3 months ago)
- Topics: deno, epub, notion, svg
- Language: TypeScript
- Homepage:
- Size: 3.02 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tea-Book: e-ink tea list
At home, I have a display with small jars of loose tea leaves. I wanted to have
some way to quickly reference what was poured out, so I created this script to
pull a
[list of teas from Notion](https://tigeroakes.notion.site/1043e8edb9094976af12a59f25e41286?v=2f64f0297c1649458f5958ec4e68cd03).
It generates files for an e-reader to display, which allows me to have an easy
to update handheld menu to show guests when they visit.## Generate summary image
The summary image shows the 12 teas on the display (6 for the top shelf, 6 for
the bottom shelf). Deno is used to generate an SVG file named `tea.svg`, which
can then be converted to a PNG file named `tea.png` using
[Inkscape](https://inkscape.org/). You can either open Inkscape's UI and export
the SVG manually, or use its CLI to export the SVG with one command.```powershell
deno run --allow-net=api.notion.com --allow-env --allow-read --allow-write .\src\generate.ts
inkscape --export-type="png" tea.svg
```This image is used as an e-book cover. It can also be uploaded separately as a
screensaver for the e-reader. For the Nook Simple Touch, I placed file in the
following folder on the e-reader hard drive (`E:`):```
E:\screensavers\Tea\tea.png
```## Generate details ebook
Descriptions of each tea are written to an e-book. The e-book includes a table
of contents page formatted as a table with summarized tea information, followed
by a chapter for each tea. Deno generates a Markdown file named `tea-list.txt`
which is then converted by [Pandoc](https://pandoc.org/) into an ePub file named
`tea.epub`. ePubs are just zip files with a bunch of HTML, so you can validate
the content by making a copy with a `.zip` suffix instead of a `.epub` suffix.```powershell
deno run --allow-net=api.notion.com --allow-env --allow-read --allow-write .\src\generate.ts
pandoc tea-list.txt -o tea.epub --epub-title-page=false
cp tea.epub tea.zip
```Validate result with https://epub-reader.online