News for hackers. Stuff that matters.

Show HN: Get your entire ChatGPT history, in Markdown files

https://github.com/mohamed-chs/chatgpt-history-export-to-md

This is just a small thing I coded to help me see my entire convo history in beautiful markdown, in Obsidian (my note-taking app).

[Link to Github repo](https://github.com/mohamed-chs/chatgpt-history-export-to-md).

The Python script helps you to convert conversations extracted from ChatGPT (ZIP export all your data, sent by Openai) into neatly formatted Markdown files.

Also adds YAML metadata headers and includes Code interpreter (Advanced data analysis) intput / output code.

Feel free to fork the repo and implement your own improvements, I feel like there's alot more to be extracted from the data. Any feedback or contributions are welcome !

I found chrome extensions to be a bit slow and sometimes overkill for this, although I did enjoy the folder system in some of them.

[Link to first post](https://www.reddit.com/r/ChatGPT/comments/16k1ub5/i_made_a_s...)

( 22 comments | 8 points | on HN )
Re:Show HN: Get your entire ChatGPT history, in Markdown files by jepler on Sunday September 24, 2023 @04:44PM (#37636995)
Cool!

I used https://github.com/pionxzh/chatgpt-exporter in firefox, which had a bulk export option.

Re:Show HN: Get your entire ChatGPT history, in Markdown files by cloudking on Sunday September 24, 2023 @04:52PM (#37637086)
I've been looking for a solution to easily search through prompt history, any good extensions? The ones I tried were extremely bloated with unnecessary features.
Re:Show HN: Get your entire ChatGPT history, in Markdown files by euazOn on Sunday September 24, 2023 @04:58PM (#37637127)
A crappy workaround: the official mobile app allows you to do that, with a search field in the History menu.
Re:Show HN: Get your entire ChatGPT history, in Markdown files by asabla on Sunday September 24, 2023 @04:56PM (#37637115)
From another Obsidian junky to another. This is great! I will for certain try it out. Thank you for sharing.

Edit: Would it be feasible to have this setup as an Obsidian extension as well?

Re:Show HN: Get your entire ChatGPT history, in Markdown files by wfhBrian on Sunday September 24, 2023 @06:08PM (#37637641)
I would have to be rewritten in JavaScript or TypeScript
Re:Show HN: Get your entire ChatGPT history, in Markdown files by mohamedchs on Sunday September 24, 2023 @06:36PM (#37637838)
Thanks, I appreciate it ! As for the Obsidian extension, how would that look like, features wise? I'm not that experienced with javascript, so this should be a fun little project to work on. On the python side of things, I'd like to also add folders and tags and stuff, based on some semantic analysis of the chats, for better Obsidian flow.
Re:Show HN: Get your entire ChatGPT history, in Markdown files by fudged71 on Sunday September 24, 2023 @04:58PM (#37637126)
Any tips/ideas on what you could do with these exports?

I bet Code Interpreter could give some good scripts to analyze and visualize these.

Re:Show HN: Get your entire ChatGPT history, in Markdown files by SOLAR_FIELDS on Sunday September 24, 2023 @06:30PM (#37637803)
I was thinking it would be interesting to archive them for the inevitable “GPTX is better/worse than it was Y months ago” gnashing of teeth
Re:Show HN: Get your entire ChatGPT history, in Markdown files by mohamedchs on Sunday September 24, 2023 @06:43PM (#37637883)
On it ! (I mean asking the code interpreter for ideas part)
Re:Show HN: Get your entire ChatGPT history, in Markdown files by shigawire on Sunday September 24, 2023 @10:11PM (#37638984)
Very cool, I just spent 15 minutes manually formatting some chatgpt responses into Markdown. I should have just checked HN instead.
Re:Show HN: Get your entire ChatGPT history, in Markdown files by mohamedchs on Sunday September 24, 2023 @10:52PM (#37639210)
Thanks ! Glad you found it useful !
Re:Show HN: Get your entire ChatGPT history, in Markdown files by padolsey on Monday September 25, 2023 @12:21AM (#37639649)
Not to minimise OP’s work, but if you’re looking for markdown in a single chat thread, you usually can just ask chatgpt to give you markdown in a code block.
Re:Show HN: Get your entire ChatGPT history, in Markdown files by eurekin on Monday September 25, 2023 @04:10AM (#37640810)
It's not uncommon to have it break partway through the response
Re:Show HN: Get your entire ChatGPT history, in Markdown files by gala8y on Monday September 25, 2023 @03:34AM (#37640613)
> I should have just checked HN instead.

Generally, I would be very careful treating HN as a time saver. :)

Re:Show HN: Get your entire ChatGPT history, in Markdown files by totetsu on Sunday September 24, 2023 @10:56PM (#37639231)
Re:Show HN: Get your entire ChatGPT history, in Markdown files by qwerty456127 on Monday September 25, 2023 @02:02AM (#37640113)
Haven't tried it yet but it sounds like exactly what I need. There should have been an option to export an entire chat to Markdown, not just "export all the data". So far I have been copy-pasting to LibreOffice to preserve bulleted lists etc.
Re:Show HN: Get your entire ChatGPT history, in Markdown files by hutzlibu on Monday September 25, 2023 @06:53AM (#37641814)
Save as mhtml works as well (but I think not supported by firefox?).
Re:Show HN: Get your entire ChatGPT history, in Markdown files by qwerty456127 on Wednesday September 27, 2023 @12:42AM (#37670247)
Wouldn't it include all sorts of irrelevant garbage then? I only want the actual chat text with semantic formatting (like list bullets etc) - what Markdown does. I don't want fonts, page layout, menu etc.
Re:Show HN: Get your entire ChatGPT history, in Markdown files by hutzlibu on Wednesday September 27, 2023 @04:10AM (#37671613)
It saves the page as it is, yes. I did not say this is superior to what this does ..
Re:Show HN: Get your entire ChatGPT history, in Markdown files by llmllmllm on Monday September 25, 2023 @03:41AM (#37640649)
Things like this needing to exist are one of the reasons we are working on https://flowch.ai - the ChatGPT interface is really sub-optimal for work and keeping track of interactions over time. We have been building a much better way to organize LLM interactions, even basics like splitting things into projects and search make it a much better experience.
Re:Show HN: Get your entire ChatGPT history, in Markdown files by pplonski86 on Monday September 25, 2023 @06:56AM (#37641838)
How do you reuse your history? Is it used only in Obsidian? Is there any option to load it as context to ChatGPT?
Re:Show HN: Get your entire ChatGPT history, in Markdown files by SevenIron on Monday September 25, 2023 @08:47AM (#37642867)
Do we know any projects that are capable of exporting AI conversations from other sources (Claude, Poe, Phind etc..) ? I was planing to start a personal project that will get the data from all these conversations (as HTML) and then build a static site that will index them (so I can search) and also tag the conversations (source, main idea etc.). The idea is that not all AI are created equal and sometimes asking the same question to multiple AI engines will generate different answers. When one answer seems better I continue the conversation there (with that particular engine). This is how you get info spread all over the place and if you want to revisit a previous discussion ... now you have to remember all the details so you can find it.