chore: 项目更名为 SceneMarshal

- README/脚本注释/LICENSE/图标文件名统一改名
- 右键菜单注册项改为 SceneMarshal / SceneMarshalArchive
- media_archive 支持 SCENEMARSHAL_* 环境变量(保留旧变量兼容)
- README 补充 preflight/字幕/字体/归档等实际能力与 check 用法
This commit is contained in:
ali
2026-11-19 12:21:42 +08:00
parent ed59d4d280
commit e66d082f31
10 changed files with 49 additions and 34 deletions
+10 -10
View File
@@ -1,7 +1,7 @@
#Requires -Version 7.0
<#
.SYNOPSIS
把本机 SceneRename 源码部署到 N100 的运行副本。
把本机 SceneMarshal 源码部署到 N100 的运行副本。
.DESCRIPTION
默认(源码同步):
@@ -53,12 +53,12 @@ function Assert-Agent {
}
function Invoke-RemoteScript([string]$Body) {
$local = Join-Path ([IO.Path]::GetTempPath()) ("scenerename-remote-{0}.sh" -f [guid]::NewGuid().ToString('N').Substring(0, 8))
$local = Join-Path ([IO.Path]::GetTempPath()) ("SceneMarshal-remote-{0}.sh" -f [guid]::NewGuid().ToString('N').Substring(0, 8))
[IO.File]::WriteAllText($local, $Body, [Text.UTF8Encoding]::new($false))
try {
& scp @SshOpts -q $local "${Remote}:/tmp/scenerename-deploy.sh"
& scp @SshOpts -q $local "${Remote}:/tmp/SceneMarshal-deploy.sh"
if ($LASTEXITCODE -ne 0) { throw 'scp 上传远端脚本失败' }
& ssh @SshOpts $Remote 'bash /tmp/scenerename-deploy.sh'
& ssh @SshOpts $Remote 'bash /tmp/SceneMarshal-deploy.sh'
if ($LASTEXITCODE -ne 0) { throw "远端脚本执行失败(exit $LASTEXITCODE)" }
}
finally {
@@ -112,7 +112,7 @@ install_tool "$RemoteRepo/scripts/media_archive.py" /usr/local/bin/media-archive
"@
}
else {
$tgz = Join-Path ([IO.Path]::GetTempPath()) 'scenerename-sync.tgz'
$tgz = Join-Path ([IO.Path]::GetTempPath()) 'SceneMarshal-sync.tgz'
Write-Host '▶ 打包 media/src ...' -ForegroundColor Cyan
if (Test-Path -LiteralPath $tgz) { Remove-Item -LiteralPath $tgz -Force }
& tar -czf $tgz -C $RepoRoot --exclude=__pycache__ --exclude='*.pyc' media/src scripts
@@ -120,7 +120,7 @@ install_tool "$RemoteRepo/scripts/media_archive.py" /usr/local/bin/media-archive
Write-Host (" {0} KB" -f [math]::Round((Get-Item -LiteralPath $tgz).Length / 1KB, 1)) -ForegroundColor DarkGray
Write-Host '▶ 上传到 N100 ...' -ForegroundColor Cyan
& scp @SshOpts -q $tgz "${Remote}:/tmp/scenerename-sync.tgz"
& scp @SshOpts -q $tgz "${Remote}:/tmp/SceneMarshal-sync.tgz"
if ($LASTEXITCODE -ne 0) { throw 'scp 上传失败' }
Invoke-RemoteScript @'
@@ -128,9 +128,9 @@ set -euo pipefail
REPO=/home/ali/docker/tools/python
cd "$REPO"
TS=$(date +%Y%m%d-%H%M%S)
mkdir -p /tmp/scenerename-backup
tar -czf "/tmp/scenerename-backup/src-$TS.tar.gz" media/src
tar -xzf /tmp/scenerename-sync.tgz -C "$REPO"
mkdir -p /tmp/SceneMarshal-backup
tar -czf "/tmp/SceneMarshal-backup/src-$TS.tar.gz" media/src
tar -xzf /tmp/SceneMarshal-sync.tgz -C "$REPO"
find media/src -name '*.py' -exec chmod 644 {} +
echo "=== 远端相对仓库 HEAD 的变更 ==="
CHANGED=$(git status --porcelain -- media/src | head -40 || true)
@@ -151,7 +151,7 @@ install_tool() {
}
install_tool "$REPO/scripts/media-rename" /usr/local/bin/media-rename
install_tool "$REPO/scripts/media_archive.py" /usr/local/bin/media-archive
echo "备份: /tmp/scenerename-backup/src-$TS.tar.gz"
echo "备份: /tmp/SceneMarshal-backup/src-$TS.tar.gz"
'@
}
}