Metadata-Version: 2.1
Name: gpt2md
Version: 0.1
Summary: A simple tool to convert your ChatGPT conversation to Markdown files.
Author-email: Yoran Gyselen <yoran@gyselen.be>
License: MIT License
        
        Copyright (c) 2024 Yoran Gyselen
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/Yoran-Gyselen/gpt2md
Project-URL: Bug Tracker, https://github.com/Yoran-Gyselen/gpt2md/issues
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE

# gpt2md

A simple tool to convert your ChatGPT conversation to Markdown files.

gpt2md allows you to convert your conversations on ChatGPT to local Markdown files. This is done by extracting the conversation data from the `conversations.json` file when you download your profile data from OpenAI's website. gpt2md converts the data from this file into readable files you can easily store locally. This gives you the ability to store your data in a manner like it's presented to you on the ChatGPT website.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install gpt2md.

```bash
pip install gpt2md
```

## Usage

You can use gpt2md as a library in Python or as a command-line tool.

In order for gpt2md to convert your data into Markdown files, you need to provide a file with your conversation history with ChatGPT. This file (among some others) can be downloaded from the ChatGPT website

1. Log in to the ChatGPT website.
2. Click on your profile avatar.
3. Click on `Settings` > `Data controls`.
4. Under the `Export data` section, click on `Export`.
5. In the info box, click `Confirm export`.
6. You should receive an e-mail containing a link to your archive (in ZIP-format).
7. Once extracted, look for the `conversations.json` file. This is the input file you need to provide to gpt2md.


### Usage in Python

```python
from gpt2md import Gpt2md

parser = Gpt2md(input_file="conversations.json", output="conversations", verbose=True)
parser.parse()
```

### Usage via the CLI

```bash
gpt2md -v conversations.json -o conversations
```

## Contributing

Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.

## License

gpt2md is licensed under the [MIT license](https://choosealicense.com/licenses/mit/).
