I was wondering this, too. I tried and spent quite a few hours trying, but I was finally able to proceed. I discovered a few things that won’t be obvious to most people along the way, so I’m posting some steps here. You should be able to have this set up on a test server for a test yourself in no time. If anyone has found an alternate way to do it, please let me know.
First, I had wanted all of my bookmarks to be organized somewhat, and though there are some tagging extensions for firefox, a lot of them seemed too bulky. In retrospect, I could have tried some of them first.
I chose to use delicious.com
(formerly del.icio.us
) to tag my bookmarks for me. It seemed the simplest way to go about it, and most of the 1,500 bookmarks I had were known to that site, so tags were available. You will be able to use the firefox delicious extension, or import directly to their website.
They have an API, and hidden inside it is this URL http:// username:password@api.del.icio.us/v1/posts/all
which should get you to having your bookmarks, now with tags, as an xml file.
Next, you’ll use the script from here http://memografia.com/wordpress/delicious-to-wordpress-importer/ to import it as a blog. But you can’t put this script in your plugins directory and make it work! WordPress 3.0 changed the way they do the importers, BUT they left in some legacy support (though this isn’t really documented anywhere.) Simply make folder named ‘input’ in the wp-admin folder and drop the delicious.php file in there. (This works with any importer script that uses the register_importer() function.)
Now when you go to your dashboard and look under Tools>Import you’ll see that Delicious is an option. You can import the bookmark tags as categories or tags and it’ll make a post for each bookmark.
If anyone tries this out I’d love advice on what to do next. I reseached how to do this so I could get a handle on my bookmarks and comment on the ones that were most useful. I can do that, but if anyone knows of any plugins that would grab excerpts to flesh things out, please let me know. It is rather neat to have an archive of your bookmarks that can easily be sorted by time.
To be ON TOPIC on the QUESTION (firefox) i dont think the approach to use delicious as intermediate step is preferred because:
Therefore my approach is to a) export firefox to a “BOOKMARK” directory structure with each bookmark saved as URL. b) this bookmark directory is the actual heart and can be filled from other browsers, holds the hierarchical information and inside the .url files additonal meta information can be placed.
(At this stage I dropped the divider export in my current code)
From WordPress you can traverse through the directory structure an place it in WP.
What you will notice is that the links as currently in WordPress also lose the applied directory taxonomy (e.g. no hierarchical categories) and have no good meta table therefore I have chosen to make a side table for my link storage to retain this information (see other answer for steps after that).
The following might be the thing needed if you want to focus on exporting firefox first. once again: traversing through a physical directory and then reading this in e.g. a database table (wplinks) is out-of-the-box:
I hope I can give you clues to take this a step further.
1) What I wanted is an easier way to manage my bookmarks and enrich it with information that is already out there.
2) the different systems out there like Alexa, Delcious, StumbleUpon etc… not all give the information on a url level e.g. Alexa gives information on a higher level in the domain structure e.g. abc.def.com : you need def.com for the ranking or abc.def.com/whatever/rtc.php : for this you e.g. need def.com/user (like youtube). So you need both the domain structure and the relative url structure and have each single node of every possible url (both domain and relative) as an entry in the database to be able later to represent this and enrich this and you need the relations between each part in the url to be able to represent it.
I have written a class that loads in the official TLD structure and used this as root items in my database. So .uk gets the id 1 and .co.uk get a parent id 1. I used both the Mozilla list and other: source is the Mozilla Public Suffix List: http://publicsuffix.org/ but that is a bit outdated so you need to add to it
Now that I have the official TLD’s in there I have class that loads in the Alexa top 1.000.000 sites. This will link in the same way. Many of these are a sort of unofficial top level TLD’s. Since e.g. “google.com” is not as official as the TLD of some country but it seems more important. By doing that you will discover some patterns but also some exceptions e.g. you will find IP addresses that are populair. Each of these entries fills the field “Alexa Ranking”. (for performance I first load the .csv in a help table)
Alexa will force you to review the patterns so that is good (a good test set)
I have written a class that traverses my Firefox Databases (sql lite) and exports all urls in there as .URL in a hierarchical directory structure. It also exports the favicons whether they be .ico, .png, .gif etc… (see below). This is also read in the database. Since I update this a lot it sycns with the database described in 1 and 2. (in the beginning I also exported the dividers but I stopped doing that).
I have begun to just drag and drop bookmarks in this directory structure from other browsers e.g. from chrome I just drag a bookmark from the browser to the directory which also delivers that .url file. The directory structure of URL’s I have given extra properties e.g. (h) at the beginning of the name will lead to a “heart” e.g. one URL I particuarly like and #01# will place it at the top (or at least thats the way code further on handles it). I have placed this directory structure in a dropbox. I still have to write the code on the server to be in constant sync so the dropbox server part. (My WORDPRESS on the server counterpart constantly reads the URL directory structure for syncing and updating bookmarks as above but i now use ftp sync)
I have written classes for delicious (you need a MD5) and StumbleUpon to get not only the ranking (delicious=amount of bookmarks) (SU= amount of reviews and amount of pageviews) but also the TAGS and the description people use (why should I invent my own tags if people have already given them). Since you have a limit amount of calls you can do to these systems you need to spread it over time to enrich your database. (if you now go to delicious and look up a link see the right side and get an idea about the taxonomy of tags given to links)
I use the Google favicons provider (const GOOGLE_ICON_URL = ‘http://www.google.com/s2/favicons?domain=’;) to show the favicons BUT since Google does not have all the icons (e.g. not for facebook applications) I enrich the cache with the icons I exported from Firefox. For that you need a priority system build in which chooses the correct favicon over the other.
To cache this I have a caching structure that looks like the domain reversed for the . parts e.g. .com.facebook.apps.geochallenge and on a deeper level the relative path structure. In eeach directory in that cache structure I store the cache favicons. In a previous release I also store there the results of the calls to delicious and stumblupon.
It seems that this is WordPress out-of-scope but in fact (grin) it is very in-scope. The build-in link functionality has no good meta options / no meta table and it has some more restrictions like no hierarchical categories etc… Also you need to type in information in it itself while there are a lot of services which already categorize urls (e.g. dmoz) and give it tags etc… which have become sort of default.
So this lies “under” my WordPress site for handling my links.
I am making this setup with all the information of at least the top 1.000.000 plus sites to make the amount of calls less and to later on share this as a plugin. I have a stumbleupon plugin in the wp plugin db and that led to this. It can give you information on the external links you have in your weblog. There are a lot of plugins that give you information on SEO general but none which show you reports and comparions of e.g. ´what percentage of your outgoing links is in which category or popular or not etc..´. It also gives rankings to your incoming links and outgoing links etc. etc.