Skip to content
This repository was archived by the owner on Nov 18, 2024. It is now read-only.

corrieriluca/JSON-Messenger-Parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JSON Messenger Parser

This program allows you to parse a Facebook Messenger JSON save file which you can get from your Facebook settings menu (Download Your Information). It parses the JSON file into a beautiful and readable HTML file which you can display in your browser with a nice and simple messenger-like style.

How to use it

Installation

This program has been tested with Python 3.7.3

It requires Jinja2 in order to work properly and render the HTML file.

I highly recommend you to use a virtual environment with virtualenv :

git clone https://github.com/corrieriluca/JSON-to-HTML-Messenger-Parser.git
cd JSON-to-HTML-Messenger-Parser
virtualenv env
source env/bin/activate
# use the program
deactivate

Finally you can use pip in order to install Jinja2. This program has been tested with Jinja2 2.10.

pip install -r requirements.txt

Basic usage

You can run python3 main.py -h to display help:

Basic usage: main.py -i <inputfolder> -o <htmlouputfile> [-s <stickerfolder>] -n <your_username> -l <FR/EN>

Arguments:
-i, --input <path>: the path to the folder containing your conversation (the JSON file must be named 'message_1.json')
-o, --output <path>: the path to the HTML output file (created if it does not exist)
-s, --stickers <path>: the path to the folder containing your stickers (optional)
-n, --username <your_username>: your username in the conversation (ex: -n 'John Doe')
-l, --lang <FR/EN>: the language to display dates and other elements
-g, --log: save a log with the messages in [outputfile].log
-h, --help: display this help

This program supports two languages : English and French, in order to display properly dates and other translated elements. Messages are not translated !

You can specify the path to the folder containing your stickers with -s or --stickers for them to be rendered.

You have the choice to save a log file with -g or --log in which just the messages, their sender and their date are displayed.

You can choose to specify your username in the conversation in order to distinguish your messages from those of others.

License

MIT

About

Python script which parses Facebook Messenger JSON files into a beautiful and readable HTML file

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published