googGitHub

Local images in Docs, Drive folders and HTML drafts

Insert images from your disk into Docs with page-aware sizing, create Drive folders, write HTML drafts, and copy or compare documents.

v0.2.6

Local images in Docs

Local files are staged through Drive and cleaned up afterwards, or through your own staging command.

$goog docs image insert DOCUMENT_ID --file ./chart.png --at 'heading:Summary'

Fit images to the page

Maximum sizes keep the aspect ratio. --fit-page uses the section's page size and margins, and exact sizes that would distort need --allow-distortion.

$goog docs image insert DOCUMENT_ID "https://example.test/chart.png" --fit-page --reserve-height 72 --at 'heading:Summary'

Create Drive folders

drive mkdir creates a folder inside another folder.

$goog drive mkdir --folder FOLDER_ID "Q4 Planning"

HTML drafts

--html sends the body as HTML, so drafts can carry bold text, highlights and links.

$goog mail draft --to teammate@example.com --subject 'Rich update' --body '<p><strong>Important</strong>: review today</p>' --html

Copy and compare documents

docs copy duplicates a document with every component intact, and docs compare reports semantic differences between two documents.

$goog docs copy SOURCE_DOCUMENT_ID "Q3 Report from template"
$goog docs compare SOURCE_DOCUMENT_ID TARGET_DOCUMENT_ID

Hide trashed items

drive ls skips soft-deleted items unless you pass --show-all.

$goog drive ls --show-all
Downloads and checksums on GitHub