From 7eba8bd7180f538c1bfdd338abf6c858ba9dfb67 Mon Sep 17 00:00:00 2001 From: Scott Bahling Date: Mon, 8 Apr 2013 20:21:44 +0200 Subject: Rename HEADER to TITLE_BLOCK --- panfry/document.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'panfry') diff --git a/panfry/document.py b/panfry/document.py index 2b1cf01..0ea619d 100755 --- a/panfry/document.py +++ b/panfry/document.py @@ -71,9 +71,9 @@ class Document: @property def title(self): - if self.header.firstline.startswith('%'): - title = self.header.firstline.split('%')[1].strip() - for line in self.header.lines[1:]: + if self.title_block.firstline.startswith('%'): + title = self.title_block.firstline.split('%')[1].strip() + for line in self.title_block.lines[1:]: if line.startswith('%'): break title = '%s %s' % (title, line.strip()) @@ -98,7 +98,7 @@ class Document: return pages def get_meta(self, path): - metafiles = ['TOC', 'HEADER'] + metafiles = ['TOC', 'TITLE_BLOCK'] meta = {} for filename in metafiles: source = read_file(os.path.join(path, filename)) @@ -173,7 +173,7 @@ class Document: def publish_pdf(self, pub_path): pdf_path = os.path.join(pub_path, self.pdf_filename) - src = self.header.source + src = self.title_block.source for page in self.pages: src += '\n%s' % page.source @@ -191,7 +191,7 @@ class Document: def publish_epub(self, pub_path): epub_path = os.path.join(pub_path, self.epub_filename) - src = self.header.source + src = self.title_block.source for page in self.pages: src += '\n%s' % page.source -- cgit v1.2.3