Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] A quick hack to keep my important bookmarks

From: volker:nitsch:g:mail at: 17-Apr-2006 9:26

REBOL [ Title: "Little Bookmark-keeper" Version: 0.1.0 Purpose: "A quick hack to keep my important bookmarks." Usage: { Run script, edit bookmarks, save and quit editor, browser with bookmarks pops up. If your browser launches rebol-scripts automatically, the "rebol-edit" will launch this script again. Format for %bookmarks.txt: a line with url, some lines with text, an empty line. } Author: "Volker Nitsch" ] protect-system make-bookmarks: func [] [ bm: read %bookmarks.txt out: copy "" parse/all bm [ any [ copy url to newline skip copy text to "^/^/" 2 skip ( repend out [build-tag [a href (url)] text </a> <p> newline] ) ] rest: ] write %bookmarks.html join "" [ <html> <body> <center> <a href="bookmarks.r"> "Rebol-Edit" </a> " | " <a href="snap-edit.r"> "Snap-Edit" </a> <hr> </center> newline out </body> </html> ] browse %bookmarks.html wait 4 quit ] if not value? 'first-script? [ append ctx-edit [prefs-file: %prefs.r] editor %bookmarks.txt make-bookmarks ]