|
@ -28,6 +28,7 @@ from os import getcwd |
|
|
import os.path |
|
|
import os.path |
|
|
assert os.path.exists(os.path.join(getcwd(), __file__)), (getcwd(), __file__) |
|
|
assert os.path.exists(os.path.join(getcwd(), __file__)), (getcwd(), __file__) |
|
|
import datetime |
|
|
import datetime |
|
|
|
|
|
import base64 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Readme |
|
|
#Readme |
|
@ -64,28 +65,28 @@ with open ("../../documentation/index.adoc", "w") as w: |
|
|
#print ("Built /documentation/index.adoc. You still need to run /documentation/build-documentation.sh manually") |
|
|
#print ("Built /documentation/index.adoc. You still need to run /documentation/build-documentation.sh manually") |
|
|
#print ("Built /documentation/index.adoc") |
|
|
#print ("Built /documentation/index.adoc") |
|
|
|
|
|
|
|
|
#Documentation |
|
|
#Documentation |
|
|
|
|
|
|
|
|
METADATA["supportedLanguages"].update({"English":""}) |
|
|
METADATA["supportedLanguages"].update({"English":""}) |
|
|
for language in METADATA["supportedLanguages"].keys(): |
|
|
for language in METADATA["supportedLanguages"].keys(): |
|
|
|
|
|
|
|
|
language = language.lower() |
|
|
language = language.lower() |
|
|
|
|
|
|
|
|
try: |
|
|
try: |
|
|
with open(f"{language}.adoc.template", "r") as r: |
|
|
with open(f"{language}.adoc.template", "r") as r: |
|
|
template = r.read() |
|
|
template = r.read() |
|
|
except: |
|
|
except: |
|
|
continue #language not yet supported as manual |
|
|
continue #language not yet supported as manual |
|
|
|
|
|
|
|
|
for key, value in METADATA.items(): #all strings |
|
|
for key, value in METADATA.items(): #all strings |
|
|
if type(value) is str: |
|
|
if type(value) is str: |
|
|
template = template.replace(f"<{key}>", value) |
|
|
template = template.replace(f"<{key}>", value) |
|
|
|
|
|
|
|
|
if language == "english": |
|
|
if language == "english": |
|
|
template = template.replace("<english-only-description>", "== Introduction\n\n" + METADATA["description"]) |
|
|
template = template.replace("<english-only-description>", "== Introduction\n\n" + METADATA["description"]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
with open (f"../../documentation/{language}.part.adoc", "r") as clientPart: |
|
|
|
|
|
|
|
|
with open (f"../../documentation/{language}.part.adoc", "r") as clientPart: |
|
|
template = template.replace("<manual>", clientPart.read()) |
|
|
template = template.replace("<manual>", clientPart.read()) |
|
|
|
|
|
|
|
|
with open (f"../../documentation/{language}.adoc", "w") as w: |
|
|
with open (f"../../documentation/{language}.adoc", "w") as w: |
|
@ -115,11 +116,11 @@ settings and save directories. |
|
|
|
|
|
|
|
|
Other modes of operations, mostly for testing, are: |
|
|
Other modes of operations, mostly for testing, are: |
|
|
|
|
|
|
|
|
Run without session management and save in /tmp. |
|
|
Run without session management and save in /tmp. |
|
|
{METADATA["shortName"]} --save /tmp |
|
|
{METADATA["shortName"]} --save /tmp |
|
|
|
|
|
|
|
|
Run without audio and midi. Skips all JACK checks. Used to just look at the GUI, e.g. to make screenshots |
|
|
Run without audio and midi. Skips all JACK checks. Used to just look at the GUI, e.g. to make screenshots |
|
|
{METADATA["shortName"]} --mute |
|
|
{METADATA["shortName"]} --mute |
|
|
|
|
|
|
|
|
[see also] |
|
|
[see also] |
|
|
The full documentation for {METADATA["name"]} is maintained as a multi-lingual html site to your systems doc-dir. |
|
|
The full documentation for {METADATA["name"]} is maintained as a multi-lingual html site to your systems doc-dir. |
|
@ -136,5 +137,21 @@ command = f"help2man ../../{METADATA['shortName']} --no-info --include ../../doc |
|
|
subprocess.run(command, capture_output=True, text=True, shell=True) |
|
|
subprocess.run(command, capture_output=True, text=True, shell=True) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Convert 32x32 and 128x128 icons to base64 utf8 strings for jack metadata |
|
|
|
|
|
txt_icon_32_base64_utf8 = os.path.join("../../engine/resources/", "icon_32_base64_utf8.txt") |
|
|
|
|
|
with open (txt_icon_32_base64_utf8, "w") as icon32txt: |
|
|
|
|
|
with open("../../desktop/images/32x32.png", "rb") as icon32png: |
|
|
|
|
|
icon32txt.write(base64.b64encode(icon32png.read()).decode('utf-8')) |
|
|
|
|
|
|
|
|
|
|
|
txt_icon_128_base64_utf8 = os.path.join("../../engine/resources/", "icon_128_base64_utf8.txt") |
|
|
|
|
|
with open (txt_icon_128_base64_utf8, "w") as icon128txt: |
|
|
|
|
|
with open("../../desktop/images/128x128.png", "rb") as icon128png: |
|
|
|
|
|
icon128txt.write(base64.b64encode(icon128png.read()).decode('utf-8')) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#Done. Tell the world: |
|
|
|
|
|
|
|
|
#print ("Built /documentation. You still need to run /documentation/build-documentation.sh manually") |
|
|
#print ("Built /documentation. You still need to run /documentation/build-documentation.sh manually") |
|
|
print ("Built template part of documentation.") |
|
|
print ("Built template part of documentation.") |
|
|