mrohland / plantuml

Plantuml package for Atom Text Editor
MIT License
15 stars 6 forks source link

file location not open. minor bug #10

Open bewam opened 9 years ago

bewam commented 9 years ago

Hi,

There is a syntax in plantuml that allows to select the file destination within the file. I don't have the documentation for it but if we use @startuml{images/diagram.png}, the result goes in the directory named images with the name diagram.png (tested on unix). And it's correctly generated. The atom script script fails with: 'Please make sure PlantUml can write to location of original file.' The script is looking for an evaluated path from the original filename where it shouldn't.

mrohland commented 9 years ago

Yes, thats how it can display the file. I'm not sure ifI like the idea to examine the plantuml file content to extract the right filename. It would couple the plugin more tightly to the syntax of plantuml and future developments of it.

bewam commented 9 years ago

Maybe your package can add arguments to pass to plantuml.jar. In a similar case, it would be the -output argument to send files to a specific directory.

mrohland commented 9 years ago

For me the main usecase is to edit and generate the result directly out of atom. Having a config var to override would override the path for all files, however this is probably only useful for a little subset of all files which one edits throuout the day. 

Maybe a second shortcut to generate into tmp for preview could help here for more flexibility. 

Sadly I don't have any time right now to take care of this. However if you want, just open a PR and I'm happy to merge it.

On Tue, Jul 21, 2015 at 9:42 AM, bewam notifications@github.com wrote:

Maybe your package can add arguments to pass to plantuml.jar. In a similar case, it would be the -output argument to send files to a specific directory.

Reply to this email directly or view it on GitHub: https://github.com/mrohland/plantuml/issues/10#issuecomment-123201383

bewam commented 9 years ago

done. The actual version of plantuml is already capable of emitting .png file from a plantuml one. The author of plantuml has thrown a beta version to add a directory as destination and a multiple destinations support. So I implemented it this way. Will be possible :

In any case, your main usecase is respected. Code may change due to my lack of acknowledgment in coffeeScript.