Skip to content

Instantly share code, notes, and snippets.

View LukasMFR's full-sized avatar

Lukas MAUFFRÉ LukasMFR

View GitHub Profile
@LukasMFR
LukasMFR / chatgpt-conversation-exporter.js
Created December 12, 2025 12:36
JavaScript snippet to export a ChatGPT conversation from the web UI to a clean Markdown file, with correct user/assistant attribution, code block preservation, and basic media placeholders. Designed to be run directly in the browser console (Safari/Chrome/Firefox).
(() => {
function formatDate(date = new Date()) {
return date.toISOString().split("T")[0];
}
function escapeMarkdown(text) {
return text
.replace(/\\/g, "\\\\")
.replace(/\*/g, "\\*")
.replace(/_/g, "\\_")
from math import *