Updated documentation.

This commit is contained in:
Tom Keffer
2010-03-28 18:34:17 +00:00
parent 10382c4c61
commit b425bc6fe8
7 changed files with 566 additions and 463 deletions

View File

@@ -1,7 +1,2 @@
TODO before the next release:
Documentation:
o Characters used in the image plots must be Latin-1 characters.
o Include some of the examples I've sent to Alf.

View File

File diff suppressed because it is too large Load Diff

BIN
docs/daytemp_with_avg.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -85,11 +85,12 @@ table {
td {
border-style: solid;
border-width: 1px;
padding: 5px;
}
.indent {
margin-left: 40px;
}
.tty {
.tty, pre {
font-family: "Courier New", Courier, monospace;
margin-left: 40px;
margin-top: 0px;
@@ -118,7 +119,20 @@ td {
.xxsmall {
font-size: xx-small;
}
.highlight {
background-color: #FFFF66;
}
.center {
text-align: center;
}
.Example_output {
padding: 10px;
border: thin #000000 dotted;
font-family: "Times New Roman", Times, serif;
margin-left: 40px;
}
</style>
</head>
<body>
@@ -164,6 +178,9 @@ Version 1.6</h1>
notes</a></p>
</li>
</ol>
<p>For information on customizing <span class="code">weewx</span>, see the
separate document <a href="customizing.htm"><em>Customizing </em><em>
<span class="code">weewx</span></em></a>.</p>
<h1>1. <a name="Copyright">Copyright</a></h1>
<p>(c) 2009, 2010 by Tom Keffer &lt;<a href="mailto:tkeffer@gmail.com">tkeffer@gmail.com</a>&gt;</p>
<p>This program is free software: you can redistribute it and/or modify it under
@@ -383,8 +400,7 @@ the <span class="code">weewx</span> directory hierarchy, then</p>
and scripts are installed;</li>
<li><span class="code"><em>$WEEWX_ROOT</em>/weewx.conf</span> is the configuration
file;</li>
<li><span class="code"><em>$WEEWX_ROOT</em>/templates</span> is where the html
templates live;</li>
<li><span class="code"><em>$WEEWX_ROOT</em>/skins</span> is where the skins live;</li>
<li><span class="code"><em>$WEEWX_ROOT</em>/archive</span> is the directory
where the sqlite3 databases live;</li>
<li><em>$</em><span class="code"><em>WEEWX_ROOT</em>/public_html</span> is where
@@ -417,7 +433,9 @@ specific actions you need to do. </p>
<strong>setup.cfg</strong></span><strong>. </strong> </p>
<p>The build and install process will do the following for you.</p>
<ul>
<li>Save your old template directories as <span class="code"><em>$WEEWX_ROOT</em>/templates.YYYYMMDDHHMMSS</span>
<li>Save your old &#39;skin&#39; subdirectory as <span class="code"><em>$WEEWX_ROOT</em>/skins.YYYYMMDDHHMMSS</span>
where YYYYMMDDHHMMSS is a timestamp;</li>
<li>Save your old &#39;bin&#39; subdirectory as <span class="code"><em>$WEEWX_ROOT</em>/bin.YYYYMMDDHHMMSS</span>
where YYYYMMDDHHMMSS is a timestamp;</li>
<li>Merge any changes you&#39;ve made to your old configuration file
<span class="code">weewx.conf</span> into the new configuration file, then install
@@ -475,7 +493,8 @@ This is done using the configuration script <span class="code">configure.py</spa
<p class="tty"><em>$WEEWX_ROOT</em>/bin/configure.py --create-stats <em>$WEEWX_ROOT</em>/weewx.conf</p>
<p class="tty"><em>$WEEWX_ROOT</em>/bin/configure.py --backfill-stats <em>$WEEWX_ROOT</em>/weewx.conf</p>
<p>If your existing database is large, backfilling could take some time. On my modest
500 MHz <a href="http://www.fit-pc.com/new/fit-pc-slim-specifications.html">fit-PC</a>
500 MHz <a href="http://www.fit-pc.com/new/fit-pc-slim-specifications.html">
fit-PC Slim</a>
with 512 MB of memory it took a little over 4 minutes for a year and a half (25
MB) of data (while wview was running in the background).</p>
<h2>6.2 Configuring your weather station</h2>
@@ -504,7 +523,10 @@ the main memory log of the VantagePro will be cleared. </p>
<p>Station specific information is set in the configuration file
<span class="code"><em>$WEEWX_ROOT</em>/weewx.conf</span>. There is another
configuration file <span class="code">skin.conf</span> for presentation-specific
options, which is described in a <a href="customizing.htm">separate document</a>. </p>
options, which is described in the <em><a href="customizing.htm">Customizing</a></em>
document under section <em>
<a href="customizing.htm#Reference:_The_Standard_skin_configuration_file">
Reference: The standard skin configuration file</a></em>.</p>
<p>Most of the important
options are up near the top of the file. They are all documented in this section, although
you can safely ignore most of them. The truly important ones, the ones you are likely
@@ -545,7 +567,7 @@ longitude</h4>
hemispheres, respectively. Required. No default.</p>
<h4 class="config_important">altitude</h4>
<p>Should be set to the altitude of the station in the same units specified in
<span class="code"><a href="#group_altitude">group_altitude</a></span>. Required. No default.</p>
<span class="code"><a href="customizing.htm#group_altitude">group_altitude</a></span>. Required. No default.</p>
<h4 class="config_important">rain_year_start</h4>
<p>If your area uses a rain year that starts on something other than the first of
January, you may want to set this variable. For example, set to 10 if your rain
@@ -554,7 +576,7 @@ year starts in October (as mine does). Default is 1.</p>
cooling_base</span></h4>
<p>Set to the base temperature for calculating heating and cooling degree-days,
respectively, in the same units specified in <span class="code">
<a href="#group_temperature">group_temperature</a></span>. The default is 65.0 for both.</p>
<a href="customizing.htm#group_temperature">group_temperature</a></span>. The default is 65.0 for both.</p>
<h4 class="config_option">week_start</h4>
<p>Start of the week. 0=Monday, 1= Tuesday, ... , 6 = Sunday. Default is 6
(Sunday)</p>
@@ -638,11 +660,38 @@ be available for generating HTML pages. Optional. The default is all types, resu
in a possibly much bigger than necessary stats database (do you really have four
different soil moisture sensors?) The list that ships with the configuration file
will work for most stations and probably will not have to be modified.</p>
<h3 class="config_section">[Reports]</h3>
<p>This section controls which reports are to be generated.</p>
<h3 class="config_section"><a name="[Reports]">[Reports]</a></h3>
<p>This section controls which reports are to be generated. While it can be
highly customized for your individual situation, this documentation describes
the section as shipped in the standard distribution.</p>
<p>Each report is represented by a sub-section, marked with double brackets (<em>e.g.</em>,
<span class="code">[[MyReport]]</span>). Any options for the report should be
placed under it. The standard report service will go through the sections,
running each report in order. Hence, for the stock distribution, report
<span class="code">[[StandardReport]]</span> will be run first, then report
<span class="code">[[FTP]]</span> (which actually optionally uploads the results
to a remote web server). Details for how to customize reports are in the section
<em><a href="customizing.htm#Opportunities_for_customizing_reports">
Opportunities for customizing reports</a></em>, in the separate <em>
<a href="customizing.htm">Customizing</a></em> document.</p>
<p class="config_option">SKIN_ROOT</p>
<p>The directory relative to <span class="code"><em>$WEEWX_ROOT</em></span>
where the skins live. Default is <span class="code">skins</span>.</p>
<p class="config_option">HTML_ROOT</p>
<p>The target directory for the generated files, relative to <span class="code">
<em>$WEEWX_ROOT</em></span>. Generated files and images will be put here.
Default is <span class="code">public_html</span>.</p>
<h4 class="config_section">[[StandardReport]]</h4>
<p>This is the standard report that will be run on every archiving interval. It
uses the skin &quot;<span class="code">Standard</span>&quot;, which generates four HTML
pages (&quot;day&quot;, &quot;week&quot;, &quot;month&quot;, and &quot;year&quot; observations), plot images for same,
and NOAA monthly and yearly reports. Unless changed otherwise, it uses US
Customary Units and puts the results in <span class="code">public_html</span>
and subdirectory <span class="code">public_html/NOAA</span>.</p>
<h4 class="config_section">[[FTP]]</h4>
<p>If you FTP your images and HTML files to an external web server,
<span class="code">weewx</span> can FTP them for you. It does an incremental update,
<p>While this &quot;report&quot; doesn&#39;t actually generate anything, it uses the report
machinery to upload files from directory <span class="code"><em>$HTML_ROOT</em></span>
to a remote webserver. It does an incremental update,
that is, it only FTPs any files that have changed, saving the outgoing bandwidth
of your Internet connection.</p>
<p>If you do not use such a server, comment out the first four options below.</p>
@@ -669,6 +718,18 @@ mode).</p>
<h4 class="config_option">max_tries</h4>
<p><span class="code">Weewx</span> will try up to this many times to FTP a file
up to your server before giving up. Default is 3.</p>
<h3 class="config_section">[Engines]</h3>
<p>This section is used to configure the internal service engine in weewx. It is
for advanced customization. Details on how to do this is found in the <em>
<a href="customizing.htm">Customizing</a></em> document under the section <em>
<a href="customizing.htm#Customizing_the_weewx_service_engine">Customizing the
weewx service engine</a></em>.</p>
<h4 class="config_section">[[WxEngine]]</h4>
<p>This section is for options used by the service engine.</p>
<pre>service_list</pre>
<p>This option is the list of <em>services</em> that are to be run by the
service engine. After each event (such as the arrival of LOOP data, etc.), they
will be run in the given order. </p>
<h1>7. <a name="Running_weewx">Running <span class="code">weewx</span></a></h1>
<p><span class="code">Weewx</span> can be run either from the command line (useful
for diagnostic purposes because it will print out a summary of every LOOP data),
@@ -955,7 +1016,7 @@ or &quot;Zulu&quot;) time. However, usually one is interested in weather events
and want image and HTML generation to reflect that. Furthermore, most weather stations
are configured in local time. This requires that many data times be converted back
and forth between UTC and local time. To avoid tripping up over time zones and daylight
savings time, <span class="code">weeewx</span> generally uses Python routines to
savings time, <span class="code">weewx</span> generally uses Python routines to
do this conversion. Nowhere in the code base is there any explicit recognition of
DST. Instead, its presence is implicit in the conversions. At times, this can cause
the code to be relatively inefficient. </p>

View File

@@ -119,7 +119,7 @@ td {
<body>
<h1 class="title">Upgrading to weewx v1.5</h1>
<h1 class="title">Upgrading to weewx v1.6</h1>
<h1>Version specific directions</h1>
<p>What follows are directions for upgrading from specific versions.</p>
<h2>V.1.5.0 or earlier</h2>
@@ -135,12 +135,10 @@ comes with the distribution).</p>
Pacific Northwest, you will probably want to change it! You can find it in
<span class="code"><em>$WEEWX_ROOT</em>/skins/Standard/index.html.tmpl</span>
and searching for &quot;radar.&quot;</p>
<p>The directory &#39;<span class="code">templates</span>&#39; is no longer used, so you
<p>The directory &#39;<span class="code">templates</span>&#39; is no longer used;
it has been replaced with directory &#39;<span class="code">skins</span>&#39;. You
may delete it if you wish:</p>
<p class="tty">rm -r <em>$WEEWX_ROOT</em>/templates</p>
<p>Two Python files are no longer used and may be deleted if you wish:</p>
<p class="tty">rm <em>$WEEWX_ROOT</em>/bin/upload.*</p>
<p class="tty">rm <em>$WEEWX_ROOT</em>/bin/weewx/ftpdata.*</p>
<h2>V1.4.0 or earlier</h2>
<p>Because the configuration file <span class="code">weewx.conf</span> changed
significantly going from V1.4 to V1.5, the installation script

BIN
docs/weekgustoverlay.png Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -83,8 +83,13 @@ class My_install_data(install_data):
# Back up the old skin directory if it exists
skin_dir = os.path.join(self.install_dir, 'skins')
if os.path.exists(skin_dir):
backupdir = backup(skin_dir)
print "Backed up skins subdirectory to %s" % backupdir
skin_backupdir = backup(skin_dir)
print "Backed up skins subdirectory to %s" % skin_backupdir
bin_dir = os.path.join(self.install_dir, 'bin')
if os.path.exists(bin_dir):
bin_backupdir = backup(bin_dir)
print "Backed up bin subdirectory to %s" % bin_backupdir
# Run the superclass's run():
install_data.run(self)
@@ -227,7 +232,8 @@ setup(name='weewx',
scripts = ['configure.py', 'weewxd.py'],
data_files = [('', ['CHANGES.txt', 'LICENSE.txt', 'README', 'weewx.conf']),
('docs', ['docs/customizing.htm', 'docs/readme.htm',
'docs/sheeva.htm', 'docs/upgrading.htm']),
'docs/sheeva.htm', 'docs/upgrading.htm',
'docs/daytemp_with_avg.png', 'docs/weekgustoverlay.png']),
('skins/Ftp', ['skins/Ftp/skin.conf']),
('skins/Standard/backgrounds', ['skins/Standard/backgrounds/band.gif']),
('skins/Standard/NOAA', ['skins/Standard/NOAA/NOAA-YYYY.txt.tmpl', 'skins/Standard/NOAA/NOAA-YYYY-MM.txt.tmpl']),