Jump to content

NerdAlert: I've made a widget to update GCal with EDF What's On events. 'Ave a look.


Recommended Posts

During a particularly idle moment I mused on how great the world would be if all the What's On events were automagically added to a calendar. This would solve the particular problem that of what to do of an evening at short notice.

Why trawl through the historical EDF What's On postings looking for the evening in question when you could have a calendar view listing everything that's been posted against the day that it's on?


I decided to take this problem on, and I decided to use THE INTERNET to make it happen.


Here's the issue: some people - despite admin's request to the contrary - don't post the date and time of their event in the title of the post. So this boiled down to two parts:


1) recognise where the date IS in the title of the post, add this event to a google calendar

2) recognise where the date is not part of the title, scan the body of the post for a date and if found append it to the title, and send this to a google calendar


All other posts - ie where there is no date either in the title or body are submitted as is. This may or may not be processed correctly by Google Cal but this is the risk you run if you disobey admin's rules. So nyuh.


So steps were:


1) Created a Yahoo Pipe which loads the EDF What's On RSS feed. Filters out anything starting in Re: since the RSS feed includes thread replies. Used RegEx to include only those items that have a date in them.


Pipe source is here: http://bit.ly/H7Chau


2) Created another pipe to find those without a date in the title. Scanned the body for a date using the same regex. If found, stores the text and appends to title


Pipe source is http://bit.ly/H8OF3P


3) a third pipe joins the RSS feeds from pipes 1) and 2) above, plus all other posts not in 1) and 2), excluding responses


4) Next step was to use the excellent IFTTT.com to process the RSS feed resulting from step 3 above and post new items to GCal when a new item arrives. GCal has some parsing logic baked in to handle stuff like "every tuesday", "next thursday", "every day this month" etc, which is why completely dateless items are submitted as is.


E Voila. Here's the result:


http://bit.ly/GQEdzO


Since GCal is syndicated, could also use IFTTT.com to send items to a twitter feed which I think @TweetsDulwich is doing, but straight from the What's on page rather than via GCal.


...but that would be a bit too nerdy...

blimey. that's marvellous, I've never seen yahoo pipes before.

I'd only add that adding a 'unique' widgetty thing based upon title & description might be good as I can see quite a few repeated entries there.


Other than that very minor quibble, hat's off to you 5imon!!

yes there are a few things to improve..work in progress etc


duplicate entries: sometimes there'll be multiple postings for the same event eg reminders as the event draws near. I had a stab at filtering them out, but the search and match critera were pretty difficult to nail down.


the dateless calendar is sometimes a bit heavy handed in it's appending text too...need to tighten that up a bit


..but yes, Yahoo Pipes is awesome - one of the true hidden web wonders. Effectively turns the internet into a database which totally floats my nerdboat. I'll be very upset if Yahoo stop development of it, cos it looks like they are on the decline.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Latest Discussions

    • Why is the name a big of a red flag? Blighty is a common name for the UK whatever people might think.
    • The only election which counts is the General Election.  There is still strong resentment for fourteen year's of Conservative rule. They squeezed the working class's way to hard, then they squeezed the middle class, but somehow the upper class never got touched, funny that.   There is also new resentment for Labour because of the utter balls up they've made of things since coming to power nine months ago. The majority of the population (or at least those with an ounce of common sense) want these clowns out of office ASAP because they see the damage they are doing to UK plc. They squeezed the pensioners, then the farmers and then business. They made and broke promise after promise, or just didn't tell the truth or say what they where going to do, otherwise known as merely lying to get elected. Inflation may be falling but the cost of things in the shops and utility bills keep on rising, the direct opposite of what they promised. They will never be trusted once they are ousted from power in about four and a half years time.   Everything they do and touch causes further harm, led by three stooges, Rayner, Reeves and balls'less Starmer, who couldn't fight his way out of a paper bag. He still thinks he's a solicitor at the DPP. Rather than spending week upon week getting involved in international politics he needs to be sorting out the UK's issues, sadly he's not up to the job and nor are his Cabinet.  Society needs a mix of people with different skills to prosper, not more and more graduates who can't get jobs in what they studied in.   Reform is the current anti establishment party, which will hopefully wither away back to where it came from.  The Liberals and Greens, well what can you say apart from using them as another alternative vote of dissatisfaction, but neither will come to power.  The country seriously needs stability and a Government that stands up for and represents it's people, not what MP's want but what the constituencies want and need.  Government needs to become far more open and transparent, it needs to be seen to be doing its job, doing what MP's are elected to do,  working for the people in the constituencies, getting back to basic principles and rebuilding the trust which has been lost by successive party's immaterial of them being, red, blue, light blue, yellow, green or some other colour.     
    • That’s very insulting! You are basically calling 17 million people that voted to leave the EU ‘thick’.        Brexit happened Sue.  Boring graphs!  Calling Nigel Farage a plastic patriot is also very insulting seeing as he and the Reform Party have had a landslide victory all over England.
    • These charity collectors are often classed as chuggers.  It can be scandalous that the charity/admin may keep a huge percentage of your donations and a tiny percentage is  actually given to the charity.   I can not speak for individual collectors - but it common practice.  
Home
Events
Sign In

Sign In



Or sign in with one of these services

Search
×
    Search In
×
×
  • Create New...