Added Ftp as a "report type."

This commit is contained in:
Tom Keffer
2010-03-17 00:31:55 +00:00
parent b8a0cc71c9
commit 829d467460
4 changed files with 33 additions and 12 deletions

25
skins/Ftp/skin.conf Normal file
View File

@@ -0,0 +1,25 @@
############################################################################################
# #
# #
# FTP CONFIGURATION FILE #
# #
# #
############################################################################################
# #
# Copyright (c) 2010 Tom Keffer <tkeffer@gmail.com> #
# #
# See the file LICENSE.txt for your full rights. #
# #
############################################################################################
#
# $Revision: 164 $
# $Author: tkeffer $
# $Date: 2010-03-16 16:16:04 -0700 (Tue, 16 Mar 2010) $
#
############################################################################################
# This isn't really a "report". Instead, we use the report engine to run an FTP service.
# The list of generators that are part of this report:
generator_list = weewx.reportengine.Ftp

View File

@@ -6,7 +6,7 @@
# #
############################################################################################
# #
# Copyright (c) 2009 Tom Keffer <tkeffer@gmail.com> #
# Copyright (c) 2010 Tom Keffer <tkeffer@gmail.com> #
# #
# See the file LICENSE.txt for your full rights. #
# #
@@ -18,6 +18,9 @@
#
############################################################################################
# The list of generators that are part of this report:
generator_list = weewx.reportengine.ByMonth, weewx.reportengine.ByYear, weewx.reportengine.ToDate, weewx.reportengine.Images
############################################################################################
[Labels]
@@ -48,8 +51,6 @@
radiation = Radiation
extraTemp1 = Pond Temperature
[[Time]]
#
# This section sets the string format to be used

View File

@@ -300,7 +300,7 @@ version = 1.6.0
# Each subsection represents a report you wish to run:
[[Report1]]
skin = Standard
############################################################################################
[Engines]
@@ -311,7 +311,3 @@ version = 1.6.0
# The list of services the main weewx engine should run:
service_list = weewx.wxengine.StdWunderground, weewx.wxengine.StdCatchUp, weewx.wxengine.StdTimeSynch, weewx.wxengine.StdPrint, weewx.wxengine.StdProcess
[[ReportEngine]]
# The list of reports the report engine should run:
report_list = weewx.reportengine.FileGen, weewx.reportengine.ImageGen, weewx.reportengine.Ftp

View File

@@ -58,6 +58,8 @@ class StdReportEngine(threading.Thread):
for report in self.config_dict['Reports'].sections:
syslog.syslog(syslog.LOG_DEBUG, "reportengine: Running report %s" % report)
report_config_path = os.path.join(self.config_dict['Station']['WEEWX_ROOT'],
self.config_dict['Reports']['SKIN_ROOT'],
self.config_dict['Reports'][report].get('skin', 'Standard'),
@@ -71,12 +73,9 @@ class StdReportEngine(threading.Thread):
report_dict = None
syslog.syslog(syslog.LOG_DEBUG, "reportengine: No report configuration file for report %s" % report)
report_dict = self.config_dict['Reports'][report]
print report_dict['Images']['image_width']
# try:
#
# for report in report_list:
# syslog.syslog(syslog.LOG_DEBUG, "reportengine: Running report %s" % skin)
# # Instantiate an instance of the class
# obj = weeutil.weeutil._get_object(report, self)
# # Call its start() method