GithubHelp home page GithubHelp logo

archaic's Introduction

Archaic

By Andrew De Ponte (a.k.a. cyphactor)

Archaic is a simple Rails front-end application combined with a Cinch based IRC Bot that is designed to assist in archiving and analyzing a chat history. The Rails web interface simply provides views for viewing and analyzing the chats that the IRC Bot records.

Getting Started

Install Dependencies & Migrating Database

First things first you of course have to install all of the dependencies using bundler. This can be done with the following command at the root of the project:

bundle install

Once all the dependencies have successfully been installed you then need to make sure that the database schema is up to date. This is done by running the following:

rake db:migrate

Configuring Archaic

To configure Archaic you need to create a configuration file called ArchaicConfig.rb in the projects config folder. This file is ignored by the git repository and is not intended to be tracked. It is specifically here for you to have your own personal Archaic configurations in. The config/ArchaicConfig.rb file should look something like the following:

require 'archaic_config'

Archaic.config do |c|
  c.irc_nick = "dev_arch_bot"
  c.irc_server = "irc.freenode.net"
  c.irc_channels = ["#archaic_dev"]
  c.ticket_url = "http://github.com/cyphactor/archaic/issues#issue/:ticket_id"

  c.brew_url = 'http://www.tustinbrewery.com/'
  c.brew_regex = /<div class="brew-name">(.*?)<\/div>/
  c.brews_to_hide = [/guest beers:/, /\*Check out our bottle list/]
end

Please replace the values for each of the configuration options shown above with the values that are appropriate for you. The above are simply the default values that are used in the case where you neglet to provide a config/ArchaicConfig.rb file.

Launching/Monitoring the Archaic IRC Bot Daemon

Once you have installed all the dependencies, migrated the database, and configured Archaic you are ready to run launch and monitor the Archaic IRC Bot Daemon.

Currently Archaic is split into two main components the front-end Rails application portion of things and the backend IRC Bot portion. The IRC Bot portion is a daemon process that is managed by god. Therefore, you can kick it off and god's monitoring of it by doing the following:

god -c config/archaic.god

The above should startup god if its not running and god should then startup and start monitoring the archaic irc bot. You can see the status of things with respect to god by running the following:

god status

If you are interesting in seeing what god is doing with respect to the archaic irc bot you can run the following:

god log archaic-irc-bot

Running the Rails App Front-end

The Rails application portion should be run as any other rails application would be. In development it is as simple as the following:

rails server

Runtime Dependencies

  • rails-3.0.3
  • sqlite3-ruby
  • cinch
  • daemons
  • god

Included Bot Plugins

TBC

Simply send 'tbc' to the chat to have Archaic return a list of brews currently offered by The TBC.

Quote Grabber

The Quote grabber allows you to 'grab' the last thing said by a particular user and store it to a personal list of quotes. Once you've grabbed a quote, you can retrieve that quote at any time. Commands related to the use of Quote Grabber are below:

quotegrab grab nick Grab the last statement made by nick

quotegrab list [nick] Without passing a nick, this will provide a list of all grabs performed by the user. Given a nick, it'll limit the list to only those grabs performed on nick

qoutegrab fetch user index Fetches the quote by user at index index is either an integer, (obtainable by calling quotegrab list nick), or the word 'random', which will select a random quote by that user.

quotegrab delete index [user] Deletes the quote at index either from that user's 'universal' list, or, if the optional user argument is provided, from the list of quotes made by the referenced user.

archaic's People

Contributors

cyoungberg avatar drewdeponte avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

cyoungberg

archaic's Issues

Add pagination to the Messages View

Currently there is no pagination on the Messages View and it simply shows all the messages in the database with the most recent at the top. This should have some limitation to the number that is presented to the user and it should have a pagination to allow you to see the other pages of messages.

Replace the README with a README.markdown that is more fitting

More fitting in this case means is clean, well organized, explains the purpose and the general README stuff. For an example of this checkout out http://github.com/mojombo/jekyll. There is nothing special about the jekyll README it is just one of a huge number of projects that have what I would consider a decent README. Note: Installation and other things are broken out into Wiki pages as should archaics for cleanliness and organizational reasons.

Add ticket helper functionality to the irc bot.

Basically, functionality should be added so that when the IRC Bot sees a ticket reference in the syntax of # followed by 1 or more digits that it creates the appropriate URL to get to that ticket and posts a message with that url to the chat.

This should support any ticketing service that uses numbers to match their tickets and has a URL to get to a given ticket given its number. Hence, somehow through the configuration of this app there needs to be a way to specific the ticket url and a placeholder for the number in that url so that when the bot finds a ticket reference it can simply replace the placeholder and paste the url.

Add support for context relative to match.

It would be nice if there was a way to see context around each of the messages that matched the search criteria as well as a way to adjust that context as needed. So, for instance if I searched for something and found the chat message in history but I don't know what was said before or after that message. It would be nice if there was a nice javascript interface where I could click on a message that was found and bring it up in a model with scrollable context.

So, the modal would popup with matched message in the center and highlighted some how and then you could use the wheel to scroll up or down in history. There should also always be a way to jump back to the matched message.

Make it so the channels which the bot connects to is configurable

The channels which the bot connects to needs to be configurable at an application level rather than having to change code. Maybe this could be done via an extra initializer since in order to run the bot there is already a requirement of running it through rails runner.

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.