gifgrep

gifgrep

熱門

使用 CLI/TUI 搜尋 GIF 提供者、下載結果,並擷取靜態圖或圖表。

38萬星標
0分支
更新於 2026/7/26
SKILL.md
readonlyread-only
name
gifgrep
description

使用 CLI/TUI 搜尋 GIF 提供者、下載結果,並擷取靜態圖或圖表。

gifgrep

使用 gifgrep 搜尋 GIF 提供者(Tenor/Giphy),在 TUI 中瀏覽、下載結果,並擷取靜態圖或圖表。

GIF-Grab(gifgrep 工作流程)

  • 搜尋 -> 預覽 -> 下載 -> 擷取(靜態圖/圖表),方便快速檢視與分享。

快速開始

  • gifgrep cats --max 5
  • gifgrep cats --format url | head -n 5
  • gifgrep search --json cats | jq '.[0].url'
  • gifgrep tui "office handshake"
  • gifgrep cats --download --max 1 --format url

TUI + 預覽

  • TUI:gifgrep tui "query"
  • CLI 靜態預覽:--thumbs(僅限 Kitty/Ghostty;靜態幀)

下載 + 顯示

  • --download 儲存至 ~/Downloads
  • --reveal 在 Finder 中顯示最後下載的檔案

靜態圖 + 圖表

  • gifgrep still ./clip.gif --at 1.5s -o still.png
  • gifgrep sheet ./clip.gif --frames 9 --cols 3 -o sheet.png
  • 圖表 = 取樣幀組成的單一 PNG 網格(適合快速檢視、文件、PR、聊天)。
  • 調整:--frames(數量)、--cols(網格寬度)、--padding(間距)。

提供者

  • --source auto|tenor|giphy
  • GIPHY_API_KEY--source giphy 所必需
  • TENOR_API_KEY 可選(若未設定則使用 Tenor 示範金鑰)

輸出

  • --json 輸出結果陣列(idtitleurlpreview_urltagswidthheight
  • --format 用於管線友善的欄位(例如 url

GIF 資產衛生

  • 在推薦或使用動畫 GIF 網址前,請確認它能成功解析、具有 Content-Type: image/gif,且確實是動畫(多幀或循環中繼資料;例如用 fileidentify 或小型腳本檢查)。
  • 記錄資產的來源網址、授權與版權資訊。
  • 若需要本地資產,請勿直接熱連結:應下載/複製到專案中,並引用本地檔案。

環境調整

  • GIFGREP_SOFTWARE_ANIM=1 強制使用軟體動畫
  • GIFGREP_CELL_ASPECT=0.5 調整預覽幾何形狀