I am temporarily making available a zip file of my localized version of the Ardour 7 tutorial at URL https://thoal.us/rsrcs/ardour-7-tutorial-20230916.zip . Maybe someone will find a better online home for it.
This method for obtaining a local copy of the Ardour 7 tutorial suitable for a local file system was created in September 2023 using Gnu/Linux Debian 12. The website build software Hugo was obtained from the Debian package manager via ‘apt install hugo’ in the bourne again (bash) shell. A complicated bash command featuring the stream editor sed and python 3 was used to reformat the local href targets of the web portal from absolute to relative paths. This method is admittedly a hack, but I got the results I wanted. All the linkage issues that I found in my localized web portal were also present in the web portal hosted by GitHub. The Russian translation is largely incomplete, for example.
The Ardour 7 tutorial is linked from the Help menu of the Ardour 7 interface and available in English at URL Home :: Ardour tutorial . A local copy of the tutorial is desirable, but evidently a version of the tutorial suitable for a local file system is not available. Downloading all the webpages from the tutorial web portal with a regular web browser is not practical. The build package of the Ardour 7 tutorial, like the tutorial web portal, is hosted on GitHub. The build package home page is at URL ahych-tee-tee-pee-ess-colan//github.com/prokoudine/ardour-tutorial and may readily be downloaded as a zip bundle (by clicking on the green button labeled ‘Code’) or by using the version control system software Git with an account from GitHub.
Robin Gareus made the entire Ardour 7.3 manual available as a single PDF file (Ardour 7 Manual (PDF Format) - #5 by gr3yh0und). The entire Ardour tutorial in a single PDF file could be nice (text search feature). I can guess that creating one HTML file of the Ardour tutorial could be an intermediary step. I do not know how to do that. I am pleased with the local tutorial document I was able to create. The English tutorial content and presentation is great, and I consider myself to be a fortunate monolinguist.
I downloaded and unzipped the zip bundle. The bundle is incomplete because the empty directory ‘./themes/hugo-theme-relearn’ is a placeholder. I downloaded the Hugo relearn theme as a zip bundle from the theme’s GitHub home page at URL GitHub - McShelby/hugo-theme-relearn: A theme for Hugo designed for documentation .
The build control directory tree requires the builder software Hugo to create the build target directory tree that is the tutorial web portal. I am not well versed with Hugo, but my impression is that the build control deals exclusively with absolute URLs and does not offer relative URLs. Furthermore, I was unable to locate the build target subtree separately from the build control subtree and generate a properly styled web portal. Therefore, final placement of the resultant directory tree with the desired top-level directory name may be advisable before using the build package to build the web portal as shown here. On Linux, a suitable final location could be /usr/local/share/doc/ , but root privileges would be necessary to build and revise it there.
All web portal generation and alteration commands are run from the top-level build directory. This is an overview of the conversion process.
(1) Place the complete build directory tree in the desired location and identify the absolute path of the top-level directory (originally named ‘ardour-tutorial-main’ in my case). Determine if you need root (a.k.a. superuser) privileges. If so, you may prepend ‘sudo ’ to the bash shell commands to get them to work. If the web portal can be converted to relative local paths, it can be done without root privileges (which is more secure), and the use of root privileges can be limited to making and manipulating a copy of the generically localized web portal subtree.
(2) Run the hugo program from within the top-level build directory and provide the absolute path to that directory as the value for the -b option and provide the single dot signifying the current directory for the -s and -d options. The result should be a largely working local copy of the tutorial.
(3) With a web browser verify the generated web portal is working correctly overall. Formatting should be good and links should generally work. Links to directories will require an extra step of clicking through to that directory’s file ‘index.html’. If desired, stop here or make a backup of the subtree. If desired, test the subtree at a different location and expect hyperlink redirection to the build location.
(4) Run the command to add ‘index.html’ to href targets that refer to directories. This will eliminate the requirement to click through webpages of directory contents.
(5) Adjust the ugly bash command for the conversion of paths within the build subtree from absolute to relative paths by assigning the built tree root path (as it was during the hugo build operation) to the variable rootprefix at the start of the command. Do not end the absolute value path with a forward slash unless you want to take a chance. One may also add one pair of parenthesis around the command to isolate the command’s assignments of shell variables.
(6) Run the prepared command to convert to relative local paths.
(7) Similarly, adjust and the command for the adjustment from absolute to relative paths in script references by assigning the correct absolute path to variable rootprefix. A pair of parenthesis may be added.
(8) Run the prepared command to adjust paths in script references.
(9) Run without modification the command to make two final adjustments to the top-level file ‘index.html’.
(10) Run the command to remove build content that is not web portal content.
(11) Check the results with a web browser.
(12) Check the results moved or copied to a different location with a web browser. If it works, you might want to create a compressed bundle or archive of it.
Step 1: Go to the top-level directory of the tutorial build subtree. A date of build download in the name might be desirable. Identify and verify the absolute path to the top-level and current directory.
cd \<tutorial build home with relearn theme files in the correct location\>
pwd
Step 2: Less than perfect but styled correctly.
hugo -b '/home/abyss/Downloads/ardour-7-tutorial-20230916' -s '.' -d '.'
Step 3: Browser check.
Step 4: Add index.html to href values that refer to local directories.
find . -type f -name index.html -execdir sed -Ei 's%(href="/?([^/:]+/)*[[:alnum:]_.-]+/)(">)%\1index.html\3%' '{}' \; ; find . -type f -name index.html -execdir sed -Ei 's%(href="/?([^/:]+/)*[[:alnum:]_-]+)(">)%\1/index.html\3%' '{}' \;
Steps 5 and 6: Replace absolute URL/href references with root prefix with relative local URL/href references. ADJUST rootprefix assignment. Any trailing forward slash is superfluous and stripped, even for the untested root directory (‘/’).
rootprefix=/home/abyss/Downloads/ardour-7-tutorial-20230916 ; rootprefix=${rootprefix%/} ; for f in $(find -type f -name index.html); do rootref=$(grep -m 1 -P '="'${rootprefix}'(/[[:alnum:]_.?=-]+)*"' $f | sed -E 's%.*="('${rootprefix}'(/[[:alnum:]_.?=-]+)*)".*%\1%'); while [ "$rootref" ] ; do reltopref=$(echo $rootref|sed -E 's%^'${rootprefix}'%./%'); relref=$(python3 -c 'import os.path; print ( os.path.relpath("'${reltopref}'", os.path.dirname("'$f'")))') ; if [[ "${relref}" != '' && "${relref}" != .* ]] then relref="./${relref}" ; fi ; echo $rootref from $f ; echo ' ->' $relref ; rootref_escaped=$(echo $rootref|sed -E 's%\?%\\?%g'); sed -Ei 's%="'${rootref_escaped}'"%="'${relref}'"%g' $f; rootref=$(grep -m 1 -P '="'${rootprefix}'(/[[:alnum:]_.?=-]+)*"' $f | sed -E 's%.*="('${rootprefix}'(/[[:alnum:]_.?=-]+)*)".*%\1%'); done; done
Steps 7 and 8: Adjust paths in script references. ADJUST rootprefix assignment. Any trailing forward slash is superfluous and stripped, even for the untested root directory (‘/’).
rootprefix=/home/abyss/Downloads/ardour-7-tutorial-20230916 ; rootprefix=${rootprefix%/} ; rootprefix_escaped=$(echo $rootprefix|sed -E 's%([^/])/$%\1%'|sed -E 's%^/([^/])%\1%'|sed -E 's%/%\\\\/%g') ; for f in $(find -type f -name index.html); do sed -Ei 's%'${rootprefix_escaped}'%.%g' $f; done
Step 9 :Run the command to make two final adjustments to the top-level file ‘index.html’. ADJUST rootprefix assignment. Any trailing forward slash is superfluous and stripped, even for the untested root directory (‘/’).
rootprefix=/home/abyss/Downloads/ardour-7-tutorial-20230916 ; rootprefix=${rootprefix%/} ; sed -Ei 's%(url=)'${rootprefix}'/?%\1./%' index.html ; sed -Ei 's%(<title>)'${rootprefix}'/?%\1./%' index.html
Step 10: Remove build content that is not web portal content. The tutorial web portal content is the top-level file ‘index.html’, the two-letter language subdirectories, and subdirectories ‘css’, ‘js’, and ‘webfonts’. The files ‘LICENSE’ and ‘README.md’ are pertinent documentation of the tutorial. I am not familiar with the utility of the XML files, file ‘.gitmodules’, file ‘.hugo_build.lock’, and subdirectory ‘.github’.
rm -rv archetypes config.toml content fonts images layouts resources static themes
Steps 11 and 12: Check the results. If the results are satisfactory, consider making a backup archive file. A date in the name of the archive file may be appropriate.
—Abyss
EDIT: Fix URLs for OP and formatting – Seablade