[links-list] Re: Bookmarks to XBEL converter

Fabio Bonelli fabiobonelli at libero.it
Wed May 8 15:04:47 PDT 2002


On Thu, May 09, 2002 at 12:01:07AM +0200, Fabio Bonelli wrote:
[...]

Err... Forgot the file. :-)

-- 
Fabio Bonelli <fabiobonelli at libero.it>
gpg fingerprint: 61E6 5442 3BDF EA0E 2D10  35A6 971B 77D1 DA7F 0F59
-------------- next part --------------
#!/usr/bin/awk -f
# Links bookmarks to XBEL (http://www.python.org/topics/xml/xbel/) converter.
# usage: links2xbel <bookmark >bookmark.xbel
# 
# Released under the terms of GPL version 2.
# mailto:<fabiobonelli at libero.it>

BEGIN {
	FS="|"
	print "<?xml version=\"1.0\"?>"
	print "<!DOCTYPE xbel"
	print "  PUBLIC \"+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML\""
	print "         \"http://www.python.org/topics/xml/dtds/xbel-1.0.dtd\">"
	ORS=""
	print "<xbel version=\"1.0\">\n\n"
	print "  <title>Links bookmarks</title>\n\n"
	ORS="\n"
}

/.*/ {
	print "  <bookmark href=\"" $2 "\">"
	print "    <title>" $1 "</title>"
	print "  </bookmark>"
	print ""
}

END {
	print "</xbel>"
}


More information about the links-list mailing list