Skip to content

Instantly share code, notes, and snippets.

@bryanthompson
Created September 29, 2010 04:49
Show Gist options
  • Save bryanthompson/602305 to your computer and use it in GitHub Desktop.
Save bryanthompson/602305 to your computer and use it in GitHub Desktop.
To use with newsbeuter, drop this in your ~/.newsbeuter/config
bookmark-cmd "~/Documents/delicious-bookmark.rb"
Then when you find a story you want to bookmark, hit ctrl+b. Edit the URL and title if necessary.
If you want to add additional tags, put them before your description separated by spaces,
then include a |pipe| character. Example:
description:
toread madebymarket cms | This is the actual description I want to save.
#!/opt/ruby-enterprise-1.8.7-2010.02/bin/ruby
# by bryan thompson - bryan@madebymarket.com
require 'rubygems'
require 'www/delicious' # from http://github.com/weppos/www-delicious
url, title, description, tags = ARGV[0], ARGV[1], ARGV[2], %w(savedrss)
if description =~ /(.+)\|(.+)/
tags = tags + $1.split(" ")
description = $2
end
d = WWW::Delicious.new('bryanthompson', 'paaaaaassword')
d.posts_add(:url => url, :title => title, :tags => tags, :notes => description)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment