BTW, if your problem is just a simple matter of getting the filename right,
you could write a sed script that runs through skin.conf, changing a file
name to today's date. Then run the script just after midnight every day.
Something like (NOT TESTED):
DD=$(date +%d)
MM=$(date +%m)
YY=$(date +%Y)
sed </home/weewx/skins/Standard/skin.start
>/home/weewx/skins/Standard/skin.conf "/TODAY/s/TODAY/$YY-$MM-$DD/"
Where skin.start is a version of skin.conf, except it has a subsection that
looks like
[[ToDate]]
# Report that will be written to a file with today's date as its
name
[[[today]]]
template = TODAY.html.tmpl
After running the sec script, this would become a skin.conf file with
subsection
[[ToDate]]
# Report that will be written to a file with today's date as its
name
[[[today]]]
template = 2016-11-28.html.tmpl
-tk
On Mon, Nov 28, 2016 at 9:11 AM, Thomas Keffer <[email protected]> wrote:
> Well, the good news is that the Cheetah generator looks to see if the file
> has already been generated. If it has, then, unless it's for the current
> date, it skips it. So, you'd have to generate all those (hundreds?,
> thousands?) of files only once.
>
> -tk
>
> On Mon, Nov 28, 2016 at 9:07 AM, Louis De Lange <[email protected]>
> wrote:
>
>> Thanks, Tom.
>>
>> Yes I have already figured that this can generate lots of files, and that
>> is not what I want. I only need to generate a file for the current day,
>> but the website template I am trying to use requires the CSV file to
>> contain the proper date in the name of the file.
>>
>> I could also modify the website template scripts to look for an input
>> file name something like "todays_data.csv" but then it breaks compatibility
>> with future website upgrades. Just trying to do things the "right way"
>>
>> I will try this out tonight and give feedback.
>>
>
>