Page 1 of 1

Twitter help in Linux.

Posted: Fri 27 Jan 2017 11:35 pm
by ConligWX
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.

Re: Twitter help in Linux.

Posted: Sat 28 Jan 2017 12:39 am
by jlmr731
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

Re: Twitter help in Linux.

Posted: Sat 28 Jan 2017 11:42 am
by steve
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.

Re: Twitter help in Linux.

Posted: Sat 28 Jan 2017 1:05 pm
by ConligWX
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:

Re: Twitter help in Linux.

Posted: Sat 28 Jan 2017 3:08 pm
by jlmr731
Nice that you got that to work, Also forgot the Steve has custom commands built in im sure that would have worked also.