Using FND’s excellent “spa.py” to make a single-page HTML files for my slides (inlines all resources)

4 Jun

http://github.com/FND/tiddlywebadmin/blob/master/spa.py

Turns everything into a single HTML file – pulls in the CSS and JS, and converts images into Data URIs. Nice job @FND 🙂 The best thing is, it just works. I tried it just now – "python spa.py index.html" against a slide pack and got back a single 1.2 MB HTML file.

This is something I've been looking for wrt TiddlyWiki (http://groups.google.com/group/tiddlywikidev/browse_thread/thread/be26913e18d7ed6a/fc9ba0a2c9a60971#fc9ba0a2c9a60971) but is also useful for HTML slides or any other HTML document you want to distribute.

I've been talking to Fred about MHTML support for our IE6 and IE7 addled friends. Hopefully we can make it happen. The other interesting thing would be to automagically download (and ideally cache) any external resources. For now, though, it's all I need to get my recent slide packs into single HTML files for ease of distro.
Advertisements

One Response to “Using FND’s excellent “spa.py” to make a single-page HTML files for my slides (inlines all resources)”

  1. Anonymous June 4, 2010 at 6:15 pm #

    Added remoting:http://gist.github.com/425746

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: