]> Shamusworld >> Repos - ardour-manual/commitdiff
Added a 'pdf-exclude' property to master-doc.txt, allowing a page not to be included...
authorEd Ward <edwsaintesprit@hotmail.com>
Wed, 28 Aug 2019 14:27:01 +0000 (16:27 +0200)
committerEd Ward <edwsaintesprit@hotmail.com>
Wed, 28 Aug 2019 14:27:01 +0000 (16:27 +0200)
build.py
master-doc.txt

index e9f4f279fee121e237aa9058a148b083179540e6..19cf37b984c9c7634f4273d151f94b478e350cc9 100755 (executable)
--- a/build.py
+++ b/build.py
@@ -21,6 +21,7 @@ import datetime
 global_bootstrap_path = '/bootstrap-3.3.7'
 global_page_title = 'The Ardour Manual'
 global_site_dir = './website/'
+global_manual_url = 'http://manual.ardour.org'
 global_githuburl = 'https://github.com/Ardour/manual/edit/master/include/'
 global_screen_template = 'page-template.html'
 global_onepage_template = 'onepage-template.html'
@@ -619,7 +620,10 @@ for header in fileStruct:
        # Set up the actual page from the template
        onepage = onepage.replace('{{ content }}', oph + '\n' + opcontent + '\n{{ content }}')
        if not nopdf:
-               pdfpage = pdfpage.replace('{{ content }}', oph + '\n' + opcontent + '\n{{ content }}')
+               if not 'pdf-exclude' in header:
+                       pdfpage = pdfpage.replace('{{ content }}', oph + '\n' + opcontent + '\n{{ content }}')
+               else:
+                       pdfpage = pdfpage.replace('{{ content }}', oph + '\n' + 'Please refer to the <a href="' + global_manual_url + '/' + header['filename'] + '/">online manual</a>.\n{{ content }}')
 
        # ----- Normal version -----
 
index 9c76da43f917cbbd5957d325404f3d8e7591ff91..b5c092e702840cd76ebb62f5f289b98e21b870a8 100644 (file)
@@ -1995,6 +1995,7 @@ title: Lua Bindings Class Reference
 style: luadoc
 include: class-reference.html
 exclude: yes
+pdf-exclude: yes
 link: class-reference
 uri: lua-scripting/class_reference
 part: chapter