Created
January 7, 2017 17:07
-
-
Save mdgriffith/1cf022e60d80f8387e183d6b86e47223 to your computer and use it in GitHub Desktop.
This file contains 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
# This is a dictionary for the file-type information when | |
# building the manifest entries in the OPF. | |
entry_dict = ({"xhtml": 'application/xhtml+xml', | |
"html": 'application/xhtml+xml', | |
"css": 'text/css', | |
"png": 'image/png', | |
"jpg": 'image/jpeg', | |
"jpeg": 'image/jpeg', | |
"tiff": 'image/tiff', | |
"gif": 'image/gif', | |
"mp4": 'video/mpeg4', | |
"mp3": 'audio/mp3', | |
"otf": 'application/vnd.ms-opentype', | |
"ttf": 'application/vnd.ms-truetype',}) | |
item_template = '\t\t<item id="{fileid}" href="{href}" media-type="{media}" \>' | |
boilerentry = (item_template.format( fileid=fileid, | |
href=directory + dirname + filename, | |
media=entry_dict[file_ext] | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment