Update on antisocial bookmarks

Print Friendly

About once a month I publish an entry about what I’ve been calling antisocial bookmarks, the saving of links to articles, blog entries, websites, and documents to a blog without using a service like Delicious or Diigo. My last entry, at the end of August, was called “More thoughts on using WordPress for antisocial bookmarks” and contains most of the background on this thread. I’ll assume you’ve read that if you are interested in what follows.

First, I’m definitely not doing anything with Drupal on this right now. The bookmarks are to be published in my WordPress blog and I can’t convert that to Drupal any time soon, nor do I necessarily want to do so. Drupal is very powerful, especially with CCK and Views, but is probably overkill. Also, Drupal 7 will be out soon, so I don’t want to do any serious coding in Drupal 6 right now.

Second, I put together some PHP code to help assemble the information for a bookmark, using the fields I described in the last blog entry.

Empty Bookie page

This is very much a work in progress. The idea is that you paste in the URL of the web item you want to bookmark and then the software tries to figure out as much of the other information as possible. Digg, Diigo, Reddit etc all do similar things.

The category is not some arbitrary keyword but rather an actual category in my blog. For now I’ve hardcoded in a list of the categories and their WordPress ids, but eventually I’ll generalize this to do a dynamic lookup using the WordPress XML-RPC APIs. Presumably I could do the same with tags.

Here’s an example of what is retrieved from a URL from a recent CNet blog entry by Matt Asay:

Retrieved info Bookie page

The comment will always be blank as that is something I would add manually. I need to add some smarts to guess at the category and the type (that is, article, blog entry, document, or website). The author field is trickier because there are no real standards on how the author is specified in an HTML page. Presumably I could guess and look for “by …” or for specific meta tags in, say, New York Times articles. The point is that much of this automatic “filling in the blanks” must be done heuristically and based on the specific source.

Here’s the form with more information added manually and some edits:

Edited Bookie page

Right now I’m guessing at the excerpt based on description attribute on a meta element in the HTML. I would probably cut and paste different information into that field for a given bookmark. If I were to create a JavaScript frontend to this, I could grab any selected text on a page and stuff it into the excerpt. Diigo does something like this.

The “Format bookmark information” button produces HTML which looks like the following in my blog:

Open Source

Zimbra notches 100 percent growth
CNet / Matt Asay

image for bookmark

Yahoo may not know what to do with Zimbra, but with 50 million paid mailboxes and counting, Zimbra clearly knows how to build a business.

A nit here is that I’ve arbitrarily set the image width to 100 for consistency, but that might be too wide for smaller images. Note to self: fix.

What would make this more interesting in the long run is to save up the bookmarks and then publish them at some set frequency into the blog. I could keep this as a completely separate application with its own database, but I think it would be smarter to take the existing code, enhance it, and then create a WordPress plugin. The bookmark information would be maintained in the regular WordPress database until it was successfully published in an entry, and then it would be cleared. The display above would be modified so that it worked in the WordPress administrative panel.

As I said, this is a work in progress and very much a side, fun project in my spare time. It’s already made my life easier for the “Daily Links” I put up in the blog, so it’s been time well spent so far, even if I get no further.


Comments are closed