Skip to main content

Analyzes the entire history of a macOS Messages conversation

Project description

iMessage Conversation Analyzer

Copyright 2020-2024 Caleb Evans
Released under the MIT license

This macOS CLI program will read the contents of an iMessage conversation via the Messages app's database on your Mac. You can then gather various metrics of interest on the messages and attachments collected.

Much of this program was inspired by and built using findings from this blog post by Yorgos Askalidis.

Caveats

Please note that currently, you can only query conversations between you and a single other person (i.e. group chats are currently unsupported).

Installation

1. Install Python 3

macOS does not include Python 3 out of the box, but you can install Python 3 with the Homebrew package manager.

brew install python@3

2. Set up virtualenv

pip3 install virtualenv
virtualenv --python=python3 .virtualenv
source .virtualenv/bin/activate

3. Install project depdendencies

pip install -r requirements.txt

Usage

-c / --contact-name

Required; the combined first and last name of the macOS contact whose conversation you want to fetch (e.g. John Doe).

ica -c 'John Doe' -m ica/metrics/message_totals.py

-m / --metric-file

Required; a Python file with an analyze() function; this file must return a pandas DataFrame. See the examples in ica/metrics.

ica -c 'John Doe' -m ica/metrics/most_frequent_emojis.py

-f / --format

Optional; the output format of the result. Omit this argument for a simple textual table, or specify csv to print output as CSV.

ica -c 'John Doe' -m ica/metrics/message_totals.py -f csv

You can also output as CSV and use the pbcopy command for easy copy/pasting into a spreadsheet program (like Excel or Numbers).

ica -c 'John Doe' -m ica/metrics/message_totals.py -f csv | pbcopy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

imessage-conversation-analyzer-1.2.3.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imessage_conversation_analyzer-1.2.3-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file imessage-conversation-analyzer-1.2.3.tar.gz.

File metadata

File hashes

Hashes for imessage-conversation-analyzer-1.2.3.tar.gz
Algorithm Hash digest
SHA256 4078c86bff03ab5f70465a5101e3df8421b82d9dace8e4b8875e448d4b378be7
MD5 c7e80038eca4a4de8b52208854f7cbdd
BLAKE2b-256 d5ea01e2c5c24a580472a2ca94db96102a503d160a6d629a8ccaa90eba5879ac

See more details on using hashes here.

File details

Details for the file imessage_conversation_analyzer-1.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for imessage_conversation_analyzer-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b13e21bd2f4b61092c784a87e818c95357e23e1b8a9db5e5bef883e2f9fa20b5
MD5 00555739bd76cd66aed98f832fa8f72e
BLAKE2b-256 03b65afa951794697d416c2c0764a21ba2cb6d3fe2ae24e396ef2ebdd86edba9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page