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
sphinx-scruffy: Plug-in for Sphinx to render "scruffy" diagrams
===============================================================

Plug-in for Sphinx to render "scruffy" diagrams.

.. image:: https://api.travis-ci.org/paylogic/sphinx-scruffy.png
:target: https://travis-ci.org/paylogic/sphinx-scruffy
.. image:: https://pypip.in/v/sphinx-scruffy/badge.png
:target: https://crate.io/packages/sphinx-scruffy/
.. image:: https://coveralls.io/repos/paylogic/sphinx-scruffy/badge.png?branch=master
:target: https://coveralls.io/r/paylogic/sphinx-scruffy


Installation
------------

.. sourcecode::

pip install sphinx-scruffy

To use scruffy diagrams you need several external dependencies installed:

- The `Scruffy Python module <https: github.com="" aivarsk="" scruffy="">`_. This module will be installed automatically when
you use ``pip install sphinx-scruffy``.
- You need ``dot`` (Graphviz), ``rsvg-convert`` (librsvg) and ``pic2plot`` (plotutils).
You can install all three with one command on Ubuntu: ``sudo apt-get install graphviz librsvg2-bin plotutils``.
- The scruffy font is called Purisa, if you're running Ubuntu you probably have it already but if you don't then
you can install it using ``sudo apt-get install ttf-thai-tlwg``.


Configuration
-------------

An example of your shpinx's conf.py:

.. code-block:: python

extensions = ['sphinx_scruffy']


Usage
-----

This section shows a few examples of "scruffy" diagrams done using shpinx-scruffy plugin.

A simple example
****************

The following reStructuredText::

.. scruffy::

[User|+Forename;+Surname;+HashedPassword;-Salt|+Login();+Logout()]

Results in this image:

.. scruffy::

[User|+Forename;+Surname;+HashedPassword;-Salt|+Login();+Logout()]

More complex example
********************

Here's a more complex example::

.. scruffy::

[note: You can stick notes on diagrams too!{bg:cornsilk}]
[Customer]<>1-orders 0..*>[Order]
[Order]++*->[LineItem]
[Order]-1>[DeliveryMethod]
[Order]-*>[Product]
[Category]<->[Product]
[DeliveryMethod]^[National]
[DeliveryMethod]^[International]

This results in the following image:

.. scruffy::

[note: You can stick notes on diagrams too!{bg:cornsilk}]
[Customer]<>1-orders 0..*>[Order]
[Order]++*->[LineItem]
[Order]-1>[DeliveryMethod]
[Order]-*>[Product]
[Category]<->[Product]
[DeliveryMethod]^[National]
[DeliveryMethod]^[International]

Class diagram extensions
************************

Here's how to create class diagrams::

.. scruffy::

[Node A]->[Node B]
[Node B]->[Node C]
[Group [Node A][Node B]]

This results in the following image:

.. scruffy::

[Node A]->[Node B]
[Node B]->[Node C]
[Group [Node A][Node B]]

Sequence diagrams
*****************

Finally there are sequence diagrams::

.. scruffy::
:sequence:

[Patron]order food>[Waiter]
[Waiter]order food>[Cook]
[Waiter]serve wine>[Patron]
[Cook]pickup>[Waiter]
[Waiter]serve food>[Patron]
[Patron]pay>[Cashier]

This results in the following image:

.. scruffy::
:sequence:

[Patron]order food>[Waiter]
[Waiter]order food>[Cook]
[Waiter]serve wine>[Patron]
[Cook]pickup>[Waiter]
[Waiter]serve food>[Patron]
[Patron]pay>[Cashier]


Python3 support
---------------

Package itself supports python3 out of the box, but it's dependency, scruffy package, doesn't yet have a pypi release
with python 3 support.
use git master for now https://github.com/aivarsk/scruffy.git

or via pip::

.. code-block:: sh

pip install -e git+https://github.com/aivarsk/scruffy.git#egg=scruffy


Contact
-------

If you have questions, bug reports, suggestions, etc. please create an issue on
the `GitHub project page <http: github.com="" paylogic="" sphinx-scruffy="">`_.


License
-------

This software is licensed under the `MIT license <http: en.wikipedia.org="" wiki="" mit_license="">`_

See `<license.txt>`_


© 2013 Paylogic International.

Changelog
=========


1.0.0
-----

- packaging fixes (bubenkoff)


0.2
---

* Initial public release
Release History

Release History

1.0.0

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

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
sphinx-scruffy-1.0.0.tar.gz (4.8 kB) Copy SHA256 Checksum SHA256 Source Sep 8, 2014

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