Edgewall Software
Modify

Opened 17 years ago

Last modified 10 years ago

#7150 new defect

"contrib/workflow/showworkflow" is KDE centric

Reported by: trac@… 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)

showworkflow.cmd (548 bytes ) - added by jhn@… 15 years ago.
windows version of showworkflow script

Download all attachments as: .zip

Change History (11)

comment:1 by Tim Hatch, 17 years ago

How about supporting open (OSX) and start (Windows) as well?

comment:2 by Christian Boos, 17 years ago

Milestone: 0.110.11.1

in reply to:  1 comment:3 by anonymous, 17 years ago

Replying to thatch:

How about supporting open (OSX) and start (Windows) as well?

The graphviz tools are not distributed as part of those operating systems. Is it necessary to support them?

comment:4 by Christian Boos, 16 years ago

Keywords: contrib added
Milestone: 0.11-retriage0.11.5

I'll add windows support at least.

comment:5 by Christian Boos, 15 years ago

Milestone: 0.11.60.13
Owner: changed from Jonas Borgström to Christian Boos

by jhn@…, 15 years ago

Attachment: showworkflow.cmd added

windows version of showworkflow script

comment:6 by jhn@…, 15 years ago

Cc: jhn@… added

showworkflow.cmd

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 jhn@…, 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 =)

in reply to:  description comment:8 by Thijs Triemstra, 13 years ago

Replying to trac@…:

I reckon this should call evince where kpdf is not available (like on Gnome desktops, which is a pretty common occurance).

The current trunk version is looking for evince as well:

for viewer in kpdf okular evince; do

Can someone apply or review the cmd file for windows?

comment:9 by psuter <petsuter@…>, 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 Ryan J Ollos, 10 years ago

Owner: Christian Boos removed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.
The ticket will be disowned.
as The resolution will be set. Next status will be 'closed'.
The owner will be changed from (none) to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.