From 2a26de717d9ac89f79b89d99fd2b7af4d3834edf Mon Sep 17 00:00:00 2001 From: pcnick Date: Sat, 4 Jul 2026 21:01:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8B=89=E4=B8=81=E5=8C=96?= =?UTF-8?q?=E3=80=81=E6=A8=99=E6=BA=96=E5=8C=96=E8=BC=B8=E5=87=BA=E6=A8=A3?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Animelibk.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Animelibk.ps1 b/Animelibk.ps1 index 26e5fe8..b8cb455 100644 --- a/Animelibk.ps1 +++ b/Animelibk.ps1 @@ -68,7 +68,7 @@ $WorkData = $(if (Test-Path $RecorDB) { Get-Content $RecorDB | ConvertFrom-Json } else { "" -}) | Select-Object ID, WorkName, TargetName, DestinName, Season, Episode, Latinization, Standard +}) | Select-Object ID, WorkName, TargetName, DestinName, Latinization, Standard, Season, Episode $RecorDB # 確認資料狀態,缺少則進行物件資料建立 @@ -92,7 +92,7 @@ $Latinization = { param($String) # 載入置換檔 - $C = if (Test-path $PSScriptRoot\C2E.csv) {Import-Csv -Encoding UTF8 $PSScriptRoot\C2E.csv} + $C = if ($WorkData.Standard -and (Test-path $PSScriptRoot\C2E.csv)) {Import-Csv -Encoding UTF8 $PSScriptRoot\C2E.csv} if ($WorkData.Latinization.Length -eq 0) { $T = Read-Host "請輸入拉丁化作品名稱" @@ -105,7 +105,7 @@ $Latinization = { $RuleString = $RuleString + $Matches[0] $TString = $TString -replace $Matches[0], '-' } - return $String -replace $RuleString, $T + return ($String -replace "$RuleString\s?", "$T ").Trim() } } $WorkData