html-inliner: 150eb9035d644c81ab983c75530deb15323c05ac

     1: # HTML Inliner #
     2: 
     3: This script reads HTML data from stdin and writes it to stdout.
     4: 
     5: It looks for `script` elements with a `src` attribute; and `link` elements with
     6: `type="text/css"`, `rel="stylesheet"` and a `href` attribute.
     7: 
     8: The `src` and `href` URLs are resolved (relative to `BASE_URL` env var, if
     9: given), and their contents fetched. This content is encoded as Base64 and put in
    10: a data URI in place of the original URL.
    11: 
    12: Areas for improvement:
    13: 
    14:  - URL handling/resolving
    15:  - Better MIME handling (we assume all scripts are `text/javascript` and all CSS
    16:    is `text/css`)
    17:  - Support for inlining `img` elements.

Generated by git2html.