frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: An interactive kids' book written in Emacs Org Mode

4•dskhatri•7mo ago
I authored and developed an interactive fiction book in Emacs using Org mode and Twinery. Read an entire storyline/adventure of the Web Book, no login required here: https://tendollaradventure.com/sample/

---

I authored and developed an interactive children's book about entrepreneurship and money management. The journey started with Twinery, the open-source tool for making interactive fiction, discovered right here on HN. The tool kindled memories of reading CYOA style books when I was a kid, and I thought the format would be awesome for writing a story my kids could follow along, incorporating play money to learn about transactions as they occurred in the story.

Twinery is a fantastic tool, and I used it to layout the story map. I really wanted to write the content of the story in Emacs and Org Mode however. Thankfully, Twinery provided the ability to write custom Story Formats that defined how a story was exported. I wrote a Story Format called Twiorg that would export the Twinery file to an Org file and then a Org export backend (ox-twee) to do the reverse. With these tools, I could go back and forth between Emacs and Twinery for authoring the story.

The project snowballed and I ended up with the book in digital and physical book formats. The Web Book is created using another Org export backend.

Ten Dollar Adventure: https://tendollaradventure.com

Sample the Web Book (one complete storyline/adventure): https://tendollaradventure.com/sample/

I developed another nifty feature that lets readers of the physical book access an online dashboard of achievements anonymously using secret "magic words" in lieu of requiring personal information. I couldn't muster the effort to write a special org export backend for the physical books unfortunately and used a commercial editor to format these.

Twiorg: https://github.com/danishec/twiorg

ox-twee: https://github.com/danishec/ox-twee

Previous HN post on writing the transaction logic using an LLM in Emacs: https://blog.tendollaradventure.com/automating-story-logic-w...

Twinery 2: https://twinery.org/ and discussion on HN: https://news.ycombinator.com/item?id=32788965

Comments

mgd•7mo ago
Org mode never ceases to amaze me. Great work, I'll see what my kids think of the book
dskhatri•7mo ago
I've been in love with Emacs and Org Mode for over a decade mostly as a user, only writing basic Elisp in my .emacs initialization file. Writing this book made me even more enamored with Emacs as I learned to write a few packages, and spent much time browsing the Org source code, especially around the export engine [1]. It was useful going through one.el source code as well [2]

[1] https://github.com/emacs-mirror/emacs/blob/master/lisp/org/o... [2] https://github.com/tonyaldon/one.el

And, thank you!

idlip•7mo ago
Hi dskhatri

Do you use reddit? If so please do post it in r/emacs and r/orgmode The community will be thrilled to know this feat. Really amazing work!

dskhatri•7mo ago
Thank you! I will attempt to share the technical details of the implementation there.
idlip•6mo ago
Hey, just heads up reminding. Do try to post it on reddit. I will try to give link in mastodon.