When you have a long session in ChatGPT, maybe you want to save it locally. I used some of the chrome extension out there, sadly it can't handle long session with hundreds of paragraph. So i usually copy all the text there into MS Word. The problem is, when you select the text to copy, your profile picture is also selected, which turns into your email address in Word. The other problem is on the copied document, distance between a single question-and-answer to another is 4 line.
This script uses python-docx
to iterate through all line of a word document, and remove all email address and excess empty lines. There's also an option to remove all line starts with >
, i use it personally.
Don't forget to install python-docx before using the script:
pip install python-docx