[Epydoc-commits] SF.net SVN: epydoc: [1799] trunk/epydoc/src/epydoc
Brought to you by:
edloper
From: <ed...@us...> - 2008-02-27 00:01:45
|
Revision: 1799 http://epydoc.svn.sourceforge.net/epydoc/?rev=1799&view=rev Author: edloper Date: 2008-02-26 16:01:42 -0800 (Tue, 26 Feb 2008) Log Message: ----------- - Changed the usage for to_html() and to_latex() methods -- they now accept a directory, rather than an image filename (and a url in the case of to_html). This is in preparation for adding an option to specify the image format for graphs in html output. Modified Paths: -------------- trunk/epydoc/src/epydoc/docwriter/html.py trunk/epydoc/src/epydoc/docwriter/latex.py trunk/epydoc/src/epydoc/markup/epytext.py trunk/epydoc/src/epydoc/markup/restructuredtext.py Modified: trunk/epydoc/src/epydoc/docwriter/html.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/html.py 2008-02-26 23:54:44 UTC (rev 1798) +++ trunk/epydoc/src/epydoc/docwriter/html.py 2008-02-27 00:01:42 UTC (rev 1799) @@ -1643,9 +1643,7 @@ def render_graph(self, graph): if graph is None: return '' graph.caption = graph.title = None - image_url = '%s.gif' % graph.uid - image_file = os.path.join(self._directory, image_url) - return graph.to_html(image_file, image_url) + return graph.to_html(self._directory) or '' RE_CALLGRAPH_ID = re.compile(r"""["'](.+-div)['"]""") Modified: trunk/epydoc/src/epydoc/docwriter/latex.py =================================================================== --- trunk/epydoc/src/epydoc/docwriter/latex.py 2008-02-26 23:54:44 UTC (rev 1798) +++ trunk/epydoc/src/epydoc/docwriter/latex.py 2008-02-27 00:01:42 UTC (rev 1799) @@ -351,9 +351,7 @@ def render_graph(self, graph): if graph is None: return '' graph.caption = graph.title = None - image_url = '%s' % graph.uid - image_file = os.path.join(self._directory, image_url) - return graph.to_latex(image_file) or '' + return graph.to_latex(self._directory) or '' def write_class(self, out, doc, short_name=None): if short_name is None: short_name = doc.canonical_name[-1] Modified: trunk/epydoc/src/epydoc/markup/epytext.py =================================================================== --- trunk/epydoc/src/epydoc/markup/epytext.py 2008-02-26 23:54:44 UTC (rev 1798) +++ trunk/epydoc/src/epydoc/markup/epytext.py 2008-02-27 00:01:42 UTC (rev 1799) @@ -1882,9 +1882,7 @@ docindex, context) if not graph: return '' # Write the graph. - image_url = '%s.gif' % graph.uid - image_file = os.path.join(directory, image_url) - return graph.to_html(image_file, image_url) + return graph.to_html(directory) else: raise ValueError('Unknown epytext DOM element %r' % tree.tag) @@ -2015,8 +2013,7 @@ docindex, context) if not graph: return '' # Write the graph. - image_file = os.path.join(directory, graph.uid) - return graph.to_latex(image_file) + return graph.to_latex(directory) else: # Assume that anything else can be passed through. return childstr Modified: trunk/epydoc/src/epydoc/markup/restructuredtext.py =================================================================== --- trunk/epydoc/src/epydoc/markup/restructuredtext.py 2008-02-26 23:54:44 UTC (rev 1798) +++ trunk/epydoc/src/epydoc/markup/restructuredtext.py 2008-02-27 00:01:42 UTC (rev 1799) @@ -601,8 +601,7 @@ if graph is None: raise SkipNode() # Write the graph. - image_file = os.path.join(self._directory, graph.uid) - self.body.append(graph.to_latex(image_file)) + self.body.append(graph.to_latex(self._directory) raise SkipNode() def visit_doctest_block(self, node): @@ -708,9 +707,7 @@ if graph is None: raise SkipNode() # Write the graph. - image_url = '%s.gif' % graph.uid - image_file = os.path.join(self._directory, image_url) - self.body.append(graph.to_html(image_file, image_url)) + self.body.append(graph.to_html(self._directory) raise SkipNode() def visit_doctest_block(self, node): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |