Git Product home page Git Product logo

irc-log-viewer's Introduction

irc-log-viewer Build Status

This is a viewer for IRC logs which are stored in a CouchDB. It's basically a couchapp using Ember.js. Demo? Here you go: http://emberjs.iriscouch.com/irc/_design/viewer/index.html (transcript of #emberjs channel)

Awesome stuff used

Stored IRC messages

The IRC messages saved in the CouchDB have the following format:

{
   "user": {
       "id": "123",
       "name": "GOB"
   },
   "text": "Come on!",
   "date": "2012-12-21T12:34:56.789Z"
}

One example of filling the CouchDB with the IRC messages would be a Hubot configured with the store-messages-couchdb.coffee script and using an IRC Adapter

CouchDB Views

The messages view returns all messages, where the key is the date structured as an array with the year as first element, month as second and so forth. This allows you to get messages for a specific period.

Front end

Inside the app folder is the basic application.

Development

Prerequisites:

  • installed Ruby
  • installed CouchDB where app can be deployed or use a free hosting service like the excellent Iris Couch
  • installed couchapp command line tool for easy pushing of the app to a CouchDB, see installation

Developing

or

  • Execute bundle execute rake test to run the tests from command line

Deploy

  • execute bundle exec rake build
  • push the Couchapp to your CouchDB; if you have couchapp installed, do a couchapp push http://localhost:5984/irc
  • access the IRC log viewer at http://localhost:5984/irc/_design/viewer/index.html

irc-log-viewer's People

Contributors

pangratz avatar stuartf avatar onkel-dirtus avatar

Stargazers

Valera Rozuvan avatar Angus H. avatar Martin Broerse avatar Jakub avatar Victor Konopelko avatar Viyat avatar  avatar Gaurav  avatar Tomáš Horáček avatar Nestor G Pestelos Jr avatar Pauli Price avatar James Smith avatar Chris Braddock avatar Dark avatar seunggi avatar Jesper Andre Lyngesen Pedersen avatar  avatar Travis Sinnott avatar Roy Daniels avatar Jim Myhrberg avatar Zhong Jianxin avatar Russell Jones avatar

Watchers

 avatar

irc-log-viewer's Issues

Uncaught TypeError: Cannot read property 'text' of undefined

When accessing some entries which have an empty string as message text.

Uncaught TypeError: Cannot read property 'text' of undefined
IRC.set.Ember.ArrayProxy.extend.addMessageirc/controller:6
IRC.set.Ember.Object.create.loadDay.$.couch.db.view.successirc/main:26
IRC.set.Ember.Object.create.loadDay.$.couch.db.view.successirc/main:25
$.ajax.$.extend.$.extend.completejquery.couch.js:661
jQuery.Callbacks.firebpm_libs.js:2178
jQuery.Callbacks.self.fireWithbpm_libs.js:2296
donebpm_libs.js:8546
jQuery.ajaxTransport.send.callback

All objects in question can be retrieved via map function:

function(doc) {
  if (!doc.text && !doc.message) {
    emit(null, doc);
  }
}

improve README

  • add background of this couchapp
  • how to build this?
  • how to develop and test?

couchapp push doesn't work

When running couchapp push https://user:[email protected]/irc I get an error:

2012-07-03 12:50:40 [ERROR] couchapp error: You aren't in a couchapp.

Running couchapp version says:

Couchapp (version 1.0.1)
Copyright 2008-2010 Benoît Chesneau <[email protected]>
Licensed under the Apache License, Version 2.0.

Date Key in JSON is null

Here is what I see in the messages via the app

{"id":"2d534b79f5b3a49900030ce0010394a1","key":[null,null,null,null,null,null,null],"value":1,"doc":{"_id":"2d534b79f5b3a49900030ce0010394a1","_rev":"1-378711d7c2b7856acfc9a5b026566ddd","user":{"id":"1357310172534","name":"vachon","room":"#dev","roles":["ops"]},"text":"yes","done":false,"room":"#dev","date":"2013-01-25T16:37:46.387Z"}}
]}

When looking at couchbase, you get:

{
   "_id": "2d534b79f5b3a49900030ce0010394a1",
   "_rev": "1-378711d7c2b7856acfc9a5b026566ddd",
   "user": {
       "id": "1357310172534",
       "name": "vachon",
       "room": "#dev",
       "roles": [
           "ops"
       ]
   },
   "text": "yes",
   "done": false,
   "room": "#dev",
   "date": "2013-01-25T16:37:46.387Z"
}

It looks to me like the date is no longer being parsed and blowing up.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.