Quote:
|
Originally Posted by robbym
I looked at this option early on but it didn't seem to fit my needs. From what I can tell del.icio.us gives users the option to either upload single urls or import/export bookmarks files but no option to upload batches of urls.
|
A little bit of script-fu can make it all work -- the Del.icio.us import is looking for a simple HTML file, which you could easily construct to be created from your list of URLs, depending on the format it's in. Let's assume you have a text file with two columns:
TITLE <tab char> URL
Using a bit of 'awk' scripting (which will work on Linux and Mac without any problems, and you can download awk.exe and cat.exe for Windows easily) you can parse this file into an HTML doc that's easy to upload. (you could also use perl)
Code:
# set our file separator to TAB, print out the header
BEGIN {
FS = "[t]";
print "<!DOCTYPE NETSCAPE-Bookmark-file-1>";
print "<TITLE>Bookmarks</TITLE>"
print "<H1>Bookmarks</H1>"
print "<DL><p>"
print "<DT><H3>Del.icio.us</H3>"
print "<DL><p>"
}
# main loop, $1 = title $2 = url
{
print "<DT><A HREF=\"$2\">$1</A>"
}
# file footer
END {
print "</DL><p>"
print "</DL><p>"
}
Save that as like 'delbook.awk', and you use it like so:
Code:
cat bb_urls.txt | awk -f delbook.awk > delimport.html
Replace cat with cat.exe and awk with awk.exe if you download those and do it on Windows. The above is a template I wrote off the top of my head, so no testing -- it could easily be enhanced to handle a more complex text file, I tried to keep it simple and straightforward to get the idea across.
Personally I would think you keep everything in a spreadsheet (XLS), and then use the spreadsheet export function to a tab-delimited file which could be parsed in a million ways, one of which could be for your posting to a forum! Standardize the data (typically called 'normalization' in programmer-speak) and let code transform it into the need at hand.