mirror of
https://github.com/wez/wezterm.git
synced 2024-11-30 06:03:39 +03:00
22 lines
563 B
Python
Executable File
22 lines
563 B
Python
Executable File
#!/usr/bin/env python3
|
|
import glob
|
|
import os
|
|
import re
|
|
import sys
|
|
|
|
NIGHTLY = '20230326-111934-3666303c'
|
|
|
|
SINCE = re.compile("\{\{since\('nightly'", re.MULTILINE)
|
|
|
|
for p in ["docs/**/*.md", "docs/**/*.markdown"]:
|
|
for filename in glob.glob(p, recursive=True):
|
|
with open(filename, "r") as f:
|
|
content = f.read()
|
|
|
|
adjusted = SINCE.sub(f"{{{{since('{NIGHTLY}'", content)
|
|
if content != adjusted:
|
|
print(filename)
|
|
with open(filename, "w") as f:
|
|
f.truncate()
|
|
f.write(adjusted)
|