Skip to content

KMChris/messenger-counter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Messenger Counter

Dependency status PyPI version PyPI downloads

Messenger Counter is a python script that counts messages from Facebook Messenger and shows various statistics.

If you are interested in contributing to this repository, pull requests are much appreciated.

Note: To use this software you need to download your data directly from Facebook (in JSON format). How to download my data?

Installation

pip install messenger-counter

CLI usage

  1. Run the following command to open CLI. You can provide path to .zip file (or extracted folder) as an argument.
python -m mc facebook-YourName.zip
  1. Wait for > to appear and use following commands for different statistics (examples below)
>command [options]

Available commands:

  • count [mcw] [s] — Counts messages, characters and words. You can use s to save data to .json file.
  • stats [converstion] [-c] — Displays statistics for counted messages. You can specify conversation for detailed statistics and use -c for character statistics.
  • user [name] — Detailed statistics for specific person
  • yearly [conversation] — Number of messages per year. You can specify conversation for more precise statistics.
  • daily [conversation] — Number of messages daily.
  • hours [conversation] — Average number of messages by hour throughout the day.

Examples

Show general statistics of all conversations

stats

Show messages statistics for specific conversation. (you can list all conversations by running previous example)

stats JohnDoe

Program allows you to write only the beginning of the conversation name. It will return first matching occurrence. (Works exactly as the previous example)

stats Joh

Shows how many messages did the person send grouped by conversation.

user "John Doe"

Shows how many messages on average have you send and received grouped by time of the day.

daily

Similar to previous one, but limited to one conversation.

daily John

Basic module usage

Get started:

import counter as mc

# Available soon

How to download messages

  1. Select Settings & Privacy in the top right of Facebook, then click Settings.
  2. In the left column, click Your Facebook Information.
  3. Click on Download Your Information. fb1
  4. Deselect all and select "Messages" category by clicking the box on the right side.
  5. It is necessary to choose JSON format of your download request. fb2
  6. Click Create File to confirm the download request.
  7. Facebook will notify you when your copy will be ready to download.
  8. Go to the Available Files section.
  9. Click Download and enter your password.

Licence

Licence

Messenger Counter is licenced under MIT Licence.

Releases

No releases published

Packages

No packages published

Languages