Skip to content
Frawkenstein to convert presentations written for Deckset to be compatible with conversion via Pandoc and reveal.js to HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
LICENSE
README.md
converter.awk
dark.css
image_test.md
makefile
messages.awk
split_test.md
text_test.md

README.md

Reformatter for markdown presentations

Small Frawkenstein to convert presentations written for Deckset to be compatible with conversion via pandoc and reveal.js to HTML.

Note that this is customised for how I write my slides and the theme I use. Caveat emptor.

An example:

"Features"

  • Looks similar enough (I use the Inter font family instead of Ostrich Sans)
  • I didn't want to fight with CSS a lot, so, fixed sizes where needed (so, it will look like crap on phones)
  • It just works good enough to convert at least the presentation above, haven't tried with any others yet
  • Expects some whitespace exatly where I put it in my markdown, and some is actually needed by pandoc ¯\_(ツ)_/¯
  • I don't recommend you use this, to be fair

How does it work

It's just an ad-hoc parser for markdown, using full slides as "tokens". Since getting the DOM/CSS to play along can be tricky, there are some parts of the slide that need rewriting before being passed to pandoc. This makes the code slightly convoluted.

The workflow is that the AWK parser converts markdown files with extension .md into reprocessed files with extension .md_2, then pandoc uses these to create an HTML page. The intermediate .md_2 files are kept, and are human readable, just some rehashing of the original presentation (useful to find places where the parser is doing something pandoc doesn't like)

You can use make verbose to see the rules applied in the parsing/building, and there is a set of example presentations (with image splits, images, floats, text formatting) to see what is being done. You will need to serve them somehow (make serve will start a Python 3 folder server, but you need Python 3 for that)

How to use it

Clone or download, add your markdown file to the folder where the .awk and makefile files are and run make. You will need gawk for this, since I use two exclusive features (includes and deleting arrays).

The current settings will use reveal.js from the web. If you want a fully standalone version, you need to download reveal.js to a folder called reveal.js (this is the default when you unzip their releases) and run make local.

Why? Why AWK?

  • I love using Deckset, but I miss having a shareable version where animated gifs play. Fixed.

  • I have always felt AWK is underrated as a language. It is quick to write, readable and gets the job done pretty nicely. This is obviously not the cleanest AWK I have ever written, but it got the job done pretty fast. And if you are asking tests? I'm working on that.

You can’t perform that action at this time.