DunneNote · Tutorial
Check a notebook with dnfmt
Look inside a notebook and check it for damage from the command line, without opening DunneNote.
Available10 min· Intermediate· DunneNote 0.9.2
In this tutorial you'll use dnfmt, the open-source command-line tool for
DunneNote notebooks, to see what a notebook holds, read a page as text, and check
the notebook for damage. None of this changes the notebook.
You'll need#
dnfmton your path.- A notebook from DunneNote 0.9, for example
Research.dunnenote. Its folder path is shown in DunneNote's notebook picker. - A terminal, opened in the folder that holds the notebook.
See what the notebook holds#
- Run
dnfmt inspect Research.dunnenote. You'll see the notebook's name, its schema version (18 for DunneNote 0.9), and how many sections, pages, canvases, tags and stored files it has. - If DunneNote has the notebook open,
inspectsays so. That's fine:dnfmtonly reads. - Run
dnfmt ls Research.dunnenoteto list the sections and pages in sidebar order. Each line ends with an id.
Read a page as text#
- Copy the id of a page from the
lsoutput. - Run
dnfmt cat Research.dunnenotefollowed by the id. - Each canvas on the page is printed in turn: rich text as paragraphs, tables as tab-separated rows, calendar events one per line, and a one-line summary for pictures and sketches.
Check for damage#
- Run
dnfmt verify Research.dunnenote. It checks the database, the page tree, and that every stored file exists and is referenced correctly. A healthy notebook ends withok. - Run it again with
--full. This also re-reads every stored file and checks it against its SHA-256 hash, so it takes longer on a large notebook. - To use it in a script, add
--strict. The command then exits with status 1 on any finding, not only on damage.
If verify finds a problem#
Don't try to repair the notebook by hand. Close DunneNote, keep a copy of the
notebook folder, and restore from your most recent backup. See
Backup and restore. If you'd like help, open a support
ticket and include the dnfmt verify --full output.
Next#
Something unclear or out of date? Open a support ticket.