This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

rstgo is a package for parsing go diagrams of the style used at the Sensei’s Library and rendering them using reStructuredText. It was designed for embedding dynamically generated images of go games into reST documents, particularly for pelican blogs or sphinx documentation.

The code lives at http://bitbucket.org/cliff/rstgo. Bug reports, feature requests, and contributions are all welcome. If you find the code useful, hop on bitbucket and send me a quick message letting me know.

To use with sphinx, add ‘rstgo.rst’ to your list of extensions.

To use with pelican or another docutils-based system, add the following to your pelican configuration file:

from rstgo import rst
rst.setup_docutils()

To use rstgo in standalone rst files, you can use the included rst2html+go.py script, which should get installed onto your PATH.

You can even use rstgo programmatically with go diagrams outside of reStructuredText documents. Just pass a file-like object containing only the text of the diagram to a GoDiagramParser, and then render the image file using a GoDiagram:

from StringIO import StringIO
from rstgo import parsers
from rstgo import board

diagram_text = StringIO("""\
    $$ -------
    $$ |. 1 .|
    $$ |X . O|
    $$ |b a 2|
    $$ -------
""")
parser = parsers.GoDiagramParser()
parser.parse(diagram_text)
diagram = board.GoDiagram.load_from_parser(parser)
diagram.render()
diagram.show()
diagram.save('diagram.png', 'PNG')

Changelog

0.2.2 – 2012/11/29

  • Updated setup.py to install pillow instead of PIL, because PIL does not understand basic packaging.

0.2.1 – 2012/11/29

  • Fixed bug causing misrendering of basic stones in certain circumstances
  • Fixed example code in this README file

0.2.0 – 2011/12/04

  • Implemented parsing of multi-digit numbers–not supported by sensei’s library.
  • Renamed setup_pelican() to setup_docutils(), because that’s what it does.
  • Deprecated setup_pelican().
  • Parser now creates a marked_coordinates dict, which allows multiple instances of the same annotation.
  • Boards now render non-alphanumeric annotations.
  • Added rstgo.__version__ information.

0.1.7 – 2011/11/06

  • Fixed an error in refactored parser that caused the first line of the board to be processed twice.
  • Added documentation for rendering diagrams in plain python.
  • Renamed GoDiagram.load_diagram_from_parser() method to GoDiagram.load_from_parser()
  • Implemented rendering of 0 as a stone marked “10”.

0.1.6 – 2011/11/05

  • Sequence moves can now start with either black or white.
  • Refactored parser a little bit.

0.1.5 – 2011/11/05

Implemented rendering of sequence moves and letter annotations. Currently, sequence moves have to start with black

0.1.4 – 2011/11/04

Fixed a bug where :alt: argument was unintentionally required.

0.1.3 – 2011/11/03

Fixed pathing and extension loading for usage with Sphinx.

0.1.2 – 2011/10/27

Added release notes to README.txt

0.1.1 – 2011/10/27

Added intro text to README.txt

0.1.0 – 2011/10/27

Initial release

To Do

  • Diagrams should render captions and metadata.
Release History

Release History

0.2.2

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
rstgo-0.2.2.tar.gz (14.5 kB) Copy SHA256 Checksum SHA256 Source Nov 29, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting