First, an explanation...
I'm adding a report that downloads images from webcams, manipulates them,
and copies them to a local file. An FTP report then sends them to a
specific location on my remote web server.
The skin for this custom report includes a configuration file but does not
use a template file. The skin configuration file contains a set of
parameters used by the custom generator to find, manipulate, and store the
images locally.
The custom generator is a highly modified (like completely) version of the
original ImageGenerator.
Here is what I have now and what I understand needs to change...
In the old weewx.conf:
[Reports]
[[CameraSnapshots]]
skin=snapshots
In the new weewx.conf:
[StdReport]
[[CameraSnapshots]]
skin=snapshots
In the old skins/snapshots/skin.conf:
<snipped out all sorts of parameter goodies used by the generator to find
and manipulate images>
[Generators]
generator_list = weewx.cameragenerator.CameraGenerator
#weewx.filegenerator.FileGenerator,
weewx.imagegenerator.ImageGenerator, weewx.reportengine.CopyGenerator
In the new skins/snapshots/skin.conf:
<snipped out all the same parameter goodies which will probably not need to
change... we'll see>
[Generators]
generator_list = user.cameragenerator.CameraGenerator
#weewx.filegenerator.FileGenerator,
weewx.imagegenerator.ImageGenerator, weewx.reportengine.CopyGenerator
in the old bin/weewx/cameragenerator.py:
import Image, ImageFont, ImageDraw, urllib, urllib2, time
import os, weewx.reportengine
#===============================================================================
# Class CameraGenerator
#===============================================================================
class CameraGenerator(weewx.reportengine.ReportGenerator):
"""Class for managing the cam image generator."""
In the new user/cameragenerator.py:
import Image, ImageFont, ImageDraw, urllib, urllib2, time
import os, weewx.reportengine
#===============================================================================
# Class CameraGenerator
#===============================================================================
class CameraGenerator(weewx.reportengine.ReportGenerator):
"""Class for managing the cam image generator."""
Is that the right place to start?
Thanks,
joe
On Friday, September 22, 2017 at 5:31:18 PM UTC-7, Tom Keffer wrote:
>
> It should go in bin/user.
>
> -tk
>
> On Fri, Sep 22, 2017 at 5:26 PM, Joe Percival <[email protected]
> <javascript:>> wrote:
>
>> Actually the most important first question I have is regarding the custom
>> generator location.... bin/weewx or do I need to move it to bin/user?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.