summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpanfry/document.py12
1 files changed, 6 insertions, 6 deletions
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