From 74d200e341210baad9cc82dd974253c355fbc56e Mon Sep 17 00:00:00 2001
From: Ed Ward Ch. ' + str(levelNums[level]) + ': ' + header['title'] + '\n'
+ content = '\n\n
\n'
lvl = 0
- levelNums = [0]*6
+ levelNums = [0]*3
for i in range(len(fs)):
# Handle Part/Chapter/subchapter/section/subsection numbering
level = fs[i]['level']
- if level == 0:
+ if level < 2:
levelNums[2] = 0
- levelNums[3] = 0
- levelNums[4] = 0
- elif level == 1:
- levelNums[2] = 0
- levelNums[3] = 0
- levelNums[4] = 0
- elif level == 2:
- levelNums[3] = 0
- levelNums[4] = 0
- elif level == 3:
- levelNums[4] = 0
levelNums[level] = levelNums[level] + 1;
j = level
txtlevel = ''
@@ -420,44 +414,49 @@ if quiet:
level = 0
fileCount = 0
-levelNums = [0]*6
+levelNums = [0]*3
lastFile = ''
page = ''
onepage = ''
+pdfpage = ''
toc = ''
pageNumber = 0
-siteDir = './website/'
+
if not quiet and devmode:
print('Devmode active: scribbling extra junk to the manual...')
-if os.access(siteDir, os.F_OK):
+if os.access(global_site_dir, os.F_OK):
if not quiet:
print('Removing stale HTML data...')
- shutil.rmtree(siteDir)
+ shutil.rmtree(global_site_dir)
-shutil.copytree('./source', siteDir)
+shutil.copytree('./source', global_site_dir)
# Read the template, and fix the stuff that's fixed for all pages
-temp = open('page-template.txt')
+temp = open(global_screen_template)
template = temp.read()
temp.close()
-
-template = template.replace('{{page.bootstrap_path}}', '/bootstrap-3.3.7')
-template = template.replace('{{page.page_title}}', 'The Ardour Manual')
+template = template.replace('{{page.bootstrap_path}}', global_bootstrap_path)
+template = template.replace('{{page.page_title}}', global_page_title)
# Same as above, but for the One-page version
-temp = open('onepage-template.txt')
+temp = open(global_onepage_template)
onepage = temp.read()
temp.close()
+onepage = onepage.replace('{{page.bootstrap_path}}', global_bootstrap_path)
+onepage = onepage.replace('{{page.page_title}}', global_page_title)
-onepage = onepage.replace('{{page.bootstrap_path}}', '/bootstrap-3.3.7')
-onepage = onepage.replace('{{page.page_title}}', 'The Ardour Manual')
+# Same as above, but for the PDF version
+temp = open(global_pdf_template)
+pdfpage = temp.read()
+temp.close()
+pdfpage = pdfpage.replace('{{page.page_title}}', global_page_title)
-# Parse out the master docuemnt's structure into a dictionary list
+# Parse out the master document's structure into a dictionary list
fileStruct = GetFileStructure()
# Build a quasi-tree structure listing children at level + 1 for each node
@@ -472,7 +471,7 @@ if not quiet:
print('.') if len(links) == 1 else print('s.')
if not quiet:
- master = open('master-doc.txt')
+ master = open(global_master_doc)
firstLine = master.readline().rstrip('\r\n')
master.close()
@@ -493,21 +492,9 @@ for header in fileStruct:
lastLevel = level
level = header['level']
- # Handle Part/Chapter/subchapter/section/subsection numbering
- if level == 0:
+ # Handle Part/Chapter/subchapter numbering
+ if level < 2:
levelNums[2] = 0
- levelNums[3] = 0
- levelNums[4] = 0
- elif level == 1:
- levelNums[2] = 0
- levelNums[3] = 0
- levelNums[4] = 0
- elif level == 2:
- levelNums[3] = 0
- levelNums[4] = 0
- elif level == 3:
- levelNums[4] = 0
-
levelNums[level] = levelNums[level] + 1;
# This is totally unnecessary, but nice; besides which, you can capture
@@ -525,7 +512,6 @@ for header in fileStruct:
# Handle TOC scriblings and one-page titles...
opl = ''
-
if 'link' in header:
opl = ' id="' + header['link'] + '"'
else:
@@ -536,19 +522,10 @@ for header in fileStruct:
oph = '
Part ' + num2roman(levelNums[level]) + ' - ' + header['title'] + '
\n';
elif level == 1:
toc = toc + '\t' + str(levelNums[level]) + ' - ' + header['title'] + '
\n';
+ oph = '' + str(levelNums[level]) + ' - ' + header['title'] + '\n';
elif level == 2:
toc = toc + '\t\t
\n'
- oph = '' + str(levelNums[level-1]) + '.' + str(levelNums[level]) + ' - ' + header['title'] + '
\n';
- elif level == 3:
- toc = toc + '\t\t\t\n'
- oph = '' + str(levelNums[level-2]) + '.' + str(levelNums[level-1]) + '.' + str(levelNums[level]) + ' - ' + header['title'] + '
\n';
- elif level == 4:
- toc = toc + '\t\t\t\t\n'
- oph = '' + str(levelNums[level-3]) + '.' + str(levelNums[level-2]) + '.' + str(levelNums[level-1]) + '.' + str(levelNums[level]) + ' - ' + header['title'] + '
\n';
-
-
-
+ oph = '' + str(levelNums[level-1]) + '.' + str(levelNums[level]) + ' - ' + header['title'] + '
\n';
# Make the 'this thing contains...' stuff
if HaveChildren(fileStruct, pageNumber):
@@ -593,7 +570,7 @@ for header in fileStruct:
if level > 0:
if 'include' in header:
srcFile = open('include/' + header['include'])
- githubedit = ''
+ githubedit = ''
content = srcFile.read()
srcFile.close()
@@ -620,17 +597,15 @@ for header in fileStruct:
devnote = devnote + 'link: ' + header['link'] + '
'
content = devnote + '' + content
- # ----- One page version -----
+ # ----- One page and PDF version -----
# Fix up any internal links
opcontent = FixInternalLinks(oplinks, content, header['title'])
-
- # Create the link sidebar
- opsidebar = BuildOnePageSidebar(fileStruct)
+ opcontent = reheader(opcontent, 2)
# Set up the actual page from the template
- onepage = onepage.replace('{% tree %}', opsidebar)
- onepage = onepage.replace('{{ content }}', oph + '\n' + opcontent + '{{ content }}')
+ onepage = onepage.replace('{{ content }}', oph + '\n' + opcontent + '\n{{ content }}')
+ pdfpage = pdfpage.replace('{{ content }}', oph + '\n' + opcontent + '\n{{ content }}')
# ----- Normal version -----
@@ -654,10 +629,10 @@ for header in fileStruct:
# Create the directory for the index.html file to go into (we use makedirs,
# because we have to in order to accomodate the 'uri' keyword)
- os.makedirs(siteDir + header['filename'], 0o775, exist_ok=True)
+ os.makedirs(global_site_dir + header['filename'], 0o775, exist_ok=True)
# Finally, write the file!
- destFile = open(siteDir + header['filename'] + '/index.html', 'w')
+ destFile = open(global_site_dir + header['filename'] + '/index.html', 'w')
destFile.write(page)
destFile.close()
@@ -676,17 +651,31 @@ page = page.replace('{% prevnext %}', '')
page = page.replace('{% githubedit %}', '')
page = page.replace('{% breadcrumbs %}', '')
-os.mkdir(siteDir + 'toc', 0o775)
-tocFile = open(siteDir + 'toc/index.html', 'w')
+os.mkdir(global_site_dir + 'toc', 0o775)
+tocFile = open(global_site_dir + 'toc/index.html', 'w')
tocFile.write(page)
tocFile.close()
# Create the one-page version of the documentation
-onepageFile = open(siteDir + 'ardourmanual.html', 'w')
+onepageFile = open(global_site_dir + 'ardourmanual.html', 'w')
+opsidebar = BuildOnePageSidebar(fileStruct) # create the link sidebar
+onepage = onepage.replace('{% tree %}', opsidebar)
onepage = onepage.replace('{{ content }}', '') # cleans up the last spaceholder
onepageFile.write(onepage)
onepageFile.close()
+if not quiet:
+ print('Generating the PDF...')
+# Create the PDF version of the documentation
+pdfpageFile = open(global_site_dir + 'pdf.html', 'w')
+pdfpage = pdfpage.replace('{% tree %}', opsidebar) # create the TOC
+pdfpage = pdfpage.replace('{{ content }}', '') # cleans up the last spaceholder
+pdfpageFile.write(pdfpage)
+pdfpageFile.close()
+
+from weasyprint import HTML
+doc = HTML(filename = global_site_dir + 'pdf.html') #, base_url = os.path.dirname(os.path.realpath(__file__)))
+doc.write_pdf(global_site_dir + 'manual.pdf')
if not quiet:
print('Processed ' + str(fileCount) + ' files.')
diff --git a/include/audio-track-controls.html b/include/audio-track-controls.html
index 1d9f763b..6b999691 100644
--- a/include/audio-track-controls.html
+++ b/include/audio-track-controls.html
@@ -33,27 +33,27 @@
The control buttons are:
● (Record) | +|
---|---|
● (Record) | The button with the pink circle arms the track for recording. When armed, the entire button will turn pink, and change to bright red as soon as the transport is rolling and the track is recording. Right clicking will allow to en/disable Rec-safe, protecting the track against accidental recording. |
M (Mute) | +|
M (Mute) | Mutes the track. Right clicking displays a menu which dictates what particular parts of the track should be muted. |
S (Solo) | +|
S (Solo) | Soloes the track. The behaviour of the solo system is described in detail in the section Muting and Soloing. Right clicking will allow to en/disable Solo isolate and Solo safe. |
P (Playlist) | +|
P (Playlist) | Opens a playlist menu when clicked. The menu offers various operations related to the track's playlist. |
A (Automation) | +|
A (Automation) | Opens the automation menu for the track. For details see Automation. |
G (Group) | +|
G (Group) | Allows to assign the track to an existing or a new group. For details see Track and bus groups. |
The Monitor section is an optional feature that provides Control Room/Monitor Speaker outputs. It can be activated for the current session in the - + Session > Properties window by enabling the Use monitor section in this session option in the Monitoring tab. By default the Monitor Section is fed with audio from the Master Bus, diff --git a/include/preferences.html b/include/preferences.html index 83aa681c..e469c64d 100644 --- a/include/preferences.html +++ b/include/preferences.html @@ -17,24 +17,24 @@
This tab contains settings for control surfaces. @@ -899,7 +899,7 @@ protocol settings (only for Generic MIDI and Open Sound Control).
-The content of this preference page varies heavily between versions or Ardour: @@ -1131,7 +1131,7 @@
Change how sound is stored on disk. These options do not change how sound is handled @@ -169,7 +169,7 @@
These options add file locations that will be searched to find the audio and @@ -197,7 +197,7 @@ -
This tab is used to change how Ardour names recorded regions. @@ -231,7 +231,7 @@ -
Provides options affecting monitoring. @@ -257,7 +257,7 @@ -
This tab changes what controls are displayed in the Meterbridge that is @@ -313,7 +313,7 @@ -
This tab has several things that don't fit on the other tabs. diff --git a/include/the-transport-menu.html b/include/the-transport-menu.html index 5ec9bfe0..6d6e61d4 100644 --- a/include/the-transport-menu.html +++ b/include/the-transport-menu.html @@ -7,14 +7,14 @@
As described in the - On Clock and Time + On Clock and Time chapter, timecode and clock are independent. If the external timecode source is not in sample-sync with the audio hardware (and JACK), Ardour needs to run at varispeed to adjust for the discrepancy. diff --git a/include/track-and-bus-groups.html b/include/track-and-bus-groups.html index a1c7f0f4..284e65f1 100644 --- a/include/track-and-bus-groups.html +++ b/include/track-and-bus-groups.html @@ -106,9 +106,9 @@ −4 dB (the difference of the gains remains the same).
- Muting, - Soloing, - record enable, + Muting, + Soloing, + record enable, active state, color and monitoring diff --git a/include/track-types.html b/include/track-types.html index 4576c82c..c1afee92 100644 --- a/include/track-types.html +++ b/include/track-types.html @@ -23,8 +23,8 @@