root/publicize-posts/cleanup-bookmarks.sh

Revision 1490, 409 bytes (checked in by jm3, 1 year ago)

pre-processor to clean up the bookmark format

  • Property svn:executable set to *
Line 
1 #!/bin/sh
2
3 # converts an exported HTML bookmarks file (e.g. exported from feedmelinks
4 # or delicious) to an easily parse-able, one-link-per-link format
5
6 # by jm3
7
8 f=$1
9
10 sed 'N;s/\n<DD/<DD/;P;D;' $f > /tmp/out
11 sed "s/<DT>/<post>/g" < /tmp/out | sed "s/A HREF/a href/g" | sed s/TAGS=/tags=/g | sed 's/LAST_VISIT="[0-9]*" //' | sed s/ADD_DATE/add_date/g | sed "s:</A>:</a>:g" | sed "s/<DD>/<note>/"
12 rm /tmp/out
Note: See TracBrowser for help on using the browser.