Justin Martenstein ([info]jmartenstein) wrote,
@ 2006-02-22 23:03:00
Previous Entry  Add to memories!  Tell a Friend!  Next Entry
del.icio.us -> LiveJournal
This is an automatically generated post to address Ario's RSS to Livejournal dilemma. I grabbed the last five links from my del.icio.us account through the RSS feed and then posted using the Livejournal API. You can check out the source for the script over here.

Stateless in Somalia, and Loving It
positive ecoomic overview of the lack of central government in Somalia; the possible downside is that Somalia may be a haven of Robb's Global Guerrillas
link

City of Seattle - Department of Planning and Development
link

The Unplugged - A Speculative Fiction
from WorldChanging
link

PressThink: Dick Cheney Did Not Make a Mistake By Not Telling the Press He Shot a Guy
Jay Rosen has the best analysis yet on the reasons behind how Cheney acted after he accidentally shot Whittington
link

The Futures Of Money
essay by Bruce Sterling from Forbes.com
link


(Post a new comment)


[info]jmartenstein
2006-02-23 07:05 am UTC (link)
There could be some formatting improvements, but I think it gets the point across.

(Reply to this)(Thread)


[info]interimlover
2006-02-23 07:18 am UTC (link)
brings a tear to my eye!

questions:

-- could you config it so you only get one post like this a day... that would include any new posts in the feed from the time of the last retrieval?

-- instead of "link," could you show the actual URL and have it be a hyperlink of itself? (having "link" is cleaner, but the full URL gives more context)

(Reply to this)(Parent)(Thread)


[info]jmartenstein
2006-02-23 07:00 pm UTC (link)
The main chunk of functionality that I left out is the "grab from the last time of retrieval". I just sucked down an arbitrary number of posts. But I don't think that would be too hard to add in.

I was also thinking that it might be nice to put in a flag that says "one post per link" or "digest link".

As far as the formatting goes, that should be trivial. It should be "user" customizable, but I don't know what's the best way to do that. XSLT, maybe?

If you want to discuss this further, I'll probably be at the XBox 360 UI thing tonight.

(Reply to this)(Parent)


[info]interimlover
2006-02-23 07:23 am UTC (link)
oh man, one ever cooler thing would be if you could show the tags as well. each unique del.icio.us entry would look like this in the LJ post:



[Error: Irreparable invalid markup ('<tag1,>') in entry. Owner must fix manually. Raw contents below.]

oh man, one ever cooler thing would be if you could show the tags as well. each unique del.icio.us entry would look like this in the LJ post:

<title>
<description>
<url>
<tag1, tag2, tag(n)>

each tag would then be a link to the page for that tag on del.icio.us.

so if the tag was seattle for example, the URL it would send you to would be this:

http://del.icio.us/interimlover/seattle

(Reply to this)(Parent)(Thread)


[info]jmartenstein
2006-02-23 07:01 pm UTC (link)
Not sure how to grab the tags out of the RSS feed - that might take some research.

(Reply to this)(Parent)(Thread)


[info]bostonsteamer
2006-02-23 08:11 pm UTC (link)
each rss item has this:

<dc:subject>cpan perl</dc:subject>
<taxo:topics>
  <rdf:Bag>
    <rdf:li resource="http://del.icio.us/tag/cpan"/>
    <rdf:li resource="http://del.icio.us/tag/perl"/>
  </rdf:Bag>
</taxo:topics>


So you've got two ways, either grabbing the space-separated list out of dc:subject, or grabbing what's after the final slash of each "resource" in taxo:topics/rdf:Bag/rdf:li

(Reply to this)(Parent)(Thread)


[info]jmartenstein
2006-02-23 09:33 pm UTC (link)
Good catch. I'm still figuring out how much I can do with XML::RSS...

(Reply to this)(Parent)


[info]interimlover
2006-02-23 08:40 pm UTC (link)
yeah, that's just a nice to have.

so how do i get this setup with my blog?

(Reply to this)(Parent)(Thread)


[info]jmartenstein
2006-02-23 09:23 pm UTC (link)
You need Perl set up on a machine. If you're doing this off of Windows, then I'd recommend using ActiveState Perl.

Grab the file that's linked in the post (or Joe's updated code). Then set up a Scheduled Task (or cron job on Linux) to run the following on a daily basis: 'perl lj_rss.pl '. Oh, and you probably need to change the username to interimlover.

It needs a bit of work to make it usable for other people. Maybe I'll get to that tonight.

(Reply to this)(Parent)


Create an Account
Forgot your login?
Login w/ OpenID
English • Español • Deutsch • Русский…