Open smolijar opened 1 year ago
Add -d
like:
puml-for-markdown -s http://localhost:8089 -i ./.md.gitignore -d --image-formats both --turn-off-link-shortening
or like: https://github.com/danielyaa5/puml-for-markdown/blob/main/.husky/pre-commit
I see, so generating images is a mandatory step then and puml-for-markdown
does not work without it?
Sorry I assumed from the docs's Advanced Usage:
that it is optional.
Adding the -d
still does not add the links into the readme, but it does provide output with bunch of warnings :tada:
There are now some images in dist_puml
but not the ones from the README. Not sure if only -d
makes it work; your example include even a custom server which I don't have.
Using the additional parameters you mentioned (without the custom server as I explained), the program ends on what seems like an unhandled HTTP request. See npx puml-for-markdown -d --image-formats both --turn-off-link-shortening
Can you tell me which combination of parameters should I use to get the simple diagram in the provided MWE, if I don't have a custom PlantUML server?
Anyone is welcome to try an alternative until this is resolved: https://github.com/grissius/plantaznik. I've written it without notion of this project and wanted to compare the two, but I did not manage to do a simple hello-world example.
There are now some images in dist_puml but not the ones from the README.
I understand it doesn't work with inline blocks:
```puml ... ```
U should define link to XXX.puml
in XXX.md
and this link should be replaced.
P.S. Try to create a demo repository or debug it, there is a simple js file, in general, you can figure it out in 15 minutes.
// docker-compose.yml
version: '3'
services:
plantuml-server:
build:
context: .
dockerfile: Dockerfile
ports:
- 8089:8080
// Dockerfile
FROM plantuml/plantuml-server:tomcat
EXPOSE 8080
First, you need to install Docker Compose.
docker-compose up -d && docker-compose logs -f
If zsh: command not found: docker-compose
and u have docker installed - just run docker and retry.
Go to http://localhost:8089
to access it.
Setup in .vscode/workspace.code-workspace
{
"settings": {
// plantuml-server
"plantuml.render": "PlantUMLServer",
"plantuml.server": "http://localhost:8089"
}
}
Use localhost:8089/<lang>
to compile. See plantuml-server/pull.
curl -s -X POST --data-binary @mydb.plantuml -H "Content-Type:text/plain" localhost:8089/png > mydb.png
Path @mydb.plantuml
same as ./mydb.plantuml
.
Disallow include
I understand it doesn't work with inline blocks:
But I don't use the inline blocks in the provided MWE, do I?
U should define link to XXX.puml in XXX.md and this link should be replaced.
Exactly what I did in the MWE, links were not replaced, however.
So based on your answer I assume I do need local PlantUML server? I can run it ofc, but I don't want to for every update of the readme, that was my point. The public one should be usable.
P.S. Try to create a demo repository or debug it, there is a simple js file, in general, you can figure it out in 15 minutes.
I guess this answers my question on the ease of use, if I should debug the primary basic functionality. Thanks for the help @NikitaIT , I am sorry we are not able to make the tool work with the public PlantUML server, with literally a single markdown and PlantUML file.
Following the README, the program does not seem to work for me. Maybe there is something I missed in the setup?
Here are steps to reproduce:
Expected: Updates the readme or prints error message.