Howto: Post your Blogger comment actions on Twitter automatically

This tutorial shows you how to take a Blogger comment feed and output a new feed containing only your comments, formatted for twitterfeed. This is useful if you frequently comment on a Blogger blog and want your comment actions to be automatically posted on Twitter.

My last tutorial showed you how to use Yahoo! Pipes to filter a WordPress comment feed so that it outputs a new feed containing only your comments. However, Blogger comment feeds require more processing than WordPress comment feeds to make the RSS items presentable as a twitterfeed tweet. (If you want the WordPress version of this tutorial, see the previous tutorial.)

The method in this tutorial creates the title of the feed item based on the blog post’s URL. For example, if I commented on Sweden expected to legalize gay marriage in May 2009 which has the URL http://gay-persons-of-color.blogspot.com/2009/01/sweden-expected-to-legalize-gay.html, the final tweet would be “commented on Sweden expected to legalize gay” with the URL appended at the end as a TinyURL link. Although the item title may not perfectly match the title of the original post (“Sweden expected to legalize gay” vs. “Sweden expected to legalize gay marriage in May 2009”), this method is easier and faster than extracting the real post title.

What you will need

Instructions

First create a customized Blogger comment feed with Yahoo! Pipes, then add the processed RSS feed to your twitterfeed account.

How to create a customized Blogger comment feed using Yahoo! Pipes

  1. Log in to Yahoo! Pipes.
  2. Click on “Create a Pipe”.
  3. On the left side menu, open up the “Sources” submenu and drag “Fetch Feed” into your work area.
  4. In your “Fetch Feed” module, paste the URL of the Blogger comment feed into the text field.
  5. On the left side menu, open up the “Operators” submenu and drag “Filter” into your work area.
  6. Pipe the “Fetch Feed” module into the “Filter” module.
  7. On the first row of the “Filter” module, choose “Permit” and “all”.
  8. In the “Filter” module, under “Rules”, choose “item.dc:creator”, “Contains”, and your handle (e.g., for me, it is “Restructure”).
  9. From the left side menu, the “Operators” submenu should be open. Drag the “Rename” module into your work area.
  10. Pipe the “Filter” module into the “Rename” module.
  11. In the “Rename” module, choose “item.thr:in-reply-to.href”, “Copy As”, and input “title”.
  12. From the “Operators” submenu, drag the “Regex” module into your work area.
  13. Pipe the “Rename” module into the “Regex” module.
  14. In the “Regex” module, choose “item.title” in the drop-down menu. In the text field after “replace”, paste “^http.*d{4}/d{2}/” (without the quotes). Leave the text field after the “with” blank.
  15. In the “Regex” module, click on the plus sign to add a new rule. In “item.title”, replace “.html$” (without the quotes) with a blank.
  16. In the “Regex” module, click on the plus sign again to add a new rule. In “item.title”, replace “-” with ” ” (without the quotes). Note that this is a space, not a blank like in the previous two rules. Check off the “g” box.
  17. In the “Regex” module, add a new rule. In “item.title”, replace “^(.)” with “commented on U$1L” (without the quotes).
  18. Pipe the “Regex” module into the “Pipe Output” module.
  19. Click on the “Pipe Output” module and check the Debugger at the bottom of the screen to make sure your new feed looks correct.
  20. Save.
  21. Click on “Run Pipe…”
  22. Get as RSS.

Pipes source for filtering Blogger comment feeds. Pipes output for filtering Blogger comment feeds.

How to add an RSS feed to twitterfeed

  1. Log in to twitterfeed.
  2. Click on “Create new feed’.
  3. Enter your Twitter username, password, and the URL of the RSS feed you created.
  4. Choose your update frequency as “Every 30 mins” and post up to 5 new updates each time.
  5. Include “title only”.
  6. Include item link and shorten link through TinyURL.
  7. Post new items based on “GUID” and make sure to select “Feed is sorted”.
  8. The rest of the options should be set correctly by default.
  9. Click “Create”.
  10. Wait up to 30 minutes until your first auto-tweet appears on Twitter.

How to pipe your comments from multiple Blogger blogs into your Yahoo! Pipe

If you successfully created your customized Blogger comment feed in Pipes, you may want to track your comments on multiple Blogger blogs. You can modify your Pipe by adding more “Fetch Feed” modules, adding the “Union” module (under “Operators”), and adding the “Sort” module (under “Operators”).

Below is a screenshot of my modified Pipe source which combines my comments from multiple Blogger blogs.

Pipes source for multiple Blogger comment feeds.

Notes on Regex

The Regex module in this Pipe takes in a comment feed in which a comment’s title is a Blogger post URL.

  • Replacing “^http.*d{4}/d{2}/” with a blank means that the rule removes the “http…/####/##/” at the beginning of the title. E.g., “http://transgriot.blogspot.com/2009/02/online-discourse-frustrations.html” becomes “online-discourse-frustrations.html”
  • Replacing “.html$” with a blank means that the rule removes the “.html” at the end. E.g., “online-discourse-frustrations.html” becomes “online-discourse-frustrations”.
  • Replacing “-” with a ” ” should be obvious. The “g” is checked off so that it replaces all instances of “-” with a ” “, not just the first instance. E.g., “online-discourse-frustrations” becomes “online discourse frustrations”.
  • Replacing “^(.)” with “commented on U$1L” means that the rule adds “commented on ” to the front of the title, makes the first character uppercase, and leaves everything after as lowercase. E.g., “online discourse frustrations” becomes “commented on Online discourse frustrations”.

You can learn more about regular expressions at Regular-Expressions.info.

Update 2009/07/10:

The actual Pipe that I use to track my Blogger comments is published here. You need to have a Pipes account to see the source. You can also follow me on Twitter.

3 Responses to “Howto: Post your Blogger comment actions on Twitter automatically”

  1. RaiulBaztepo Says:

    Hello!
    Very Interesting post! Thank you for such interesting resource!
    PS: Sorry for my bad english, I’v just started to learn this language ;)
    See you!
    Your, Raiul Baztepo

  2. Parthipan Says:

    Hi,

    Twitter is peak now, you chose the well topic and done your job perfectly.

    Thanks

  3. mastepoc Says:

    Где-то я уже видел подобную статью.Вы случайно не с рунета её скачали?


Comments are closed.

%d bloggers like this: