irclogs

command module
v0.0.0-...-7ab2adf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2014 License: MIT Imports: 10 Imported by: 0

README

irclogs - save and scroll irc logs

Archive messages from your irc channel, and scroll back through them. Something like botbot.

Usage

Clone the repository. Compile/Build binary with Golang.

 git clone https://github.com/ciju/irclogs.git
 go get
 go build

Execute it. The options available are.

$ ./irclogs -h
Usage of ./irclogs:
  -c="#astest": channel to connect to
  -h=false: Print console options
  -l=".": log directory, also to serve
  -p="3001": port to serve assets and logs
  -s=30: page size, to be served
  ...

Contribute

It works. But could be made much better. To contribute, follow the same instructions as above. Change the code, build it, run it, test it, and send pull requests.

Things that are in my mind.

  • better UX/UI
  • more efficient serving of logs
  • package as a single binary go-bindata

Technical Details

There are three parts to the server. From the irclogs.go file.

go logIRCMessages(p, *channel, quit)
go serveAssets("./assets")
go serveLogs(p, *page_size, quit)
  1. logIRCMessages: It logs the messages sent on the irc channel. Uses goirc to listen to a channel, and writes messages on to a text file for the particular day.

  2. serveAssets: This is the part serving the static content from the ./assets directory. Front-end is pretty straightforward. Except for the reverse scroll, which is a behavior to the infinite-scroll. Its available at reverse-infinite-scroll.

  3. serveLogs: This part is responsible for reading the log files and serving the lines, requested by the api. The implementation could be improved.

License

MIT

Sponsored by ActiveSphere

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
ircfilelog Logs all channel messages to the channel, into daily log files.
ircfilelog Logs all channel messages to the channel, into daily log files.
logserver Receives request for a range of lines.
logserver Receives request for a range of lines.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL