Notebook files and Python
What a notebook can hold besides text, tables and checklists, and how to get notebooks in and out of Haruspex. For the basics see the notebooks page.
Keep files and pictures
+ Add card → Picture… or File… picks files to keep in the notebook; dropping files onto a notebook does the same, placing them after the card under the pointer. Pictures show in the card, and clicking one enlarges it. Other files show their name and size: Open opens them in the app your computer uses for that type, Save a copy… saves them where you choose, and PDFs have Preview. Programs and scripts aren't opened from a notebook; save a copy instead. Replace… swaps in another file. Files up to 200 MB can be kept, and they stay on this computer.
Work with tables in Python
+ Add card → Python holds code that runs in the Python sandbox (Settings → Chat → Enable Python sandbox). The notebook's tables are pandas DataFrames in tables["Title"]; code reads them but never changes them. ▶ Run (or Ctrl / ⌘ + S) runs it and keeps the output, plots included; "stale" means a table it read has changed since. Put a DataFrame in result and Save as table card keeps it as a new table. The cards of one notebook share variables; Reset clears them.
Export a notebook
⋯ → Export as… on a notebook saves it as a PDF, a Word or OpenDocument file, a web page (one file, pictures inside), Markdown, or a Jupyter notebook (Python cards become code cells, with their output). Markdown with files or pictures is saved as a .zip with them in files/. Chart cards go in as pictures of their table as it is (see notebook-charts). A table's ⋯ → Export table as CSV… / Excel… saves that table alone.
Print or email a notebook
⋯ → Print… on a notebook opens it as a page, pictures inside, and then the print dialog; Print… in that window opens the dialog again. ⋯ → Email… opens a new message with the notebook as formatted text, in the Review email window: add the recipients and click Send. Its pictures and plots go inside the message and its file cards are attached; Attach as PDF adds the notebook as a PDF too. Email shows only when an email account has Allow sending on (see the email page). A card's ⋯ → Print card… and Email card… do the same for that card alone. Neither is offered for a notebook on another computer.
File a notebook on GitHub
With the GitHub server running (Settings → MCP servers, see the mcp-servers page), a notebook's ⋯ → File as GitHub issue… opens File on GitHub with the notebook as the issue's text. ⋯ → Add to a GitHub issue… posts it as a comment instead: give the issue's number or paste its link. A card's menu has the same two for that card alone.
Pick the repository (the one you used last comes first), edit the title and text, tick any of the repository's labels, and click Create issue or Add comment. A notice links to it on GitHub. Tables, checklists and code show on GitHub as they do here. Pictures and files are named in the text but not uploaded, since GitHub's API can't take them. The GitHub account behind the server (its token, or your sign-in) needs permission to write issues in that repository.
Import notes and tables
⤓ Import… under the notebook list makes a notebook from each Markdown, CSV or spreadsheet file you pick; ⋯ → Import into this notebook… adds to the open one. Markdown is split at its ## headings: its tables become table cards and its task lists checklists. A CSV becomes one table, and a spreadsheet a table per sheet (up to 5,000 rows each).
Back up and restore every notebook
Settings → Notebooks → Back up… saves every notebook to one .zip file: cards, tables, files, earlier versions and Trash. Notebook chats aren't included. Keep it somewhere else, or use it to move notebooks to another computer.
Restore… picks a backup and says what's in it. Restore (or Add the missing ones, when some are here already) adds the notebooks that aren't here and leaves the rest alone. Replace with the backup puts the backup's notebooks back as they were, losing changes made since, and moves notebooks not in it to Trash. It first saves what's here to notebook_backups in Haruspex's data folder. A file in the backup that is damaged isn't restored, and the message says how many.