Archive messages from your irc channel, and scroll back through them. Something like botbot.
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
...
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
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)
-
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. -
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. -
serveLogs
: This part is responsible for reading the log files and serving the lines, requested by the api. The implementation could be improved.
Sponsored by ActiveSphere