Skip to content

Your first notebook pages

In this tutorial you will write a page in a Supernote notebook, and then scan it: Freehand records the page and draws it, ready for your AI to read. By the end you’ll have seen how Freehand keeps track of which pages are new, which have changed and which are read.

It builds on Your first proof. Do that one first: it installs the freehand command and writes your config.

On your Supernote, open or start a notebook and write a few lines on a page. Anything will do: a thought, a to-do, a question for your AI. Sync the device and wait for Google Drive for desktop to catch up.

Your notebooks sync to the Supernote/Note folder in your drive, one .note file for each. List them:

Terminal window
ls "<your drive>/Supernote/Note"

Pick the notebook you wrote in. In the rest of this tutorial it’s Ideas.note: use your own file’s name.

Terminal window
freehand pages --state ~/.freehand/pages scan "<your drive>/Supernote/Note/Ideas.note" --out ~/pages-scratch > ~/scan.json

The first time, uv installs the Python library that reads Supernote files, which takes a moment. Then the scan does three things:

  1. It records every page in the notebook, in your state folder, ~/.freehand/pages. That folder holds one small JSON file for each notebook: page ids, dates, a fingerprint of the ink and a status. It holds nothing about what your pages say.
  2. It draws each page that’s waiting to be read, new or changed, as a picture in ~/pages-scratch. Look inside: you’ll find a folder for your notebook with p0001.png and a p0001.json beside it. The JSON has any keywords you added on the device, and the device’s own handwriting recognition, which is only a hint.
  3. It prints a summary of every notebook and its waiting pages as JSON, which you’ve saved in ~/scan.json. A line on the terminal gives the counts, for example ideas: 14 pages | new 14 | changed 0 | unchanged 0 | blank 0 | skipped 0.

Open p0001.png. It’s your page, drawn from the notebook file.

Terminal window
freehand pages --state ~/.freehand/pages status
ideas: unparsed 14 | next: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

Every page has a status. The ones you care about start as unparsed: nobody has read them yet. Your AI works through the waiting pages, oldest first, in two steps:

  • parsed: someone has written down what the page says.
  • processed: what’s on the page has been filed where it belongs, in your notes or your to-do list.

Read p0001.png yourself, as your AI would, and then tell Freehand you have:

Terminal window
freehand pages --state ~/.freehand/pages set ideas 1 parsed

The notebook name is the one in the scan’s output. status now shows one page fewer waiting. Write something new on that page on your Supernote, sync, and scan again: the page comes back as changed, because its ink is different. Freehand never assumes a changed page says what it said before.

The pictures are of your handwriting, so they live only as long as you need them:

Terminal window
rm -r ~/pages-scratch ~/scan.json

The state folder stays. It has nothing private in it.

You’ve seen how Freehand follows a notebook page by page, and how it keeps your handwriting out of its records. Scanning by hand every time would be tedious, though. The next step is to let a watcher do it whenever you sync: run the watcher in the background. To have your AI read and file the pages, see read Supernote notebooks.