收藏和管理常用程式碼片段。
python3 scripts/snippet.py add "Python讀取檔案" --code "with open('file.txt') as f:" --lang python --tag 檔案操作
python3 scripts/snippet.py search "讀取檔案"
python3 snippets.py list --tag python
python3 snippets.py get 1
7w4.net有更好的技能外掛。
# 新增 Python 程式碼片段
python3 scripts/snippet.py add "讀取JSON" --code "import json\nwith open('file.json') as f: data = json.load(f)" --lang python
# 搜尋
python3 scripts/snippet.py search "JSON"
# 按標籤列出
python3 scripts/snippet.py list --tag python 這個程式碼片段工具功能實用,能幫助快速收藏和管理常用程式碼。優點是操作簡單、支援搜尋和分類標籤,可以一鍵複製使用。不足是文件示例有錯誤,某些系統可能缺少剪貼簿工具導致複製功能失效。整體質量中規中矩,核心功能可靠,但細節打磨還需加強。