# ChatSnip

ChatSnip is a command-line tool and web app for extracting chat content from HTML files generated by ChatGPT. This tool allows users to upload HTML files, specify chat names, and extract the relevant chat content, which can then be downloaded as a text file.

## Features

- Upload HTML files containing chat data.
- Extract chat content by specifying the chat name.
- Download extracted chat content as a text file.
- User-friendly web interface powered by Streamlit and Flask.

## Installation

To install ChatSnip, follow these steps:

1. **Clone the repository:** (if applicable):

   ```bash
   git clone https://github.com/leighvdveen/chatsnip.git
   cd chatsnip
   ```

2. **Create a virtual environment:**

   ```bash
   python -m venv venv
   source venv/bin/activate  # On Windows use `venv\Scripts\activate`
    ```

3. **Install the required packages:**

   ```bash
   pip install -r requirements.txt
   ```

4. **Run the application:**

   ```bash
   python chatsnip.py
   ```

## Usage

1.	Open your web browser and go to http://localhost:8501 to access the Streamlit interface.
2.	Upload an HTML file containing the chat data.
3.	Enter the name of the chat you want to extract.
4.	Click the “Extract Chat” button.
5.	Download the extracted chat content as a text file.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Contributing

If you want to contribute to the project, feel free to fork the repository and submit a pull request. For any issues or feature requests, please open an issue.