Thursday, December 16, 2010

Delicious Export HTML: Show Tags

There are rumors going around that Yahoo! is shutting down their Delicious social bookmarking site, and there are already a couple of posts describing how to preserve your bookmarks.  One of the most valuable aspects of bookmarks are your tags, and unfortunately when you export your bookmarks from Delicious, the HTML page that you download doesn't display the tags.

If it did, you would at least be able to open the web page and search for a specific tag.  The tags are there in the HTML source, but they aren't visible on the page.

Here's how to modify the page source to make them visible.  First, log in to Delicious, and go to the Export page in Settings.  Download the export file and save it.

Next, open the file in gVim (You can download gVim here).

Enter the following command.  You can either do this by typing it in, or by copying it from this web page (starting after the colon), typing the colon character ":", and then pressing Ctrl+V.  Here's the command:

:%s/\(<A HREF="[^"]*" .* TAGS="\([^"]*\)">[^<]*<\/A>\(\n.*\)\?\)/\1\r<DD><I>\2<\/I>/g

Press Enter.  This will apply the command.

 Next, save the file and exit gVim.  You can do that with the ":wq" command, but you can also just click the graphical "Save" icon.

No comments:

Post a Comment