Code Sample |
#! /bin/bash # Title: convert_dillobm.sh # Author: WoofyDugfock on dsl forum # Date: 2005.03.17 Updated 2005.03.24 # Purpose: Converts dillo bookmarks file (bm.txt) argument into a standard html format akin to Firefox bookmarks #- suitable for importing into Firefox etc # Distribution: GNU GPL { cat <<EOF <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <TITLE>Bookmarks</TITLE> <H1>Bookmarks</H1> <DL><p> <DT><H3 ADD_DATE="1111700525" LAST_MODIFIED="1111701745" PERSONAL_TOOLBAR_FOLDER="true" ID="rdf:#$XZzXO3">Bookmarks Toolbar Folder</H3> <DL><p> EOF awk '/http/{$1="";print}' $1 | while read ADR TIT; do echo " <DT><A HREF=\""${ADR}\"" ADD_DATE="1111701745" LAST_CHARSET="UTF-8" ID="rdf:#$nsWFX">"$TIT"</A>" done cat <<EOF2 </DL><p> </DL><p> EOF2 } >dillobm_converted.html #output file exit 0 |