Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Get your entire ChatGPT history in Markdown files (github.com/mohamed-chs)
295 points by mohamedchs 11 months ago | hide | past | favorite | 22 comments
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...)




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?


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.


I would have to be rewritten in JavaScript or TypeScript


Very cool, I just spent 15 minutes manually formatting some chatgpt responses into Markdown. I should have just checked HN instead.


> I should have just checked HN instead.

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


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.


It's not uncommon to have it break partway through the response


Thanks ! Glad you found it useful !


Cool!

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


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.


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.


On it ! (I mean asking the code interpreter for ideas part)


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


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.


Save as mhtml works as well (but I think not supported by firefox?).


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.


It saves the page as it is, yes. I did not say this is superior to what this does ..



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.


A crappy workaround: the official mobile app allows you to do that, with a search field in the History menu.


How do you reuse your history? Is it used only in Obsidian? Is there any option to load it as context to ChatGPT?


Things like this needing to exist are one of the reasons we are working on https://flowch.ai/?ref=hn - 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: