Welcome to the new home of the Cumulus Support forum.

Latest Cumulus release v1.9.4 (build 1099) - Nov 28 2014
Latest Cumulus MX release - v3.0.0 build 3043 Jan 20 2017. See the Wiki for download

Twitter help in Linux.

Share your Cumulus MX user interface here
Post Reply
User avatar
ConligWX
Posts: 729
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.5 Stretch
Location: Bangor, NI
Contact:

Twitter help in Linux.

Post by ConligWX » Fri 27 Jan 2017 11:35 pm

Ok guys, I have twitter setup in CumulusMX and is updating my Twitter feed every hour. with Weather data.

I would however like to also post Forecasts as well and Since CumulusMX does not support this i thought of looking elsewhere.

I found an app called Twidge that allows you to post from command line.

very easy to setup.

from the command line, once you have setup the app with your twitter account you then only need to do the following.


[~] # twidge update "Cloudy skies with periods of light rain late. Low 3C. Winds light and variable. Chance of rain 60%."

and it posts directly onto the feed.

I would like to know if anyone has some linux commandline experience who could possible help me in getting a script to read a forecast text file (created by the <#forecast> or <#wsforecast> webtag and put it into the commandline.

twidge update "value" is all that is needed but I am unsure how to do this. anyone have any ideas?

once this is done just run the script via crontab say 2-4 hours and you now have a forecast feed too.
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2 Plus - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS Templates

jlmr731
Posts: 118
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Youngstown, Ohio
Contact:

Re: Twitter help in Linux.

Post by jlmr731 » Sat 28 Jan 2017 12:39 am

can twidge post from a file?
if so you can setup cumulus to generate a txt file from its tags and have twidge read from it

User avatar
steve
Cumulus Author
Posts: 26714
Joined: Mon 02 Jun 2008 6:49 pm
Weather Station: None
Operating System: None
Location: Vienne, France
Contact:

Re: Twitter help in Linux.

Post by steve » Sat 28 Jan 2017 11:42 am

And if it can't update from a file, just the command line, then include the command in the file which Cumulus processes:

twidge update "<#forecast>"

or whatever.
Steve

User avatar
ConligWX
Posts: 729
Joined: Mon 19 May 2014 10:45 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Debian 9.5 Stretch
Location: Bangor, NI
Contact:

Re: Twitter help in Linux.

Post by ConligWX » Sat 28 Jan 2017 1:05 pm

steve wrote:And if it can't update from a file, just the command line, then include the command in the file which Cumulus processes:

twidge update "<#forecast>"

or whatever.
I managed to get it done like so:

ForecastT.txt processes <#wsforecast> to forecast.txt

Forecast script called by crontab.

Code: Select all

#!/bin/sh
value=`cat /CumulusMX/web/forecast.txt`
twidge update "Station Forecast: $value"
Crontab:

Code: Select all

# m h  dom mon dow   command
0 8,14,20 	* * *   root	/root/forecast.sh
this then posts Station forecast at 8am,2pm,8pm. the rest of the time I'm sleeping :lol:
Last edited by ConligWX on Sat 28 Jan 2017 5:31 pm, edited 1 time in total.
Regards Simon

https://www.conligwx.org
https://twitter.com/conligwx
Davis Vantage Pro2 Plus - CumulusMX v3.0.0 (build 3043) + Saratoga/PWS Templates

jlmr731
Posts: 118
Joined: Sat 27 Aug 2016 12:11 am
Weather Station: Davis vantage pro 2
Operating System: Debian
Location: Youngstown, Ohio
Contact:

Re: Twitter help in Linux.

Post by jlmr731 » Sat 28 Jan 2017 3:08 pm

Nice that you got that to work, Also forgot the Steve has custom commands built in im sure that would have worked also.

Post Reply