Too Long; Didn't Read (TL;DR 📖) Grab my
gm-notepad-swn-free dataset for some tables to add to your
I have continued refining my
See my announcement about
I have developed
gm-notepad into a satisfactory funtional state.
I wanted tables to feed into
gm-notepad. And I immediately thought of Stars without Number: Revised Edition.
Or frankly anything by Kevin Crawford, as he apparently dreams in random tables
First, I looked at munging data from
swnt, a command line tool for “Stars without Number”. It was doable but I did a bit more digging.
Looking at my folder full of Sine Nomine products, I saw
StarsWithoutNumberRevised-DeluxeEdition-011418.epub. On a lark I typed
vim StarsWithoutNumberRevised-DeluxeEdition-011418.epub, and got the following:
1 " zip.vim version v28 2 " Browsing zipfile StarsWithoutNumberRevised-DeluxeEdition-011418.epub 3 " Select a file with cursor and press <enter> 4 5 mimetype 6 OEBPS/cover.xhtml 7 OEBPS/SWNRevised-DeluxePDF-011418-EPUB.xhtml … more lines of no importance to me
And a part my brain remembered: “Of course and EPUB is built from an Hypertext Markup Language (HTML 📖) document.” I had forgotten (or didn’t know) that an EPUB is a fancy ZIP file.
Jackpot! I could use
nokogiri to parse the
OEBPS/SWNRevised-DeluxePDF-011418-EPUB.xhtml document and extract the tables.
With some Ruby coding, I got the basic process down, and generated the tables for
I have a separate code repository that I’m working on for data extraction first from Stars without Number, then for other Sine Nomine products that have an EPUB. I will only release the datasets for tables that are freely available.
At present I have:
- One Roll Non-Player Character (NPC 📖)
- One Roll Patron
- One Roll Urban Encounter
- One Roll Wilderness Encounter
- Planetary Tag
Thank you Kevin Crawford for taking the time to release your content as an EPUB. I look forward to writing a library that others can use to extract tables from Sine Nomine’s publications.