A simple tool to convert Facebook chat JSON files into a readable HTML format. This project is designed to make it easier to browse and analyze your Facebook chat history in a user-friendly interface.
- Converts Facebook chat JSON files into clean, readable HTML.
- Preserves message timestamps, sender names, and message content.
- Supports media files by linking them to the HTML output.
- Lightweight and easy to use.
- Clone the repository:
git clone https://github.com/your-username/fb-chat-json-to-html.git
- Navigate to the project directory:
cd fb-chat-json-to-html - Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install dependencies using
pip-tools:pip install pip-tools pip-compile requirements.in pip install -r requirements.txt
- Export your Facebook chat data as a JSON file from Facebook's data download tool.
- Place the JSON file in the project directory.
- If your chat includes media files, upload them as a zipped folder. Extract the contents of the zip file into the
staticfolder in the project directory. The HTML output will link to these media files. - Run the conversion script:
node convert.js your-chat-file.json
- Open the generated
output.htmlfile in your browser to view the chat.
To start the server for development or production, use the following commands:
Run the FastAPI development server:
uvicorn app.main:app --reloadRefer to the FastAPI documentation for more details on running and configuring the development server.
Run the FastAPI production server:
uvicorn app.main:app --host 0.0.0.0 --port 8000Refer to the FastAPI deployment documentation for best practices and deployment options.
Contributions are welcome! Feel free to submit issues or pull requests to improve the project.
This project is licensed under the MIT License. See the LICENSE file for details.
