Readit News logoReadit News
Posted by u/mohamedchs 2 years ago
Show HN: Get your entire ChatGPT history in Markdown filesgithub.com/mohamed-chs/ch...
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...)

asabla · 2 years ago
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?

mohamedchs · 2 years ago
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.

Dead Comment

wfhBrian · 2 years ago
I would have to be rewritten in JavaScript or TypeScript
shigawire · 2 years ago
Very cool, I just spent 15 minutes manually formatting some chatgpt responses into Markdown. I should have just checked HN instead.
gala8y · 2 years ago
> I should have just checked HN instead.

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

padolsey · 2 years ago
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.
eurekin · 2 years ago
It's not uncommon to have it break partway through the response
mohamedchs · 2 years ago
Thanks ! Glad you found it useful !
jepler · 2 years ago
Cool!

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

SevenIron · 2 years ago
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.
fudged71 · 2 years ago
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.

mohamedchs · 2 years ago
On it ! (I mean asking the code interpreter for ideas part)
SOLAR_FIELDS · 2 years ago
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
qwerty456127 · 2 years ago
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.
hutzlibu · 2 years ago
Save as mhtml works as well (but I think not supported by firefox?).
qwerty456127 · 2 years ago
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.
cloudking · 2 years ago
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.
euazOn · 2 years ago
A crappy workaround: the official mobile app allows you to do that, with a search field in the History menu.