⚠️ This repository is no longer maintained by Lukas Martinelli.
A simple web interface and API that can export diagrams as images from a Astah project files.
🌐 Try out the demo at astah-converter.lukasmartinelli.ch
There is a single ressource project
for an Astah project file.
Make a POST request to the projects
endpoint with a file upload named upload
.
curl -H "Accept:application/json" -F "[email protected]" http://localhost/projects
{
"project_url":"http://localhost/projects/ee6a3d12a3b22305272badb76f39fe738c97eb3d",
"exports":[
{
"export_url":"http://localhost/projects/ee6a3d12a3b22305272badb76f39fe738c97eb3d?file=UseCase Diagramm.png",
"filename":"UseCase Diagramm.png"
}
]
}
Make a GET request to the exported file.
curl -O http://localhost/projects/ee6a3d12a3b22305272badb76f39fe738c97eb3d?file=UseCase Diagram.png"
If you request text/plain
from the API you can download the exports
line by line.
curl -H "Accept:text/plain" -F "[email protected]" http://localhost/projects | xargs -n1 curl -O
The Dockerfile contains Astah, Oracle JDK7 and the latest Node.
I have already setup an automated build lukasmartinelli/astah-converter
which you can use.
docker pull lukasmartinelli/astah-converter
Or you can clone the repo and build the docker image yourself.
docker build -t lukasmartinelli/astah-converter .
Now you can run the image.
docker run -p 3000:3000 -it lukasmartinelli/astah-converter
For developing I recommend mounting the current directory to the installation.
docker run -v $(pwd):/opt/astah-api -p 80:3000 -it lukasmartinelli/astah-converter
Attention: if you add additional Node packages you need to rebuild the image.