Facebook offers the ability to download all of their Facebook data in linked JSON files. This project aims to transform downloaded Facebook data into a Markov model to generate random statements based on everything the user has submitted in statuses, comments, and messages. It consists of two main components: the script for processing the data and the GUI for user interaction.
The script main.py contains several functions to handle Facebook data. Key functionalities include:
- Blacklist Handling: Reads and applies a blacklist to filter out unwanted words.
- File Discovery: Discovers and lists JSON files in a specified directory.
- Message Extraction: Pulls messages from JSON files based on the sender's name.
- Alert Removal: Filters out system alerts and non-original content from messages.
- Data Parsing: Parses comments and statuses from JSON files.
- Markov Model Processing: Processes data to create a word count dictionary for the Markov model and generates random statements.
The gui.py script provides a Graphical User Interface using Tkinter. It allows users to:
- Enter their name for personalized data processing.
- Select outer directories containing Facebook data.
- Choose to include comments, statuses, and messages in the data processing.
- Check to see how many messages, statuses, or comments (if any) were found in the provided directory.
- Pull random entries from available data sources
- Generate random statements based on the selected data.
- Clear the output area.
- Python 3.x
- Tkinter (usually comes with Python)
- Facebook data in JSON format
- Ensure Python 3.x is installed.
- Download the project files to a local directory.
- Place your Facebook data in a known directory.
- Run
gui.pyto start the application. - Enter your name in the pop-up window.
- Use the "Get Directory" button to select the root directory of your Facebook data.
- Select the types of data (Statuses, Comments, Messages) you want to include.
- Click "GENERATE" to produce a random statement or set of statements based on the selected data.
- Use the "CLEAR" button to clear the output area.
- The project only processes data in the specified formats. Ensure your Facebook data is in the correct JSON format.
- The blacklist feature is crucial to filter out sensitive or unwanted content. Modify
filter.txtas needed.
This project is open-source and free for personal use. Please attribute the original creation appropriately in any derivative works.


