Home | Trees | Index | Help |
---|
Package dataplot :: Class GenericPlot |
|
object
--+
|
GenericPlot
Plot
,
Plot
,
Plot
,
Plot
Singular representation of a plot for the web. Subclasses need to define: convert_to: dictionary that defines associated file suffixes, i.e. convert_to={ 'png':{'suffix':'.png'}, 'thumb':{'suffix':'-thumb.png','convert_args':'-resize 65x90'}, 'pdf':{'suffix':'.pdf'}, } convert_from: one of the keys from convert_to, which specifies which of the files is created by the makefile method. makefile: a method that creates the image specified by convert_from on the filesystem.
Method Summary | |
---|---|
Make a new plot to display. | |
__repr__(self)
| |
Convert from PDF to other formats using ImageMagick. | |
Change group write perms if requested. | |
do_chgrp_on(self,
fn)
| |
from_filename(self)
| |
from_url(self)
| |
Dig through settings.INSTALLED_APPS for full paths. | |
Return dictionary of image filenames. | |
get_full_base(self)
| |
Gather input data from defaults and return value of tocall. | |
Return dictionary of image URLs. | |
Make subdirectories of media/ for this plot. | |
Make initial file and conversions. | |
Generalized form of url/filename reporting. | |
Render a HTML template with self as context 'plot'. | |
Render the PNG image and link to the PDF. | |
Render the PNG without link to PDF. | |
Render the PNG thumb. | |
Use some other program to look at rendered source image. | |
Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) |
Class Variable Summary | |
---|---|
bool |
autosave = False
|
NoneType |
chgrp = None |
str |
convert_binary = 'convert'
|
bool |
enable_caching = False
|
str |
view_program = 'display'
|
Method Details |
---|
__init__(self,
basename,
tocall,
**kwargs)
|
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. |
get_app_dirs(self)Dig through settings.INSTALLED_APPS for full paths. |
get_filenames(self)Return dictionary of image filenames. |
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. |
Class Variable Details |
---|
autosave
|
chgrp
|
convert_binary
|
enable_caching
|
view_program
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Tue Apr 29 23:35:16 2008 | http://epydoc.sf.net |