Skip to Content

 

`


UMLet

Project Roadmap

In this part, we explain how to develop a new project. here is the steps:

  • Clone project
  • make .venv
  • install Sphinx 9.1
  • install sphinx-umlet
  • install UMLet 15.1
  • make a diagram at UMLet
  • make test project for Sphinx
  • run Extension in conf.py
  • use .. uml:: application
  • run make html
  • build application.svg
  • existance of SVG in HTML

project coding

1. Make a directory

In the ripository for testing sphinx, then clone README.md & read it:

mkdir sphinx-umlet-task cd sphinx-umlet-task git clone https://github.com/odoonix/sphinx-umlet.git cd sphinx-umlet less README.md

2. activate vnen , install sphinx & the sphinx project:

python3 -m venv .venv

. .venv/bin/activate

python -m pip --version

pip 24.0 from /home/saba/sphinx-umlet-task/sphinx-umlet/.venv/lib/python3.12/site-packages/pip (python 3.12)

python -m pip install "Sphinx==9.1"

sphinx-build --version

python -m pip install .

3. Instull UMLet & make a directory for testing UMLet, then run it:

snap list | grep umlet

umlet-standalone 15.1 54 latest/stable digidigital-software

mkdir -p umlet-test

cd umlet-test

umlet-standalone

4. illustrate a diagram in UMLet app & save as application.uxf in umlet-test, then make an output directory & convert to svg:

mkdir -p output

java -jar /snap/umlet-standalone/current/Umlet/umlet.jar -action=convert -format=svg -filename=application.uxf -output=output

ls -l output

application.svg

5. test & run sphinx:

mkdir sphinx-test

cd sphinx-test

sphinx-quickstart

  • y
  • UMLet Test
  • Saba
  • Enter
  • Enter

6. how sphinx connect to the extension, rst to uml & runing generate_umlet_assets:


cd source

cat conf.py

sed -i "s/extensions = \[\]/extensions = ['sphinx_umlet']/" conf.py

grep -n "extensions" conf.py

cp ../../umlet-test/application.uxf .

cat index.rst

cat >> index.rst <<'EOF'



UMLet Diagram

=============



.. uml:: application

:alt: Application Architecture

:align: center

:width: 100%

EOF

tail -n 10 index.rst


7. first extension building & showing it: (go back to sphinx-test directory)


cd ..

make html

find build -name "*.svg" -o -name "*.html"

grep -n "application.svg" build/html/index.html

make html && firefox build/html/index.html