joethei / obsidian-plantuml

Generate PlantUML Diagrams inside Obsidian.md
MIT License
394 stars 23 forks source link

Ability to export diagrams #55

Closed blacktau closed 4 weeks ago

blacktau commented 7 months ago

Is your feature request related to a problem? Please describe. It would be useful to export the diagrams as they are rendered in obsidian out to the file system

Describe the solution you'd like It would be useful to add a menu item to the the right click to allow exporting. the format of the export would be determined by the rendering being performed (i.e. plantuml-svg = svg, plantuml = png etc)

Additionally it would be useful to be able to configure an export location in the settings int he following way if the setting is blank (this would be the default) the file will be output in the same folder was the .md file. if the setting starts with a leading / then the path would be relative to the vault root. if the setting does not have a leading / then the path would be relative to the path for the .md file. if the folder determined by the above does not exist then it should be created

the file name could be extracted from the title of the plantuml diagram (i.e. text following the @startuml) if no title is specified for the diagram then the filename will be based on a combination of the .md filename and the current date and time.

Describe alternatives you've considered The alternative is a manual process of using the 'copy image' function and pasting into an image editor. this is less than ideal.

Additional context I have created a fork with the changes in here: https://github.com/blacktau/obsidian-plantuml but did not wish to create a PR for the changes until a discussion has been had around the proposal.

joethei commented 7 months ago

Feel free to send a PR, it's a good idea.

joethei commented 4 weeks ago

forgot to close this when merging your PR.