[Erp5-report] r45844 kazuhiko - in /erp5/trunk/utils/Products.DCWorkflowGraph: ./ Products....

nobody at svn.erp5.org nobody at svn.erp5.org
Wed May 11 10:44:45 CEST 2011


Author: kazuhiko
Date: Wed May 11 10:44:44 2011
New Revision: 45844

URL: http://svn.erp5.org?rev=45844&view=rev
Log:
copied from http://svn.plone.org/svn/collective/Products.DCWorkflowGraph/trunk@110357

Added:
    erp5/trunk/utils/Products.DCWorkflowGraph/
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/
    erp5/trunk/utils/Products.DCWorkflowGraph/Products.DCWorkflowGraph.egg-info/
    erp5/trunk/utils/Products.DCWorkflowGraph/Products.DCWorkflowGraph.egg-info/paster_plugins.txt   (with props)
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/DCWorkflowGraph.py
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/DCWorkflowGraph_Rank.py
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/__init__.py
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/config.py
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/DCWorkflowGraph-es.po
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/DCWorkflowGraph.pot
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/install.txt   (with props)
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/refresh.txt   (with props)
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/todo.txt   (with props)
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/version.txt   (with props)
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/www/
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/www/manage_workflowGraph.zpt
    erp5/trunk/utils/Products.DCWorkflowGraph/Products/__init__.py
    erp5/trunk/utils/Products.DCWorkflowGraph/README.txt   (with props)
    erp5/trunk/utils/Products.DCWorkflowGraph/bootstrap.py
    erp5/trunk/utils/Products.DCWorkflowGraph/buildout.cfg
    erp5/trunk/utils/Products.DCWorkflowGraph/docs/
    erp5/trunk/utils/Products.DCWorkflowGraph/docs/HISTORY.txt   (with props)
    erp5/trunk/utils/Products.DCWorkflowGraph/docs/INSTALL.txt   (with props)
    erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.GPL
    erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.txt   (with props)
    erp5/trunk/utils/Products.DCWorkflowGraph/setup.cfg
    erp5/trunk/utils/Products.DCWorkflowGraph/setup.py

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products.DCWorkflowGraph.egg-info/paster_plugins.txt
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products.DCWorkflowGraph.egg-info/paster_plugins.txt?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products.DCWorkflowGraph.egg-info/paster_plugins.txt (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products.DCWorkflowGraph.egg-info/paster_plugins.txt [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1 @@
+ZopeSkel

Propchange: erp5/trunk/utils/Products.DCWorkflowGraph/Products.DCWorkflowGraph.egg-info/paster_plugins.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/DCWorkflowGraph.py
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/DCWorkflowGraph.py?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/DCWorkflowGraph.py (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/DCWorkflowGraph.py [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,148 @@
+from Products.CMFCore.utils import getToolByName
+from tempfile import mktemp
+import os
+import sys
+from os.path import basename, splitext, join
+from config import bin_search_path, DOT_EXE
+
+
+# following 2 method is copied form PortalTranforms 
+# Owners of PortalTransforms own the copyright of these 2 functions
+class MissingBinary(Exception): pass
+
+def bin_search(binary):
+    """search the bin_search_path  for a given binary
+    returning its fullname or None"""
+    result = None
+    mode   = os.R_OK | os.X_OK
+    for p in bin_search_path:
+        path = join(p, binary)
+        if os.access(path, mode) == 1:
+            result = path
+            break
+    else:
+        raise MissingBinary('Unable to find binary "%s"' % binary)
+    return result
+
+
+def getObjectTitle(object, REQUEST=None):
+    """Get a state/transition title to be displayed in the graph
+    """
+
+    if REQUEST is not None:
+        only_ids = REQUEST.get('only_ids', False)
+        translate = REQUEST.get('translate', False)
+    else:
+        only_ids = False
+        translate = False
+
+    id = object.getId()
+    title = object.title
+
+    if translate:
+        id = object.translate(default=id, msgid=id)
+        title = object.translate(default=title, msgid=title)
+    if not title or only_ids:
+        title = id
+    else:
+        title = '%s\\n(%s)'%(title, id)
+    return title
+
+def getPOT(self, wf_id="", REQUEST=None):
+    """ get the pot, copy from:
+         "dcworkfow2dot.py":http://awkly.org/Members/sidnei/weblog_storage/blog_27014
+        and Sidnei da Silva owns the copyright of the this function
+    """
+    out = []
+    transitions = {}
+
+    if wf_id:
+        w_tool = getToolByName(self, 'portal_workflow')
+        wf = getattr(w_tool, wf_id)
+    else:
+        wf = self
+
+    if REQUEST is None:
+        REQUEST = self.REQUEST
+
+    out.append('digraph "%s" {' % wf.title)
+    transitions_with_init_state = []
+    for s in wf.states.objectValues():
+        s_id = s.getId()
+        s_title = getObjectTitle(s, REQUEST)
+        out.append('%s [shape=box,label="%s",style="filled",fillcolor="#ffcc99"];' % (s_id, s_title))
+        for t_id in s.transitions:
+            transitions_with_init_state.append(t_id)
+            try:
+                t = wf.transitions[t_id]
+            except KeyError:
+                out.append(('# transition %s from state %s '
+                            'is missing' % (t_id, s_id)))
+                continue
+
+            new_state_id = t.new_state_id
+            # take care of 'remain in state' transitions
+            if not new_state_id:
+                new_state_id = s_id
+            key = (s_id, new_state_id)
+            value = transitions.get(key, [])
+            t_title = getObjectTitle(t, REQUEST)
+            value.append(t_title)
+            transitions[key] = value
+
+    # iterate also on transitions, and add transitions with no initial state
+    for t in wf.transitions.objectValues():
+        t_id = t.getId()
+        if t_id not in transitions_with_init_state:
+            new_state_id = t.new_state_id
+            if not new_state_id:
+                new_state_id = None
+            key = (None, new_state_id)
+            value = transitions.get(key, [])
+            t_title = getObjectTitle(t, REQUEST)
+            value.append(t_title)
+            transitions[key] = value
+
+    for k, v in transitions.items():
+        out.append('%s -> %s [label="%s"];' % (k[0], k[1],
+                                               ',\\n'.join(v)))
+
+    out.append('}')
+    return '\n'.join(out)
+
+def getGraph(self, wf_id="", format="png", REQUEST=None):
+    """show a workflow as a graph, copy from:
+"OpenFlowEditor":http://www.openflow.it/wwwopenflow/Download/OpenFlowEditor_0_4.tgz
+    """
+    pot = getPOT(self, wf_id, REQUEST)
+    encoding = self.portal_properties.site_properties.getProperty('default_charset', 'utf-8')
+    pot = pot.encode(encoding)
+    infile = mktemp('.dot')
+    f = open(infile, 'w')
+    f.write(pot)
+    f.close()
+    
+    if REQUEST is None:
+        REQUEST = self.REQUEST
+    response = REQUEST.RESPONSE
+        
+    if format != 'dot':
+        outfile = mktemp('.%s' % format)
+        os.system('%s -T%s -o %s %s' % (bin_search(DOT_EXE), format, outfile, infile))
+        out = open(outfile, 'rb')
+        result = out.read()
+        out.close()
+        os.remove(outfile)
+        response.setHeader('Content-Type', 'image/%s' % format)
+    else:
+        result = open(infile, 'r').read()
+        filename = wf_id or self.getId()
+        response.setHeader('Content-Type', 'text/x-graphviz')
+        response.setHeader('Content-Disposition',
+                           'attachment; filename=%s.dot' % filename)
+        
+    os.remove(infile)
+    return result
+
+
+

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/DCWorkflowGraph_Rank.py
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/DCWorkflowGraph_Rank.py?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/DCWorkflowGraph_Rank.py (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/DCWorkflowGraph_Rank.py [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,147 @@
+from Products.CMFCore.utils import getToolByName
+from tempfile import mktemp
+import os
+import sys
+from os.path import basename, splitext, join
+from config import bin_search_path, DOT_EXE
+
+
+# bin_search() and getPOT() are copied form PortalTranforms 
+# Owners of PortalTransforms own the copyright for these 2 functions
+class MissingBinary(Exception): pass
+
+def bin_search(binary):
+    """search the bin_search_path  for a given binary
+    returning its fullname or None"""
+    result = None
+    mode   = os.R_OK | os.X_OK
+    for p in bin_search_path:
+        path = join(p, binary)
+        if os.access(path, mode) == 1:
+            result = path
+            break
+    else:
+        raise MissingBinary('Unable to find binary "%s"' % binary)
+    return result
+
+
+# Rank states according to indegree, outdegree, and name.  Returns a list
+# of states in an order which *hopefully* will make an nice graph.
+def rankstates( states, transitions, debugmsgs=None):
+    indegree = {}   # number of edges in to each state
+    outdegree = {}  # number of edges out of each state
+    statepairs = [] # tuples of (in-degree/out-degree, state)
+
+    # Initialize degree hashes.
+    for s in states:
+        myId = s.getId()
+        indegree[myId] = 0
+        outdegree[myId] = 0
+
+    # Compute degrees.
+    for sourceId,destId in transitions:
+        indegree[sourceId] += 1
+        outdegree[destId] += 1
+
+    # Compute ranks.
+    for s in states:
+        myId = s.getId()
+
+        # Initialize rank.
+        ins = indegree[myId]
+        outs = outdegree[myId]
+        rank = abs(outs - ins)
+
+        # Adjust rank with crazy scoring functions.
+        if myId.lower().find( 'priv') >= 0:
+            rank = rank - 5
+        if myId.lower().find( 'pub') >= 0:
+            rank = rank + 5
+
+        # Debugging info.
+        if debugmsgs is not None:
+            m = '# node %s has indegree %d, outdegree %d, rank %d'
+            m = m % (myId, indegree, outdegree, rank)
+            debugmsgs.append( m)
+
+        # Store rank.
+        statepairs.append( (rank, s))
+
+    # Sort states by rank.
+    statepairs.sort()
+    newstates = []
+    for r,s in statepairs:
+        newstates.append( s)
+
+    # Done.
+    return newstates
+    
+
+def getPOT(self, wf_id=""):
+    """ get the pot, copy from:
+         "dcworkfow2dot.py":http://awkly.org/Members/sidnei/weblog_storage/blog_27014
+        and Sidnei da Silva owns the copyright of the this function
+    """
+    out = []
+    transitions = {}
+
+    # Get states.
+    if wf_id:
+        w_tool = getToolByName(self, 'portal_workflow')
+        wf = getattr(w_tool, wf_id)
+    else:
+        wf = self
+    states = wf.states.objectValues()
+
+    # Start Graph
+    out.append('digraph "%s" {' % wf.title)
+
+    # Get states and sort by out-degree / (in-degree+1).
+    for s in states:
+
+        # Get transitions.
+        for t in s.transitions:
+            try:
+                trans = wf.transitions[t]
+            except KeyError:
+                out.append('# transition %s from state %s is missing'
+                           % (t, s.getId()))
+                continue
+
+            key = (s.getId(), trans.new_state_id)
+            value = transitions.get(key, [])
+            value.append(trans.actbox_name)
+            transitions[key] = value
+
+    # Order states and add them to graph.
+    states = rankstates( states, transitions)
+    for s in states:
+        out.append('%s [shape=box,label="%s (%s)"];'
+                   % (s.getId(), s.title, s.getId().capitalize()))
+
+    # Add transitions.
+    for k, v in transitions.items():
+        out.append('%s -> %s [label="%s"];' % (k[0], k[1],
+                                           ', '.join(v)))
+
+    # Finish graph.
+    out.append('}')
+    return '\n'.join(out)
+
+def getGraph(self, wf_id="", format="gif", REQUEST=None):
+    """show a workflow as a graph, copy from:
+"OpenFlowEditor":http://www.openflow.it/wwwopenflow/Download/OpenFlowEditor_0_4.tgz
+    """
+    pot = getPOT(self, wf_id)
+    infile = mktemp('.dot')
+    f = open(infile, 'w')
+    f.write(pot)
+    f.close()
+    outfile = mktemp('.%s' % format)
+    os.system('%s -T%s -o %s %s' % (bin_search(DOT_EXE), format, outfile, infile))
+    out = open(outfile, 'rb')
+    result = out.read()
+    out.close()
+    os.remove(infile)
+    os.remove(outfile)
+    return result

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/__init__.py
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/__init__.py?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/__init__.py (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/__init__.py [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,16 @@
+from DCWorkflowGraph import getGraph
+from Products.DCWorkflow.DCWorkflow import DCWorkflowDefinition
+from Products.PageTemplates.PageTemplateFile import PageTemplateFile
+import os
+
+# Import "MessageFactory" to create messages in the DCWorkflowGraph domain
+from zope.i18nmessageid import MessageFactory
+_ = MessageFactory('DCWorkflowGraph')
+
+manage_workflowGraph = PageTemplateFile(os.path.join('www','manage_workflowGraph'), globals())
+manage_workflowGraph.__name__ = 'manage_workflowGraph'
+manage_workflowGraph._need__name__ = 0
+
+DCWorkflowDefinition.getGraph=getGraph
+DCWorkflowDefinition.manage_workflowGraph=manage_workflowGraph
+DCWorkflowDefinition.manage_options=tuple(DCWorkflowDefinition.manage_options)+({'label': _(u'Graph'), 'action': 'manage_workflowGraph'},)

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/config.py
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/config.py?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/config.py (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/config.py [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,34 @@
+# where is 'pot'?, add your path here
+
+import os
+
+DOT_EXE = 'dot'
+bin_search_path = ''
+
+if os.name == 'nt':
+    DOT_EXE = 'dot.exe'
+
+    # patch from Joachim Bauch bauch at struktur.de
+    # on Windows, the path to the ATT Graphviz installation 
+    # is read from the registry. 
+    try:
+        import win32api, win32con
+        # make sure that "key" is defined in our except block
+        key = None
+        try:
+            key = win32api.RegOpenKeyEx(win32con.HKEY_LOCAL_MACHINE, r'SOFTWARE\ATT\Graphviz')
+            value, type = win32api.RegQueryValueEx(key, 'InstallPath')
+            bin_search_path = [os.path.join(str(value), 'bin')]
+        except:
+            if key: win32api.RegCloseKey(key)
+            # key doesn't exist
+            pass
+    except ImportError:
+        # win32 may be not installed...
+        pass
+else:
+    # for posix systems
+    DOT_EXE = 'dot'
+    path = os.getenv("PATH")
+    bin_search_path = path.split(":")
+

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/DCWorkflowGraph-es.po
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/DCWorkflowGraph-es.po?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/DCWorkflowGraph-es.po (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/DCWorkflowGraph-es.po [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,51 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: DCWorkflowGraph 0.4\n"
+"POT-Creation-Date: 2010-01-30 13:42+0000\n"
+"PO-Revision-Date: 2010-01-30 09:34-0400\n"
+"Last-Translator: Leonardo J. Caballero G. <leonardocaballero at gmail.com>\n"
+"Language-Team: Spanish <plone-conosur at lists.plone.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"Language-code: es\n"
+"Language-name: Spanish\n"
+"Preferred-Encodings: utf-8 latin1\n"
+"Domain: DCWorkflowGraph\n"
+"X-Is-Fallback-For: es-ar es-bo es-cl es-co es-cr es-do es-ec es-es es-sv es-gt es-hn es-mx es-ni es-pa es-py es-pe es-pr es-us es-uy es-ve\n"
+
+#: ../__init__.py:18
+msgid "Graph"
+msgstr "Gráfica"
+
+#. Default: "DCWorkflow Graph"
+#: ../www/manage_workflowGraph.zpt:15
+msgid "heading_dcworkflowdraph"
+msgstr "Gráfica DCWorkflow"
+
+#. Default: "You must install <a href=\"http://www.graphviz.org/\">Graphviz</a> before you will be able to see workflow graphs. If Graphviz is not installed, please install it now."
+#: ../www/manage_workflowGraph.zpt:17
+msgid "help_dcworkflowdraph_install_graphviz"
+msgstr "Usted debe instalar antes <a href=\"http://www.graphviz.org/\">Graphviz</a>, luego de de hacerlo usted será habilitado para ver las gráficas de flujos de trabajo. Sí no se muestran la gráfica, es por que, Graphviz no esta instalado, por favor, debe instalarlo ahora."
+
+#. Default: "download dot file"
+#: ../www/manage_workflowGraph.zpt:44
+msgid "input_value_download_dot_file"
+msgstr "descargar archivo .dot"
+
+#. Default: "update"
+#: ../www/manage_workflowGraph.zpt:43
+msgid "input_value_update"
+msgstr "actualizar"
+
+#. Default: "Only Show Ids:"
+#: ../www/manage_workflowGraph.zpt:36
+msgid "only_show_ids"
+msgstr "Mostrar solamente identificador(es):"
+
+#. Default: "Translate Graph:"
+#: ../www/manage_workflowGraph.zpt:40
+msgid "translate_graph"
+msgstr "Traducir gráfica:"
+

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/DCWorkflowGraph.pot
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/DCWorkflowGraph.pot?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/DCWorkflowGraph.pot (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/i18n/DCWorkflowGraph.pot [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,53 @@
+# --- PLEASE EDIT THE LINES BELOW CORRECTLY ---
+# SOME DESCRIPTIVE TITLE.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2010-01-30 13:42+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0\n"
+"Language-Code: en\n"
+"Language-Name: English\n"
+"Preferred-Encodings: utf-8 latin1\n"
+"Domain: DCWorkflowGraph\n"
+
+#: ../__init__.py:18
+msgid "Graph"
+msgstr ""
+
+#. Default: "DCWorkflow Graph"
+#: ../www/manage_workflowGraph.zpt:15
+msgid "heading_dcworkflowdraph"
+msgstr ""
+
+#. Default: "You must install <a href=\"http://www.graphviz.org/\">Graphviz</a> before you will be able to see workflow graphs. If Graphviz is not installed, please install it now."
+#: ../www/manage_workflowGraph.zpt:17
+msgid "help_dcworkflowdraph_install_graphviz"
+msgstr ""
+
+#. Default: "download dot file"
+#: ../www/manage_workflowGraph.zpt:44
+msgid "input_value_download_dot_file"
+msgstr ""
+
+#. Default: "update"
+#: ../www/manage_workflowGraph.zpt:43
+msgid "input_value_update"
+msgstr ""
+
+#. Default: "Only Show Ids:"
+#: ../www/manage_workflowGraph.zpt:36
+msgid "only_show_ids"
+msgstr ""
+
+#. Default: "Translate Graph:"
+#: ../www/manage_workflowGraph.zpt:40
+msgid "translate_graph"
+msgstr ""
+

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/install.txt
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/install.txt?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/install.txt (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/install.txt [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,10 @@
+Install 
+
+1. you must install "Graphviz":http://www.graphviz.org/ in your system before you use it.
+
+2. unzip the DCWorkflowEditor to your zope Products directory.
+
+3. check if your dot binary path is included in 'bin_search_path' in config.py. 
+   if not, add it. (on windows, it looks from registery automatically)
+
+4. restart zope

Propchange: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/install.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/refresh.txt
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/refresh.txt?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/refresh.txt (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/refresh.txt [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1 @@
+ 
\ No newline at end of file

Propchange: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/refresh.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/todo.txt
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/todo.txt?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/todo.txt (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/todo.txt [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,21 @@
+rank nodes
+====================
+The initial state should put at the top.
+
+See DCWorkflowGraph_Rank.py
+
+shorter title
+====================
+I found the transition title is quite long in this version. This makes
+the graph a bit ugly.
+
+I want to show the transition id only and make the full title visible
+only when hover on the transition id.
+
+I have some idea to make hover works:
+
+- in the pot file, give each state and transition a URL attribute,
+this will generate links in the graph
+
+- use javascript to register onhover event listener and show the title
+at some place in the page.

Propchange: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/todo.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/version.txt
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/version.txt?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/version.txt (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/version.txt [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1 @@
+0.4

Propchange: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/version.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/www/manage_workflowGraph.zpt
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/www/manage_workflowGraph.zpt?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/www/manage_workflowGraph.zpt (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/DCWorkflowGraph/www/manage_workflowGraph.zpt [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,54 @@
+<h1 tal:replace="structure here/manage_page_header">Header</h1>
+<h2 tal:define="manage_tabs_message options/manage_tabs_message | nothing"
+    tal:replace="structure here/manage_tabs">Tabs</h2>
+    
+<tal:download condition="exists:request/download">
+  <tal:redirect define="dummy python:request.response.redirect(
+        '%s/getGraph?only_ids=%s&translate=%s&format=dot' % (
+            here.absolute_url(), request.get('only_ids', ''),
+            request.get('translate', '')));"
+    />
+</tal:download>
+
+<div i18n:domain="DCWorkflowGraph">
+
+<h3 i18n:translate="heading_dcworkflowdraph">DCWorkflow Graph</h3>
+
+<p i18n:translate="help_dcworkflowdraph_install_graphviz"> 
+You must install <a href="http://www.graphviz.org/">Graphviz</a> before you will be able to see workflow graphs.
+If Graphviz is not installed, please install it now.
+</p>
+
+<!--img tal:attributes="src string:${here/absolute_url}/getGraph" /-->
+
+<tal:defs tal:define="only_ids request/only_ids|string:;
+  translate request/translate|string:">
+  <img tal:attributes="src string:${here/absolute_url}/getGraph?only_ids=${only_ids}&translate=${translate}"/>
+</tal:defs>
+
+<hr/>
+
+<form name="graph_options" action="#" method="get"
+  tal:attributes="action string:${here/absolute_url}/manage_workflowGraph"
+  tal:define="only_ids request/only_ids|nothing;
+    translate request/translate|nothing;">
+
+  <span i18n:translate="only_show_ids">Only Show Ids:</span>
+  <input type="checkbox" checked="" name="only_ids"
+    tal:attributes="checked only_ids"/><br/>
+
+  <span i18n:translate="translate_graph">Translate Graph:</span> <input type="checkbox" checked="" name="translate"
+    tal:attributes="checked translate"/><br/>
+
+  <input type="submit" value="update" i18n:attributes="value input_value_update;" />
+  <input type="submit" name="download" value="download dot file" i18n:attributes="value input_value_download_dot_file;" />
+
+</form>
+
+</div>
+
+<p>
+<a href="http://www.zopechina.com">zopechina.com</a>
+</p>
+<h1 tal:replace="structure here/manage_page_footer">Footer</h1>
+

Added: erp5/trunk/utils/Products.DCWorkflowGraph/Products/__init__.py
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/Products/__init__.py?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/Products/__init__.py (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/Products/__init__.py [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,6 @@
+# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
+try:
+    __import__('pkg_resources').declare_namespace(__name__)
+except ImportError:
+    from pkgutil import extend_path
+    __path__ = extend_path(__path__, __name__)

Added: erp5/trunk/utils/Products.DCWorkflowGraph/README.txt
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/README.txt?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/README.txt (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/README.txt [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,58 @@
+Introduction
+============
+
+DCWorkflowGraph
+---------------
+
+    DCWorkflowGraph is a DCWorkflow graphic viewer now. It uses Graphviz. 
+    I want to make it a graphic editor for DCWorkflow, just like what
+    OpenFlowEditor does.
+
+    DCWorkflowGraph is at the collective: http://svn.plone.org/svn/collective/Products.DCWorkflowGraph
+
+    Product home: http://www.zope.org/Members/panjunyong/DCWorkflowGraph
+
+Requires
+========
+
+    Graphviz - http://www.graphviz.org
+
+Install
+=======
+
+    see install.txt
+
+How to use it
+=============
+
+    Go to ZMI portal_workflow/your_workflow, there is a new tab called
+    'graph', click it and you will see the workflow graph!
+
+Credits
+=======
+
+    Author: panjunyong (panjy at zopechina.com, http://www.zopechina.com)
+
+    version 0.3 for CPSWorkflow:
+
+    - Encolpe Degoute <encolpe at colpi.info>
+
+    - Anahide Tchertchian <at at nuxeo.com>
+
+    Most idea and codes comes from the following resources:
+
+    - "dcworkfow2dot.py":http://awkly.org/Members/sidnei/weblog_storage/blog_27014
+
+    - "DCWorkflow dot graphs":http://xiru.org/Members/xiru/weblog_storage/blog_79598
+
+    - "OpenFlowEditor":http://www.openflow.it/wwwopenflow/Download/OpenFlowEditor_0_4.tgz
+
+    - "DCWorkflowDump":http://cvs.sourceforge.net/viewcvs.py/collective/DCWorkflowDump/
+
+    - "dot guide":http://www.research.att.com/sw/tools/graphviz/dotguide.pdf
+
+    - "dot man page":http://www.die.net/doc/linux/man/man1/dot.1.html
+
+    Convert product package to egg
+
+    - Alex Clark <aclark at aclark.net>

Propchange: erp5/trunk/utils/Products.DCWorkflowGraph/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: erp5/trunk/utils/Products.DCWorkflowGraph/bootstrap.py
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/bootstrap.py?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/bootstrap.py (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/bootstrap.py [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,55 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+try:
+    import pkg_resources
+except ImportError:
+    ez = {}
+    exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+                         ).read() in ez
+    ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+    import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+    cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+    os.P_WAIT, sys.executable, sys.executable,
+    '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+    dict(os.environ,
+         PYTHONPATH=
+         ws.find(pkg_resources.Requirement.parse('setuptools')).location
+         ),
+    ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)

Added: erp5/trunk/utils/Products.DCWorkflowGraph/buildout.cfg
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/buildout.cfg?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/buildout.cfg (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/buildout.cfg [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,33 @@
+[buildout]
+find-links = http://dist.plone.org/thirdparty
+parts = 
+    zope2
+    instance
+    graphviz
+
+develop =
+    .
+
+[zope2]
+recipe = plone.recipe.zope2install
+url = http://www.zope.org/Products/Zope/2.10.7/Zope-2.10.7-final.tgz
+fake-zope-eggs = true
+
+[instance]
+recipe = plone.recipe.zope2instance
+zope2-location = ${zope2:location}
+user = admin:admin
+http-address = 8080
+eggs = 
+    PIL
+    Plone
+    Products.DCWorkflowGraph
+zope-conf-additional = 
+    <environment>
+        PATH ${buildout:directory}/parts/graphviz/bin
+    </environment>
+
+[graphviz]
+recipe = zc.recipe.cmmi 
+url = http://www.graphviz.org/pub/graphviz/stable/SOURCES/graphviz-working.tar.gz
+

Added: erp5/trunk/utils/Products.DCWorkflowGraph/docs/HISTORY.txt
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/docs/HISTORY.txt?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/docs/HISTORY.txt (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/docs/HISTORY.txt [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,47 @@
+Changelog
+=========
+
+(Developer name in brackets)
+
+0.4 - Release
+-------------
+
+* Add Spanish l10n [macagua]
+
+* Add support for i18n [macagua]
+
+* Use standard PATH environment for bin_search_path
+  when we are under posix systems.
+
+* Egg-i-fy [aclark]
+
+0.3.1 - Release
+---------------
+
+* Better handling of non ascii chars
+
+0.3 - Release
+-------------
+
+This version is contributed by Encolpe Degoute <encolpe at colpi.info> and 
+Anahide Tchertchian <at at nuxeo.com> to make it work with CPSWorkflow.
+
+* take transitions without initial state into account
+
+* deal with 'remain in state' transitions
+
+* use transition title instead of action box name
+
+0.2 - Release
+-------------
+
+* support windows now, thanks volker.wend at efgbsh.de
+
+* on Windows, the path to the ATT Graphviz installation can 
+  be  read from the registry, thanks Joachim Bauch bauch at struktur.de
+
+0.1 - Initial release
+---------------------
+
+* initial import, graphic view of DCWorkflow is provided only now
+

Propchange: erp5/trunk/utils/Products.DCWorkflowGraph/docs/HISTORY.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: erp5/trunk/utils/Products.DCWorkflowGraph/docs/INSTALL.txt
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/docs/INSTALL.txt?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/docs/INSTALL.txt (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/docs/INSTALL.txt [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,63 @@
+Products.DCWorkflowGraph Installation
+-------------------------------------
+
+To install Products.DCWorkflowGraph into the global Python environment (or a workingenv),
+using a traditional Zope 2 instance, you can do this:
+
+* When you're reading this you have probably already run 
+  ``easy_install Products.DCWorkflowGraph``. Find out how to install setuptools
+  (and EasyInstall) here:
+  http://peak.telecommunity.com/DevCenter/EasyInstall
+
+* If you are using Zope 2.9 (not 2.10), get `pythonproducts`_ and install it 
+  via::
+
+    python setup.py install --home /path/to/instance
+
+into your Zope instance.
+
+* Create a file called ``Products.DCWorkflowGraph-configure.zcml`` in the
+  ``/path/to/instance/etc/package-includes`` directory.  The file
+  should only contain this::
+
+    <include package="Products.DCWorkflowGraph" />
+
+.. _pythonproducts: http://plone.org/products/pythonproducts
+
+
+Alternatively, if you are using zc.buildout and the plone.recipe.zope2instance
+recipe to manage your project, you can do this:
+
+* Add ``Products.DCWorkflowGraph`` to the list of eggs to install, e.g.:
+
+    [buildout]
+    ...
+    eggs =
+        ...
+        Products.DCWorkflowGraph
+       
+* Tell the plone.recipe.zope2instance recipe to install a ZCML slug:
+
+    [instance]
+    recipe = plone.recipe.zope2instance
+    ...
+    zcml =
+        Products.DCWorkflowGraph
+      
+* Re-run buildout, e.g. with:
+
+    $ ./bin/buildout
+        
+You can skip the ZCML slug if you are going to explicitly include the package
+from another package's configure.zcml file.
+
+
+Because its top level Python namespace package is called ``Products``, this
+package can also be installed in Zope 2 as an old style **Zope 2 Product**.
+
+For that, move (or symlink) the ``DCWorkflowGraph`` folder of this project
+(``Products.DCWorkflowGraph/Products/DCWorkflowGraph``) into the ``Products`` directory of
+the Zope instance it has to be installed for, and restart the server.
+
+You can also skip the ZCML slug if you install this package the **Zope 2
+Product** way.

Propchange: erp5/trunk/utils/Products.DCWorkflowGraph/docs/INSTALL.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.GPL
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.GPL?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.GPL (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.GPL [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,222 @@
+		    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+			    NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+		     END OF TERMS AND CONDITIONS

Added: erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.txt
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.txt?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.txt (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.txt [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,16 @@
+  Products.DCWorkflowGraph is copyright Author: panjunyong (panjy at zopen.cn, from ZOpen)
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; if not, write to the Free Software
+  Foundation, Inc., 59 Temple Place, Suite 330, Boston, 
+  MA 02111-1307 USA.

Propchange: erp5/trunk/utils/Products.DCWorkflowGraph/docs/LICENSE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: erp5/trunk/utils/Products.DCWorkflowGraph/setup.cfg
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/setup.cfg?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/setup.cfg (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/setup.cfg [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,7 @@
+[zopeskel]
+template = plone
+
+[egg_info]
+tag_build = dev
+tag_svn_revision = true
+

Added: erp5/trunk/utils/Products.DCWorkflowGraph/setup.py
URL: http://svn.erp5.org/erp5/trunk/utils/Products.DCWorkflowGraph/setup.py?rev=45844&view=auto
==============================================================================
--- erp5/trunk/utils/Products.DCWorkflowGraph/setup.py (added)
+++ erp5/trunk/utils/Products.DCWorkflowGraph/setup.py [utf8] Wed May 11 10:44:44 2011
@@ -0,0 +1,40 @@
+from setuptools import setup, find_packages
+import os
+
+version = '0.4'
+
+setup(name='Products.DCWorkflowGraph',
+      version=version,
+      description="DCWorkflowGraph is a DCWorkflow graphic viewer now. It uses Graphviz.",
+      long_description=open("README.txt").read() + "\n" +
+                       open(os.path.join("docs", "HISTORY.txt")).read(),
+      # Get more strings from http://www.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=[
+        "Framework :: Plone",
+        "Programming Language :: Python",
+        "Topic :: Software Development :: Libraries :: Python Modules",
+        ],
+      keywords='',
+      author='Author: panjunyong (panjy at zopen.cn, from ZOpen)',
+      author_email='panjy at zopen.cn',
+      url='http://svn.plone.org/svn/collective/Products.DCWorkflowGraph/',
+      license='ZPL',
+      packages=find_packages(exclude=['ez_setup']),
+      namespace_packages=['Products'],
+      include_package_data=True,
+      zip_safe=False,
+      install_requires=[
+          'setuptools',
+          # -*- Extra requirements: -*-
+      ],
+      entry_points="""
+      # -*- Entry points: -*-
+
+      [distutils.setup_keywords]
+      paster_plugins = setuptools.dist:assert_string_list
+
+      [egg_info.writers]
+      paster_plugins.txt = setuptools.command.egg_info:write_arg
+      """,
+      paster_plugins = ["ZopeSkel"],
+      )



More information about the Erp5-report mailing list