/irclog-couchapp

A couchapp to view irc logs stored in CouchDB

Primary LanguageJavaScriptApache License 2.0Apache-2.0

IrcLog CouchApp

This is a CouchApp to view irc logs stored in a CouchDB database. The irclogs can be stored by my ircbot and its couchdb loging plugin for example, or anything else that will store them in the following structure:

{
  "sender": "SomeOne",
  "channel": "trollclub",
  "message": "hi hey, can I ask a question",
  "timestamp": 1283207105.891249
}

Install

couchapp push . http://localhost:5984/irclog

Use

Visit the canonical URL:

http://localhost:5984/irclog/_design/log/_rewrite

but probably it's better if you setup a vhost.

Setup vhosts

Go to the configuration page of CouchDB (it's right there on the right in Futon), and then click on "Add a new section", set vhosts as section, your domain name as option, and /irclog/_design/log/_rewrite as value. This thing in the config file will look like:

[vhosts]
irclog.example.tld = /irclog/_design/log/_rewrite

or with curl:

curl -X PUT http://localhost:5984/_config/vhosts/irclog.example.tld \
    -d '"/irclog/_design/log/_rewrite"'

Read the documentation about CouchDB Virtual Hosts for further info.

License

Apache 2.0