Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
sphinxcontrib Support image trimming: googledrive_trim_images Oct 13, 2018
.gitignore Initial commit Oct 13, 2018
LICENSE Initial commit Oct 13, 2018 Initial commit Oct 13, 2018
setup.cfg Support image trimming: googledrive_trim_images Oct 13, 2018
tox.ini tox: usedevelop=true Oct 13, 2018



This Sphinx extension allows you to embed images on Google Drive into your document:

.. image::



$ pip install sphinxcontrib-googledrive

Prepare your Google Apps

This extension expects you to create Google Apps and its Service Account. Please read the document of Google Client Libraries: Using OAuth 2.0 for Server to Server Applications and create your service account. And please generate a private key for the account.

Configure Sphinx

Add sphinxcontrib.googledrive to extensions at

extensions += ['sphinxcontrib.googledrive']

And let the private key for your service account to Sphinx through one of the following methods:

  1. Set content of the private key via environment variable GOOGLE_DRIVE_SERVICE_ACCOUNT_KEY:

    $ export GOOGLE_DRIVE_SERVICE_ACCOUNT_KEY='{"type": "service_account", ...}'
  2. Set a path to the private key file via googledrive_service_account in

    googledrive_service_account = '/path/to/private.key'


Please give an URL of caoo diagrams to image or figure directives as an argument:

.. image::

.. figure::

   caption of figure

Configuration Options

A path to private key for service account.
Trim white space or not (boolean).


You can’t perform that action at this time.