Skip to content

Instantly share code, notes, and snippets.

View thrasher's full-sized avatar
🚚
Working from van

Jason Thrasher thrasher

🚚
Working from van
View GitHub Profile
@thrasher
thrasher / export_google_docs_to_obsidian_markdown.py
Created March 21, 2026 15:03
Export Google Docs to Obsidian Markdown, extracting inline images to attachments
import re
import base64
import argparse
import os
import sys
def export_images(md_file, update=False, folder=None):
if not os.path.exists(md_file):
print(f"Error: File '{md_file}' not found.")
return
# clean the git config
git config --global --unset diff
git config --global --unset diff.external
git config --global --unset diff.tool
git config --global --unset difftool.prompt
git config --global --unset merge.tool
# configure for DiffMerge
# https://sourcegear.com/diffmerge/downloads.php
git config --global diff.tool diffmerge