docs: 한글화 운영 적용본과 도움말 100개 작업 기록 보관

This commit is contained in:
Codex
2026-09-06 05:06:00 +09:00
parent 1752fed118
commit 0814e9f44c
632 changed files with 117034 additions and 0 deletions
@@ -0,0 +1,29 @@
import pathlib,shutil,subprocess,datetime,time,urllib.request
target=pathlib.Path('/www/dk_project/dk_app/trilium/patched/main.cjs')
source=pathlib.Path('/tmp/trilium-korean-release/main.cjs')
text=source.read_text()
# Static assets are mapped by Express from the SAME jg variable into public/src.
# This is a URL prefix, not a new physical directory.
assert 'jg=`assets/v${CR.version}-ko-20260905`' in text
assert 'e.use(`/${jg}/src`,TQ(x2.default.join(n,"src")))' in text
assert 'assetPath:jl' in text
stamp=datetime.datetime.now().strftime('%Y%m%d-%H%M%S')
backup=target.parent/('main.cjs.before-cache-fix-'+stamp)
shutil.copy2(target,backup)
try:
target.write_bytes(source.read_bytes())
subprocess.run(['docker','restart','trilium'],check=True,stdout=subprocess.DEVNULL)
for attempt in range(20):
try:
with urllib.request.urlopen('http://127.0.0.1:18082/assets/v0.95.0-ko-20260905/src/layout_commons.js',timeout=3) as response:
assert response.read(120).startswith(b'import triliumKoreanEditorTranslations')
with urllib.request.urlopen('http://127.0.0.1:18082/api/health-check',timeout=3) as response: assert response.status==200
print('Cache version fix verified. Backup: '+str(backup));break
except Exception:
if attempt==19:raise
time.sleep(1)
except Exception:
target.write_bytes(backup.read_bytes())
subprocess.run(['docker','restart','trilium'],check=True)
print('Rolled back cache version fix')
raise