Skip to main content

Crate org_gdocs

Crate org_gdocs 

Source
Expand description

org-gdocs — publish a projection of an org-mode document to Google Docs and sync reviewer comments back into the org file.

Org-mode is the single source of truth; Google Docs is a collaboration surface for comments only. This crate owns all testable logic (org projection, the Google API client, comment anchoring, file writeback); the companion Emacs package is a thin shell over the binary.

See docs/plans/org-gdocs.md for the architecture and invariants this crate is built against.

Re-exports§

pub use error::Error;
pub use error::Result;

Modules§

auth
OAuth 2.0 authentication via the installed-app (loopback) flow.
clean
Q3 — the clean command: archive the comments the operator marked DONE.
cli
Command-line argument definitions for org-gdocs.
comments
Q1 — mapping a Google comment back to the org structural element it anchors to.
comments_meta
P6 — the ** Active Comments subtree: human-facing TODO/DONE headings, one per pulled Google comment, keyed by :COMMENT_ID:.
config
Configuration and filesystem-path resolution.
custom_id
Stable section ids and their surgical insertion (P2).
doctor
Health-check provider for org-gdocs.
envelope
The CLI ↔ Emacs result envelope (A5): a single s-expression the binary prints for domain commands, which org-gdocs.el reads with (read …).
error
Typed error surface for the org-gdocs library.
google
Google API integration: the Docs/Drive hubs and index arithmetic.
open
Q3 — the open command: report the linked doc’s browser URL for elisp to browse-url.
orgfile
Two-region model of a synced org file: the user’s body and the tool-owned machine region, split at the * GDOC_METADATA heading.
project
P3 — projecting an org document into Google Docs batchUpdate requests.
pull
Q2 — the pull orchestration: fetch reviewer comments from the linked Google Doc and merge them into the org file as structural-anchored TODO headings.
push
P7 — the push orchestration: publish the org body’s projection to its linked Google Doc and write machine state back into the file.
sexp
Minimal s-expression reader/writer for the surfaces org-gdocs owns (A5).
syncstate
P5 — the tool-owned ** Sync State block.

Constants§

TOOL_SPEC
Shared CLI metadata for the org-gdocs binary.