Sphinx-Stylo
| Project | |
| Code | |
| PyPi |
It is extremely early stages for this extension. It is not likely to be robust
Sphinx-Stylo is an extension to the Sphinx
documentation tool that allows you to insert dynamically generated images created using
the Stylo python library. Images can be defined
using the .. stylo-image:: directive inline in your rst source files.
.. stylo-image::
:align: center
:img-width: 1920
:img-height: 1080
:display-width: 75%
from stylo.color import FillColor
from stylo.shape import Circle
from stylo.image import SimpleImage
color = FillColor("ffff00)
circle = Circle(fill=True)
image = SimpleImage(circle, color)
Then when a sphinx build is run your code will be executed and an image with the given dimensions will be inserted into the final HTML page.
If you want the code included alongside the inserted image then add the :include-code:
option to the list of options under the directive.
You must store your image in a variable called image for it to be picked up by the
extension.
Getting Started
If you want to use this extension in your documentation then you first need to
install the extension using pip.
$ pip install sphinx-stylo
Then you need to add the extension to your extensions = [] list in your project's conf.py
extensions = [
...
"sphinx_stylo"
]
Metadata
Release files for sphinx-stylo 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinx-stylo-0.1.1.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_stylo-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / sphinx-stylo-0.1.1.tar.gz
| Download URL | sphinx-stylo-0.1.1.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c53983054468455e2b3c6b66332932f8349a71aebeda6211ad42c819e60a03f
|
|
BLAKE2b-256 checksum How to use checksums |
a02b5219c6c27c4b4afbfb892c1037ee59fca60ac6b585bb8bca08736d7aa265
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
|
Release files / sphinx_stylo-0.1.1-py3-none-any.whl
| Download URL | sphinx_stylo-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc9ef2ec95d30f08619f4b3264308fbf365bb2c8442de165c3eac0025800b7d4
|
|
BLAKE2b-256 checksum How to use checksums |
9cf7d3f7ae4a7d5ffd679acaf732cc93eec94fffcd4546e06ffcd705b2e7590c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
|