Ian Sinke

Posts Tagged ‘Recommended Reading’

The Recommended Reading feature is moving

In Internet, Miscellaneous, Recommended Reading on Saturday, October 4, 2008 at 12:13 pm

…to ma.gnolia.com.

In the past, I provided here, Saturdays, a list of my favorite blog posts and other online content from the week. It worked, I guess, but it was a pain to compile. So I finally decided I needed something new.

Ma.gnolia is a “social bookmarking” site, a lot like Delicious.com, but better looking. It allows you to bookmark sites, with rating, tags, and descriptions, and other people can subscribe to it. Hopefully this combination will be the perfect blend between full blog articles and little John Gruber-esque snippets that I’m looking for.

If you’d like to subscribe to my ma.gnolia feed (and I recommend that you do), it’s right here.

Recommended Reading #6

In Recommended Reading on Saturday, September 27, 2008 at 2:11 pm

Recommended Reading #5

In Recommended Reading on Monday, August 25, 2008 at 7:18 pm

Recommended Reading #4

In Recommended Reading on Thursday, July 24, 2008 at 9:25 am

Recommended Reading #3

In Recommended Reading on Tuesday, July 15, 2008 at 3:42 pm

Recommended Reading #2

In Recommended Reading on Tuesday, June 10, 2008 at 8:05 pm

How the Recommended Reading Feature Works

In Internet, Recommended Reading, Software on Thursday, April 10, 2008 at 11:04 am

I recently introduced a new feature: Recommended Reading. My goal for this feature was to be able to take a list of my favorite blog posts from Google Reader and automatically post them to my blog with a python script. The way I eventually implemented this was by ripping the Atom feed from my Google Reader Shared Items Page, take each item in it and format it as a <ul>, and then post it to my blog using XMLRPC/metaWebLog. Here’s the script, commented for your reading pleasure.

# Import a bunch of things we'll need.
# feedparser is from http://www.feedparser.org/
import feedparser
import time
import xmlrpclib
from xml.dom import minidom
from pprint import pprint

# Defines how to post to the blog.
def blogPost( server, username, password, date, title, content ):
datastruct = {'pubDate': date, 'description':content, 'title':title}
returncode = server.metaWeblog.newPost('1',username,password,datastruct,1)
print returncode

# Initialize some details.
# You would need to put your real blog url, username, and password here, though.
servname = xmlrpclib.Server("http://iansinke.wordpress.com/xmlrpc.php")
username = 'xxxxx'
password = 'xxxxx'

# Check to make sure it's working.
pprint(servname.system.listMethods())

# Set up the post data.
Title = "Recommended Reading"
Date = ""
Content = ""

# Parse the feed.
# You would need to replace the URL with your google reader account's \
# shared page URL, or some other RSS or Atom feed.
f = feedparser.parse("http://www.google.com/reader/public/atom/user/15838963114361614548/state/com.google/broadcast")
ontent = Content + '<p>(Every Friday, I post my favorite blog posts of the week under the title "Recommended Reading".)</p>'
Content = Content + '<ul>'
for item in f.entries:
Content = Content + '<li><a href="' + item.link + '">' + item.title + '</a></li>'
Content = Content + '</ul>'
Content = Content + '<p> </p>'

# Post to the blog.
blogPost(servname, username, password, Date, Title, Content)

This took me about two hours to figure out and implement. Feel free to use it however you want.

Recommended Reading #1

In Recommended Reading on Thursday, April 10, 2008 at 10:48 am