Twitter.txt: Difference between revisions

From Cumulus Wiki
Jump to navigationJump to search
932 bytes added ,  09:23, 23 September 2015
no edit summary
m (Added a link to the Twitter username list)
No edit summary
 
(13 intermediate revisions by 2 users not shown)
Line 7: Line 7:




Twitter support was added in [[Version 1.8.5]]
Twitter support was added in [[Version 1.8.5]] however due to security changes with the Twitter service you MUST be running version 1.9.0 or above of Cumulus


There is also a list of Cumulus [[Twitter Usernames]]
There is also a list of Cumulus [[Twitter Usernames]]
Line 15: Line 15:
By default Cumulus will ''tweet'' the following information:
By default Cumulus will ''tweet'' the following information:


*Current Temperature
*Wind speed and direction
*Windspeed
*Pressure and trend
*Pressure
*Temperature
*Pressure trend
*Rain Today
*Rain Today
*Forecast
*Humidity


A default 'tweet' could read.... "Temp: 14.7°C Wind:0.0mph Pressure: 1004.2hpa Falling slowly Rain Today 0.3mm. Forecast: Precipitation at times, very unsettled"
A default 'tweet' could read.... "Wind 8 mph W. Barometer 1036.81 mb, Rising slowly. Temperature 6.3 °C. Rain today 0.4 mm. Humidity 78%"




You can change what information is sent to Twitter.  Create a text file called <tt>twitter.txt</tt> and save it in your Cumulus Program folder.  The file may contain static text and any combination of Cumulus [[webtags]].
You can change what information is sent to Twitter.  '''Create a text file called <tt>twitter.txt</tt> and save it in your Cumulus program folder'''.  The file may contain static text and any combination of Cumulus [[webtags]]. Cumulus will read the file, process any web tags in it, and use the result to update Twitter.


Note:  
Note:  
*Twitter messages can not be more that 140 characters so bear this in mind when building your message.   
*Twitter messages can not be more that 140 characters so bear this in mind when building your message.   
*Take into account the maximum length of any webtag; pay close attention to the [[Forecast_webtag|<#forecast>]] webtag if you use it as some of the text generated by it can be long.  If your eventual ''tweet'' is over 140 character it will be truncated by Twitter.
*If you try to put 'accented' characters into the file, the Twitter update will probably fail
*Take into account the maximum length of any webtag; pay close attention to the [[Forecast_webtag|<#forecast>]] webtag if you use it as some of the text generated by it can be long.  If your eventual ''tweet'' is over 140 character it will be truncated by Cumulus.
*If you want to include any Twitter 'hash tags' in your message, just add them as plain text, e.g. #hashtag




An example of a <tt>twitter.txt</tt>:
An example of a <tt>twitter.txt</tt>:
  Temp: <#temp>°C Wind:<#wspeed>mph Pressure: <#press>hpa <#presstrend> Rain Today <#rfall>mm.  Forecast: <#forecast>
  Temp: <#temp>°C Wind:<#wspeed>mph Pressure: <#press>hpa <#presstrend> Rain Today <#rfall>mm.  Forecast: <#forecast>
The equivalent of the default 'tweet' as a <tt>twitter.txt</tt> file is as follows:
Wind <#wspeed> <#windunit> <#wdir>. Barometer <#press> <#pressunit>, <#presstrend>. Temperature <#temp> <#tempunit>. Rain today <#rfall> <#rainunit>. Humidity <#hum>%
You might find the degree symbol from <#tempunit> is displayed by Twitter as &amp;deg; in which case the simple solution is to 'hard code' your temperature units in the twitter.txt file rather than using the web tag. You should probably save your twitter.txt file as 'UTF-8 without BOM'.


[[Category: Configuration Files]]
[[Category: Configuration Files]]

Navigation menu