Triki supports Twitter feeds

Triki supported feeds from RSS and Atom, now it support feeds from Twitter as well.

Posted: Sun 12 Jun, 2016, 18:32
One aim when developing triki was to make using the Web a more efficient and pleasurable experience by allowing feeds of interesting metadata to be pulled into my site. Rather than hunting around my favourite sites for interesting content, automated agents working along side the site would periodically pull in metadata from preferred sources. This premise has worked well for RSS and Atom feeds on the news and feeds page.

Then I watched Claus Ibsens talk at Riga Dev Day about containerisation and he used the Camel Twitter component as an example. He showed how simple the Twitter Search API is and this got me thinking that maybe I could create triki support for Twitter searches.

In many ways this is the natural progression from slow content to fast content. On the "slow" side I have feeds setup to retrieve updates on blogs written by various people I am interested in. These updated twice a day. At the fast end I had RSS feeds from news outlets that are producing new content every minute, and this updates every 15 minutes. Now triki effectively supports "super fast" content, which I called chat on my site, coming from Twitter, which allows me to specify search queries. These also update every 15 minutes at the moment. Twitter does throttle your number of permitted searches using API Rate Limiting in a given time window, but it is pretty generous. Every 15 mins is more current than I need and well within the limit.

I have to confess to being rather behind the curve on Twitter. On reflection I realise this was because I could never pull out the stuff I was actually interested in without becoming a human data filter again. My phone has a pretty basic web interface to Twitter and I guess I rarely visited it because there was so much noise.

So the new chat page gives me all the control I need now to very selectively pull in any and all content that interests me using the (very) powerful boolean search expressions that the Twitter Search API supports. For example, I want to follow the IndieWeb chat so one of my feeds is defined using the following Turtle statements:

    resource:twitter-indieweb a triki:feed;
            dc:created "2016-06-09T20:20:00"^^xsd:dateTime ;
            dc:title "indieweb" ;
            triki:feedurl "http://www.twitter.com/" ;
            triki:dateformat "EEE MMM dd HH:mm:ss Z yyyy" ;
            triki:refresh "chatter" ;
            triki:keywords "#indieweb OR ((from:indiewebcamp OR from:kevinmarks OR from:aaronpk OR from:rhiaro) AND -filter:retweets)" ;
            triki:feedtype "twitter".
        

Obviously this search string can be anything you wish, to pick out precisely the right tweets from Twitter. Currently I have eight different queries setup for Twitter. At the moment all tweets are being published on a public page but it could be a private page.

This improvement has two very implications for triki as a basis for a personal web server.

Building a personal web hub

The content published on my site is not just my content, it growing to be an even richer and valuable source of web content that I am interested in. The concept of hosting not just a personal web site, but a web hub is now becoming more and more evident in triki. It is a hub that I visit first every day. The automation behind the scenes, where updates are asynchronously pulled into my metadata triple store, is becoming a really valuable feature. This saves me time and allows for much finer grained control of the content offered to me. (I am a programmer, I am supposed to be lazy, right?)

Less apps, more web

An interesting thing for me is that as my site provides a richer experience as a content consumer (a content junkie, let's be honest!), the "smart" element of my smartphone is becoming less important. My site is becoming the one place that I visit because I no longer need to visit all the silos seperately, the site takes care of this for me. This reduces my dependency on Smartphone apps and leverages the web fully.

Without running my own, self-hosted site, with content agents, it would not be possible to do this.

Long live the Web.