Skip to main content

Analyze your iMessage data

Project description

iMessage Analysis

Python scripts to analyze your iMessage data. Completely private and locally hosted. Please see TODO for more details and examples.

Example Plot

Table of Contents:

  1. 💽 Installation
  2. ⚡️ Quickstart
  3. 🧑‍💻 Advanced

💽 Installation

pip install imess

⚡️ Quickstart

First, load your messages and contacts data.

# Copy data into /tmp/imess/ so that this script can access it
imess_init

# Preprocess data
imess_load

Second, generate plots:

# General plots (top-K) of all-time
imess_run --mode top_K_chats_with_sender_counts --K 20

# General plots (top-K) of chats over time
imess_run --mode top_K_chats_over_time --K 20

# Plots about a specific named group chat
imess_run --mode specific_chat_over_time --chat <chat-name>

# Plots about a specific set of senders
imess_run --mode specific_chat_over_time --senders <comma-separated-list-of-senders>

# Plots about a specific chat's word cloud
imess_run --mode specific_chat_word_cloud --senders <comma-separated-list-of-senders>

# Outputs all chat histories, one CSV and TXT per chat
imess_run --mode output_chat_history

All plots and outputs will be saved to ./plots/.

🧑‍💻 Advanced

Install

For local development:

conda create -n imess python=3.10 -y
conda activate imess
pip install -e .

Merging Contacts

TODO

If you have contacts that you want to merge but don't think that's captured in the contacts.vcf file, you can provide a data/merges.txt file to imless_load to specify how you want to merge contacts.

First, create a data/merges.txt file. Each row is a separate contact that will be merged into a single contact. The row should contain a comma-separated list of contact info that will be merged into a single contact.

An example is below:

test@gmail.com,test@comcast.com,599-559-4499
1121122222,999-999-9999,mom@icloud.com

Anytime we see test@gmail.com, test@comcast.com, or 599-559-4499, we will merge them into a single contact.

The script imess_load will automatically try to load data/merges.txt. If you don't want to use this file, you can set the --path_to_merges_txt flag to None or delete the file.

imess_load --path_to_merges_txt ./data/merges.txt

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

imess-0.1.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

imess-0.1.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file imess-0.1.1.tar.gz.

File metadata

  • Download URL: imess-0.1.1.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.16

File hashes

Hashes for imess-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e4a3b1439085d99f6cc5b6a69e4f1fe561710d9ae488df1118689faeb58f3285
MD5 8730410e21450138174c642a5b936480
BLAKE2b-256 2f934d91eb9c9b323fc0362f0932daf367f253bcfd3db083bb6164a0ccb93d8c

See more details on using hashes here.

File details

Details for the file imess-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: imess-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.16

File hashes

Hashes for imess-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 188d4697e25d3a86e735c634b92d24fea98ed1d790e3bd844c41d15e67daeef4
MD5 5346d770b8ab08cc1a1d3d1db19c4374
BLAKE2b-256 03146d1822e845965b78d85f5fc2344aab8abfc5bedce624e948f9a0d1dea4dd

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