fork/wezterm

git clone https://git.julia.blue/fork/wezterm

Wez Furlongdocs: update for release3129e20fd

termwiz-0.23.3
799 B29 linesraw
1#!/usr/bin/env python3
2import glob
3import os
4import re
5import sys
6
7NIGHTLY = '20240203-110809-5046fc22'
8
9SINCE = re.compile("\{\{since\('nightly'", re.MULTILINE)
10
11for p in ["docs/**/*.md", "docs/**/*.markdown"]:
12    for filename in glob.glob(p, recursive=True):
13        with open(filename, "r") as f:
14            content = f.read()
15
16        adjusted = SINCE.sub(f"{{{{since('{NIGHTLY}'", content)
17        if content != adjusted:
18            print(filename)
19            with open(filename, "w") as f:
20                f.truncate()
21                f.write(adjusted)
22
23SCHEME_DATA = 'docs/colorschemes/data.json'
24with open(SCHEME_DATA, 'r') as f:
25    content = f.read()
26with open(SCHEME_DATA, 'w') as f:
27    content = content.replace("nightly builds only", NIGHTLY)
28    f.truncate()
29    f.write(content)