Skip to content

Instantly share code, notes, and snippets.

View qoli's full-sized avatar

Ronnie W. qoli

View GitHub Profile
param (
# Accept command parts as an array
[Parameter(Mandatory=$true, ValueFromRemainingArguments=$true)]
[string[]]$CommandParts
)
# Check if command parts were provided
if (-not $CommandParts) {
Write-Host "Error: Please provide the command parts as arguments after the script path."
Write-Host "Example: powershell.exe -File .\your_script.ps1 part1 part2 part3"
Directory Structure:
└── ./
├── EDMesg
│ ├── __init__.py
│ ├── EDMesgBase.py
│ ├── EDMesgClient.py
│ └── EDMesgProvider.py
├── CargoParser.py
├── directinput.py
@qoli
qoli / app_translate.py
Created June 3, 2025 10:30
調用 LLM 執行翻譯
import json
import os
import requests
from dotenv import load_dotenv
import shutil
import re
# 加載 .env 文件中的環境變量
load_dotenv()
@qoli
qoli / add_missing_localizations.py
Created June 3, 2025 10:29
增加 localizations 字段
import json
def add_localization(filepath):
try:
with open(filepath, 'r', encoding='utf-8') as f:
content = f.read()
data = json.loads(content)
except json.JSONDecodeError as e:
print(f"JSON 解碼錯誤:{e}")
return
@qoli
qoli / gist:d13b3223d68912b630f36e491a83b564
Last active May 30, 2025 12:52
這是一份會讓 qwen3 最少卡住 3 分鐘的提示詞。
### 翻譯必要性判斷
你是一個專業的本地化專家,請根據提供的 Swift 代碼片段和原文,判斷該原文是否需要進行翻譯。
### 判斷規則
- **需要翻譯 (YES)**:
- 用戶界面 (UI) 上顯示的文本,例如按鈕文字、標籤、提示信息、錯誤信息、菜單項等。
- 應用程序內部邏輯中,會直接或間接影響用戶體驗的文本。
- 任何可能需要向用戶展示的字符串。
- **不需要翻譯 (NO)**:
- 調試信息 (例如 `print("")` 中的內容)。
76561197973847617
830685888
@qoli
qoli / .clinerules
Created February 5, 2025 17:15
面向 Roo Code 的一份提示詞
# 對話規則
每次開始對話前,
請使用 list_files 工具,列出 Docs/cline 下確定如下文檔的位置。
請閱讀
1. app-directory-guide.md // 項目目錄結構
2. data-model-reference.md // 數據庫結構
3. view-development-guide.md // 最佳實踐
@qoli
qoli / exportAll.sh
Created January 22, 2024 09:08
flutter package with Xcode
#!/bin/zsh
function buildTest() {
clear
cp -rf ./lib/common/config_test.txt ./lib/common/config.dart
EX_FOLDER="app-test"
cat ./lib/common/config.dart
echo "// ==="
buildiOS
buildAndroid
//
// ScrollView.swift
// SyncNext
//
// Created by 黃佁媛 on 2023/9/25.
//
import Foundation
import SwiftUI
@qoli
qoli / simulator-input.py
Created October 11, 2023 09:58
允許粘貼板或其他方式快捷輸入 tvOS 模擬器
#!/usr/bin/env python3
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Simulator Input
# @raycast.mode silent
# Optional parameters:
# @raycast.icon ⌨️
# @raycast.argument1 { "type": "text", "placeholder": "Placeholder" }