Thanks for this.
No luck. It appears the direct editing of the default format variable in
twitter.py is best.
On Saturday, December 30, 2017 at 10:53:24 PM UTC-8, Andrew Milner wrote:
>
> A further thing - significance unknown - looking at the wiki the examples
> in there seem to include semicolons between items, and I cannot see the
> significance of format_None = * mentioned either.
>
> Perhaps something more like:
> station = Hourly Auto-Tweet
> unit_system = METRICWX
> post_interval = 3600
>
> format = "{station}; \n{dateTime:%H:%M %b %d %Y}; \nT: {outTemp:%.1f}ºC;
> \
> \nD: {dewpoint:%.1f}ºC; \nW: {windDir:ORD} {windSpeed:%.1f}kph gusting to
> {windGust:%.1f}kph; \
> \nH: {outHumidity:%.0f}%; \nP: {barometer:%.2f}hPa; \nRain
> {dayRain:%.2f}mm; Rain Rate: {rainRate:%.1f}mm/hr; \
> \nChill:{windchill:%.1f}ºC; \nHIndex:{heatindex:%.1f}ºC; \nSolar:
> {radiation:%.0f}W/m2; \nUV: {UV:%.0f}; \
> \n#PortAlberni https://www.alberniweather.ca
> https://www.youtube.com/alberniweather"
>
> would also work??.....
>
>
>
>
> On Sunday, 31 December 2017 08:18:23 UTC+2, Andrew Milner wrote:
>
>> Just a thought - is it possible that in .conf there should not be any
>> quotes around the format string? Other values appear to have no quotes
>> around them.
>>
>>
>>
>> On Sunday, 31 December 2017 07:32:41 UTC+2, Chris Alemany wrote:
>>
>>> Success!
>>>
>>> I shifted focus to the _DEFAULT_FORMAT value in the twitter.py file
>>> directly rather than the weewx.conf file and the first and simplest option
>>> works!
>>>
>>> The \n escape sequence works to create a new line.
>>>
>>> This:
>>>
>>> _DEFAULT_FORMAT = '{station} {dateTime:%H:%M %b %d %Y}:\nT:
>>> {outTemp:%.1f}C\nD: {dewpoint:%.1f}C\nW: {windDir:ORD} {windSpeed:%.1f}kph
>>> gusting to {windGust:%.1f}kph\nH: {outHumidity:%.0f}%\nP:
>>> {barometer:%.2f}hPa\nDay Rain {dayRain:%.2f}mm\nRain Rate:
>>> {rainRate:%.1f}mm/hr\nChill:{windchill:%.1f}C\nHIndex:{heatindex:%.1f}C\nSolar:
>>>
>>> {radiation:%.0f}W/m2\nUV: {UV:%.0f}\n#PortAlberni\nhttps://
>>> www.alberniweather.ca\nhttps://www.youtube.com/alberniweather'
>>>
>>> Produced this:
>>>
>>> Hourly Auto-Tweet 21:25 Dec 30 2017:
>>> T: 2.4C
>>> D: 0.7C
>>> W: NNE 1.5kph gusting to 3.1kph
>>> H: 88%
>>> P: 1028.18hPa
>>> Day Rain 3.30mm
>>> Rain Rate: 0.0mm/hr
>>> Chill:2.4C
>>> HIndex:2.4C
>>> Solar: 0W/m2
>>> UV: 0
>>> #PortAlberni
>>> https://www.alberniweather.ca
>>>
>>> I had degree symbols in the string originally, which killed weewx when I
>>> tried to use them in the DEFAULT value. So I took those out and it works
>>> fine now. I'll see if I can use a character encoding to get the degree
>>> symbol, but it's not a deal breaker. The main goal has been fulfilled,
>>> even if it is a little hack-ish :)
>>>
>>> BTW: I also thought it might have been a double quote vs. single quote
>>> problem in the weewx.conf but still no love when I tried that, so I will
>>> settle on this solution.
>>>
>>> Thanks again for everyones help. I will post again if I get degree
>>> symbols in there. :)
>>>
>>> Cheers,
>>> Chris
>>>
>>>
>>>
>>> On Saturday, December 30, 2017 at 8:18:56 PM UTC-8, Chris Alemany wrote:
>>>>
>>>>
>>>>
>>>> On Saturday, December 30, 2017 at 2:47:52 PM UTC-8, vince wrote:
>>>>>
>>>>> On Saturday, December 30, 2017 at 11:58:47 AM UTC-8, Chris Alemany
>>>>> wrote:
>>>>>>
>>>>>> That's a negative on both  and %0a
>>>>>>>
>>>>>>>
>>>>>> That twython is capable of sending "new lines" to twitter. And of
>>>>>> course python is able to have new lines within strings. Is it perhaps
>>>>>> some
>>>>>> way in how the .conf file is being parsed that does not allow these
>>>>>> characters through properly?
>>>>>>
>>>>>>
>>>>>>
>>>>> This is ugly but seems to work.....
>>>>>
>>>>> >>> mytweet=("this is line1\n" "this is line2\n" "this is line3\n")
>>>>> >>> print mytweet
>>>>> this is line1
>>>>> this is line2
>>>>> this is line3
>>>>>
>>>>>
>>>>>
>>>>>
>>>> Doesn't seem to parse when used in the format option in weewx.conf just
>>>> spits out the characters it is given... I'll look into mangling the
>>>> twitter.py file perhaps.
>>>>
>>>> @Auto_AlberniWx
>>>> ("this is line1\n" "this is line2\n" "this is line3\n")
>>>>
>>>>
>>>>
>>>
--
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.