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 * generates json and jsonp feeds for client-side inclusion in other sites * regex search * uses HTML5 audio for mp3 and ogg urls * looks good on iPhone * PubSubHubbub notification * plugin interface * rack interface * Gravatar support * generates import scripts from delicious api exports See "http://urls.matthewm.boedicker.org/":http://urls.matthewm.boedicker.org/ for example. h1. Installation h2. 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
h2. Development
* Create a fork and check it out
* edit config.yaml
* rake init
* rackup
* open http://localhost:9292/
h1. 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.
h1. API
h2. Recent urls
* http://your_root/atom.atom
* http://your_root/rss.rss
* http://your_root/podcast.rss (urls with audio/mpeg content type)
* http://your_root/json.json
* http://your_root/json.json?callback=x (jsonp)
h1. 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|
h1. PubSubHubbub
Murlsh can notify "PubSubHubbub":http://code.google.com/p/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.
h1. 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: "matthewm@boedicker.org":mailto:matthewm@boedicker.org