Menu

[r116]: / trunk / docs / htdocs / pydoc / dataplot.shellscript.html  Maximize  Restore  History

Download this file

164 lines (128 with data), 10.6 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<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&nbsp;script&nbsp;plots&nbsp;make&nbsp;images&nbsp;via&nbsp;command&nbsp;line&nbsp;programs.<br>
&nbsp;<br>
These&nbsp;are&nbsp;usually&nbsp;shell&nbsp;scripts&nbsp;to&nbsp;command&nbsp;line&nbsp;programs&nbsp;for&nbsp;data<br>
analysis&nbsp;that&nbsp;use&nbsp;the&nbsp;filesystem&nbsp;for&nbsp;io.&nbsp;This&nbsp;can&nbsp;be&nbsp;rather&nbsp;slow<br>
processing,&nbsp;but&nbsp;it&nbsp;makes&nbsp;for&nbsp;easy&nbsp;development.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr>
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</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>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</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>&nbsp;<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>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Make&nbsp;plots&nbsp;through&nbsp;the&nbsp;filesystem&nbsp;and&nbsp;command&nbsp;line&nbsp;programs.<br>
&nbsp;<br>
Subclasses&nbsp;need&nbsp;to&nbsp;define:<br>
&nbsp;<br>
1.&nbsp;A&nbsp;method&nbsp;get_plot_args,&nbsp;which&nbsp;returns&nbsp;a&nbsp;dictionary&nbsp;with&nbsp;at<br>
&nbsp;&nbsp;&nbsp;least&nbsp;one&nbsp;key&nbsp;'data'&nbsp;which&nbsp;maps&nbsp;to&nbsp;a&nbsp;text&nbsp;string&nbsp;that&nbsp;will&nbsp;be<br>
&nbsp;&nbsp;&nbsp;written&nbsp;out&nbsp;to&nbsp;the&nbsp;input&nbsp;file&nbsp;for&nbsp;the&nbsp;command&nbsp;line&nbsp;program.<br>
&nbsp;<br>
2.&nbsp;The&nbsp;attribute&nbsp;cmdtmp,&nbsp;which&nbsp;is&nbsp;a&nbsp;template&nbsp;string&nbsp;that&nbsp;will&nbsp;be<br>
&nbsp;&nbsp;&nbsp;filled&nbsp;in&nbsp;with&nbsp;the&nbsp;dictionary&nbsp;returned&nbsp;by&nbsp;get_plot_args.&nbsp;This<br>
&nbsp;&nbsp;&nbsp;string&nbsp;will&nbsp;be&nbsp;the&nbsp;command&nbsp;line&nbsp;that&nbsp;is&nbsp;executed&nbsp;to&nbsp;make&nbsp;the<br>
&nbsp;&nbsp;&nbsp;plot.&nbsp;You&nbsp;should&nbsp;use&nbsp;the&nbsp;'infile'&nbsp;key&nbsp;in&nbsp;your&nbsp;string,&nbsp;i.e.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;cmdtmp='/usr/local/bin/hairpinplot.bash&nbsp;%(infile)s'<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</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&nbsp;command&nbsp;line&nbsp;based&nbsp;on&nbsp;template&nbsp;and&nbsp;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&nbsp;used&nbsp;to&nbsp;fill&nbsp;in&nbsp;self.<strong>cmdtmp</strong>&nbsp;string.</tt></dd></dl>
<dl><dt><a name="Plot-makefile"><strong>makefile</strong></a>(self)</dt><dd><tt>Write&nbsp;data&nbsp;to&nbsp;infile&nbsp;and&nbsp;then&nbsp;execute&nbsp;the&nbsp;commandline.<br>
&nbsp;<br>
This&nbsp;presumably&nbsp;makes&nbsp;the&nbsp;convert_from&nbsp;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&nbsp;data&nbsp;from&nbsp;get_plot_args&nbsp;into&nbsp;infile&nbsp;specified.<br>
&nbsp;<br>
Presumably&nbsp;this&nbsp;data&nbsp;is&nbsp;the&nbsp;input&nbsp;for&nbsp;a&nbsp;command-line&nbsp;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&nbsp;a&nbsp;new&nbsp;plot&nbsp;to&nbsp;display.<br>
&nbsp;<br>
Required&nbsp;args:&nbsp;(no&nbsp;sensible&nbsp;defaults)<br>
&nbsp;<br>
basename:&nbsp;basename&nbsp;of&nbsp;this&nbsp;plot&nbsp;(no&nbsp;.pdf)<br>
tocall:&nbsp;makes&nbsp;data&nbsp;dict&nbsp;to&nbsp;pass&nbsp;to&nbsp;the&nbsp;function&nbsp;for&nbsp;plotmaking.<br>
&nbsp;<br>
Other&nbsp;plot&nbsp;parameters&nbsp;may&nbsp;be&nbsp;specified&nbsp;after&nbsp;instantiation&nbsp;as<br>
attributes:<br>
&nbsp;<br>
enable_caching:&nbsp;should&nbsp;the&nbsp;image&nbsp;be&nbsp;remade&nbsp;every&nbsp;time?<br>
chgrp:&nbsp;group&nbsp;to&nbsp;set&nbsp;write&nbsp;permissions&nbsp;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&nbsp;from&nbsp;PDF&nbsp;to&nbsp;other&nbsp;formats&nbsp;using&nbsp;ImageMagick.</tt></dd></dl>
<dl><dt><a name="Plot-do_chgrp"><strong>do_chgrp</strong></a>(self)</dt><dd><tt>Change&nbsp;group&nbsp;write&nbsp;perms&nbsp;if&nbsp;requested.<br>
&nbsp;<br>
This&nbsp;is&nbsp;useful&nbsp;if&nbsp;your&nbsp;testing&nbsp;and&nbsp;production&nbsp;webservers&nbsp;have<br>
different&nbsp;users&nbsp;but&nbsp;share&nbsp;the&nbsp;same&nbsp;media&nbsp;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&nbsp;through&nbsp;settings.INSTALLED_APPS&nbsp;for&nbsp;full&nbsp;paths.</tt></dd></dl>
<dl><dt><a name="Plot-get_filenames"><strong>get_filenames</strong></a>(self)</dt><dd><tt>Return&nbsp;dictionary&nbsp;of&nbsp;image&nbsp;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&nbsp;input&nbsp;data&nbsp;from&nbsp;defaults&nbsp;and&nbsp;return&nbsp;value&nbsp;of&nbsp;tocall.<br>
&nbsp;<br>
1.&nbsp;defaults&nbsp;for&nbsp;this&nbsp;plot&nbsp;type<br>
2.&nbsp;returned&nbsp;arguments&nbsp;from&nbsp;get_plot_args</tt></dd></dl>
<dl><dt><a name="Plot-get_urls"><strong>get_urls</strong></a>(self)</dt><dd><tt>Return&nbsp;dictionary&nbsp;of&nbsp;image&nbsp;URLs.<br>
&nbsp;<br>
Make&nbsp;the&nbsp;plot&nbsp;if&nbsp;it&nbsp;doesn't&nbsp;exist&nbsp;or&nbsp;caching&nbsp;is&nbsp;off.</tt></dd></dl>
<dl><dt><a name="Plot-makedirs"><strong>makedirs</strong></a>(self)</dt><dd><tt>Make&nbsp;subdirectories&nbsp;of&nbsp;media/&nbsp;for&nbsp;this&nbsp;plot.</tt></dd></dl>
<dl><dt><a name="Plot-makefiles"><strong>makefiles</strong></a>(self)</dt><dd><tt>Make&nbsp;initial&nbsp;file&nbsp;and&nbsp;conversions.<br>
&nbsp;<br>
<a href="#Plot-makefile">makefile</a>()&nbsp;just&nbsp;makes&nbsp;the&nbsp;initial&nbsp;file.</tt></dd></dl>
<dl><dt><a name="Plot-prefix"><strong>prefix</strong></a>(self, pre)</dt><dd><tt>Generalized&nbsp;form&nbsp;of&nbsp;url/filename&nbsp;reporting.<br>
&nbsp;<br>
pre:&nbsp;prefix&nbsp;to&nbsp;attach&nbsp;to&nbsp;the&nbsp;basename&nbsp;and&nbsp;suffix.</tt></dd></dl>
<dl><dt><a name="Plot-render_html"><strong>render_html</strong></a>(self, tfile)</dt><dd><tt>Render&nbsp;a&nbsp;HTML&nbsp;template&nbsp;with&nbsp;self&nbsp;as&nbsp;context&nbsp;'plot'.</tt></dd></dl>
<dl><dt><a name="Plot-to_html"><strong>to_html</strong></a>(self)</dt><dd><tt>Render&nbsp;the&nbsp;PNG&nbsp;image&nbsp;and&nbsp;link&nbsp;to&nbsp;the&nbsp;PDF.</tt></dd></dl>
<dl><dt><a name="Plot-to_html_nolink"><strong>to_html_nolink</strong></a>(self)</dt><dd><tt>Render&nbsp;the&nbsp;PNG&nbsp;without&nbsp;link&nbsp;to&nbsp;PDF.</tt></dd></dl>
<dl><dt><a name="Plot-to_html_thumb"><strong>to_html_thumb</strong></a>(self)</dt><dd><tt>Render&nbsp;the&nbsp;PNG&nbsp;thumb.</tt></dd></dl>
<dl><dt><a name="Plot-view"><strong>view</strong></a>(self)</dt><dd><tt>Use&nbsp;some&nbsp;other&nbsp;program&nbsp;to&nbsp;look&nbsp;at&nbsp;rendered&nbsp;source&nbsp;image.<br>
&nbsp;<br>
Will&nbsp;make&nbsp;the&nbsp;source&nbsp;image&nbsp;if&nbsp;it&nbsp;does&nbsp;not&nbsp;exist&nbsp;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> = &lt;dictproxy object&gt;<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dl>
<dl><dt><strong>__weakref__</strong> = &lt;attribute '__weakref__' of 'GenericPlot' objects&gt;<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;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>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.