コンテンツにスキップ

2025-12-23 - 2025-12-29

読んだ記事

読んだ本

書いた

その他

  • Jetbrains AI Assistantとのチャット履歴を取得するシェルスクリプト
    • あとはClaudeCodeのも作れば普段遣いには耐えるな
    • もうちょい、複数環境前提のシェルスクリプトを書けるようになりたいなぁ
      • Pythonでやれ、でもいいんだけど
        #!/usr/bin/env bash
        set -euo pipefail
        
        cd "$HOME/Library/Application Support/JetBrains" || exit 1
        
        grep -r -m 1 displayContent ./*/workspace/*.xml |
          cut -d':' -f1 |
          while IFS= read -r xmlfile; do
            echo "=================================="
            # shellcheck disable=SC2012
            gdate -d @"$(stat -f '%B' "$xmlfile")" '+%Y-%m-%d %H:%M'
        
            grep displayContent "$xmlfile" |
              yq -oj -p xml '.option[0] | .+@value' |
              jq -r .
          done
        
        #週報 <2025-12-09 - 2025-12-15 2025-12-30 - 2026-01-05>