mirror of
https://github.com/wassname/FanFicFare.git
synced 2026-09-12 12:02:50 +08:00
Tweak output a bit, allow any 'entry' as epub subject.
This commit is contained in:
+4
-4
@@ -28,7 +28,7 @@
|
||||
# formatext
|
||||
|
||||
## items to include in title page
|
||||
titlepage_entries: category,genre,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,site,storyId,authorId,extratags,description
|
||||
titlepage_entries: category,genre,status,datePublished,dateUpdated,dateCreated,rating,warnings,numChapters,numWords,site,description
|
||||
|
||||
## include title page as first page.
|
||||
include_titlepage: true
|
||||
@@ -73,10 +73,10 @@ windows_eol: true
|
||||
## epub is already a zip file.
|
||||
zip_output: false
|
||||
|
||||
# possible subject tags: extratags, genre, category, warnings, lastupdate
|
||||
# entries tags to make epub subject tags
|
||||
# lastupdate creates two tags: "Last Update Year/Month: %Y/%m" and "Last Update: %Y/%m/%d"
|
||||
include_subject_tags: extratags, genre, category, lastupdate
|
||||
include_tocpage: false
|
||||
include_subject_tags: extratags, genre, category, lastupdate, status
|
||||
#include_tocpage: false
|
||||
|
||||
# epub->mobi conversions typically don't like tables.
|
||||
titlepage_use_table: true
|
||||
|
||||
@@ -81,10 +81,6 @@ def main():
|
||||
outputepub = ZipFile(outputopt, "w", compression=ZIP_STORED)
|
||||
outputepub.debug = 3
|
||||
outputepub.writestr("mimetype", "application/epub+zip")
|
||||
# declares all the files created by Windows. otherwise, when
|
||||
# it runs in appengine, windows unzips the files as 000 perms.
|
||||
for zf in outputepub.filelist:
|
||||
zf.create_system = 0
|
||||
outputepub.close()
|
||||
|
||||
## Re-open file for content.
|
||||
|
||||
@@ -80,7 +80,7 @@ h6 { text-align: center; }
|
||||
<link href="stylesheet.css" type="text/css" charset="UTF-8" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
<h1><a href="${storyUrl}">${title}</a> by <a href="${authorUrl}">${author}</a></h1>
|
||||
<h3><a href="${storyUrl}">${title}</a> by <a href="${authorUrl}">${author}</a></h3>
|
||||
<table class="full">
|
||||
''')
|
||||
|
||||
@@ -240,8 +240,11 @@ h6 { text-align: center; }
|
||||
metadata.appendChild(newTag(contentdom,"dc:description",text=
|
||||
self.getMetadata('description')))
|
||||
|
||||
metadata.appendChild(newTag(contentdom,"dc:subject",text=
|
||||
self.getMetadata('status')))
|
||||
for entry in self.titleLabels.keys():
|
||||
if entry in self.getConfigList("include_subject_tags") and \
|
||||
self.story.getMetadata(entry):
|
||||
metadata.appendChild(newTag(contentdom,"dc:subject",text=
|
||||
self.getMetadata(entry)))
|
||||
# listables all go into dc:suject tags, but only if they are configured.
|
||||
for (name,lst) in self.story.getLists().iteritems():
|
||||
if name in self.getConfigList("include_subject_tags"):
|
||||
@@ -394,7 +397,6 @@ h6 { text-align: center; }
|
||||
|
||||
# declares all the files created by Windows. otherwise, when
|
||||
# it runs in appengine, windows unzips the files as 000 perms.
|
||||
logging.debug("outputepub create_system")
|
||||
for zf in outputepub.filelist:
|
||||
zf.create_system = 0
|
||||
outputepub.close()
|
||||
|
||||
@@ -25,7 +25,7 @@ class HTMLWriter(BaseStoryWriter):
|
||||
<title>${title} by ${author}</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1><a href="${storyUrl}">${title}</a> by <a href="${authorUrl}">${author}</a></h1>
|
||||
<h3><a href="${storyUrl}">${title}</a> by <a href="${authorUrl}">${author}</a></h3>
|
||||
''')
|
||||
|
||||
self.HTML_TITLE_PAGE_START = string.Template('''
|
||||
|
||||
Reference in New Issue
Block a user