A month ago there would have been no reason to write this post, because Google Reader made it’s own RSS feed of the posts you wanted to share. See, Google wants to drive people to use Google+, and they seem to be doing this by crippling their other services that have even a smidgen of social usefulness. The thing is, I liked the social bits of Google Reader. Sure, they were a bit of an afterthought, and mildly dysfunctional, but I got a lot of value from reading what other people shared, and I liked that when I shared something I was creating a kind of archive of stuff I liked on Reader, with an RSS feed of its very own.
The great thing about RSS is that it can be consumed by arbitrary 3rd party applications. The likes of Google, Facebook and Twitter don’t like this, because they want control over the 3rd parties that can access their stream. So they are quite prepared to kill off RSS services in their applications, because it does not serve their mission. You can no longer get an RSS feed of your Twitter stream (as far as I know), there is no RSS built into Google+ (which I have yet to have the time to fully grok).
My needs are small, I want an RSS feed of the stuff I want to share from Google Reader, so that other people can follow the things I share in Reader (if they want), and I can pipe that information elsewhere (I use dlvr.it to post selected RSS feeds into Twitter). Google doesn’t want to provide that anymore, so I’ll hack something together.
The ingredients:
- These simple instructions for how to render an RSS feed from a MySQL backend.
- The instructions for how to create your own “Send to:” item in Google Reader
- My rudimentary PHP hackery skills
The code:
All source is available on BitBucket.
First, we need a database connection. The database is set up exactly as described in (1), above.
<?php
DEFINE('DB_USER', 'db_user');
DEFINE('DB_PASSWORD', 'db_password');
DEFINE('DB_HOST', 'localhost');
DEFINE('DB_NAME', 'db_name');
// Make the connnection and then select the database.
$dbc = @mysql_connect(DB_HOST, DB_USER, DB_PASSWORD) OR die(mysql_error());
mysql_select_db(DB_NAME) OR die(mysql_error());
?>
Now, when the page is visited, we want to render what is in the database as an RSS feed (again, this is a simple adaptation of the code in (1)):
<?php
class RSS {
public function RSS() {
require_once ('mysql_connect.php');
}
public function GetFeed() {
return $this->getDetails() . $this->getItems();
}
private function dbConnect() {
DEFINE('LINK', mysql_connect(DB_HOST, DB_USER, DB_PASSWORD));
}
private function getDetails() {
//header of the RSS feed
$detailsTable = "webref_rss_details";
$this->dbConnect($detailsTable);
$query = "SELECT * FROM ". $detailsTable;
$result = mysql_db_query (DB_NAME, $query, LINK);
while($row = mysql_fetch_array($result)) {
//fairly minimal description of the feed
$details = '<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0">
<channel>
<title>'. $row['title'] .'</title>
<link>'. $row['link'] .'</link>
<description>'. $row['description'] .'</description>
<language>'. $row['language'] .'</language>
';
}
return $details;
}
private function getItems() {
//return all the items foe the RSS feed
$itemsTable = "webref_rss_items";
$this->dbConnect($itemsTable);
$query = "SELECT * FROM ". $itemsTable;
$result = mysql_db_query(DB_NAME, $query, LINK);
$items = '';
while($row = mysql_fetch_array($result)) {
$items .= '<item>
<title>'. $row["title"] .'</title>
<link>'. $row["link"] .'</link>
<description><![CDATA['. $row["description"] .']]></description>
</item>';
}
//close the feed
$items .= '</channel>
</rss>';
return $items;
}
}
?>
Finally, we need a method for adding new stuff for the feed. This code takes the GET variables passed to it by Google Reader, and stores them in the DB:
<?php
if ($_GET['url']) {
//receive google reader 'send to' items, and store in mysqldb
$url = $_GET['url'];
$source = $_GET['source'];
$title = $_GET['title'];
$simple_check = $_GET['check'];
//stops anyone adding new items to your feed unless they have the key
if ($simple_check == 'uniquepasscodehere') {
//statement adds new item to RSS database
$insert_statement = "INSERT INTO webref_rss_items(title, description, link) VALUES('$title', '$source', '$url')";
require_once('mysql_connect.php');
$result = mysql_query($insert_statement, $dbc);
if ($result) {
echo "<p>Success!";
//would be nice to close the window automatically after a couple of seconds
}
else {
die('<p>Invalid query: ' . mysql_error());
}
}
}
else {
//render everything in the db as RSS
header("Content-Type: application/xml; charset=ISO-8859-1");
include("RSS.class.php");
$rss = new RSS();
echo $rss->GetFeed();
}
?>
Now, I can set up the Send To: item in Google Reader:
Finally, click ‘Send To: -> Readershare’ in the footer of an item in Google Reader, and it is rendered into my RSS feed, which can then be consumed by other applications, including Google Reader itself (so if you want to subscribe to my Google Reader shared items feed, you can find it at http://fuzzierlogic.com/readershare). Oh, and I can pipe my Google Reader shares back into Twitter again.
An announcement courtesy of Colin Gillespie, a lecturer in Maths & Stats here in Newcastle:
The School of Mathematics & Statistics at Newcastle University, are
again running some R courses. In January, 2012, we will run:
- January 16th: Introduction to R;
- January 17th: Programming with R;
- January 18th & 19th: Advanced graphics with R.
The courses aren’t aimed at teaching statistics, rather they aim to go through the fundemental concepts of R programming.
Further information is available at the course website.
It is hard not to get carried away in a room full of people who seem mostly to want the same things. You come away from a conference like Science Online thinking that the open science revolution is inevitable, and there is nothing anyone can do to stop it. Then you get back to your day job and talk of REF and impact factors and get bought back to earth with a bump.
The take home message of the conference this year seemed to be this: for open science to work, long term, reward mechanisms within the profession have to change in a comprehensive and profound way. Do I think this is possible? Of course. Do I think this is inevitable? Not by a long chalk. There are too many parties with a vested interest in things remaining the same, some of whom were represented here, despite all of the talk being about openness.
NPG certainly don’t seem that interested in opening things up too far, as the breakout session on APIs demonstrated. Nothing outside of their paywall was discussed, even more broadly applicable tools, like Connotea, seem to be quietly dropped in the background. The research councils are still more interested in “impact” (whatever that means) than genuinely original thinking.
But for all this pessimism, there are interesting things happening, and a mainstream breakthrough becomes more likely as the volume of those agitating for change grows. MaryAnn Martone‘s keynote was genuinely inspiring, a clear case for breaking down the garden walls. Michael Nielsen made a compelling case for wholesale revolution (however unlikely I think this sort of change may be). We showed that in an afternoon, you can set up a collaborative blog and populate it with interesting scientific content, using freely available tools. The interest we always encounter for the Knowledgeblog project enthuses me, and encourages me that something similar will make hay someday soon (even if we don’t manage to be the people who make the breakthrough).
It may be difficult for me to get to SoLo12, but I will try very hard to return, because I always leave with a smile on my face.
This is a cross-post from the Blogging for Science Online London group blog. During the Saturday workshop at Science Online London 2011, a bunch of us wrote content relating to Spinal Muscular Atrophy. My post was a short summary of a small scale drug trial, which shows promising results.
This is a summary of a paper that shows that Salbutamol promotes SMN2 expression in vivo (http://dx.doi.org/10.1136/jmg.2010.080366) .
Patients with Spinal Muscular Atrophy (SMA) have no functioning copy of the gene SMN1. The SMN2 gene can theoretically function in its place, but a change in this gene means that only a small amount of functional protein is produced from the gene.
It is therefore suggested that any intervention that can increase the level of functional SMN2 transcript could well be effective as a treatment for SMA.
Salbutamol is a short acting beta-adrenergic agonist that is primarily used for treating asthma. A previous study (http://dx.doi.org/10.1136/jmg.2007.051177) has shown that Salbutamol is effective in raising SMN2 full length (SMN2-fl) levels in cultured SMA fibroblasts.
In this study, the researchers administered Salbutamol to 12 patients with SMA, and measured the levels of SMN2-fl 3 times (0, 3 and 6 months). The levels of SMN2-fl were significantly increased in all but 3 patients after 3 months (average increase of 48.9%), and in all patients after 6 months (average increase of 91.8%). They also showed that patients with more copies of the SMN2 gene (some patients had 3 copies, some had 4) showed a larger response to Salbutamol treatment. This increase in expression cannot be explained by normal fluctuations over time in these patients, since studies have shown that levels of SMN2-fl are usually stable over time (http://dx.doi.org/10.1212/01.wnl.0000252934.70676.ab) (http://dx.doi.org/10.1038/ejhg.2009.116) . Clearly the big question now is whether this molecular response to the drug is reflected in a beneficial clinical response in the patient. This study does not address this question, but does propose that a full double-blind, placebo controlled trial should be carried out to ascertain whether or not this treatment is effective in treating the symptoms of SMA.
Tiziano, F., Lomastro, R., Pinto, A., Messina, S., D’Amico, A., Fiori, S., Angelozzi, C., Pane, M., Mercuri, E., Bertini, E., Neri, G., & Brahe, C. (2010). Salbutamol increases survival motor neuron (SMN) transcript levels in leucocytes of spinal muscular atrophy (SMA) patients: relevance for clinical trial design Journal of Medical Genetics, 47 (12), 856-858 DOI: 10.1136/jmg.2010.080366
Bibliography
Further to my last post, I am able to announce the availability of a position in the BSU, to work with me (it’s my old job!)
Official details are below, or you can find the full ad on the Newcastle University website.
Experimental Scientific Officer, Bioinformatics Support Unit
£27,428 to £35,788 per annum
Closing Date: 11 September 2011
The Bioinformatics Support Unit at Newcastle University is a successful cross-Faculty service providing high quality scientific support for a range of bioinformatics projects.
We require an Experimental Scientific Officer, with experience of a range of Bioinformatics techniques, to work in the Unit on the development and delivery of scientific projects and liaison with relevant academics.
You should have at least a first degree in a relevant science related subject and preferably a PhD. You will have previous experience in bioinformatics support and an understanding of UK research funding procedures.
For an informal discussion on this opportunity, please contact Dr Simon Cockell (Senior Experimental Scientific Officer).
The BSU website is a useful source of information on the kind of work we undertake. There’s a lot of analysis of high throughput data (as you would expect), but also opportunities to get involved with projects that have a bioinformatics research base. We support groups across the university, and beyond – in other north east universities and the local hospitals.
Archives
Categories
Tags
About Me Astronomy badscience BBC biosysbio Blog citations Conference creative-commons doom friendfeed kblog knowledgeblog lifefeed microblog MMR naming netbook news obama open-data Open Access personal politics posterous president protein-protein interactions proteomics Radio referencing Research Blogging Review science scienceisvital Software solo10 space statistics telescopes testing trivia twitter wiki wordle workTwitter
- Why Nikola Tesla was the greatest geek who ever lived http://t.co/ic6IodmQ #greader
- and it all started out so simply⦠#nclswc #conflictathon http://t.co/ub3TdjER
- Glad #nclswc is teaching Mercuial, best of all the DVCSs (IMHO). About to have a BitBucket conflict-a-thon.
- folks new to bash at #nclswc - man files are your new best friend, use them wisely :)
- Greycite: Citing the Web http://t.co/MxUx9PJ8 #greader
On Fuzzier Logic




