### Install epstein-files Package Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Instructions for installing the epstein-files package using poetry, pip, or pipx. Poetry is recommended for managing dependencies. ```bash # Using poetry (recommended) poetry install # Using pip pip install epstein-files # Using pipx pipx install epstein-files ``` -------------------------------- ### Epstein Files Command Line Tools Source: https://github.com/michelcrypt4d4mus/epstein_text_messages/blob/master/README.md Examples of using various command-line tools provided by the epstein-files package, including generating highlighted files, searching text, displaying files, counting words, and diffing files. ```bash # Generate color highlighted texts/emails/other files epstein_generate # Search for a string: epstein_grep Bannon # Or a regex: epstein_grep '\bSteve\s*Bannon|Jeffrey\s*Epstein\b' # Show a file with color highlighting of keywords: epstein_show 030999 # Show both the highlighted and raw versions of the file: epstein_show --raw 030999 # The full filename is also accepted: epstein_show HOUSE_OVERSIGHT_030999 # Count words used by Epstein and Bannon epstein_word_count --name 'Jeffrey Epstein' --name 'Steve Bannon' # Diff two epstein files after all the cleanup (stripping BOMs, matching newline chars, etc): epstein_diff 030999 020442 ``` -------------------------------- ### Install Epstein Files Package Source: https://github.com/michelcrypt4d4mus/epstein_text_messages/blob/master/README.md Instructions for installing the epstein-files package using poetry, pip, or pipx. This package provides the core functionality for processing Epstein's documents. ```bash poetry install pip install epstein-files pipx install epstein-files ``` -------------------------------- ### Email Access and Filtering Methods Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Provides examples of retrieving emails based on sender, recipient, or both. It covers getting emails by file ID, counting authors and recipients, and accessing the earliest and latest emails for a person. ```python from epstein_files.epstein_files import EpsteinFiles epstein_files = EpsteinFiles.get_files() # Get all emails sent by a specific person emails_from_bannon = epstein_files.emails_by("Steve Bannon") for email in emails_from_bannon: print(f"{email.timestamp}: {email.subject}") # Get all emails sent to a specific person emails_to_epstein = epstein_files.emails_to("Jeffrey Epstein") print(f"Total emails to Epstein: {len(emails_to_epstein)}") # Get all emails to or from a person (combined, deduplicated, sorted) all_emails_for_person = epstein_files.emails_for("Ghislaine Maxwell") print(f"First email: {all_emails_for_person[0].timestamp}") print(f"Last email: {all_emails_for_person[-1].timestamp}") # Get email by file ID email = epstein_files.email_for_id("030999") print(f"Subject: {email.subject}, From: {email.author}") # Get email author counts author_counts = epstein_files.email_author_counts() for author, count in sorted(author_counts.items(), key=lambda x: -x[1])[:10]: print(f"{author}: {count} emails sent") # Get recipient counts recipient_counts = epstein_files.email_recipient_counts() for recipient, count in sorted(recipient_counts.items(), key=lambda x: -x[1])[:10]: print(f"{recipient}: {count} emails received") ``` -------------------------------- ### Manage Epstein Files Data Cache (Pickle) Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Demonstrates how to work with the cached data (pickle file) used by the EpsteinFiles library for faster loading. It shows how to load from the cache, force a rebuild by deleting the cache file, use a pre-packaged cache, save the current state, and reload specific subsets of data like DOJ files. ```python from epstein_files.epstein_files import EpsteinFiles import os # Load from pickle (default behavior if pickle exists) epstein_files = EpsteinFiles.get_files() # Force rebuild of pickle cache # (set args.overwrite_pickle = True before calling, or delete pickle file) os.remove("the_epstein_files.pkl.gz") # Remove existing cache epstein_files = EpsteinFiles.get_files() # Will rebuild # Use pre-packaged pickle from repo # cp emails_extracted_from_legal_filings/the_epstein_files.pkl.gz . # Save current state to disk epstein_files.save_to_disk() # Reload only DOJ files (keeps HOUSE_OVERSIGHT unchanged) epstein_files.reload_doj_files() ``` -------------------------------- ### EpsteinFiles Class: Load and Access Documents Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Demonstrates how to load all documents using the EpsteinFiles class, access them as a sequence, and filter by type (emails, iMessages, JSON, other). It also shows how to retrieve unique emails and lists of email senders. ```python from epstein_files.epstein_files import EpsteinFiles # Load all files (uses cached pickle if available, otherwise parses all documents) epstein_files = EpsteinFiles.get_files() # Access all documents as a single sequence for document in epstein_files.all_documents: print(f"{document.file_id}: {document.author} - {document.timestamp}") # Access emails specifically for email in epstein_files.emails: print(f"From: {email.author}, To: {email.recipients}, Subject: {email.subject}") # Access iMessage logs for imessage_log in epstein_files.imessage_logs: print(f"Conversation with: {imessage_log.author}, Messages: {len(imessage_log.messages)}") # Access JSON files extracted from document dump for json_file in epstein_files.json_files: print(f"JSON file: {json_file.file_id}") # Access other files (non-email, non-iMessage documents) for other_file in epstein_files.other_files: print(f"Other: {other_file.file_id}, Type: {other_file._class_name}") # Get non-duplicate emails only unique_emails = epstein_files.non_duplicate_emails # Get list of all people who sent or received emails emailers = epstein_files.emailers for person in emailers: print(f"{person.name}: {len(person.emails)} emails") ``` -------------------------------- ### Document Search with docs_matching() Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Shows how to search for text patterns (simple strings or regex) across all documents using the `docs_matching` method. It also demonstrates filtering search results by author. ```python from epstein_files.epstein_files import EpsteinFiles epstein_files = EpsteinFiles.get_files() # Search for a simple string across all documents results = epstein_files.docs_matching("Bitcoin") for result in results: print(f"Found in {result.document.file_id}:") for line in result.lines: print(f" Line {line.line_number}: {line.line}") # Search using regex pattern results = epstein_files.docs_matching(r"\bSteve\s*Bannon\b") for result in results: print(f"Match in: {result.document.file_id}") # Filter search to specific author results = epstein_files.docs_matching("meeting", names=["Jeffrey Epstein"]) print(f"Found {len(results)} documents from Jeffrey Epstein mentioning 'meeting'") ``` -------------------------------- ### Set Epstein Documents Directory Environment Variable Source: https://github.com/michelcrypt4d4mus/epstein_text_messages/blob/master/README.md Demonstrates how to set the EPSTEIN_DOCS_DIR environment variable, which is required for the command-line tools. This can be done temporarily for a single command or permanently via a .env file. ```bash EPSTEIN_DOCS_DIR=/path/to/epstein/ocr_txt_files epstein_generate --help ``` -------------------------------- ### Display Epstein Documents with epstein_show Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Displays individual Epstein documents, identified by a 6-digit ID or a full prefix, with color highlighting. It supports showing multiple documents, raw text comparison, opening source PDFs or URLs, and filtering documents by sender name. ```bash # Show document by 6-digit ID epstein_show 030999 # Show document with full prefix epstein_show HOUSE_OVERSIGHT_030999 # Show multiple documents epstein_show 030999 020442 # Show with raw text comparison epstein_show --raw 030999 # Open source PDF (if available locally) epstein_show --open-pdf 030999 # Open source URL in browser epstein_show --open-url 030999 # Show all emails for specific person epstein_show --name "Steve Bannon" ``` -------------------------------- ### Set DOJ Text Directory Environment Variable Source: https://github.com/michelcrypt4d4mus/epstein_text_messages/blob/master/README.md Shows how to set both EPSTEIN_DOCS_DIR and EPSTEIN_DOJ_TXTS_20260130_DIR environment variables to include data from the January 2026 DOJ disclosures. ```bash EPSTEIN_DOCS_DIR=/path/to/epstein/ocr_txt_files EPSTEIN_DOJ_TXTS_20260130_DIR=/path/to/doj/files epstein_generate --help ``` -------------------------------- ### Compare Epstein Documents with epstein_diff Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Compares two Epstein documents after applying cleanup processing. The tool outputs the differences in cleaned text and can suggest configurations for duplicate suppression. ```bash # Diff two documents by ID epstein_diff 030999 020442 # Shows cleaned text differences and suggests duplicate suppression config ``` -------------------------------- ### Use Epstein Files as a Python Library Source: https://github.com/michelcrypt4d4mus/epstein_text_messages/blob/master/README.md Python code snippet demonstrating how to import and use the EpsteinFiles class from the epstein_files library to access and iterate through all processed documents. ```python from epstein_files.epstein_files import EpsteinFiles epstein_files = EpsteinFiles.get_files() # All files for document in epstein_files.all_documents(): do_stuff(document) ``` -------------------------------- ### Load Document by ID and Access Properties (Python) Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Loads a document directly using its file ID and prints various properties such as filename, author, timestamp, length, and URL. It also allows access to raw and processed text, checks for duplicates, retrieves metadata, and searches for matching lines within the document. ```python from epstein_files.documents.document import Document # Load a document directly by file ID doc = Document.from_file_id("030999") print(f"File: {doc.filename}") print(f"Author: {doc.author}") print(f"Timestamp: {doc.timestamp}") print(f"Length: {doc.length} characters, {doc.num_lines} lines") print(f"External URL: {doc.external_url}") # Access raw and processed text print(f"Processed text preview: {doc.text[:500]}") print(f"Raw text: {doc.raw_text()[:500]}") # Check if document is a duplicate if doc.is_duplicate: print(f"This is a duplicate of: {doc.duplicate_of_id}") # Get document metadata as dict metadata = doc.metadata print(f"Metadata: {metadata}") # Search for matching lines within a document matching_lines = doc.matching_lines(r"money|payment|transfer") for match in matching_lines: print(f"Line {match.line_number}: {match.line}") ``` -------------------------------- ### Document Class: Base Document Properties Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Illustrates the base Document class, which serves as the foundation for all document types within the library. It highlights common properties available for any document, such as file ID, author, timestamp, and text content. ```python from epstein_files.documents.document import Document ``` -------------------------------- ### Generate HTML Reports with epstein_generate CLI Tool (Bash) Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt This command-line tool generates color-highlighted HTML output of the documents. It allows for generating the full HTML output, or specific sections for emails or text messages. It can also generate a chronological email timeline. ```bash # Set environment variable for document directory export EPSTEIN_DOCS_DIR=/path/to/epstein/ocr_txt_files # Generate full HTML output epstein_generate # Generate only emails section epstein_generate --output-emails # Generate only text messages section epstein_generate --output-texts # Generate chronological email timeline epstein_generate --email-timeline ``` -------------------------------- ### CLI Tool: epstein_generate Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt A command-line interface tool to generate color-highlighted HTML output of the documents. Supports filtering output for emails, text messages, or generating a chronological email timeline. ```APIDOC ## CLI Tool: epstein_generate ### Description A command-line interface tool to generate color-highlighted HTML output of the documents. Supports filtering output for emails, text messages, or generating a chronological email timeline. ### Method Command-line execution ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```bash # Set environment variable for document directory export EPSTEIN_DOCS_DIR=/path/to/epstein/ocr_txt_files # Generate full HTML output epstein_generate # Generate only emails section epstein_generate --output-emails # Generate only text messages section epstein_generate --output-texts # Generate chronological email timeline epstein_generate --email-timeline ``` ### Response #### Success Response (200) HTML output to standard output or file. #### Response Example N/A ``` -------------------------------- ### Generate Epstein Document Information Tables Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Generates various informational tables from the Epstein documents. This includes emailer information and JSON metadata for all files. The generation of DOJ files requires the EPSTEIN_DOJ_TXTS_20260130_DIR environment variable to be set. ```bash epstein_generate --emailers-info epstein_generate --json-metadata export EPSTEIN_DOJ_TXTS_20260130_DIR=/path/to/doj/txt/files epstein_generate --output-doj-files epstein_generate --help ``` -------------------------------- ### Document Class - Document Loading and Access Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Load documents directly by their file ID and access various properties such as filename, author, timestamp, and content. It also supports searching for lines within a document. ```APIDOC ## Document Class - Document Loading and Access ### Description Load documents directly by their file ID and access various properties such as filename, author, timestamp, and content. It also supports searching for lines within a document. ### Method N/A (Class methods and instantiation) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```python from epstein_files.documents.document import Document # Load a document directly by file ID doc = Document.from_file_id("030999") print(f"File: {doc.filename}") print(f"Author: {doc.author}") print(f"Timestamp: {doc.timestamp}") print(f"Length: {doc.length} characters, {doc.num_lines} lines") print(f"External URL: {doc.external_url}") # Access raw and processed text print(f"Processed text preview: {doc.text[:500]}") print(f"Raw text: {doc.raw_text()[:500]}") # Check if document is a duplicate if doc.is_duplicate: print(f"This is a duplicate of: {doc.duplicate_of_id}") # Get document metadata as dict metadata = doc.metadata print(f"Metadata: {metadata}") # Search for matching lines within a document matching_lines = doc.matching_lines(r"money|payment|transfer") for match in matching_lines: print(f"Line {match.line_number}: {match.line}") ``` ### Response #### Success Response (200) N/A (This is client-side code) #### Response Example N/A ``` -------------------------------- ### Aggregate Person Data and Communication Statistics (Python) Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Aggregates all communications for specific individuals, including emails and iMessage logs. It provides details on the person's category, information string, email statistics (total, sent, received, unique), and date ranges for their email activity. It also shows the count of iMessage conversations and allows access to all emailers sorted by activity. ```python from epstein_files.epstein_files import EpsteinFiles epstein_files = EpsteinFiles.get_files() # Get Person objects for specific names people = epstein_files.person_objs(["Steve Bannon", "Ghislaine Maxwell"]) for person in people: print(f"\n=== {person.name} ===") print(f"Category: {person.category}") print(f"Info: {person.info_str}") # Email statistics print(f"Total emails: {len(person.emails)}") print(f"Emails sent: {len(person.emails_by)}") print(f"Emails received: {len(person.emails_to)}") print(f"Unique emails: {len(person.unique_emails)}") # Date range print(f"First email: {person.earliest_email_date}") print(f"Last email: {person.last_email_date}") print(f"Conversation span: {person.email_conversation_length_in_days} days") # iMessage logs print(f"iMessage conversations: {len(person.imessage_logs)}") # Access all emailers sorted by activity all_emailers = epstein_files.emailers sorted_emailers = sorted(all_emailers, key=lambda p: len(p.unique_emails), reverse=True) for person in sorted_emailers[:10]: print(f"{person.name}: {len(person.unique_emails)} emails") ``` -------------------------------- ### Copy Extracted Emails to Document Directory Source: https://github.com/michelcrypt4d4mus/epstein_text_messages/blob/master/README.md Command to copy extracted email text files from the repository into the directory specified by the EPSTEIN_DOCS_DIR environment variable for local analysis. ```bash cp ./emails_extracted_from_legal_filings/*.txt "$EPSTEIN_DOCS_DIR" ``` -------------------------------- ### Process Emails in Epstein Text Messages Source: https://github.com/michelcrypt4d4mus/epstein_text_messages/blob/master/README.md Iterates through a collection of email objects within the epstein_files.emails list and applies a 'do_stuff' function to each email. This snippet demonstrates basic iteration over email data. ```python for email in epstein_files.emails: do_stuff(email) ``` -------------------------------- ### Search Epstein Documents with epstein_grep Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Searches through the Epstein documents for specified strings or regular expression patterns. It offers options to filter searches to email bodies, specific document types (emails or texts), display the whole file content for each match, and filter by minimum line length. Output is color-highlighted. ```bash # Search for a name epstein_grep "Bannon" # Search with regex epstein_grep '\bSteve\s*Bannon|Jeffrey\s*Epstein\b' # Search only in email bodies (exclude headers) epstein_grep --email-body "Bitcoin" # Filter to specific document types epstein_grep --output-emails "meeting" epstein_grep --output-texts "tomorrow" # Show whole file for each match epstein_grep --whole-file "confidential" # Filter by minimum line length epstein_grep --min-line-length 50 "money" ``` -------------------------------- ### Email Class - Email-Specific Properties Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Access email-specific data including headers, recipients, subjects, and extracted actual text (excluding quoted replies). ```APIDOC ## Email Class - Email-Specific Properties ### Description Access email-specific data including headers, recipients, subjects, and extracted actual text (excluding quoted replies). ### Method N/A (Class methods and instantiation) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```python from epstein_files.documents.email import Email from epstein_files.epstein_files import EpsteinFiles epstein_files = EpsteinFiles.get_files() # Get an email and access its properties email = epstein_files.email_for_id("030999") # Basic properties print(f"From: {email.author}") print(f"To: {email.recipients}") print(f"Subject: {email.subject}") print(f"Sent at: {email.timestamp}") print(f"Sent from device: {email.sent_from_device}") # e.g., "iPhone", "BlackBerry" # Header information print(f"Header fields: {email.header.field_names}") print(f"CC: {email.header.cc}") print(f"BCC: {email.header.bcc}") print(f"Attachments: {email.attachments}") # Text content print(f"Full text length: {len(email.text)}") print(f"Actual text (excluding quoted replies): {email.actual_text[:300]}") # Classification flags print(f"Is junk mail: {email.is_junk_mail}") print(f"Is mailing list: {email.is_mailing_list}") print(f"Is forwarded article: {email.is_fwded_article}") print(f"Is note to self: {email.is_note_to_self}") # Check if email involves specific person print(f"Involves Bannon: {email.is_from_or_to('Steve Bannon')}") # Access attached documents for attached_doc in email.attached_docs: print(f"Attachment: {attached_doc.file_id}") ``` ### Response #### Success Response (200) N/A (This is client-side code) #### Response Example N/A ``` -------------------------------- ### Access and Analyze iMessage Logs (Python) Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Provides access to parsed iMessage conversation logs, allowing iteration through conversations and individual messages. It displays conversation details like author, phone number, message count, and timestamps. It also supports retrieving logs for a specific person and counting messages by author across all logs. ```python from epstein_files.epstein_files import EpsteinFiles epstein_files = EpsteinFiles.get_files() # Access all iMessage logs for log in epstein_files.imessage_logs: print(f"Conversation with: {log.author}") print(f"Phone number: {log.phone_number}") print(f"Number of messages: {len(log.messages)}") print(f"First message at: {log.timestamp}") # Access individual messages for msg in log.messages[:5]: # First 5 messages print(f" [{msg.timestamp_str}] {msg.author}: {msg.text[:50]}...") # Get logs for specific person logs_for_person = epstein_files.imessage_logs_for("Some Name") # Count messages by author across all logs author_counts = epstein_files.MessengerLog.count_authors(epstein_files.imessage_logs) for author, count in sorted(author_counts.items(), key=lambda x: -x[1]): print(f"{author}: {count} messages") ``` -------------------------------- ### Export JSON Metadata for Epstein Files Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Exports structured metadata for all documents as a JSON string using the EpsteinFiles Python library. This metadata can be parsed to access information about individual files, such as email subjects, and details about people mentioned in the documents. ```python from epstein_files.epstein_files import EpsteinFiles import json epstein_files = EpsteinFiles.get_files() # Get JSON metadata string for all files metadata_json = epstein_files.json_metadata() # Parse and access metadata = json.loads(metadata_json) # Access file metadata by type for email_meta in metadata['files']['Email'][:5]: print(f"Email {email_meta['file_id']}: {email_meta.get('subject', 'No subject')}") # Access people metadata for name, info in list(metadata['people'].items())[:5]: print(f"{name}: {info}") ``` -------------------------------- ### Person Class - Aggregate Person Data Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Aggregate all communications for a specific individual including emails and iMessage logs. Provides statistics on communication volume, dates, and types. ```APIDOC ## Person Class - Aggregate Person Data ### Description Aggregate all communications for a specific individual including emails and iMessage logs. Provides statistics on communication volume, dates, and types. ### Method N/A (Class methods and instantiation) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```python from epstein_files.epstein_files import EpsteinFiles epstein_files = EpsteinFiles.get_files() # Get Person objects for specific names people = epstein_files.person_objs(["Steve Bannon", "Ghislaine Maxwell"]) for person in people: print(f"\n=== {person.name} ===") print(f"Category: {person.category}") print(f"Info: {person.info_str}") # Email statistics print(f"Total emails: {len(person.emails)}") print(f"Emails sent: {len(person.emails_by)}") print(f"Emails received: {len(person.emails_to)}") print(f"Unique emails: {len(person.unique_emails)}") # Date range print(f"First email: {person.earliest_email_date}") print(f"Last email: {person.last_email_date}") print(f"Conversation span: {person.email_conversation_length_in_days} days") # iMessage logs print(f"iMessage conversations: {len(person.imessage_logs)}") # Access all emailers sorted by activity all_emailers = epstein_files.emailers sorted_emailers = sorted(all_emailers, key=lambda p: len(p.unique_emails), reverse=True) for person in sorted_emailers[:10]: print(f"{person.name}: {len(person.unique_emails)} emails") ``` ### Response #### Success Response (200) N/A (This is client-side code) #### Response Example N/A ``` -------------------------------- ### MessengerLog Class - iMessage Logs Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Access parsed iMessage conversation logs with individual message extraction. Allows iteration through conversations and messages, filtering by author, and counting messages. ```APIDOC ## MessengerLog Class - iMessage Logs ### Description Access parsed iMessage conversation logs with individual message extraction. Allows iteration through conversations and messages, filtering by author, and counting messages. ### Method N/A (Class methods and instantiation) ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example ```python from epstein_files.epstein_files import EpsteinFiles epstein_files = EpsteinFiles.get_files() # Access all iMessage logs for log in epstein_files.imessage_logs: print(f"Conversation with: {log.author}") print(f"Phone number: {log.phone_number}") print(f"Number of messages: {len(log.messages)}") print(f"First message at: {log.timestamp}") # Access individual messages for msg in log.messages[:5]: # First 5 messages print(f" [{msg.timestamp_str}] {msg.author}: {msg.text[:50]}...") # Get logs for specific person logs_for_person = epstein_files.imessage_logs_for("Some Name") # Count messages by author across all logs author_counts = epstein_files.MessengerLog.count_authors(epstein_files.imessage_logs) for author, count in sorted(author_counts.items(), key=lambda x: -x[1]): print(f"{author}: {count} messages") ``` ### Response #### Success Response (200) N/A (This is client-side code) #### Response Example N/A ``` -------------------------------- ### Access Email Properties and Content (Python) Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Retrieves email-specific data, including headers, recipients, subjects, and the actual text content excluding quoted replies. It provides access to basic properties, header fields, attachment information, and classification flags like junk mail or mailing list status. It can also check if an email involves a specific person and access attached documents. ```python from epstein_files.documents.email import Email from epstein_files.epstein_files import EpsteinFiles epstein_files = EpsteinFiles.get_files() # Get an email and access its properties email = epstein_files.email_for_id("030999") # Basic properties print(f"From: {email.author}") print(f"To: {email.recipients}") print(f"Subject: {email.subject}") print(f"Sent at: {email.timestamp}") print(f"Sent from device: {email.sent_from_device}") # e.g., "iPhone", "BlackBerry" # Header information print(f"Header fields: {email.header.field_names}") print(f"CC: {email.header.cc}") print(f"BCC: {email.header.bcc}") print(f"Attachments: {email.attachments}") # Text content print(f"Full text length: {len(email.text)}") print(f"Actual text (excluding quoted replies): {email.actual_text[:300]}") # Classification flags print(f"Is junk mail: {email.is_junk_mail}") print(f"Is mailing list: {email.is_mailing_list}") print(f"Is forwarded article: {email.is_fwded_article}") print(f"Is note to self: {email.is_note_to_self}") # Check if email involves specific person print(f"Involves Bannon: {email.is_from_or_to('Steve Bannon')}") # Access attached documents for attached_doc in email.attached_docs: print(f"Attachment: {attached_doc.file_id}") ``` -------------------------------- ### Process JSON Files in Epstein Text Messages Source: https://github.com/michelcrypt4d4mus/epstein_text_messages/blob/master/README.md Iterates through a collection of JSON file objects within the epstein_files.json_files list and applies a 'do_stuff' function to each file. This demonstrates the processing of structured JSON data. ```python for json_file in epstein_files.json_files: do_stuff(json_file) ``` -------------------------------- ### Process Other Files in Epstein Text Messages Source: https://github.com/michelcrypt4d4mus/epstein_text_messages/blob/master/README.md Iterates through a collection of miscellaneous file objects within the epstein_files.other_files list and applies a 'do_stuff' function to each file. This serves as a fallback for unprocessed file types. ```python for file in epstein_files.other_files: do_stuff(file) ``` -------------------------------- ### Process iMessage Logs in Epstein Text Messages Source: https://github.com/michelcrypt4d4mus/epstein_text_messages/blob/master/README.md Iterates through a collection of iMessage log objects within the epstein_files.imessage_logs list and applies a 'do_stuff' function to each log. This snippet shows how iMessage data is handled. ```python for imessage_log in epstein_files.imessage_logs: do_stuff(imessage_log) ``` -------------------------------- ### Generate Word Count Statistics with epstein_word_count Source: https://context7.com/michelcrypt4d4mus/epstein_text_messages/llms.txt Generates word count statistics for communications within the Epstein documents. It allows filtering by specific individuals' names and produces an HTML output that includes word frequency analysis. ```bash # Count words by specific people epstein_word_count --name "Jeffrey Epstein" --name "Steve Bannon" # Generates HTML output with word frequency analysis ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.