This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| """ | |
| Embed images into an HTML document | |
| """ | |
| import base64, mimetypes, re, sys | |
| ## from https://gist.github.com/jsocol/1089733 | |
| def img_to_data(path): | |
| """Convert a file (specified by a path) into a data URI.""" |