How to REALLY Import your Delicious Links into Tumblr

I’ve been using Del.icio.us, the fabulous Joshua Schachter creation, as my linkrolling tool for a few years now. Although it can be a powerful tool for organizing and browsing through interesting URLs, I find I only use it for two things: saving links and displaying said links in the sidebar of Mike Industries. For that reason, there are probably any number of bookmarking services which would amply serve my meager needs.

One service that’s caught my eye recently is the increasingly popular Tumblr. I have friends who run their main blogs off of it and others who just run one of their multiple blogs off of it. I still like hosting my own WordPress blog and would never outsource this to a hosted service, but at the same time, running all linkblogging activity through a service like Tumblr sounds appealing — especially considering I can then pull all of that activity into my main blog using something like WP-O-Matic.

The super nice thing about Tumblr is how simple the posting interface is. The “Share on Tumblr” bookmarklet the company provides does a pretty good job of automatically figuring out what type of content you’re posting and treating it accordingly. In other words, if you seed from a YouTube page, the link gets posted as type “video” and is displayed accordingly. These sorts of interface niceties reduce the amount of work required to save links and thus encourage more linking activity. Both good things. The woefully inadequate “Press This” bookmarklet from WordPress just doesn’t measure up.

So… a couple of days ago when I decided I wanted to migrate all of my Del.icio.us bookmarks over to Tumblr, I couldn’t for the life of me find an automated way to do it. Tumblr has an import feeds feature but it is misleadingly named. It doesn’t actually import existing feeds. It only adds your feed URL and then posts any new items you add afterwards. This does nothing to aid in the migration of existing content over to Tumblr.

Using a combination of the Tumblr API sample code and some code I stole from Greg Neustaetter, I created a PHP script which imports all of your existing Del.icio.us bookmarkets into Tumblr.

Warning: I am not a PHP genius so I know the code isn’t pretty… but it works. It imported all 312 of my Del.icio.us bookmarks in under a minute.

In case you’re interested, here’s how to do it (caveat — you might want to do this on a fresh Tumblr account, just to be sure):

  1. Log into your Del.icio.us account.
  2. Hit http://del.icio.us/api/posts/all and save the file to your desktop as “delicious.xml”. Upload this file to your server.
  3. Upload Delicious-To-Tumblr.php to the same location on your server and edit the two lines in the file specifying your Tumblr email and password (to authenticate with the Tumblr API).
  4. Hit Delicious-To-Tumblr.php in your web browser and all of your entries will be imported.

Voila! Del.icio.us-to-Tumblr migration in about a minute. Enjoy.

22 comments on “How to REALLY Import your Delicious Links into Tumblr”. Leave your own?
  1. Bramus! says:

    Mike, thanks for the script! Alas, the downloadlink’s not working :(

  2. Joe Clark says:

    Yeah, but I want a Tumblr-to-Magnolia script. Can you heterosexually gin one of those up for me?

  3. Mike D. says:

    Bramus: Oops, thanks. I had a capitalization problem in my link. Fixed now!

    Joe: Hmmmm, shouldn’t be hard. I don’t use Magnolia a lot, but I assume they have an API. I’ll look into it when I find a sec.

  4. Mark says:

    Mike, I think the download link to the php script is still broken?

  5. Mike D. says:

    Mark: Really? Totally working for me. Tested in Safari and Firefox. What’s happening for you?

  6. Tigerblade says:

    It appears that the script only imports whatever the first tag on the bookmark is, and ignores the other tags. Any ideas on how to fix that?

  7. Mike D. says:

    Tigerblade: Interesting. It imported multiple tags for me. I wonder if maybe your tags are somehow set up differently than mine in Delicious. On the output screen when the script runs, do you see multiple tags or just one per entry?

  8. Mark says:

    Mike: Well I’ll be. Looks like maybe a “bug” in Firefox 3.1 Beta 2? I get Error 404 – Not Found. Guess “beta” means “beta”.

    I tried the link in both IE7 and Firefox 3.04 and it works just fine. Thanks!

  9. Tigerblade says:

    Mike: I see just one tag per entry on the output screen. Here’s the tag snippet from the XML…

    tag="list reference code web design to:tumble"

    So for this bookmark, only the tag “list” will be imported for some reason.

  10. Mike D. says:

    Tigerblade: Interesting. My delicious feed separates all my tags with commas. It looks like yours separates them with spaces. Will have to hack around that somehow.

  11. Tigerblade says:

    I should note that I briefly looked through the PHP… while it seems to loop through and fetch all the tags, the output page only prints the first one.


    $deliciouspost[tags][0] = trim($deliciouspost[tags][0],',');
    echo $deliciouspost[tags][0];

    But that shouldn’t matter because later on it takes the whole array and sends it to Tumblr, so… what am I missing?

    (in any case, thanks for this script! some of us are just too lazy to write it ourselves *ahem* me *ahem*)

  12. Mike D. says:

    Tigerblade: Funny, it turns out I’ve been entering tags “wrong” this whole time on Delicious. I would like to think comma delimiting used to be allowed and now it’s been ditched in favor of space delimiting, but I can’t say for sure. Anyway, I just modified the script so it handles both space and comma delimited tags automatically. I lightly tested it and it works. Try redownloading the script and let me know if it works for you now. Thanks.

  13. Emma says:

    didn’t understand any of that! ;o)

  14. j says:

    who came up with your color scheme? very well balanced.

  15. Ray says:

    Thanks for the post. I will try again when the script link is working.

  16. Mike D. says:

    Ray: What’s not working about it?

  17. Matt J says:

    not been having much luck with this.

    I saw in the php file the ‘Check for success’ bit – even if I put the wrong password in it doesn’t come up with the error message – any ideas?

  18. Mike D. says:

    Matt J: Hmmm, no idea. Unless Delicious or Tumblr changed something recently, it should work. That said, I wouldn’t be surprised if they did indeed change something.

  19. […] how to get Tumblr to import the entire contents of an RSS feed (not just recent entries), I found a nice solution using the Tumblr API and php. I then created a few separate Tumblr accounts for some page sets […]

  20. reverent1 says:

    The tumblr ‘feed import’ is very misleading.. And sadly they don’t offer any fee based importation!!! Any chance we can get an export.php with dropdown menu which lists: delicious, mixx or others, etc… ?

    Certainly would appreciate it!

  21. Lachlan says:

    Is there a way for this to work with the new Google Reader, there is an option now to export your Starred and Shared items to JSON XML.
    It could be useful since they killed the Share option.

  22. Blogger Paul says:

    Thanks, but I need a script to import from an ordinary RSS xml feed. I’m now trying to edit your php script if that is ok, if it is ready I will leave a comment again before I use.

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe by Email

... or use RSS