summaryrefslogtreecommitdiff
path: root/panfry/main.py
diff options
context:
space:
mode:
authorScott Bahling <sbahling@mudgum.net>2013-03-19 18:25:18 +0100
committerScott Bahling <sbahling@mudgum.net>2013-03-19 18:25:18 +0100
commitae99cfbd9a0372b577a23636f0677f266a559c5f (patch)
tree0ea33cec22901661a433402941286cafe7895641 /panfry/main.py
parent59e2443d531ace2005de5a9e830e063d79808427 (diff)
downloadpanfry-ae99cfbd9a0372b577a23636f0677f266a559c5f.tar.gz
panfry-ae99cfbd9a0372b577a23636f0677f266a559c5f.tar.xz
panfry-ae99cfbd9a0372b577a23636f0677f266a559c5f.zip
Implement full table of contents generation
By default panfry now generates a full table of contents navigation for split page documents. This means the TOC navitation has links to all pages and page sections. Simple, page only level table of contents can be switched on by passing the --simple-toc option.
Diffstat (limited to 'panfry/main.py')
-rwxr-xr-xpanfry/main.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/panfry/main.py b/panfry/main.py
index 1a7acf7..776fd52 100755
--- a/panfry/main.py
+++ b/panfry/main.py
@@ -24,6 +24,7 @@ def get_env():
return env
+
def main():
env = get_env()
if os.path.exists(env.pub_path):
@@ -32,6 +33,8 @@ def main():
document = Document(env.src_path)
document.set_templater(Templater(env.templates_path))
+ if env.simple_toc:
+ document.set_simple_toc
###### Create PDF
pdffile = document.publish_pdf(env.pub_path)