Every repository with this icon (
Every repository with this icon (
tree bf1ed588c7ea11d73cecfaebbe0908b3564bc335
parent c1b5c4df0e6780b195b2770f8ee2ec467165c55f
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Sat Mar 28 15:17:23 -0700 2009 | |
| |
MIT-LICENSE | Thu Mar 26 09:22:21 -0700 2009 | |
| |
README.rdoc | ||
| |
Rakefile | ||
| |
TODO.rdoc | ||
| |
application.rb | ||
| |
config.ru | Thu Mar 26 09:22:21 -0700 2009 | |
| |
environment.rb | ||
| |
lib/ | ||
| |
public/ | ||
| |
spec/ | ||
| |
sphinx.conf.example | ||
| |
views/ |
Mogo: A Planet-Style Feed Aggregator
Mogo combines multiple news feeds (or feed topic searches) into a single web page view, much like a typical "Planet"-style feed aggregator. It’s built in Ruby on top of Sinatra and DataMapper.
Configuration
Dependencies and all configuration is done in environment.rb. Your database is also set up here. DataMapper will use sqlite3 by default. Tests use the sqlite3-memory adapter (no configuration needed).
Getting Started
rake db:migrate rake feeds:add URL=http://blog.zerosum.org/feed/atom.xml rake feeds:update ruby application.rb
Adding Feeds
I’ll add a web interface for this soon. In the meantime, run rake feeds:add and specify the feed URL you want to add as a parameter. Example:
rake feeds:add URL=http://blog.zerosum.org/feed/atom.xml
Status Updates
Run rake feeds:update to update the cached feeds. You can schedule this as a cron job to fire every few minutes if you like.
Searching
We use Sphinx for full-text indexing and search. Therefore, you’ll need to have it installed. You can find downloads and installation instructions at www.sphinxsearch.com.
To enable search in Mogo, set the option in environment.rb. Search is disabled by default. I’ve only tested search with MySQL, so set your database connection string to a MySQL database you’ll create (default: ‘mogo’ with user ‘root’). Feel free to tune the sample configuration provided in sphinx.conf to your taste. You probably won’t want to use a passwordless root user in a production environment ;-).
Once that’s done, go ahead and run the supplied Rake tasks to get up and running:
rake sphinx:reindex # update the search indexes; you'll probably want to schedule this periodically rake sphinx:search:start # start it up rake sphinx:search:stop # shut it down
You should now be able to run application.rb and use the rudimentary search interface.








