Building a document from a Drafts template

I helped a student teacher out with a Drafts related query over on the forum. I’m posting a link here as it had some useful bits and pieces in it, and I figured it might be useful to have a cross-reference in the Drafts forum.

Just converting Markdown didn’t seem to be enough to do the job - the formatting didn’t look to permit that. It utilises a standardised input structure, template tags, HTML output, and a Shortcuts custom shortcut to generate a PDF at the end of the process.

Hope folks find it useful.


I’m sat here clapping :grinning: Well done.

This may be a daft question, but how did you formulate the HTML for the template? Was it a ‘simple’ conversion/export from the Word doc or was more work/knowledge involved?

I started with saving the Word document as HTML. Then I ran it through a formatter. After that I stripped out all the CSS and added back in the CSS I found it actively using. Finally I “corrected” the HTML as I worked through and tested the processing - as the OP noted, the original template was somewhat imperfect.

1 Like

Great. Thanks for clarifying.

It might’ve been simpler to create the HTML by hand. :slight_smile:

Hands up if you’ve done exactly that so many more times than you wish you had had to.


Word and I have a love hate relationship. I personally really like Word (not as much as Excel, obviously) and for 99% of the things I ever want it to do, I can make it do it pretty well. What I don’t like are the garbage templates and lack of standardised formatting that I receive from “others”. They drive me :face_with_symbols_over_mouth: insane at times. It often takes me as long to fix the blasted document as to complete it.

1 Like

This is precisely why I author everything in Markdown or a similar text-based language.

(Recently, whenever I’m refurbishing a presentation, it’s my standard practice to convert it to Markdown - for my special PowerPoint pptx maker.)

That’s just a little bit awesome!

Just curious, but what would be the easiest way you would recommend to create the HTML by hand? Would it be a WYSIWIG tool or pure coding? Genuinely interested to hear.

Personally, I’d do it by hand.

But note that Drafts itself could get you a long way. Not just turning Markdown syntax into HTML but note that Markdown can contain embedded HTML. So form elements might be embedded in Markdown as HTML.

And I’m sure there are tons of tools out there but for this one off case I probably wouldn’t bother.

… What tool are using to accomplish this (if not PowerPoint?)


I’m using some python code that uses the python-pptx package to create a presentation. This is entirely outside PowerPoint.

(Unfortunately, I’m not at liberty to share or open source the code; All I produce belongs to my employer.)

If you have access to a desktop computer, then you can convert Markdown to PowerPoint using Pandoc. Search the manual page for ‘PowerPoint’.

1 Like