diff --git a/MANIFEST b/MANIFEST
index 0b30b073..8369320a 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -71,18 +71,18 @@ skins/Standard/backgrounds/drops.gif
skins/Standard/backgrounds/flower.jpg
skins/Standard/backgrounds/leaf.jpg
skins/Standard/backgrounds/night.gif
-skins/Standard/mobile/barometer.html.tmpl
-skins/Standard/mobile/custom.js
-skins/Standard/mobile/humidity.html.tmpl
-skins/Standard/mobile/index.html.tmpl
-skins/Standard/mobile/radar.html.tmpl
-skins/Standard/mobile/rain.html.tmpl
-skins/Standard/mobile/temp_outside.html.tmpl
-skins/Standard/mobile/wind.html.tmpl
-skins/Standard/mobile/icons/icon_ipad_x1.png
-skins/Standard/mobile/icons/icon_ipad_x2.png
-skins/Standard/mobile/icons/icon_iphone_x1.png
-skins/Standard/mobile/icons/icon_iphone_x2.png
+skins/Standard/smartphone/barometer.html.tmpl
+skins/Standard/smartphone/custom.js
+skins/Standard/smartphone/humidity.html.tmpl
+skins/Standard/smartphone/index.html.tmpl
+skins/Standard/smartphone/radar.html.tmpl
+skins/Standard/smartphone/rain.html.tmpl
+skins/Standard/smartphone/temp_outside.html.tmpl
+skins/Standard/smartphone/wind.html.tmpl
+skins/Standard/smartphone/icons/icon_ipad_x1.png
+skins/Standard/smartphone/icons/icon_ipad_x2.png
+skins/Standard/smartphone/icons/icon_iphone_x1.png
+skins/Standard/smartphone/icons/icon_iphone_x2.png
start_scripts/BSD/weewx
start_scripts/Debian/weewx
start_scripts/SuSE/weewx
diff --git a/bin/weeutil/daemon.py b/bin/daemon.py
similarity index 100%
rename from bin/weeutil/daemon.py
rename to bin/daemon.py
diff --git a/bin/weewx/wxengine.py b/bin/weewx/wxengine.py
index 58209aac..022b450d 100644
--- a/bin/weewx/wxengine.py
+++ b/bin/weewx/wxengine.py
@@ -22,7 +22,7 @@ import time
# 3rd party imports:
import configobj
-import weeutil.daemon
+import daemon
# weewx imports:
import weewx.archive
@@ -32,7 +32,7 @@ import weewx.reportengine
import weeutil.weeutil
usagestr = """
- %prog config_path [--help] [--daemon] [--pidfile pidfile] [--version] [--exit]
+ %prog config_path [--help] [--daemon] [--pidfile=PIDFILE] [--version] [--exit]
Entry point to the weewx weather program. Can be run from the command
line or, by specifying the '--daemon' option, as a daemon.
@@ -689,7 +689,7 @@ def parseArgs():
sys.exit(weewx.CMD_ERROR)
if options.daemon:
- weeutil.daemon.daemonize(pidfile=options.pidfile)
+ daemon.daemonize(pidfile=options.pidfile)
return (options, args)
diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt
index c98cc9d5..5333aaf6 100644
--- a/docs/CHANGES.txt
+++ b/docs/CHANGES.txt
@@ -21,15 +21,17 @@ argparse.py in any sys.path directory.
When doing DMPAFT, no longer tries to correct for DST.
-1.14.0 06/15/12
+1.14.0 06/18/12
Added smartphone formatted mobile webpage, contributed by user Torbjörn Einarsson.
-It is generated by default. If you have custom templates, see the upgrade guide
-on how to have these webpages generated. Thanks, Tobbe!
+If you are doing a fresh install, then these pages will be generated automatically.
+If you are doing an upgrade, then see the upgrade guide on how to have these webpages
+generated. Thanks, Tobbe!
Three changes suggested by user Charlie Spirakis:
- o Changed umask in daemon.py to 0022.
- o Allow location of process ID file to be specified on the command line.
+ o Changed umask in daemon.py to 0022;
+ o Allow location of process ID file to be specified on the command line
+ of weewx;
o Start script allows daemon to be run as a specific user.
Thanks, Charlie!
diff --git a/docs/customizing.htm b/docs/customizing.htm
index e7bea5e3..50db1d80 100644
--- a/docs/customizing.htm
+++ b/docs/customizing.htm
@@ -1625,10 +1625,11 @@ outTemp = Outside Temperature
label = Rain (daily avg)
This will generate an image file with name monthrain.png.
- It will be a bar plot. Option yscale controls the
- y-axis scaling — if left out, the scale will automatically be chosen. However,
- in this example we are choosing to exercise some degree of control by specifying
- values explicitly. It is a 3-way tuple (ylow, yhigh, min_interval), where ymin and ymax are the minimum
+ It will be a bar plot. Option yscale
+ controls the y-axis scaling — if left out, the scale will
+ automatically be chosen. However, in this example we are
+ choosing to exercise some degree of control by specifying values
+ explicitly. The option takes a 3-way tuple (ylow, yhigh, min_interval), where ylow and yhigh are the minimum
and maximum y-axis values, respectively, and min_interval
is the minimum tick interval. If set to 'None', the
corresponding value will be automatically chosen. So, in this example, we are
diff --git a/docs/upgrading.htm b/docs/upgrading.htm
index 9247d86b..5f8815ca 100644
--- a/docs/upgrading.htm
+++ b/docs/upgrading.htm
@@ -23,11 +23,11 @@
What follows are directions for upgrading from specific versions.
V1.13 or earlier
Version 1.14 introduces some new webpages that have been expressly formatted for
-the smartphone, using jQuery.
+the smartphone by using jQuery.
The skins shipped with the distribution take advantage of these features. If
-you do nothing, your old skins will continue to work, but you will not take
+you do nothing, your old skins will continue to work, but you will not be taking
advantage of these new webpages.
-If you want these new webpages, then you have two choices:
+If you want them, then you have two choices:
- Rename your old skin directory (call it "skins.old")
then do the install. This will install the new skin distribution. You can
@@ -37,30 +37,30 @@ advantage of these new webpages.
- Alternatively, change the contents of your existing skin directory to
include the new webpages. If you take this approach, you will need to copy
over the contents of the subdirectory
- skins/Standard/mobile from the distribution into your skins/Standard
+ skins/Standard/smartphone from the distribution into your skins/Standard
directory. You will then need to modify your skin.conf.
-Replace the section that looks like
+After the section that looks like
[[[Mobile]]]
template = mobile.html.tmpl
-with a section that looks like
- [[[Mobile]]]
- template = mobile/index.html.tmpl
+add the following directives:
+ [[[MobileSmartphone]]]
+ template = smartphone/index.html.tmpl
[[[MobileTempOutside]]]
- template = mobile/temp_outside.html.tmpl
+ template = smartphone/temp_outside.html.tmpl
[[[MobileRain]]]
- template = mobile/rain.html.tmpl
+ template = smartphone/rain.html.tmpl
[[[MobileBarometer]]]
- template = mobile/barometer.html.tmpl
+ template = smartphone/barometer.html.tmpl
[[[MobileWind]]]
- template = mobile/wind.html.tmpl
+ template = smartphone/wind.html.tmpl
[[[MobileRadar]]]
- template = mobile/radar.html.tmpl
+ template = smartphone/radar.html.tmpl
Then modify section [CopyGenerator]
to add the highlighted files:
[CopyGenerator]
@@ -70,10 +70,12 @@ to add the highlighted files:
#
# List of files that are to be copied at the first invocation of the generator only
- copy_once = backgrounds/*, weewx.css, mobile.css, favicon.ico, mobile/icons/*, mobile/custom.js
+ copy_once = backgrounds/*, weewx.css, mobile.css, favicon.ico, smartphone/icons/*, smartphone/custom.js
Whichever approach you chose, the generated files will appear in
-public_html/mobile. The start of the document root
-will be at public_html/mobile/index.html.
+public_html/smartphone. The start of the document root
+will be at public_html/smartphone/index.html. You may want
+to add a link to this in the template for your main index page
+skins/Standard/index.html.tmpl.
V1.12 or earlier
Version 1.13 changed the way binding happens to the databases used in reports
so that it happens much later. The upshot is that the signature of a few
diff --git a/setup.py b/setup.py
index b63ec0e3..72d1bdfa 100755
--- a/setup.py
+++ b/setup.py
@@ -2,7 +2,7 @@
#
# weewx --- A simple, high-performance weather station server
#
-# Copyright (c) 2009, 2010, 2011, 2012 Tom Keffer
+# Copyright (c) 2009, 2010, 2011 Tom Keffer
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -44,8 +44,6 @@
6. It backs up any pre-existing bin subdirectory.
7. It conserves the ./bin/user subdirectory.
-
- 8. Finally, it tries to tidy up things left behind from earlier versions.
"""
import os
@@ -55,8 +53,8 @@ import shutil
import sys
import tempfile
import time
-
import configobj
+
from distutils.core import setup
from distutils.command.install_data import install_data
from distutils.command.install_lib import install_lib
@@ -354,7 +352,8 @@ setup(name='weewx',
url='http://www.weewx.com',
package_dir = {'' : 'bin'},
packages = ['weewx', 'weeplot', 'weeutil', 'examples', 'user'],
- scripts = ['bin/config_database.py', 'bin/config_vp.py', 'bin/weewxd.py', 'bin/runreports.py'],
+ py_modules = ['daemon'],
+ scripts = ['bin/configure.py', 'bin/weewxd.py', 'bin/runreports.py'],
data_files = [('', ['LICENSE.txt', 'README', 'weewx.conf']),
('docs', ['docs/CHANGES.txt', 'docs/customizing.htm',
'docs/daytemp_with_avg.png', 'docs/debian.htm',
@@ -366,12 +365,12 @@ setup(name='weewx',
('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']),
('skins/Standard/RSS', ['skins/Standard/RSS/weewx_rss.xml.tmpl']),
- ('skins/Standard/mobile', ['skins/Standard/mobile/barometer.html.tmpl', 'skins/Standard/mobile/custom.js',
- 'skins/Standard/mobile/humidity.html.tmpl', 'skins/Standard/mobile/index.html.tmpl',
- 'skins/Standard/mobile/radar.html.tmpl', 'skins/Standard/mobile/rain.html.tmpl',
- 'skins/Standard/mobile/temp_outside.html.tmpl', 'skins/Standard/mobile/wind.html.tmpl']),
- ('skins/Standard/mobile/icons',['skins/Standard/mobile/icons/icon_ipad_x1.png', 'skins/Standard/mobile/icons/icon_ipad_x2.png',
- 'skins/Standard/mobile/icons/icon_iphone_x1.png','skins/Standard/mobile/icons/icon_iphone_x2.png']),
+ ('skins/Standard/smartphone', ['skins/Standard/smartphone/barometer.html.tmpl', 'skins/Standard/smartphone/custom.js',
+ 'skins/Standard/smartphone/humidity.html.tmpl', 'skins/Standard/smartphone/index.html.tmpl',
+ 'skins/Standard/smartphone/radar.html.tmpl', 'skins/Standard/smartphone/rain.html.tmpl',
+ 'skins/Standard/smartphone/temp_outside.html.tmpl', 'skins/Standard/smartphone/wind.html.tmpl']),
+ ('skins/Standard/smartphone/icons',['skins/Standard/smartphone/icons/icon_ipad_x1.png', 'skins/Standard/smartphone/icons/icon_ipad_x2.png',
+ 'skins/Standard/smartphone/icons/icon_iphone_x1.png','skins/Standard/smartphone/icons/icon_iphone_x2.png']),
('skins/Standard', ['skins/Standard/favicon.ico',
'skins/Standard/mobile.css', 'skins/Standard/mobile.html.tmpl',
'skins/Standard/index.html.tmpl', 'skins/Standard/month.html.tmpl',
diff --git a/skins/Standard/index.html.tmpl b/skins/Standard/index.html.tmpl
index 7b690a20..957fd2b9 100644
--- a/skins/Standard/index.html.tmpl
+++ b/skins/Standard/index.html.tmpl
@@ -309,7 +309,8 @@
fast, and easy to understand by leveraging modern software concepts.
RSS feed
- Mobile formatted
+ Mobile formatted
+ Smartphone formatted
Weewx uptime: $station.uptime
Server uptime: $station.os_uptime
weewx v$station.version
diff --git a/skins/Standard/skin.conf b/skins/Standard/skin.conf
index c663f45d..31d1d85e 100644
--- a/skins/Standard/skin.conf
+++ b/skins/Standard/skin.conf
@@ -244,22 +244,25 @@
template = RSS/weewx_rss.xml.tmpl
[[[Mobile]]]
- template = mobile/index.html.tmpl
+ template = mobile.html.tmpl
+
+ [[[MobileSmartphone]]]
+ template = smartphone/index.html.tmpl
[[[MobileTempOutside]]]
- template = mobile/temp_outside.html.tmpl
+ template = smartphone/temp_outside.html.tmpl
[[[MobileRain]]]
- template = mobile/rain.html.tmpl
+ template = smartphone/rain.html.tmpl
[[[MobileBarometer]]]
- template = mobile/barometer.html.tmpl
+ template = smartphone/barometer.html.tmpl
[[[MobileWind]]]
- template = mobile/wind.html.tmpl
+ template = smartphone/wind.html.tmpl
[[[MobileRadar]]]
- template = mobile/radar.html.tmpl
+ template = smartphone/radar.html.tmpl
############################################################################################
@@ -270,7 +273,7 @@
#
# List of files that are to be copied at the first invocation of the generator only
- copy_once = backgrounds/*, weewx.css, mobile.css, favicon.ico, mobile/icons/*, mobile/custom.js
+ copy_once = backgrounds/*, weewx.css, mobile.css, favicon.ico, smartphone/icons/*, smartphone/custom.js
# List of files to be copied every time:
# copy_always =
diff --git a/skins/Standard/mobile/barometer.html.tmpl b/skins/Standard/smartphone/barometer.html.tmpl
similarity index 100%
rename from skins/Standard/mobile/barometer.html.tmpl
rename to skins/Standard/smartphone/barometer.html.tmpl
diff --git a/skins/Standard/mobile/custom.js b/skins/Standard/smartphone/custom.js
similarity index 100%
rename from skins/Standard/mobile/custom.js
rename to skins/Standard/smartphone/custom.js
diff --git a/skins/Standard/mobile/humidity.html.tmpl b/skins/Standard/smartphone/humidity.html.tmpl
similarity index 100%
rename from skins/Standard/mobile/humidity.html.tmpl
rename to skins/Standard/smartphone/humidity.html.tmpl
diff --git a/skins/Standard/mobile/icons/icon_ipad_x1.png b/skins/Standard/smartphone/icons/icon_ipad_x1.png
similarity index 100%
rename from skins/Standard/mobile/icons/icon_ipad_x1.png
rename to skins/Standard/smartphone/icons/icon_ipad_x1.png
diff --git a/skins/Standard/mobile/icons/icon_ipad_x2.png b/skins/Standard/smartphone/icons/icon_ipad_x2.png
similarity index 100%
rename from skins/Standard/mobile/icons/icon_ipad_x2.png
rename to skins/Standard/smartphone/icons/icon_ipad_x2.png
diff --git a/skins/Standard/mobile/icons/icon_iphone_x1.png b/skins/Standard/smartphone/icons/icon_iphone_x1.png
similarity index 100%
rename from skins/Standard/mobile/icons/icon_iphone_x1.png
rename to skins/Standard/smartphone/icons/icon_iphone_x1.png
diff --git a/skins/Standard/mobile/icons/icon_iphone_x2.png b/skins/Standard/smartphone/icons/icon_iphone_x2.png
similarity index 100%
rename from skins/Standard/mobile/icons/icon_iphone_x2.png
rename to skins/Standard/smartphone/icons/icon_iphone_x2.png
diff --git a/skins/Standard/mobile/index.html.tmpl b/skins/Standard/smartphone/index.html.tmpl
similarity index 95%
rename from skins/Standard/mobile/index.html.tmpl
rename to skins/Standard/smartphone/index.html.tmpl
index 21a5b383..8a1bf214 100644
--- a/skins/Standard/mobile/index.html.tmpl
+++ b/skins/Standard/smartphone/index.html.tmpl
@@ -29,7 +29,7 @@
diff --git a/skins/Standard/mobile/radar.html.tmpl b/skins/Standard/smartphone/radar.html.tmpl
similarity index 100%
rename from skins/Standard/mobile/radar.html.tmpl
rename to skins/Standard/smartphone/radar.html.tmpl
diff --git a/skins/Standard/mobile/rain.html.tmpl b/skins/Standard/smartphone/rain.html.tmpl
similarity index 100%
rename from skins/Standard/mobile/rain.html.tmpl
rename to skins/Standard/smartphone/rain.html.tmpl
diff --git a/skins/Standard/mobile/temp_outside.html.tmpl b/skins/Standard/smartphone/temp_outside.html.tmpl
similarity index 100%
rename from skins/Standard/mobile/temp_outside.html.tmpl
rename to skins/Standard/smartphone/temp_outside.html.tmpl
diff --git a/skins/Standard/mobile/wind.html.tmpl b/skins/Standard/smartphone/wind.html.tmpl
similarity index 100%
rename from skins/Standard/mobile/wind.html.tmpl
rename to skins/Standard/smartphone/wind.html.tmpl