graphvix
graphvix copied to clipboard
Choose file path to save graphs
I have a use case where I need to save the graph files (dot, png, svg, etc...) inside a specific folder.
I suggest using Application.get_env
so the user can add the path through Mix.Config
. Maybe place this inside the Writer.save
function.
I thought inside each GenServer
call, but I like how the name is handled there.
I can work on this if you have no problem, just let me know and I can get it in a couple of days.
Cheers and awesome library, you just made my life easier 👍
Giving it a second thought, and a deeper review, it is already implemented to choose where the .dot
file will be saved. I was talking about the Writer.compile
function. Should implement something like the save process.
Like this:
@file_store_path Application.get_env(:graphvix, :file_storage_location)
@default_file_store_path "/tmp"
...
defp file_store_path do
@file_store_path || @default_file_store_path
end