dataplot.shellscript
index
/home/thocking/dataplot/docs/htdocs/pydoc/dataplot/shellscript/__init__.py

Shell script plots make images via command line programs.
 
These are usually shell scripts to command line programs for data
analysis that use the filesystem for io. This can be rather slow
processing, but it makes for easy development.

 
Package Contents
       

 
Classes
       
dataplot.GenericPlot(__builtin__.object)
Plot

 
class Plot(dataplot.GenericPlot)
    Make plots through the filesystem and command line programs.
 
Subclasses need to define:
 
1. A method get_plot_args, which returns a dictionary with at
   least one key 'data' which maps to a text string that will be
   written out to the input file for the command line program.
 
2. The attribute cmdtmp, which is a template string that will be
   filled in with the dictionary returned by get_plot_args. This
   string will be the command line that is executed to make the
   plot. You should use the 'infile' key in your string, i.e.
 
   cmdtmp='/usr/local/bin/hairpinplot.bash %(infile)s'
 
 
Method resolution order:
Plot
dataplot.GenericPlot
__builtin__.object

Methods defined here:
get_cline(self)
Construct command line based on template and dict.
get_cline_template_dict(self)
Dict used to fill in self.cmdtmp string.
makefile(self)
Write data to infile and then execute the commandline.
 
This presumably makes the convert_from file.
write_data_to_infile(self)
Write data from get_plot_args into infile specified.
 
Presumably this data is the input for a command-line program.

Methods inherited from dataplot.GenericPlot:
__init__(self, basename, tocall, **kwargs)
Make a new plot to display.
 
Required args: (no sensible defaults)
 
basename: basename of this plot (no .pdf)
tocall: makes data dict to pass to the function for plotmaking.
 
Other plot parameters may be specified after instantiation as
attributes:
 
enable_caching: should the image be remade every time?
chgrp: group to set write permissions for
__repr__(self)
convert(self)
Convert from PDF to other formats using ImageMagick.
do_chgrp(self)
Change group write perms if requested.
 
This is useful if your testing and production webservers have
different users but share the same media directory.
do_chgrp_on(self, fn)
from_filename(self)
from_url(self)
get_app_dirs(self)
Dig through settings.INSTALLED_APPS for full paths.
get_filenames(self)
Return dictionary of image filenames.
get_full_base(self)
get_plot_args(self)
Gather input data from defaults and return value of tocall.
 
1. defaults for this plot type
2. returned arguments from get_plot_args
get_urls(self)
Return dictionary of image URLs.
 
Make the plot if it doesn't exist or caching is off.
makedirs(self)
Make subdirectories of media/ for this plot.
makefiles(self)
Make initial file and conversions.
 
makefile() just makes the initial file.
prefix(self, pre)
Generalized form of url/filename reporting.
 
pre: prefix to attach to the basename and suffix.
render_html(self, tfile)
Render a HTML template with self as context 'plot'.
to_html(self)
Render the PNG image and link to the PDF.
to_html_nolink(self)
Render the PNG without link to PDF.
to_html_thumb(self)
Render the PNG thumb.
view(self)
Use some other program to look at rendered source image.
 
Will make the source image if it does not exist yet.

Data and other attributes inherited from dataplot.GenericPlot:
__dict__ = <dictproxy object>
dictionary for instance variables (if defined)
__weakref__ = <attribute '__weakref__' of 'GenericPlot' objects>
list of weak references to the object (if defined)
autosave = False
chgrp = 'uploads'
convert_binary = 'convert'
enable_caching = True
view_program = 'display'