Package for counting messages from Facebook Messenger
Project description
Messenger Counter
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
- Count your messages using (insert path for your .zip file)
python -m mc count "facebook-YourName.zip"
- Add flag
--chars
or-c
to count characters (optional)
python -m mc count -c "facebook-YourName.zip"
- Use following commands for different statistics (examples below)
python -m mc [-h] command [options]
Available commands:
count [-c] file
— Counts all messages/characters and saves to messages.json or messages_chars.json file.stats [-c] [converstion]
— Displays statistics for counted messages. You can specify conversation for detailed statistics and use -c for character statistics.user name
— Detailed statistics for specific personyearly file [conversation]
— Number of messages per year. (please specify path to .zip file as for counting messages) You can specify conversation for more precise statistics.daily [-d DIFF] file [conversation]
— Number of messages daily. (use-d
or--difference
flag to time shift by some number of hours and show statistics differently)hours [-d DIFF] file [conversation]
— Average number of messages by hour throughout the day. (additional options as above)
Examples
Show general statistics of all conversations
python -m mc stats
Show messages statistics for specific conversation. (you can list all conversations by running previous example)
python -m mc 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)
python -m mc stats Joh
Shows how many messages did the person send grouped by conversation.
python -m mc user "John Doe"
Shows how many messages on average have you send and received grouped by time of the day.
python -m mc daily "facebook-YourName.zip"
Similar to previous one, but limited to one conversation.
python -m mc daily "facebook-YourName.zip" John
Basic module usage
Get started:
import MessengerCounter as mc
mc.set_source('facebook-YourName.zip') # insert path for your .zip file
mc.count()
mc.count(chars=True)
data = mc.get_data()
mc.statistics(*data)
How to download messages
- Select Settings & Privacy in the top right of Facebook, then click Settings.
- In the left column, click Your Facebook Information.
- Click on Download Your Information.
- Deselect all and select "Messages" category by clicking the box on the right side.
- It is necessary to choose JSON format of your download request.
- Click Create File to confirm the download request.
- Facebook will notify you when your copy will be ready to download.
- Go to the Available Files section.
- Click Download and enter your password.
Licence
Messenger Counter is licenced under MIT Licence.
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
Built Distribution
File details
Details for the file messenger_counter-0.5.1.tar.gz
.
File metadata
- Download URL: messenger_counter-0.5.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f91443a015e5983306d2bfc06060ef8bf58a6f6c0df85fee1f54590a7416e2d7 |
|
MD5 | 7d04eb0a715b6c4a7bec53f962a3b5e3 |
|
BLAKE2b-256 | 7965d8cf7960e86483b132876059d8db2c54f21e7e5c255b10c9767e01f23167 |
File details
Details for the file messenger_counter-0.5.1-py3-none-any.whl
.
File metadata
- Download URL: messenger_counter-0.5.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e484c1155ef3da63e9022313bf0c5bbd90d6a29a39bfd438278b6761c8813518 |
|
MD5 | 5c7cdacbcf108403de91268b11917c68 |
|
BLAKE2b-256 | 3d3c2575c4f00450445acd6a29ae13e70871eff2dbc47663056eb4d88403f57e |