[PLUG] Porting IE Bookmarks to Galeon
Cooper Stevenson
cooper at cooper.stevenson.name
Sat Jul 12 08:21:02 UTC 2003
I wrote this simple bash script (oh, how I pined for 'emerge pdksh') to
convert exported IE bookmarks to Galeon. It turns this:
[DEFAULT]
BASEURL=http://accounts.keybank.com/
[InternetShortcut]
URL=http://accounts.keybank.com/
Modified=E064CB6ECCAEC201BA
Into this...
<bookmark href="http://accounts.keybank.com/">
<title>Key Bank - Online Banking</title>
</bookmark>
Simply change the top two variables to suit your needs and place the
output in your ~.galeon/bookmarks.xbel file.
May you find it useful...
#--------------Begin script----------------------
#!/bin/bash
favorites_directory=directory/that/holds/your/exported/bookmarks
output_file=file/to/hold/results
find "$favorites_directory" -printf %f\\n | while read file
do
if [[ -f "$file" ]]
then
grep URL "$file" | awk -F '=' '{ print $2 }' | while read url
do
echo '<bookmark href="'"$url"'">' >> "$output_file"
echo ' <title>'"$file"'</title>' >> "$output_file"
echo '</bookmark>' >> "$output_file"
done
fi
done
#----------------------End Script------------------------------------
More information about the PLUG
mailing list