Great! Thanks.

I have modified the CSV extension to also create a JSON-file. 
Actually i just imported a method to generate a JSON-file from the CSV-file 
and this method runs every time write_data is running (at the end).

Regards



Den tirsdag den 20. februar 2018 kl. 18.29.33 UTC+1 skrev Tom Keffer:
>
> The CSV extension <https://github.com/weewx/weewx/wiki/csv> generates a 
> CSV file, configurable for either every LOOP packet, or archive record. 
>
> It shouldn't be hard to modify it to emit JSON instead. 
>
> -tk
>
> On Tue, Feb 20, 2018 at 7:31 AM, <[email protected] <javascript:>> wrote:
>
>> Hello all
>>
>> I have a very simple report that generetes a json-file:
>>
>> [StdReport]
>>    [[json]]
>>         skin = json
>>         HTML_ROOT = /var/www/html/weewx/json
>>
>> At the moment CheetahGenerator is the "driver" and the json is updated at 
>> each archive record:
>>
>> [CheetahGenerator]
>>     encoding = html_entities    # 'html_entities', 'utf8', or 
>> 'strict_ascii'
>>     [[ToDate]]
>>         [[[json]]]
>>             template = json.json.tmpl
>>
>>
>> How can I bind the json-generation to NEW_LOOP_PACKET?
>>
>> I have looked at http://www.weewx.com/docs/customizing.htm but I'm a 
>> little bit confused, do I have to make a new "Service"?
>>
>> Kind Regards
>>
>> -- 
>> 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.

Reply via email to