README
Why should you use this?
When you export your personal data from Facebook/Instagram, you will see that the encoding of the .json messages is not human-readable. This script combines and decodes the messages to a human-friendly format, making it easier to read and understand your message history.
Installation
To run this script, you will need Python 3.6 or higher and the tqdm library installed. You can install the tqdm library by running the following command in your terminal:
pip install tqdm
Usage
-
To extract your personal data from Facebook or Instagram, log in to your account and go to the settings page. From there, select "Download Your Information" and follow the prompts to generate a data file. Extract the messages folder from the downloaded data by navigating to the Messages folder within the data file and copying it to a separate location.
-
Download this repository.
-
Create in/ folder in the root of the repository.
-
Copy the message_x.json files you want to decode to the in/ folder located in the root of the repository. Ideally, only one chat thread should be copied at a time.
-
Create an out/ folder in the same location as the in/ folder.
-
Run the decoder_py script from the repository. This script should be able to decode the message_x.json files located in the in/ folder and output the decoded messages as one file in the out/ folder.
-
Repeat the process by copying another conversation file into the in/ folder and running the decoder_py script to decode the messages.
How does it work
The decoder_py script uses three functions to combine, decode, and write the messages to separate files.
combine_and_convert_json_files
This function combines multiple JSON files into one, converts the timestamp_ms field in each message to a human-readable format, sorts the messages by timestamp, and writes the updated JSON file to the out/ folder.
batch_decoder.py
This script reads the combined and decoded .json file in the out/ folder, and writes each message to a separate file in the out/decoded/ folder. It first calculates the total number of messages in the input file and updates the progress bar accordingly. Then, it loads the messages, decodes special characters, and writes each message to an output file.
FacebookIO
The FacebookIO class is used to decode special characters in the JSON messages. It extends the io.FileIO class and overrides the read method to replace Unicode escape sequences with actual characters.
Metadata
Release files for facebook-json-message-data-parser-public 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| facebook_json_message_data_parser_public-1.1.0.tar.gz | 5.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| facebook_json_message_data_parser_public-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / facebook_json_message_data_parser_public-1.1.0.tar.gz
| Download URL | facebook_json_message_data_parser_public-1.1.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e29db4abc32044905b92f2e6b6c6fce02cfb4e83240cbc300e1cc0567919e495
|
|
BLAKE2b-256 checksum How to use checksums |
3d71d3a8508d04c87d2d2db842dca134b2033eed78f695a9955f411317ed3dd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.8
|
Release files / facebook_json_message_data_parser_public-1.1.0-py3-none-any.whl
| Download URL | facebook_json_message_data_parser_public-1.1.0-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70c866068bf30ef775c0a5205f8dd59e06fc70fe365e561d49dc000cd243b8eb
|
|
BLAKE2b-256 checksum How to use checksums |
e394a68b03a6ba389e11e255611a8caa2d081c24a95f4b02cb1ee208973d6aa0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.8
|
Security for facebook-json-message-data-parser-public 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.