Tooling for Notion journaling synthesis, by @wustep
This repo creates some utilities and scripts for synthesizing journals from Notion.
Currently, it can ingest text from a Notion DB and dump thoughts in various organizational patterns. More coming soon!
Inspired by this review of Sheila Heti's Alphabetical Diaries.
- Follow the instructions in https://www.notion.so/help/create-integrations-with-the-notion-api to create a Notion integration and receive an API key!
- Share the desired pages and databases in your workspace with the Notion integration.
- With NPM installed, run
npm install
and in this root directory. Optionally usenpm install -g
instead to install globally so you can use the commandjourno
directly. - Use
npm build
to build the codebase. - Now, you can use either
npm run journo [command]
orjourno [command]
(if you used-g
flag above) to execute commands below!
- ✅
help
- get list of commands - ✅
set-data-folder /path/to/folder
- set data folder for imports, ingests, and exports, will default to /data/ in project - ✅
set-api-key [Notion API key]
- to add and store an integration API key in .env file - ✅
import-db [Notion Database URL]
- to ingest pages from a Notion database - ✅
import-page [Notion URL]
- to ingest a Notion page - ✅
import /path/to/text/file
- to ingest a text or md file - ✅
thoughts
- dump all the ingested files into a list of thoughts, with some different organizational options- ✅
--abc
(alphabetical),--regex
(filter by regex),--sentences
(split by sentences),--newlines
(add newlines),--dedupe
(skip dupes),--words
(split by words),--random
(randomize order)
- ✅
import-stats
- get various stats on all imported contentcreate-notion-db [Notion Page URL]
- to create an export database at the given page (it will be nested at that page)export-csv /path/to/csv/file
- to export to csvexport-db [Notion Database URL]
- to export to a Notion export database that matches the given URLset-db [Notion Page URL]
- to set the default notion DB for exporting purposestrash
- delete all imported content and saved databases
- Run
npm run dev
to execute the program in developer mode, which means it'll auto-build on file edits and let you input commands more quickly.