Analyze and visualize relations between chat users.
Project description
Chat Relater
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).
The GraphViz usage is pretty basic and output may be improved somehow, but so far, the graphs created by PieSpy look much nicer.
Requirements
Python 3.7 or later is required.
Chat Relater can be installed via pip:
$ pip install ChatRelater
Tests
Install the test dependencies:
$ pip install -r requirements-test.txt
Install the local source files as package in development mode:
$ pip install -e .
Run the tests:
$ pytest
Usage
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.
- Copyright:
2007-2021 Jochen Kupperschmidt
- License:
MIT, see LICENSE for details.
Chat Relater Changelog
Version 0.4
Released 2021-02-28
Added support for Python 3.7, 3.8, and 3.9.
Removed support for Python 2.7, 3.3, and 3.4.
Removed tox. Different Python versions are tested on Travis CI.
Require graphviz >= 0.15 for Python 3.9 support.
Modernized code.
Added type hints.
Turned command line modules into actual console scripts.
Version 0.3
Released 2015-08-09
Introduced compatibility with Python 3.3 and 3.4.
Ported command line argument handling from ‘optparse’ to ‘argparse’.
Switched from YAML to JSON as the intermediate format produced by the analyzer.
Remove potential status symbols from nicknames.
Improved nickname recognition.
Moved scripts out of the package.
Version 0.2
Released 2015-07-27
Dropped support for Python versions below 2.7.
Switched DOT library from ‘pydot’ to ‘graphviz’.
Don’t require ez_setup anymore.
Moved package docstring into stand-alone README file.
Moved requirement specifications from setup script into pip-style text files.
Created configuration file for tox.
Various small refactorings and cleanup.
Version 0.1
Released 2007-07-05
Initial release.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ChatRelater-0.4.tar.gz
.
File metadata
- Download URL: ChatRelater-0.4.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdb228776b0faaaba336a8242679106128a3b15446a9a1131263add310bc0656 |
|
MD5 | 176e35a807757f20fcd19e29a2e5fa71 |
|
BLAKE2b-256 | d9e0fc31245f4f0dfbbcdd528a8d8964bf764dca449cdd40957fd017a71d2f85 |
File details
Details for the file ChatRelater-0.4-py3-none-any.whl
.
File metadata
- Download URL: ChatRelater-0.4-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1b15e394f793796c1033b008a79568ebe2bb30914fc56b0095a71b1257fdef6 |
|
MD5 | 6618cabebca62593d5a07639f4152f7f |
|
BLAKE2b-256 | 85a93a48cf87890e330af3fb423e17cbaaaaf7d3368c89bc5b3e6b5f85e6fe8f |