This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.zsh_err_gemini | |
# ------------------------------------------------------------ | |
# gemini-2.5-flash を使って zsh エラーを対話的に調査するフック | |
# ------------------------------------------------------------ | |
# .zshrc に以下を追記してください: | |
# [[ -f ~/.zsh_err_gemini ]] && source ~/.zsh_err_gemini | |
# ==== ユーザー設定(必要に応じて .zshrc 側で export 可) ==== | |
: "${ZSH_ERR_LINES:=40}" # 取得するエラー出力の最大行数(デフォルト: 40) | |
: "${GEMINI_CLI:=gemini -m gemini-2.5-flash -p}" # Gemini CLI の実行コマンド |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import base64 | |
import argparse | |
def extract_base64_images_from_markdown(input_file, output_file): | |
with open(input_file, 'r', encoding='utf-8') as f: | |
md_text = f.read() | |
output_dir = os.path.join(os.path.dirname(output_file), 'images') |