Skip to main content

fetch_google_doc_as_archive

Function fetch_google_doc_as_archive 

Source
pub async fn fetch_google_doc_as_archive(
    url: &str,
    api_token: Option<&str>,
) -> Result<GDocsArchiveResult>
Expand description

Fetch a Google Docs document as a ZIP archive.

Fetches the document as HTML, extracts embedded base64 images, converts to Markdown, and returns all components ready for archiving.

The archive contains:

  • document.md — Markdown version
  • document.html — HTML version with local image paths
  • images/ — extracted images

§Arguments

  • url - Google Docs URL
  • api_token - Optional API token for private documents

§Errors

Returns an error if the fetch or conversion fails.