diff options
author | koray kavukcuoglu <koray@kavukcuoglu.org> | 2015-07-23 17:23:52 +0300 |
---|---|---|
committer | koray kavukcuoglu <koray@kavukcuoglu.org> | 2015-07-23 17:23:52 +0300 |
commit | 7250e45bacb820c5f2771697f81880893f366f3c (patch) | |
tree | fe50bb38f08d5194cb315509a2641c836ef50a79 | |
parent | 99919fa260dd2ca33347c06da04dce5931f9fcc8 (diff) |
add randomized naming to svg file names that are auto generatedsvg_name
-rw-r--r-- | graphinspecting.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/graphinspecting.lua b/graphinspecting.lua index 66a334f..7c8d462 100644 --- a/graphinspecting.lua +++ b/graphinspecting.lua @@ -83,6 +83,9 @@ local function onError(failedNode, gmodule) local nInputs = gmodule.nInputs or #gmodule.innode.children local svgPathPrefix = gmodule.name or string.format( 'nngraph_%sin_%sout', nInputs, #gmodule.outnode.children) + if paths.filep(svgPathPrefix .. '.svg') then + svgPathPrefix = svgPathPrefix .. '_' .. paths.basename(os.tmpname()) + end local dotStr = customToDot(gmodule.fg, svgPathPrefix, failedNode) saveSvg(svgPathPrefix, dotStr) end |