del.icio.us --> wordpress
September 2, 2009 6:23 PM   Subscribe

Import delicious.com links to wordpress as 'blog entries' - how?

I do not want a feed of my delicious data in my wordpress. I want to migrate all of my delicious data to wordpress. There are plenty of tools to migrate other formats into wordpress. There's nothing particularly exotic about delicious data. I'm going to guess a tool doesn't already exist because of a mental disconnect. delicious is thought of as a bookmark service, wordpress is thought of as a blog / site manager. But my delicious data is made up of (short) 'blog entires' - title, URL, notes, date, categories, etc. Importing this data shouldn't be any more difficult than importing blogger data, for example. But I've been stumped for over a year, and those I've paid to find an answer for me have failed. delicious is not a tiny or obscure service, yet... I'm just not having any success. No success either in converting delicious to something else and then converting that something else to wordpress. Many thanks in advance.
posted by eccnineten to Computers & Internet (9 answers total) 4 users marked this as a favorite
 
You can get the last 100 bookmarks out of delicious via the RSS feed, then you can import RSS feeds into Wordpress. This is NOT a live feed. You actually save the RSS file to disk and then import that file to Wordpress.

If you need more than 100 bookmarks, the main problem you'll run into is that the only other export format for delicious is a Netscape HTML bookmarks file, which is antiquated. You would need to write some perl parser or such to convert that into a useful format that Wordpress can import.
posted by smackfu at 7:30 PM on September 2, 2009


smackfu: "If you need more than 100 bookmarks, the main problem you'll run into is that the only other export format for delicious is a Netscape HTML bookmarks file, which is antiquated."

You can get a XML file going to the API url using your login data. Of course, you still need to parse it but it should be easier.


And, if you are interested in importing the RSS feed (for the last 100 entries) you need to edit it to make WordPress recognize the categories, and edit the wp-admin/import/rss.php file to make WP actually show the link.

RSS feed changes:
Find & Replace: <category domain="http://delicious.com/username/"> for <category>

wp-admin/import/rss.php changes:
Find

$post_content = $wpdb->escape($this->unhtmlentities(trim($post_content[1])));

And add the following lines:

preg_match('|<link>(.*?)</link>|is', $post, $post_link);
$post_link = $wpdb->escape($this->unhtmlentities(trim($post_link[1])));
$post_content = '<h3><a href="'.$post_link.'">'.$post_link.'</a></h3>'.$post_content;


Change <h3> tags to whatever you need.

Disclaimer: I tried out the code and it works but YMMV.

posted by Memo at 8:10 PM on September 2, 2009 [1 favorite]


Response by poster: Smackfu: thank you! Yes, RSS is limited to 100 feeds. I have many, many more.
Memo: thank you! As of the past few days, the API url doesn't work any more. The code you wrote is clearly code, and I hope to find someone who can tell me what to do with it. Thank you!
posted by eccnineten at 6:44 AM on September 3, 2009 [1 favorite]


eccnineten: As of the past few days, the API url doesn't work any more.

That's weird. It takes a few refreshes but it works for me.
posted by Memo at 7:26 AM on September 3, 2009


Response by poster: Memo: Here's what I get...

This XML file does not appear to have any style information associated with it. The document tree is shown below.



<> fe06.api.del.ac4.yahoo.net uncompressed/chunked Thu Sep 3 20:20:43 PDT 2009
-->

posted by eccnineten at 8:21 PM on September 3, 2009 [1 favorite]


Response by poster: Memo: ... but a few refreshes later, success. Part of why I need to get my data off delicious is that they aren't able to work with the number of links I've posted. I love the service and will likely keep using it or start over with a second account. How many? Plenty, from a period of many years. So thanks!
posted by eccnineten at 8:25 PM on September 3, 2009 [1 favorite]


Memo: I tried this method and it worked great. I'd prefer the tags to map to categories, if that's possible, but so be it.

I was then able to export from a temp WordPress blog into my Movable Type blog.

I guess I just need to back up and then delete 100 del.icio.us entries to get the next 100?
posted by davextreme at 9:22 AM on September 5, 2009


Best answer: davextreme: "I guess I just need to back up and then delete 100 del.icio.us entries to get the next 100?"

The RSS feed only goes up to 100 posts so there's no way to use it for importing more than that number.


I had some free time and started hacking around the included importers in WordPress. The result is this Delicious to Wordpress importer [self-link with instructions and file]. It works with the API XML data and you can choose if you want to use the Delicious tags as WordPress tags or categories.

Disclaimer: Use it at your own risk as I can't support it. It shouldn't do anything catastrophic if it fails though.
posted by Memo at 3:14 PM on September 5, 2009


Response by poster: Memo: Thank you! I am importing my delicious links right now. This works, and nothing else has, and you are the first. Hooray!
posted by eccnineten at 7:36 AM on September 6, 2009 [1 favorite]


« Older Help me find a rangy router!   |   Applications for converting XML to Word / PDF? Newer »
This thread is closed to new comments.