Take a look inside the template index.html.tmpl. You will find some
conditionals for deciding what order to display the dates for solstice and
equinox that are similar to what you're proposing.

You could easily create a template file that looks something like (NOT
TESTED):

#if $almanac.sun.rise.raw < $current.dateTime.raw < $almanac.sun.set.raw
TAKE A PICTURE!
#else
NO PICTURE!
#end if

-tk

On Sat, Nov 26, 2016 at 5:53 AM, WindnFog <[email protected]> wrote:

> I have a USB camera pointed at my backyard.  It takes a picture every 5
> minutes, one minute before weewx does it's calculations and uploads (i.e.
> picture at 04, weewx at 05 and so on.)  It works fine now on a cron job
> every 5 minutes, 24/7.
>
> I want to enhance it to just take pictures during daylight hours.  My
> thoughts are to put a time check in my .bat file that runs every 5
> minutes.  Something like: IF (DAYLIGHT) TAKE_PICTURE ELSE FORGET_IT sort of
> thinking.
>
> Is there a better way (from a Linux bash script, not Python) than parsing
> /home/weewx/public_html/index_html to obtain these values?  I'm looking
> for the simplest solution.  I'm hoping I can make DAYLIGHT a boolean that
> is something like this:
>
> DAYLIGHT = ((time > Start civil twilight) AND time <  (End civil twilight))
>
> I could use Sunrise and Sunset instead if they are easier to obtain.
>
> I'd like to upload this photo to my weewx web site, and I can now except
> well over half of them are taken in the dark.  I want to put a .jpg there
> that says something like "Next photo update at sunrise" or similar.
>
> Thoughts?  Better ideas?
>
> - Paul
>
> --
> 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.
>

-- 
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.

Reply via email to