From 74d200e341210baad9cc82dd974253c355fbc56e Mon Sep 17 00:00:00 2001 From: Ed Ward Date: Tue, 30 Jul 2019 16:14:34 +0200 Subject: [PATCH] Adding PDF generation --- build.py | 157 ++++--- include/audio-track-controls.html | 12 +- include/master-bus-strip.html | 2 +- include/monitor-section.html | 2 +- include/preferences.html | 60 +-- include/region-properties.html | 2 +- include/session-properties.html | 40 +- include/the-transport-menu.html | 4 +- include/the-view-menu.html | 2 +- include/timecode-generators-and-slaves.html | 2 +- include/track-and-bus-groups.html | 6 +- include/track-types.html | 4 +- include/workflow-amp-operations.html | 2 +- onepage-template.txt | 46 -- page-template.txt | 81 ---- source/css/app.css | 452 -------------------- 16 files changed, 142 insertions(+), 732 deletions(-) delete mode 100644 onepage-template.txt delete mode 100644 page-template.txt delete mode 100644 source/css/app.css diff --git a/build.py b/build.py index 3762049..2345dbc 100755 --- a/build.py +++ b/build.py @@ -9,9 +9,6 @@ # Remnants (could go into the master document as the first header) -#bootstrap_path: /bootstrap-3.3.7 -#page_title: The Ardour Manual - import os import re import shutil @@ -19,11 +16,19 @@ import argparse # Global vars +global_bootstrap_path = '/bootstrap-3.3.7' +global_page_title = 'The Ardour Manual' +global_site_dir = './website/' +global_githuburl = 'https://github.com/Ardour/manual/edit/master/include/' +global_screen_template = 'page-template.html' +global_onepage_template = 'onepage-template.html' +global_pdf_template = 'pdf-template.html' +global_master_doc = 'master-doc.txt' + # This matches all *non* letter/number, ' ', '.', '-', and '_' chars cleanString = re.compile(r'[^a-zA-Z0-9 \._-]+') # This matches new 'unbreakable' links, up to the closing quote or anchor findLinks = re.compile(r'"@@[^#"]*[#"]') -githuburl = 'https://github.com/Ardour/manual/edit/master/include/' # # Create an all lowercase filename without special characters and with spaces @@ -70,19 +75,12 @@ def ParseHeader(fileObj): # def PartToLevel(s): level = -1 + lvl = {'part': 0, 'chapter': 1, 'subchapter': 2} + if s in lvl: + return lvl[s] + else: + return -1 - if s == 'part': - level = 0 - elif s == 'chapter': - level = 1 - elif s == 'subchapter': - level = 2 - elif s == 'section': - level = 3 - elif s == 'subsection': - level = 4 - - return level # # Converts a integer to a roman number @@ -107,7 +105,7 @@ def GetFileStructure(): fnames = [None]*6 content = '' grab = False - mf = open('master-doc.txt') + mf = open(global_master_doc) for ln in mf: if ln.startswith('---'): @@ -202,12 +200,19 @@ def GetParent(fs, pos): return pos +# +# Change the hierarchy of titles : h1->hn, h2->hn+1, etc... n being delta-1 +# +def reheader(txt, delta): + for i in range(6, 0, -1): + txt = txt.replace('> is for Bootstrap pre-3.0 breadcrumbs = '
  • '+ fs[pos]['title'] + '
  • ' while pos >= 0: @@ -342,26 +347,15 @@ def BuildList(lst, fs, pagePos, cList): # def BuildOnePageSidebar(fs): - content = '\n\n -

    Monitoring

    +

    Monitoring

    Provides options affecting monitoring. @@ -257,7 +257,7 @@ -

    Meterbridge

    +

    Meterbridge

    This tab changes what controls are displayed in the Meterbridge that is @@ -313,7 +313,7 @@ -

    Misc

    +

    Misc

    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 5ec9bfe..6d6e61d 100644 --- a/include/the-transport-menu.html +++ b/include/the-transport-menu.html @@ -7,14 +7,14 @@ Start/StopStarts or stops the playhead, and recording if it is armed Play Play SelectionOnly plays the selected part of the session, be it a range or selected regions - Play Selection w/PrerollAs the previous menu, except it starts the playback a few bars or seconds before the beginning of the selection (the amount of time can be set in the Preferences) + Play Selection w/PrerollAs the previous menu, except it starts the playback a few bars or seconds before the beginning of the selection (the amount of time can be set in the Preferences) Start/Continue/StopLeaves loop play or range play mode but without stopping the transport Play from Edit Point and ReturnStarts the playback at the Edit point, and when stopped, goes back to the original location Play Loop RangeIf a Loop range is defined, play it and loop until stopped Start RecordingThis is a shortcut to trigger the global recording, and start playback at once Stop and Forget CaptureStops the recording, removes the newly created material, and goes back to the original position Enable RecordTriggers the global recording. Next time "Play" is pressed, it will record on the track(s) that are armed for recording - Record w/PrerollAs the Start Recording menu, except it starts the recording a few bars or seconds before the playhead's position (the amount of time can be set in the Preferences) + Record w/PrerollAs the Start Recording menu, except it starts the recording a few bars or seconds before the playhead's position (the amount of time can be set in the Preferences) Record w/Count-InAs the Start Recording menu, except it waits for 2 bars before the playhead's position. The Metronome will tick (even if disabled) during the count-in Set Loop from SelectionConverts the selection into a Loop range by placing loop markers at the start and end of the selected range diff --git a/include/the-view-menu.html b/include/the-view-menu.html index df178d4..d95e36d 100644 --- a/include/the-view-menu.html +++ b/include/the-view-menu.html @@ -72,7 +72,7 @@ [] Show Editor MixerWhen checked, the selected tracks' mixer strip is displayed on the left of the editor window, allowing for a quick access to e.g. effects and routing [] Show Editor ListIn the Editor window, shows the Editor List, giving access to a number of handy lists (regions, tracks, …) [] Toggle Mixer ListIn the Mixer view, shows the Mixer list, giving access to some handy lists (Favorite plugins, The Strip list,…) - [] Toggle Monitor Section VisibilityIf the Use monitoring section on this session has been checked in the Session Properties window, shows or hides the Monitor Section in the Mixer + [] Toggle Monitor Section VisibilityIf the Use monitoring section on this session has been checked in the Session Properties window, shows or hides the Monitor Section in the Mixer [] Show Measure LinesIf checked, in the Editor, shows a vertical white line at each measure start [] Show SummaryIf checked, in the Editor, shows the Summary, allowing a faster navigation in the session [] Show Group TabsIf checked, makes the groups visible as tabs on the left in the Editor, and on the top in the mixer diff --git a/include/timecode-generators-and-slaves.html b/include/timecode-generators-and-slaves.html index 955f26f..41df915 100644 --- a/include/timecode-generators-and-slaves.html +++ b/include/timecode-generators-and-slaves.html @@ -175,7 +175,7 @@

    Clock Sync Lock

    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 a1c7f0f..284e65f 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 4576c82..c1afee9 100644 --- a/include/track-types.html +++ b/include/track-types.html @@ -23,8 +23,8 @@ Audio An Audio Track is created with a user-specified number of inputs. The number of outputs is defined by the master bus channel count - (for details see Channel Configuration - below). This is the type of track to use when planning to work with + (for details see Channel Configuration). + This is the type of track to use when planning to work with existing or newly recorded audio. MIDI A MIDI track is created with a single MIDI input, and a diff --git a/include/workflow-amp-operations.html b/include/workflow-amp-operations.html index 49a695c..0aa9891 100644 --- a/include/workflow-amp-operations.html +++ b/include/workflow-amp-operations.html @@ -41,7 +41,7 @@ Importing a video makes Ardour start the video server automatically. If the Show video Server Startup Dialog option in the Video section of the - preferences is checked, the + preferences is checked, the Launch Video Server window is shown, allowing more complex operations, e.g. connecting to a remote video server instead of a local one. diff --git a/onepage-template.txt b/onepage-template.txt deleted file mode 100644 index b4240eb..0000000 --- a/onepage-template.txt +++ /dev/null @@ -1,46 +0,0 @@ - - - - - The Ardour Manual - - - - - - - - - - -

    -
    - - -
    - - {{ content }} - -
    -
    -
    - - - - - - diff --git a/page-template.txt b/page-template.txt deleted file mode 100644 index fb0c9b5..0000000 --- a/page-template.txt +++ /dev/null @@ -1,81 +0,0 @@ - - - - - {{page.page_title}} - - - - - - -{% if page.style %} - -{% endif %} - - - -
    -
    -
    - -

    The Ardour Manual

    - - - - {% tree %} - -
    - -
    - - {% breadcrumbs %} - {% githubedit %} - -

    {{ page.title }}

    - - {{ content }} - -
    - - {% prevnext %} - -
    -
    -
    - - - - - - diff --git a/source/css/app.css b/source/css/app.css deleted file mode 100644 index 28741c5..0000000 --- a/source/css/app.css +++ /dev/null @@ -1,452 +0,0 @@ -@font-face { - font-family: 'junge-regular'; - src: url('junge-regular-webfont.woff2') format('woff2'), - url('junge-regular-webfont.woff') format('woff'), - url('junge-regular-webfont.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} - -body { - font-family: 'junge-regular'; - font-size: 16px; - line-height: 2ex; -} - -.clear { - clear:both; -} - -#tree { - background-color: #212A30; - line-height: 1.8ex; - height: 100%; - overflow: scroll; - position: fixed; - top: 0; - bottom: 0; - left: 0; - width: 20em; - padding: 1em 1em 2em 1.5em; -} - -#tree h1 { - font-size: 1.75em; - margin-bottom: 1em; - font-weight: normal; -} - -#tree ul { - padding-left: 1em; - list-style-type: none; -} - -#tree a { - display: inline !important; - font-size: 0.88em; - line-height: 2em; - color: #E4E4E4; - border-bottom: 1px solid transparent; -} - -#tree a:hover { - text-decoration: none; - border-bottom: 1px solid #aaa; -} - -#tree .active > a { - display: inline; - color: #FF8080; -} - -#content { - padding: 1em 2em 2ex 21em; - margin-left: 0; - line-height: 2em; -} - -#content h1, -#content h2, -#content h3, -#content h4 { - font-weight: normal; - padding-bottom: .3ex; -} - -#content h1 { - font-size: 1.8em; - margin: 0 0 2ex 0; - padding-bottom: .8ex; - border-bottom: 2px solid #ccc; -} - -#content h2 { - font-size: 1.3em; - margin: 2ex 0 1ex 0; - border-bottom: 2px solid #ddd; -} - -#content h3 { - font-size: 1.2em; - margin: 1.5ex 0 1ex 0; - border-bottom: 1px solid #eee; -} - -#content h4 { - font-size: 1.1em; - margin: 1.5ex 0 .5ex 0; - border-bottom: 1px solid #eee; -} - -#content table { - width:100%; - margin: 1em 0; - padding: 0; - font-weight: normal; - text-align: left; -} - -#content table tr { - border-bottom: 2px solid #eeeeee; -} - -#content table tr:nth-child(odd){ - background-color: white; -} - -#content table tr:nth-child(even){ - background-color: #f5f5f5; -} - -#content table tr:hover { - background-color: #F2F9FF; -} - -#content table td, -#content table th { - margin: 0; - padding: .5em; -} - -#content table th { - font-weight: bold; -} - -#content table th.sub1 { - padding-left: 2em; -} - -#content table th.sub2 { - padding-left: 4em; -} - -#content table thead { - font-weight:bold; -} - -#content table.dl th { - /* dl class (definition list) is for 2-columns tables that describe properties: - maximmizes the width of the 2nd (description) column */ - vertical-align: top; - min-width: 20%; - white-space:nowrap -} - -#content table.dl td { - vertical-align: top; - width: 100%; -} - -#content ul, -#content ol { - overflow: hidden; -} - -#content figure { - display: table; -} - -#content figcaption { - display: table-caption; - caption-side: bottom; - font-style: italic; - padding-top: 0.5em; - padding-bottom: 1em; -} - -#content figcaption.center { - text-align: center; -} - -#content figcaption.titleover { - text-align: center; - caption-side: top ; -} - -#content figure.right { - margin: 0 0 1em 1em; - float: right; - clear: right; -} - -#content figure.left { - margin: 0 1em 1em 0; - float: left; - clear: left; -} - -#content figure.center { - margin: 1em auto 1em auto; - clear: both; -} - -kbd { - display: inline-block; - min-width: 1em; - padding: .2em .3em; - font: normal .8em/1 sans-serif; - text-align: center; - text-decoration: none; - border-radius: .3em; - background: rgb(250, 250, 250); - background: linear-gradient(to top, rgb(210, 210, 210), rgb(255, 255, 255)); - color: rgb(50, 50, 50); - text-shadow: 0 0 2px rgb(255, 255, 255); - box-shadow: inset 0 0 1px rgb(255, 255, 255), inset 0 0 .4em rgb(200, 200, 200), 0 .1em 0 rgb(130, 130, 130), 0 .11em 0 rgba(0, 0, 0, .4), 0 .1em .11em rgba(0, 0, 0, .9); - white-space:nowrap; - text-transform:capitalize; -} - -kbd.def { - font-weight:bolder; - margin-right:.2em; -} - -kbd.input, -kbd.cmd, -kbd.osc { - font-family:mono; - border-width:0; - text-transform:none; -} - -kbd.input { - background:none; - border-radius: 0; -} - -kbd.cmd { - display:block; - width:100%; - margin-bottom:1ex; - text-transform:none; - background: rgb(220, 220, 220); - text-shadow: none; - box-shadow: none; - text-align:left; -} - -kbd.cmd.lin:before { - content: 'user@linux:~ '; - color:#999999; -} - -kbd.cmd.mac:before { - content: 'MacBook:~/Desktop User\$ '; - color:#999999; -} - -kbd.cmd.win:before { - content: 'C:\\Users\\myAccount> '; - color:#999999; -} - -kbd.optoff, -kbd.option { - border:none; - background:none; -} - -kbd.optoff:before { - content:url('/images/checkbox-unchecked.png'); - margin: 0 1em 0 0; - vertical-align:middle; -} - -kbd.option:before { - content:url('/images/checkbox-checked.png'); - margin: 0 1em 0 0; - vertical-align:middle; -} - -kbd.menu { - border:none; - background:none; - font-weight:bold; - font-stretch:extra-condensed; - white-space:normal; -} - -kbd.osc { - border:none; - background: rgb(208, 208, 243); - font-stretch:extra-condensed; - white-space: nowrap; - text-align:left; -} - -kbd.fader, -kbd.knob, -kbd.button { - background: rgb(174, 174, 217); - background: linear-gradient(to top, rgb(174, 174, 217), rgb(221, 221, 255)); - color:#000044; -} - -kbd.fader { - border-width: 1px 1px 9px 9px; -} - -kbd.knob { - border-radius:12px; - border-width: 1px 1px 9px 9px; -} - -kbd.button { - border-radius:8px; - border-width: 1px 1px 3px 3px; -} - -kbd.mouse { - border-radius:10px; -} - -samp { - font-family:mono; - color:#666666; - background-color:#EBEBEB; - margin-left: .5em; - margin-right: .5em; -} - -#content dfn { - font-weight: bold; - font-style: normal; -} - -#content img.mini { - width: 200px; -} - -#content img.mini:hover { - width: 100%; -} - -#content p.center { - text-align:center; -} - -#content .note, -#content .warning, -#content .fixme { - min-height: 1.5ex; - padding: 1em; - margin-bottom: 1em; - border-style: solid; - border-width: 1px 1px 1px 8px; -} - -#content code { - font-size: .9em; - color: #555; -} - -#content .note { - border-color: #e3e3e3; - background-color: #f5f5f5; -} - -#content .warning { - border-color: #995555; - background-color: #ffeeee; -} - -#content .fixme { - border-color: #999944; - background-color: #f0f0e0; - font-weight:bold; -} - -.fixme:before { - content:'FIXME: '; - font-style: italic; - font-size:2em; -} - -/* Keyboard modifiers */ -.mod1:before { content: "Ctrl ";} -.mod2:before { content: "Alt ";} -.mod3:before { content: "Shift ";} -.mod4:before { content: "Win ";} -.mod12:before { content: "Ctrl Alt ";} -.mod13:before { content: "Ctrl Shift ";} -.mod14:before { content: "Ctrl Win ";} -.mod23:before { content: "Alt Shift ";} -.kp:before { content: "Keypad ";} -/* Variants *without* space after them (yes, these are needed!) */ -.mod1n:before { content: "Ctrl";} -.mod2n:before { content: "Alt";} -.mod3n:before { content: "Shift";} -.mod4n:before { content: "Win";} -.mod12n:before { content: "Ctrl Alt";} -.mod13n:before { content: "Ctrl Shift";} -.mod14n:before { content: "Ctrl Win";} -.mod23n:before { content: "Alt Shift";} -/* Automagic translation for Mac based display */ -.mac .mod1:before { content: "Cmd ";} -.mac .mod2:before { content: "Ctrl ";} -.mac .mod3:before { content: "Shift ";} -.mac .mod4:before { content: "Opt ";} -.mac .mod12:before { content: "Cmd Ctrl ";} -.mac .mod13:before { content: "Cmd Shift ";} -.mac .mod14:before { content: "Cmd Opt ";} -.mac .mod23:before { content: "Ctrl Shift ";} -/* No space variants (Mac based) */ -.mac .mod1n:before { content: "Cmd";} -.mac .mod2n:before { content: "Ctrl";} -.mac .mod3n:before { content: "Shift";} -.mac .mod4n:before { content: "Opt";} -.mac .mod12n:before { content: "Cmd Ctrl";} -.mac .mod13n:before { content: "Cmd Shift";} -.mac .mod14n:before { content: "Cmd Opt";} -.mac .mod23n:before { content: "Ctrl Shift";} - -@media (max-width: 800px) { - #tree { - position: relative; - height: 250px; - width: 100%; - margin-top: 20px; - } - #content { - padding-left: 20px; - margin-top: 0px; - } -} - -/* for the TOC */ -#content p.chapter, -#content p.subchapter, -#content p.section, -#content p.subsection { - line-height:1em; -} -#content p.chapter { padding-top: 1em; padding-left: 1em; padding-bottom:1em; } -#content p.subchapter { padding-left: 4em; } -#content p.section { padding-left: 6em; } -#content p.subsection { padding-left: 8em; } - -/* for images sliced in divs, as in http://manual.ardour.org/ardours-interface/about/ */ -.container { position: relative; border: none; } -.hoverimg { position: absolute; border: none; } -.hoverimg:hover{ z-index:100; box-shadow: 0 0 .2em .2em lightgreen; } -- 2.37.2