Chat Relater is a tool consisting of two command-line scripts:
- The analyzer extracts user relations from chat logs. The gained data is serialized as JSON.
- The visualizer takes that data, generates a DOT file, and calls the GraphViz application to render the graph in the requested output format (e. g. PDF, PNG, SVG).
It is actually a conceptual clone of the PieSpy Social Network Bot. However, Chat Relater does not act as an IRC bot (although this could be easily accomplished by making use of the irc package), but therefore allows to be run on any logfiles that produce similar output to those created by XChat. Of course, this includes logs from Jabber, SILC or any other communication (but it might require some minor changes to the log reader).
Python 3.7 or later is required.
Chat Relater can be installed via pip:
$ pip install ChatRelater
Run the analyzer on one or more log files, saving the intermediate results to another file (chat.json):
$ chatrelater-analyze -o chat.json chat_today.log chat_yesterday.log
Create a nice graph (using the 'twopi' program) from the results (chat.json) and save it to a PNG image (graph.png):
$ chatrelater-visualize -f png -p neato chat.json chat
And intermediate file containing the 'dot' description (graph) will be created in the process.