Donnerstag, 21. März 2013

Automated pubmed searching with RSS

If you're regularly searching pubmed on a particular topic, you can make your life a lot more comfortable using automated searches. Everything that is required is a web browser and a RSS-aggregator, such as the soon-to-fade-out Google Reader, feedly, or a Tiny Tiny RSS instance (if you're geek enough to set one up for this purpose).

Here's how it works:

  1. Go to pubmed.
  2. Type in your favorite search query.
  3. Click "Search".
  4. After the result appeared, click on the button "RSS" below the query field.
  5. Adjust the settings to your liking and click "Create RSS".
  6. Use the xml-link to subscribe to this search in your favorite aggregator.
Et voila, you're done! Next time you log in to your feed aggregator, you'll see all the new articles that match the query. The cool thing is, you don't have to check the search on a regular basis anymore - your feed aggregator will keep track on all the new results as they tumble in via the feed. Unread items will be highlighted. If you use a mobile client, you can use the time on the train to browse through the list and star interesting articles for later reading. 

You can take this a step further, and subscribe to TOCs from your favorite journals. Never face a pile of unread TOC alerts in your inbox again. Every decent journal out there offers an RSS feed. 

Replace Google Reader with Tiny Tiny RSS

Google Reader was an essential part of my workflow for keeping up with the literature. I had configured several PubMed-searches as RSS-Feeds. For example, I created an automated search for olf*. Hence, every time a new article appeared on pubmed that contained that term, it would appear in my Google Reader. That was extremely convenient, as I could simply log in to Google Reader whenever I felt like reading new stuff, then browse the RSS with the pubmed query, star interesting abstracts, download those articles and push them to my cloud storage where I keep the PDFs. 
Now Google announced to shut down the Reader Service. Booooooh, bad Google! However, I can't afford to let the decision of some internet company disrupt my workflow ;) So I looked for alternatives, and found Tiny Tiny RSS. TT-RSS is a server-side application to be installed on some webserver. It provides similar service as Google Reader, and even an Android client!
It took me two hours to set it all up, including dusting off my Mysql knowledge and learning how to use systemd. I got along mostly with the install instructions from the TT-RSS website. The only thing which took some time was figuring out how to set up a MySQL database for ttrss, and configuring systemd to run the update daemon. In the end it was pretty straightforward. 

Now my workflow's saved! Happy! ;) 

Note to self: Here's the systemd-service file that is required to start the update daemon for ttrss. To enable it, store it at /lib/systemd/system/ttrss-update.service, and enable it permanently using systemctl enable ttrss-update.service.

Description=Update daemon for ttrss

ExecStart=/usr/bin/php /srv/www/htdocs/feeds/update.php --daemon



!!! Update!!! (April 12.2013): the script was missing a second hyphen before -update, which caused the update to be run exactly once on startup, and never again. Fixed.

Second Update Oct 30, 2013: Added Restart flag to the service that takes care of firing the update daemon up again if it exits.