site 1.8.1: the boot screen names the release (Pionaarr Mods 1.8.1)

make_builder_data.py writes the site version into the credit mod's RELEASE
and into the pages' and the builder's boot text on every run; new boot
screen shots.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Thiemo TizianiandClaude Opus 5.5 committed 2026-10-20 22:20:20 +02:00
1 parent 08adcfcd27
commit 5537afb53d
13 files changed
+89 -30

No files matched your search

+16
View File
@@ -1,6 +1,13 @@
{
"_about": "The site's changelog, newest first. Versions follow Semantic Versioning (MAJOR.MINOR.PATCH), dates ISO 8601 (DIN EN 28601). make_builder_data.py adds every mod's current version from its module and writes assets/versions.js.",
"site": [
{
"version": "1.8.1",
"date": "2026-10-20",
"changes": [
"The boot screen names the release: Pionaarr Mods 1.8.1 (it said 1.0); from now on always the latest."
]
},
{
"version": "1.8.0",
"date": "2026-10-20",
@@ -325,6 +332,15 @@
"Hot cue colours read correctly when a cue has a comment."
]
}
],
"credit": [
{
"version": "1.1.0",
"date": "2026-10-20",
"changes": [
"The boot text carries the Pionaarr Mods release number, always the latest."
]
}
]
}
}
+27
View File
@@ -158,12 +158,30 @@ def python_bundle(repo):
return out
def set_release(repo):
"""The boot screen (the credit mod) names the Pionaarr Mods release: always
the site's version (tools/changelog.json), written into credit.py's
RELEASE before anything is built."""
import re
with open(os.path.join(HERE, 'changelog.json'), encoding='utf-8') as f:
site = json.load(f)['site'][0]['version']
path = os.path.join(repo, 'mods', 'cdj900nxs', 'credit.py')
with open(path, encoding='utf-8') as f:
src = f.read()
new = re.sub(r"^RELEASE = '[^']*'", "RELEASE = '%s'" % site, src, count=1, flags=re.M)
if new != src:
with open(path, 'w', encoding='utf-8', newline='\n') as f:
f.write(new)
print('set credit.RELEASE to %s (the boot screen)' % site)
def main():
ap = argparse.ArgumentParser()
ap.add_argument('--repo', default=os.path.join(os.path.dirname(WEB), 'CDJ900NXSVirtual'))
args = ap.parse_args()
sys.path.insert(0, os.path.join(args.repo, 'mods'))
sys.path.insert(0, os.path.join(args.repo, 'mods', 'cdj900nxs'))
set_release(args.repo)
import patch_cdj900nxs as p
import hotcuekeys as hk
import cuecolours
@@ -286,10 +304,19 @@ def write_versions(p):
html = f.read()
new = re.sub(r'(href|src)="((?:style\.css|script\.js|assets/versions\.js|builder/[a-z]+\.js))(\?v=[^"]*)?"',
lambda m: '%s="%s?v=%s"' % (m.group(1), m.group(2), data['site']), html)
new = re.sub(r'Pionaarr Mods \d+\.\d+(\.\d+)?', 'Pionaarr Mods ' + data['site'], new) # the boot text
if new != html:
with open(path, 'w', encoding='utf-8', newline='\n') as f:
f.write(new)
print('stamped %s with ?v=%s' % (name, data['site']))
ui = os.path.join(WEB, 'builder', 'ui.js')
with open(ui, encoding='utf-8') as f:
js = f.read()
new = re.sub(r'Pionaarr Mods \d+\.\d+(\.\d+)?', 'Pionaarr Mods ' + data['site'], js)
if new != js:
with open(ui, 'w', encoding='utf-8', newline='\n') as f:
f.write(new)
print('stamped builder/ui.js with Pionaarr Mods %s' % data['site'])
if __name__ == '__main__':