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.2.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.2-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: imess-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 db435dbc48560c08a3de9d2abae869610927c87ed888cc45740745b9ddae3283
MD5 c9525ff68e999fe932003fd941957dd8
BLAKE2b-256 2c6428c1402d9af485edaf70121c3008f938c311e566fe937346f0a788f8b11d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: imess-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a6b2e00fdefaa54d092389a40d029dcb8ea1bd2aab2fe41b2b1a6361be4bfbc9
MD5 868e54b85296c4d617370891f519c66b
BLAKE2b-256 cbaa0be72fc03306cd10eafdd6c9abb2e74a0b54d5aadbfc6b7c1c9afa03fcc2

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