From c9205dd6bcbe1ba9bcc42a62a77c3f8426706184 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 6 Oct 2016 20:22:44 -0500 Subject: [PATCH] Tiny fix to html output--close TOCTOP tag. --- fanficfare/writers/writer_html.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/fanficfare/writers/writer_html.py b/fanficfare/writers/writer_html.py index a859f1f..ff315cf 100644 --- a/fanficfare/writers/writer_html.py +++ b/fanficfare/writers/writer_html.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2011 Fanficdownloader team, 2015 FanFicFare team +# Copyright 2011 Fanficdownloader team, 2016 FanFicFare team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ class HTMLWriter(BaseStoryWriter): def __init__(self, config, story): BaseStoryWriter.__init__(self, config, story) - + self.HTML_FILE_START = string.Template(''' @@ -48,7 +48,7 @@ ${output_css} self.HTML_COVER = string.Template(''' cover ''') - + self.HTML_TITLE_PAGE_START = string.Template(''' ''') @@ -62,14 +62,14 @@ ${output_css} ''') self.HTML_TOC_PAGE_START = string.Template(''' -

Table of Contents

+

Table of Contents

''') self.HTML_TOC_ENTRY = string.Template(''' ${chapter}
''') - + self.HTML_TOC_PAGE_END = string.Template('''

''') @@ -100,12 +100,12 @@ ${output_css} FILE_END = string.Template(self.getConfig("file_end")) else: FILE_END = self.HTML_FILE_END - + self._write(out,FILE_START.substitute(self.story.getAllMetadata())) if self.getConfig('include_images') and self.story.cover: self._write(out,COVER.substitute(dict(self.story.getAllMetadata().items()+{'coverimg':self.story.cover}.items()))) - + self.writeTitlePage(out, self.HTML_TITLE_PAGE_START, self.HTML_TITLE_ENTRY, @@ -120,12 +120,12 @@ ${output_css} CHAPTER_START = string.Template(self.getConfig("chapter_start")) else: CHAPTER_START = self.HTML_CHAPTER_START - + if self.hasConfig('chapter_end'): CHAPTER_END = string.Template(self.getConfig("chapter_end")) else: CHAPTER_END = self.HTML_CHAPTER_END - + for index, chap in enumerate(self.story.getChapters()): if chap.html: logging.debug('Writing chapter text for: %s' % chap.title) @@ -139,4 +139,4 @@ ${output_css} if self.getConfig('include_images'): for imgmap in self.story.getImgUrls(): self.writeFile(imgmap['newsrc'],imgmap['data']) - +