macOS · automation

Automating PagePacker with AppleScript

PagePacker has been scriptable since Matt Neuberg, one of the people who wrote the book on AppleScript, added the dictionary to it. Here's how to actually use that.

Why script a notebook maker

Dragging eight pages into place by hand is fine for one notebook. It stops being fine the moment you need thirty: a teacher prepping a week of foldable worksheets for every class, or someone converting a folder of scanned zine pages into a stack of print-ready sheets. That's exactly the kind of repetitive job AppleScript exists to kill.

PagePacker's scripting support isn't a bolt-on. Matt Neuberg, author of O'Reilly's AppleScript: The Definitive Guide, is credited in the project for making PagePacker AppleScriptable, and the app ships with a real .sdef dictionary you can open straight from Script Editor.

What's actually in the dictionary

Open PagePacker's dictionary in Script Editor (File → Open Dictionary → PagePacker) and you'll find one custom suite on top of the standard open/save/print/quit commands every macOS app gets for free:

That's the whole model: a document is always 8 pages, and scripting one means setting what file sits on each page.

A basic script

This opens a new document, sets the page size, and fills all 8 pages from files in a folder:

tell application "PagePacker" set page size to letter make new document tell document 1 repeat with i from 1 to 8 set pageFile to POSIX file ("/Users/you/notebook-pages/page" & i & ".pdf") set file source of page i to pageFile end repeat save print document 1 end tell end tell

Swap the folder path for wherever your pages actually live, and this alone turns "drag eight files in by hand" into "run script."

Batching multiple notebooks

The same idea extended over a list of page sets can build a whole stack of notebooks unattended, which is the actual point of scripting this instead of using the app by hand:

tell application "PagePacker" set page size to A4 set notebookSets to {{"weekOne1.pdf", "weekOne2.pdf", "..."}, ¬ {"weekTwo1.pdf", "weekTwo2.pdf", "..."}} repeat with pageSet in notebookSets make new document tell document 1 repeat with i from 1 to 8 set file source of page i to POSIX file (item i of pageSet) end repeat save print document 1 close document 1 end tell end repeat end tell

Fill in real paths for each set and you have a script that walks away and comes back with a printer tray full of finished notebooks.

Or let an agent do it: the Claude Code zine skill

If you use Claude Code, you don't have to write any of the above by hand. PagePacker's GitHub repo ships a Claude Code skill that reads a report, a PDF, or a topic you ask it to research, distills it into eight short panels — a cover, a handful of key-terms/notes panels, a back cover — and drives PagePacker through exactly the scripting dictionary described on this page to assemble the zine.

It isn't a new layer on top of the app; it's setting the same file source property, one page at a time, that the scripts above set by hand. The one step it can't script away is the final export: PagePacker's print command doesn't honor a scripted output path, so it opens the real Print dialog and you choose PDF → "Save as PDF" yourself.

You don't need PagePacker's source to install it — just the app itself and one command, which pulls only the skill's files out of the repo:

mkdir -p ~/.claude/skills/zine curl -sL https://github.com/robrohan/PagePacker/archive/refs/heads/master.tar.gz \ | tar -xz -C ~/.claude/skills/zine --strip-components=4 PagePacker-master/.claude/skills/zine

That drops it into ~/.claude/skills/zine, available in any project you use Claude Code in. Then just ask it something like: "use the zine skill to make a pocket zine from this article."

Keep exploring

What is a pocket notebook? · How to fold one by hand · Zines, GTD, and the hipster PDA · Source on GitHub