vscode-plantuml icon indicating copy to clipboard operation
vscode-plantuml copied to clipboard

Feature Request: Export folder diagrams to path relative to folder

Open ianisms opened this issue 5 years ago • 11 comments

Would love to be able to right click on a folder ex:

/Project/Services/ServiceX/Documentation/Diagrams/src

And have the diagrams generated in a folder relative to the src ex:

/Project/Services/ServiceX/Documentation/Diagrams/out

ianisms avatar Aug 01 '19 18:08 ianisms

This is only useful if user keeps export diagrams to different folder, or I don't see the necessity, please use plantuml.exportOutDir(in workspace setting if you want different out dir for different project).

qjebbs avatar Aug 16 '19 06:08 qjebbs

The point is if you have a workspace with different project, the export will be at the same level for all projects and not related to the project itself.

git/GitPrj01/test1.wsd git/GitPrj02/test2.wsd

Outputs are in git/out/GitPrj01/test1.png git/out/GitPrj02/test2.png

And is not possible to put them in the repository of the wiki, I need to copy them always to the correct folder.

I would like to have :

git/GitPrj01/out/test1.png git/GitPrj02/out/test2.png

mrkintaro avatar Aug 16 '19 12:08 mrkintaro

@mrkintaro Use multi-root workspace feature of VSCode instead

qjebbs avatar Sep 02 '19 02:09 qjebbs

This would be useful for me too. I edit Azure DevOps wikis in VSCode. DevOps wikis use a hidden .attachments folder. In this folder I have my plantuml source files and I would like my generated diagrams to go here too. Then, when I push the repo back up I can link to the images but the wiki UI does NOT show the .attachments folder.

tforster avatar Nov 11 '19 17:11 tforster

@tforster See #typical-files-organization, and change the plantuml.exportOutDir

qjebbs avatar Nov 12 '19 01:11 qjebbs

I also use plantuml for DevOps wiki's, and I'd prefer to just have the generated image alongside the plantuml source in the same directory as the markdown document that includes it. Diagrams typically appear in exactly one document in our case.

retorquere avatar Feb 13 '21 12:02 retorquere

{
  "plantuml.exportOutDir": "."
}

qjebbs avatar Feb 17 '21 10:02 qjebbs

Hi! Contributing our use case/our situation: For our repos/projects, I see the need to have 2 different locations for diagrams, depending on the diagram scope, etc:

  1. General ("central") solution diagrams. In a folder relative to the workspace root. ✅ This is currently supported.
  2. Diagrams explaining specifics for a certain class, etc. Would want to have in different source folders. I would want an out folder generated for this, like for the "central" diagrams. This is not really possible, AFAIK.

Example:

\duck-project\
	\docs\
		middleearth-overview.puml
		\out\
			middleearth-overview.png
	\foo-area-a\
		\gandalf-a1\
			gandalf-a1-flow.puml
			\out\
				gandalf-a1-flow.png
		\elrond\
		\bilbo\
		\docs\
			foo-area-overview.puml
			\out\
				foo-area-overview.png
	\mordor-area-b
		\sauron-b1
			sauron-creates-orchs-flow.puml
			\out\
				sauron-creates-orchs-flow.png
		\sauron-b2
			sauron-spy-organization-flow.puml
			\out\
				sauron-spy-organization-flow.png
		\sauron-b3
			sauron-deployments-flow.puml
			\out\
				sauron-deployments-flow.png
		\docs\
			mordor-overview.puml
			\out\
				mordor-overview.png

But you cant have both at the same time, AFAICS, right? I have not been able to make it work.

Using a relative path would allow you to do that though - have one pattern or scheme that applies both to central diagrams and to diagrams in different source folders.

Thanks for a great plugin!

chipbite avatar Sep 08 '21 07:09 chipbite

To save in alongside the original graph:

{
  "plantuml.exportOutDir": ".",
  "plantuml.exportSubFolder": false
}

vintprox avatar Nov 22 '21 17:11 vintprox

I have the exact same scenario as @chipbite. We have modules and every module has its documentation with its diagrams. I just want to export diagrams relative to its puml file.

garcipat avatar Jul 26 '22 08:07 garcipat

Can't this be the default behaviour?

{
  "plantuml.exportOutDir": ".",
  "plantuml.exportSubFolder": false
}

Thanks @vintprox

kay-haensge avatar Jan 18 '23 11:01 kay-haensge