Skip to main content

Sphinx extension to include screenshot of programs

Project description

This Sphinx 1.0 extension executes programs during the build step and includes their screenshot into the documentation. GUI version of the sphinxcontrib.programoutput extension.

home: https://github.com/ponty/sphinxcontrib-programscreenshot

documentation: http://ponty.github.com/sphinxcontrib-programscreenshot

Basic usage

.. program-screenshot:: xmessage hello
    :prompt:

How it works

  1. start Xvfb headless X server using pyvirtualdisplay
  2. redirect program display to Xvfb server by setting $DISPLAY variable.
  3. wait some seconds
  4. take screenshot by pyscreenshot which needs scrot.
  5. use .. image:: directive to display image

Installation

General

  • install Xvfb and Xephyr

  • install PIL

  • install scrot

  • install pip

  • install the program:

    # as root
    pip install sphinxcontrib-programscreenshot
    

Ubuntu

sudo apt-get install python-pip
sudo apt-get install scrot
sudo apt-get install xvfb
sudo apt-get install xserver-xephyr
sudo apt-get install python-imaging
sudo pip install sphinxcontrib-programscreenshot

Uninstall

# as root
pip uninstall sphinxcontrib-programscreenshot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sphinxcontrib-programscreenshot, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size sphinxcontrib-programscreenshot-0.0.5.tar.gz (7.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page