Site for sharing and archiving links.

  • fetches url titles and generates thumbnails
  • jGrowls embedded versions of Imageshack, Vimeo and YouTube urls
  • converts Twitter status urls to their full text and adds user thumbnail
  • generates Atom and RSS feeds
  • regex search
  • embeds Flash mp3 player for mp3 urls
  • looks good on iPhone
  • PubSubHubbub notification
  • plugin interface
  • rack interface
  • Gravatar support
  • imports Netscape bookmark format files

See http://urls.matthewm.boedicker.org/ for example.

Installation

Phusion Passenger

DESTINATION_DIRECTORY is the web directory to install the murlsh site to.


gem sources -a http://gemcutter.org/
gem install murlsh
murlsh DESTINATION_DIRECTORY
cd DESTINATION_DIRECTORY
edit config.yaml
rake init

Updating

If you are using the gem and it gets updated to a new version you should run the murlsh command again from your web directory to update plugins, javascript and css. It will prompt before overwriting anything in case you have made modifications.

Plugins

Classes in the plugins directory can be used to change behavior at certain points. Each class that extends Murlsh::Plugin and sets an instance variable called @hook will be called for that hook. Each plugin has a run() method that accepts arguments and returns something. These methods will be called in the order of their class names sorted lexically. Some hooks pass the output of their run() method to the next plugin for that hook so that the data can be passed through a chain of methods that each do something to it.

A lot of the standard behavior is implemented as plugins. See the plugins directory for examples.

Plugin hooks

Hook Description run() arguments Returns
add_pre called before a new url is saved url, config hash undefined
add_post called after a new url is saved url, config hash undefined
avatar called to get an avatar url from an email md5 sum avatar url, url, config hash avatar url
html_parse parse HTML using something like Hpricot or Nokogiri parseable parsed HTML, only first plugin is run (cannot be chained)
url_display_add called to display additional information after urls markup builder, url, config hash undefined

PubSubHubbub

Murlsh can notify PubSubHubbub hubs when a new url is added by adding them to config.yaml. The pubsubhubbub_hubs key is a list of hashes in the following format:


pubsubhubbub_hubs:
- publish_url: http://pubsubhubbub.appspot.com/publish
  subscribe_url: http://pubsubhubbub.appspot.com/

publish_url is where the notifications get sent subscribe_url is what gets put in the feed as link rel=“hub”

This will make updates to your feed show up in Google Reader instantly.

Design Goals

  • low effort required to add a url, get metadata programatically instead of requiring user to specify
  • allow customization with config and plugins
  • full regex search for finding saved urls
  • simple security (no sessions, no cookies)

Questions and comments: [email protected]