#! /bin/bash # PUBLIC DOMAIN # See http://www.purposeful.co.uk/software/places2bookmarks/ IFS=$'\t\n' conv(){ echo "$3
" sqlite3 -separator $'\t' "$1" "select moz_bookmarks.id, type, moz_bookmarks.title, url from moz_bookmarks left join moz_places on moz_bookmarks.fk=moz_places.id where parent=$2 and type in (1,2,3) order by position" | sed 's/&/\&/g;s/"/\"/g;s/\</g' | while read -r id type title url do if [ "$type" = 1 ] then echo "$3 $title" elif [ "$type" = 2 ] then echo "$3
" } echo $'\n