https://github.com/corrieriluca/json-messenger-parser
Python script which parses Facebook Messenger JSON files into a beautiful and readable HTML file
https://github.com/corrieriluca/json-messenger-parser
facebook jinja json messenger python
Last synced: about 2 months ago
JSON representation
Python script which parses Facebook Messenger JSON files into a beautiful and readable HTML file
- Host: GitHub
- URL: https://github.com/corrieriluca/json-messenger-parser
- Owner: corrieriluca
- License: mit
- Archived: true
- Created: 2019-03-30T11:15:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-01-11T17:26:38.000Z (over 1 year ago)
- Last Synced: 2025-02-17T23:46:51.637Z (8 months ago)
- Topics: facebook, jinja, json, messenger, python
- Language: HTML
- Homepage:
- Size: 24.4 KB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JSON Messenger Parser
This program allows you to parse a Facebook Messenger JSON save file which you can
get from your [Facebook settings menu](https://www.facebook.com/settings?tab=your_facebook_information)
(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
### InstallationThis 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` :
```bash
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.
```bash
pip install -r requirements.txt
```### Basic usage
You can run `python3 main.py -h` to display help:
```
Basic usage: main.py -i -o [-s ] -n -lArguments:
-i, --input : the path to the folder containing your conversation (the JSON file must be named 'message_1.json')
-o, --output : the path to the HTML output file (created if it does not exist)
-s, --stickers : the path to the folder containing your stickers (optional)
-n, --username : your username in the conversation (ex: -n 'John Doe')
-l, --lang : 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