<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: package dataplot.shellscript</title>
</head><body bgcolor="#f0f0f8">
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="dataplot.html"><font color="#ffffff">dataplot</font></a>.shellscript</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/thocking/dataplot/docs/htdocs/pydoc/dataplot/shellscript/__init__.py">/home/thocking/dataplot/docs/htdocs/pydoc/dataplot/shellscript/__init__.py</a></font></td></tr></table>
<p><tt>Shell script plots make images via command line programs.<br>
<br>
These are usually shell scripts to command line programs for data<br>
analysis that use the filesystem for io. This can be rather slow<br>
processing, but it makes for easy development.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom> <br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="dataplot.html#GenericPlot">dataplot.GenericPlot</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="dataplot.shellscript.html#Plot">Plot</a>
</font></dt></dl>
</dd>
</dl>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom> <br>
<font color="#000000" face="helvetica, arial"><a name="Plot">class <strong>Plot</strong></a>(<a href="dataplot.html#GenericPlot">dataplot.GenericPlot</a>)</font></td></tr>
<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td>
<td colspan=2><tt>Make plots through the filesystem and command line programs.<br>
<br>
Subclasses need to define:<br>
<br>
1. A method get_plot_args, which returns a dictionary with at<br>
least one key 'data' which maps to a text string that will be<br>
written out to the input file for the command line program.<br>
<br>
2. The attribute cmdtmp, which is a template string that will be<br>
filled in with the dictionary returned by get_plot_args. This<br>
string will be the command line that is executed to make the<br>
plot. You should use the 'infile' key in your string, i.e.<br>
<br>
cmdtmp='/usr/local/bin/hairpinplot.bash %(infile)s'<br> </tt></td></tr>
<tr><td> </td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="dataplot.shellscript.html#Plot">Plot</a></dd>
<dd><a href="dataplot.html#GenericPlot">dataplot.GenericPlot</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Plot-get_cline"><strong>get_cline</strong></a>(self)</dt><dd><tt>Construct command line based on template and dict.</tt></dd></dl>
<dl><dt><a name="Plot-get_cline_template_dict"><strong>get_cline_template_dict</strong></a>(self)</dt><dd><tt>Dict used to fill in self.<strong>cmdtmp</strong> string.</tt></dd></dl>
<dl><dt><a name="Plot-makefile"><strong>makefile</strong></a>(self)</dt><dd><tt>Write data to infile and then execute the commandline.<br>
<br>
This presumably makes the convert_from file.</tt></dd></dl>
<dl><dt><a name="Plot-write_data_to_infile"><strong>write_data_to_infile</strong></a>(self)</dt><dd><tt>Write data from get_plot_args into infile specified.<br>
<br>
Presumably this data is the input for a command-line program.</tt></dd></dl>
<hr>
Methods inherited from <a href="dataplot.html#GenericPlot">dataplot.GenericPlot</a>:<br>
<dl><dt><a name="Plot-__init__"><strong>__init__</strong></a>(self, basename, tocall, **kwargs)</dt><dd><tt>Make a new plot to display.<br>
<br>
Required args: (no sensible defaults)<br>
<br>
basename: basename of this plot (no .pdf)<br>
tocall: makes data dict to pass to the function for plotmaking.<br>
<br>
Other plot parameters may be specified after instantiation as<br>
attributes:<br>
<br>
enable_caching: should the image be remade every time?<br>
chgrp: group to set write permissions for</tt></dd></dl>
<dl><dt><a name="Plot-__repr__"><strong>__repr__</strong></a>(self)</dt></dl>
<dl><dt><a name="Plot-convert"><strong>convert</strong></a>(self)</dt><dd><tt>Convert from PDF to other formats using ImageMagick.</tt></dd></dl>
<dl><dt><a name="Plot-do_chgrp"><strong>do_chgrp</strong></a>(self)</dt><dd><tt>Change group write perms if requested.<br>
<br>
This is useful if your testing and production webservers have<br>
different users but share the same media directory.</tt></dd></dl>
<dl><dt><a name="Plot-do_chgrp_on"><strong>do_chgrp_on</strong></a>(self, fn)</dt></dl>
<dl><dt><a name="Plot-from_filename"><strong>from_filename</strong></a>(self)</dt></dl>
<dl><dt><a name="Plot-from_url"><strong>from_url</strong></a>(self)</dt></dl>
<dl><dt><a name="Plot-get_app_dirs"><strong>get_app_dirs</strong></a>(self)</dt><dd><tt>Dig through settings.INSTALLED_APPS for full paths.</tt></dd></dl>
<dl><dt><a name="Plot-get_filenames"><strong>get_filenames</strong></a>(self)</dt><dd><tt>Return dictionary of image filenames.</tt></dd></dl>
<dl><dt><a name="Plot-get_full_base"><strong>get_full_base</strong></a>(self)</dt></dl>
<dl><dt><a name="Plot-get_plot_args"><strong>get_plot_args</strong></a>(self)</dt><dd><tt>Gather input data from defaults and return value of tocall.<br>
<br>
1. defaults for this plot type<br>
2. returned arguments from get_plot_args</tt></dd></dl>
<dl><dt><a name="Plot-get_urls"><strong>get_urls</strong></a>(self)</dt><dd><tt>Return dictionary of image URLs.<br>
<br>
Make the plot if it doesn't exist or caching is off.</tt></dd></dl>
<dl><dt><a name="Plot-makedirs"><strong>makedirs</strong></a>(self)</dt><dd><tt>Make subdirectories of media/ for this plot.</tt></dd></dl>
<dl><dt><a name="Plot-makefiles"><strong>makefiles</strong></a>(self)</dt><dd><tt>Make initial file and conversions.<br>
<br>
<a href="#Plot-makefile">makefile</a>() just makes the initial file.</tt></dd></dl>
<dl><dt><a name="Plot-prefix"><strong>prefix</strong></a>(self, pre)</dt><dd><tt>Generalized form of url/filename reporting.<br>
<br>
pre: prefix to attach to the basename and suffix.</tt></dd></dl>
<dl><dt><a name="Plot-render_html"><strong>render_html</strong></a>(self, tfile)</dt><dd><tt>Render a HTML template with self as context 'plot'.</tt></dd></dl>
<dl><dt><a name="Plot-to_html"><strong>to_html</strong></a>(self)</dt><dd><tt>Render the PNG image and link to the PDF.</tt></dd></dl>
<dl><dt><a name="Plot-to_html_nolink"><strong>to_html_nolink</strong></a>(self)</dt><dd><tt>Render the PNG without link to PDF.</tt></dd></dl>
<dl><dt><a name="Plot-to_html_thumb"><strong>to_html_thumb</strong></a>(self)</dt><dd><tt>Render the PNG thumb.</tt></dd></dl>
<dl><dt><a name="Plot-view"><strong>view</strong></a>(self)</dt><dd><tt>Use some other program to look at rendered source image.<br>
<br>
Will make the source image if it does not exist yet.</tt></dd></dl>
<hr>
Data and other attributes inherited from <a href="dataplot.html#GenericPlot">dataplot.GenericPlot</a>:<br>
<dl><dt><strong>__dict__</strong> = <dictproxy object><dd><tt>dictionary for instance variables (if defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = <attribute '__weakref__' of 'GenericPlot' objects><dd><tt>list of weak references to the object (if defined)</tt></dl>
<dl><dt><strong>autosave</strong> = False</dl>
<dl><dt><strong>chgrp</strong> = 'uploads'</dl>
<dl><dt><strong>convert_binary</strong> = 'convert'</dl>
<dl><dt><strong>enable_caching</strong> = True</dl>
<dl><dt><strong>view_program</strong> = 'display'</dl>
</td></tr></table></td></tr></table>
</body></html>