Opened 17 years ago
Last modified 10 years ago
#7150 new defect
"contrib/workflow/showworkflow" is KDE centric
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | next-major-releases |
Component: | general | Version: | devel |
Severity: | trivial | Keywords: | contrib |
Cc: | jhn@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I reckon this should call evince where kpdf is not available (like on Gnome desktops, which is a pretty common occurance). Here's a patch:
Index: trac/contrib/workflow/showworkflow =================================================================== --- trac/contrib/workflow/showworkflow (revision 6880) +++ trac/contrib/workflow/showworkflow (working copy) @@ -24,4 +24,8 @@ dot -T ps -o "$ps" "$dot" && ps2pdf "$ps" "$pdf" || exit 1 dot -T png -o "$png" "$dot" -kpdf "$pdf" +if [ -n "`which kpdf 2>/dev/null`" ] ; then + kpdf "$pdf" +else + evince "$pdf" +fi
Attachments (1)
Change History (11)
follow-up: 3 comment:1 by , 17 years ago
comment:2 by , 17 years ago
Milestone: | 0.11 → 0.11.1 |
---|
comment:3 by , 17 years ago
Replying to thatch:
How about supporting
open
(OSX) andstart
(Windows) as well?
The graphviz tools are not distributed as part of those operating systems. Is it necessary to support them?
comment:4 by , 16 years ago
Keywords: | contrib added |
---|---|
Milestone: | 0.11-retriage → 0.11.5 |
I'll add windows support at least.
comment:5 by , 15 years ago
Milestone: | 0.11.6 → 0.13 |
---|---|
Owner: | changed from | to
comment:6 by , 15 years ago
Cc: | added |
---|
i ported the shell script to run on windows. it's pretty much a direct translation. one of the differences is that it does not generate a PS and a PDF, just a PNG. i wrote this about a year ago so i don't remember if it was because the required tools weren't included in the windows graphviz install, or whether i just had no need for the PDF version.
comment:7 by , 15 years ago
the reason i didn't include the PS and PDF parts of the script was that ps2pdf requires the additional install of ghostscript and i only wanted PNGs anyway. it would be easy to add them to the script if someone wanted to. PNGs are better though =)
comment:8 by , 13 years ago
comment:9 by , 13 years ago
The cmd file works fine here, after installing Graphviz 2.28.0 and making sure dot
is in %PATH%
(set PATH=%PATH%;"C:\Program Files (x86)\Graphviz 2.28\bin"
). I also had to change
-workflow_parser.py %options% "%config%" > "%dot%" +python workflow_parser.py %options% "%config%" > "%dot%"
because the Python interpreter registered for executing .py
files does not know about Trac.
Adding PS an PDF export seems to work as well, without additional dependencies like ghostscript.
comment:10 by , 10 years ago
Owner: | removed |
---|
How about supporting
open
(OSX) andstart
(Windows) as well?