sphinxcontrib-umlet
Sphinx Extension for effordlessly embedding UMLet diagrams in your Sphinx document.
.. umlet-figure:: some_folder/some_diagram.uxf
It adds the umlet-image and umlet-figure directives. These are equivalent to the standard image and figure directives, but accept the path to a .uxf file and additional options to control exporting of the diagram to a suitable image format.
This extension is highly influenced by sphinxcontrib-drawio. Many thanks to the creator @modelmat !
Installation
Make sure that UMLet works on your machine. Java runtime in the path is a prerequisite.
Add the UMLet binary to $PATH. See below for more details and alternative solutions.
pip install sphinxcontrib-umlet
In your sphinx config.py, register it to the extensions to use, such as:
extensions = []
# ...
extensions.append("sphinxcontrib.umlet")
# ...
Usage
The extension can be used through the umlet-image directive. For example:
.. umlet-image:: some_diagram.uxf
There’s also a umlet-figure directive that mimics the figure directive:
.. umlet-figure:: some_diagram.uxf
Some caption
The directives can be configured with option format to control the export of the specific UMLet diagram to a bitmap or vector image. This option controls the output file format of this specific directive, so it overrides the export format commonly used or commonly configured in the conf.py file.
Name: :format:
Default value:
"png"Possible Values:
"png","jpg","svg"or"pdf"
Additionally, umlet-image accepts all of the options supported by the image directive. These options apply to the image as exported by UMLet. Similarly, umlet-figure accepts all options supported by the figure directive.
Configuration Options
These values are placed in the conf.py of your Sphinx project.
Binary Path
Name:
umlet_binary_pathDefault value:
None
It is the path including the program’s name.
This config option allows for a specific override for the binary location. By default, this chooses the umlet.sh (resp. Umlet.exe) binary accessible in $PATH.
Default Output Format
Name:
umlet_builder_export_formatDefault value:
{}
This config option controls the default export file format for each Sphinx builder.
It accepts a dictionary mapping builder names to image formats. The
builder name should match the name of a Sphinx builder
(e.g., "html", "latex"). Accepted values for the export format are "png",
"jpg", "svg" and "pdf". If no format is set for a given builder, its
preferred image format is used, that is, the first format listed in a builder’s
supported image types that UMLet is capable of exporting to (eg. SVG for HTML, PDF for LaTeX).
Metadata
Release files for sphinxcontrib-umlet 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sphinxcontrib-umlet-1.0.2.tar.gz | 11.8 kB | Without provenance | Details for sphinxcontrib-umlet-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinxcontrib_umlet-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for sphinxcontrib_umlet-1.0.2-py3-none-any.whl |
Total release size: 18.7 kB
Release files / sphinxcontrib-umlet-1.0.2.tar.gz
| Download URL | sphinxcontrib-umlet-1.0.2.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c342c2506675f135baafc19f44fa0375d6d508655b12f33cdc8b7b91c20c62a3
|
|
BLAKE2b-256 checksum How to use checksums |
40c03e6223b6f2b86afa4e461eec565f98268809e62c12abd1770770eb6cc9c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Release files / sphinxcontrib_umlet-1.0.2-py3-none-any.whl
| Download URL | sphinxcontrib_umlet-1.0.2-py3-none-any.whl |
|---|---|
| Size | 6.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b028e2be46a8312b497cae3370ffb0b5b3c1470dae75a3ad33aa32bf7af45f0
|
|
BLAKE2b-256 checksum How to use checksums |
be9093a2d7bf9f23767ab67598fbd24df9f88119c36879bfffaffacf4ed98e15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.7
|
Security for sphinxcontrib-umlet 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.