26 lines
1.1 KiB
PowerShell
26 lines
1.1 KiB
PowerShell
# Install china-yt-longform into the current user's Cursor personal skills.
|
|
# Run: 右键 → 使用 PowerShell 运行,或在本目录执行:
|
|
# powershell -ExecutionPolicy Bypass -File .\install_skill.ps1
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$src = Join-Path $PSScriptRoot "skills\china-yt-longform"
|
|
if (-not (Test-Path -LiteralPath $src)) {
|
|
$src = Join-Path $PSScriptRoot ".cursor\skills\china-yt-longform"
|
|
}
|
|
if (-not (Test-Path -LiteralPath $src)) {
|
|
Write-Host "ERROR: skill folder not found next to this script." -ForegroundColor Red
|
|
exit 1
|
|
}
|
|
|
|
$dstRoot = Join-Path $env:USERPROFILE ".cursor\skills"
|
|
$dst = Join-Path $dstRoot "china-yt-longform"
|
|
New-Item -ItemType Directory -Force -Path $dstRoot | Out-Null
|
|
if (Test-Path -LiteralPath $dst) {
|
|
Remove-Item -LiteralPath $dst -Recurse -Force
|
|
}
|
|
Copy-Item -LiteralPath $src -Destination $dst -Recurse -Force
|
|
|
|
Write-Host "Installed -> $dst" -ForegroundColor Green
|
|
Write-Host "Open a NEW Cursor chat, then say: 按 china-yt-longform 处理我的视频批次"
|
|
Write-Host "Optional deps: pip install -r requirements.txt"
|