RSS Cumulus conditions and Facebook
Posted: Sat 11 May 2013 4:23 pm
I got sick of the flaky (at best) Twitter to Facebook integration and so decided to update Facebook independently by RSS. I thought it might potentially be of use to somebody else so I thought I'd put it here.
It is relatively easy to create a RSS feed for the current conditions using the Webtags facility. I attach a genericised version of what I use. You'd need to edit this to put in your web address and email address where indicated, and choose a Time To Live (how long subscribing services should wait before checking for new items.) Then tell Cumulus to process and upload it. The result is a one entry RSS feed. Mine is at http://www.wetherbyweather.org.uk/cumulus.rss
Then use a RSS feed to Facebook service. I use RSS Graffiti https://apps.facebook.com/rssgraffiti/ . Add http://www.yourwebsite/path/to/cumulus.rss as a source, and select your profile or page as the destination. I tell mine to update every hour, and to use Standard post style, no "Text to Box", with 0 (no) in Shorten to.
It works; I get the current conditions posted on my Wetherby Weather Facebook page every hour.
It is possible to doctor what I've done and use a linux or PHP script to create a true RSS Cumulus conditions feed with multiple entries. To do this, I have a file 1.txt with all the elements up to but not including the first <item>, uploaded to the webspace. I have a 2.txt which consists of the <item> ... </item> section, which Cumulus processes and uploads. Then I have 3.txt on the webspace, which consists of solely </channel></rss>.
I have a Linux shell script uploaded to the server. It concatenates 2.txt and 2.existing.txt back into 2.existing.txt and then crops the last <item></item> using tail 60 lines, so that 2.existing.txt always contains a set number of <item>s. The script then concatenates 1.txt, 2.existing.txt and 3.txt into feed.rss . A cron job runs this shortly after every hour so the conditions on the hour are added as an item to the RSS feed.
It is also possible to post WXSIM forecasts to Facebook automatically using Ken's WXSIM RSS feed script at http://saratoga-weather.org/scripts-WXS ... aintextRSS and RSS Graffiti.
It is relatively easy to create a RSS feed for the current conditions using the Webtags facility. I attach a genericised version of what I use. You'd need to edit this to put in your web address and email address where indicated, and choose a Time To Live (how long subscribing services should wait before checking for new items.) Then tell Cumulus to process and upload it. The result is a one entry RSS feed. Mine is at http://www.wetherbyweather.org.uk/cumulus.rss
Then use a RSS feed to Facebook service. I use RSS Graffiti https://apps.facebook.com/rssgraffiti/ . Add http://www.yourwebsite/path/to/cumulus.rss as a source, and select your profile or page as the destination. I tell mine to update every hour, and to use Standard post style, no "Text to Box", with 0 (no) in Shorten to.
It works; I get the current conditions posted on my Wetherby Weather Facebook page every hour.
It is possible to doctor what I've done and use a linux or PHP script to create a true RSS Cumulus conditions feed with multiple entries. To do this, I have a file 1.txt with all the elements up to but not including the first <item>, uploaded to the webspace. I have a 2.txt which consists of the <item> ... </item> section, which Cumulus processes and uploads. Then I have 3.txt on the webspace, which consists of solely </channel></rss>.
I have a Linux shell script uploaded to the server. It concatenates 2.txt and 2.existing.txt back into 2.existing.txt and then crops the last <item></item> using tail 60 lines, so that 2.existing.txt always contains a set number of <item>s. The script then concatenates 1.txt, 2.existing.txt and 3.txt into feed.rss . A cron job runs this shortly after every hour so the conditions on the hour are added as an item to the RSS feed.
It is also possible to post WXSIM forecasts to Facebook automatically using Ken's WXSIM RSS feed script at http://saratoga-weather.org/scripts-WXS ... aintextRSS and RSS Graffiti.