2021-12-10 11:09:44 +01:00
|
|
|
function dotg --description 'Generate gstreamer dot graph for selected file'
|
2022-04-03 05:56:07 +02:00
|
|
|
if count $argv >/dev/null
|
|
|
|
set dotpath "$argv"
|
|
|
|
else
|
|
|
|
set dotpath "$GST_DEBUG_DUMP_DOT_DIR"
|
|
|
|
end
|
|
|
|
|
2023-01-16 08:00:45 +01:00
|
|
|
find /tmp/gst-dot -maxdepth 1 -regextype posix-extended -regex ".*\.(dot)" -printf '%T@ %p\n' | sort -k 1 -n -r | fzf | awk -F' ' '{print $2}' | read -l result
|
2022-04-03 05:56:07 +02:00
|
|
|
|
|
|
|
if test -n "$result"
|
|
|
|
dot -Tsvg "$result" -O
|
|
|
|
mv "$result".svg ~/Pictures/gstreamer
|
|
|
|
end
|
2021-12-10 11:09:44 +01:00
|
|
|
end
|