This repository has been archived by the owner. It is now read-only.
Ruby scripts that can generate a whole Swift Playgrounds for iPad book from a Markdown file
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Sample.playgroundbook/Contents
LICENSE
README.md
Rakefile
generator.rb
lib.rb
sample.md
test.rb

README.md

Swift Playgrounds for iPad Book Generator

This Ruby program parses a Markdown file and generates a Swift Playgrounds for iPad book (file with the extension .playgroundbook.)

How It Works

Check the file sample.md and Sample.playgroundbook files for examples of input and output. The current version of this program simply generates a book with a single chapter, separating the pages with horizontal rulers (that is, the --- marker in Markdown, which translates as a <HR> tag in HTML.)

It parses the first <H1> elements and uses its value as the title of the chapter.

You can test the output of this tool by dropping the file Sample.playgroundbook in the iCloud/Playgrounds folder of the Finder.

Alternatively, the Rakefile included in this project shows how to use the command line options.

Requirements

It requires the kramdown and plist gems:

gem install kramdown
gem install plist

License

See the LICENSE file.