├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── README.md ├── build.js ├── gpt2md.js ├── package-lock.json └── package.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | custom: https://www.paypal.me/rgmz 4 | github: yaph -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | data/ 2 | dist/ 3 | *.png 4 | 5 | # Logs 6 | logs 7 | *.log 8 | npm-debug.log* 9 | yarn-debug.log* 10 | yarn-error.log* 11 | lerna-debug.log* 12 | .pnpm-debug.log* 13 | 14 | # Diagnostic reports (https://nodejs.org/api/report.html) 15 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 16 | 17 | # Runtime data 18 | pids 19 | *.pid 20 | *.seed 21 | *.pid.lock 22 | 23 | # Directory for instrumented libs generated by jscoverage/JSCover 24 | lib-cov 25 | 26 | # Coverage directory used by tools like istanbul 27 | coverage 28 | *.lcov 29 | 30 | # nyc test coverage 31 | .nyc_output 32 | 33 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 34 | .grunt 35 | 36 | # Bower dependency directory (https://bower.io/) 37 | bower_components 38 | 39 | # node-waf configuration 40 | .lock-wscript 41 | 42 | # Compiled binary addons (https://nodejs.org/api/addons.html) 43 | build/Release 44 | 45 | # Dependency directories 46 | node_modules/ 47 | jspm_packages/ 48 | 49 | # Snowpack dependency directory (https://snowpack.dev/) 50 | web_modules/ 51 | 52 | # TypeScript cache 53 | *.tsbuildinfo 54 | 55 | # Optional npm cache directory 56 | .npm 57 | 58 | # Optional eslint cache 59 | .eslintcache 60 | 61 | # Optional stylelint cache 62 | .stylelintcache 63 | 64 | # Microbundle cache 65 | .rpt2_cache/ 66 | .rts2_cache_cjs/ 67 | .rts2_cache_es/ 68 | .rts2_cache_umd/ 69 | 70 | # Optional REPL history 71 | .node_repl_history 72 | 73 | # Output of 'npm pack' 74 | *.tgz 75 | 76 | # Yarn Integrity file 77 | .yarn-integrity 78 | 79 | # dotenv environment variable files 80 | .env 81 | .env.development.local 82 | .env.test.local 83 | .env.production.local 84 | .env.local 85 | 86 | # parcel-bundler cache (https://parceljs.org/) 87 | .cache 88 | .parcel-cache 89 | 90 | # Next.js build output 91 | .next 92 | out 93 | 94 | # Nuxt.js build / generate output 95 | .nuxt 96 | dist 97 | 98 | # Gatsby files 99 | .cache/ 100 | # Comment in the public line in if your project uses Gatsby and not Next.js 101 | # https://nextjs.org/blog/next-9-1#public-directory-support 102 | # public 103 | 104 | # vuepress build output 105 | .vuepress/dist 106 | 107 | # vuepress v2.x temp and cache directory 108 | .temp 109 | .cache 110 | 111 | # Docusaurus cache and generated files 112 | .docusaurus 113 | 114 | # Serverless directories 115 | .serverless/ 116 | 117 | # FuseBox cache 118 | .fusebox/ 119 | 120 | # DynamoDB Local files 121 | .dynamodb/ 122 | 123 | # TernJS port file 124 | .tern-port 125 | 126 | # Stores VSCode versions used for testing VSCode extensions 127 | .vscode-test 128 | 129 | # yarn v2 130 | .yarn/cache 131 | .yarn/unplugged 132 | .yarn/build-state.yml 133 | .yarn/install-state.gz 134 | .pnp.* 135 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2023 by Ramiro Gómez (https://ramiro.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of 4 | this software and associated documentation files (the "Software"), to deal in 5 | the Software without restriction, including without limitation the rights to 6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 7 | the Software, and to permit persons to whom the Software is furnished to do so, 8 | subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 15 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 16 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 17 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 18 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ChatGPT Export Browser Bookmarklet 2 | 3 | The ChatGPT Export bookmarklet is a convenient tool that allows you to effortlessly export conversations with ChatGPT as markdown files. With this bookmarklet, you can capture and save your ChatGPT conversations in a readable format for easy reference and sharing. 4 | 5 | ## Installation 6 | 7 | To get started, simply visit the [ChatGPT to Markdown web page](https://geeksta.net/tools/chatgpt-to-markdown/) and drag the bookmarklet link to your browser's bookmark toolbar. You can also review the source code of the link to ensure its integrity and functionality. 8 | 9 | Alternatively, if you prefer a more hands-on approach, you can clone this repository, install the necessary dependencies, and compile the code on your own machine. 10 | 11 | ## How it works 12 | 13 | Once the bookmarklet link is clicked on a ChatGPT conversation page the `document.body` is cloned and modified in the cloned version to remove any unnecessary information, ensuring a clean and concise output. Finally, the resulting HTML code is converted to markdown format and downloaded as a text file. The file is automatically named based on the conversation's title in the ChatGPT interface. 14 | 15 | With the ChatGPT Export browser bookmarklet, archiving and sharing your ChatGPT conversations as markdown files becomes a seamless process, enhancing your productivity and collaboration. 16 | -------------------------------------------------------------------------------- /build.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import * as esbuild from 'esbuild' 3 | import bookmarkletPlugin from 'esbuild-plugin-bookmarklet' 4 | 5 | await esbuild.build({ 6 | bundle: true, 7 | entryPoints: ['gpt2md.js'], 8 | format: 'iife', 9 | minify: true, 10 | outfile: 'dist/gpt2md.bookmarklet.js', 11 | plugins: [bookmarkletPlugin], 12 | sourcemap: false, 13 | target: ['chrome58', 'firefox57', 'safari11', 'edge16'], 14 | write: false, 15 | }) -------------------------------------------------------------------------------- /gpt2md.js: -------------------------------------------------------------------------------- 1 | const TurndownService = require('turndown'); 2 | const tables = require('turndown-plugin-gfm').tables; 3 | const ts = new TurndownService({ 4 | 'hr': '___________', 5 | 'preformattedCode': true, 6 | 'headingStyle': 'setext', 7 | 'codeBlockStyle': 'fenced' 8 | }); 9 | ts.use(tables); 10 | 11 | // Clone to not modify the actual `document.body` in the code that follows 12 | const body = document.body.cloneNode(true); 13 | 14 | // Remove code box headers 15 | body.querySelectorAll('pre .text-xs').forEach(n => n.parentNode?.removeChild(n)); 16 | 17 | // Remove prompt/response numbers 18 | body.querySelectorAll('div .text-xs.gap-1').forEach(n => n.parentNode?.removeChild(n)); 19 | 20 | // Remove footer 21 | body.querySelector('.absolute.bottom-0').remove() 22 | 23 | // properly format code blocks 24 | body.querySelectorAll('.text-message pre').forEach((n) => { 25 | n.innerHTML = n.querySelector('code').outerHTML; 26 | }); 27 | 28 | // Iterate through main text containers and create text to export 29 | let text = `# ${document.title}\n\n`; 30 | body.querySelectorAll('.text-message').forEach((n, i) => { 31 | const num = Math.trunc(i / 2) + 1; 32 | const prose = n.querySelector('.prose'); 33 | if (prose) { 34 | // Only convert response markup to markdown 35 | text += `## RESPONSE ${num}\n\n${ts.turndown(prose.innerHTML)}\n\n`; 36 | } else { 37 | // Keep prompt text as it was entered 38 | text += `## PROMPT ${num}\n\n${n.querySelector('div').innerText}\n\n`; 39 | } 40 | }); 41 | 42 | // Download 43 | const a = document.createElement('a'); 44 | a.download = `${document.title}.md`; 45 | a.href = URL.createObjectURL(new Blob([text])); 46 | a.style.display = 'none'; 47 | document.body.appendChild(a); 48 | a.click(); 49 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chatgpt-export", 3 | "version": "2.0.0", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "chatgpt-export", 9 | "version": "2.0.0", 10 | "license": "MIT", 11 | "dependencies": { 12 | "esbuild": "^0.25.0", 13 | "esbuild-plugin-bookmarklet": "^1.0.0", 14 | "turndown": "^7.2.0", 15 | "turndown-plugin-gfm": "^1.0.2" 16 | } 17 | }, 18 | "node_modules/@deno/shim-deno": { 19 | "version": "0.12.0", 20 | "resolved": "https://registry.npmjs.org/@deno/shim-deno/-/shim-deno-0.12.0.tgz", 21 | "integrity": "sha512-nD/Izdp4RfU35rip2Jx4lP1WOWY8qAvGLpB3wvjlwgut237/RS4PwhLdmYnxDBXdsjjWMx8sDxmdHWs35GF3yA==", 22 | "license": "MIT", 23 | "dependencies": { 24 | "@deno/shim-deno-test": "^0.4.0", 25 | "which": "^2.0.2" 26 | } 27 | }, 28 | "node_modules/@deno/shim-deno-test": { 29 | "version": "0.4.0", 30 | "resolved": "https://registry.npmjs.org/@deno/shim-deno-test/-/shim-deno-test-0.4.0.tgz", 31 | "integrity": "sha512-oYWcD7CpERZy/TXMTM9Tgh1HD/POHlbY9WpzmAk+5H8DohcxG415Qws8yLGlim3EaKBT2v3lJv01x4G0BosnaQ==", 32 | "license": "MIT" 33 | }, 34 | "node_modules/@esbuild/aix-ppc64": { 35 | "version": "0.25.1", 36 | "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.1.tgz", 37 | "integrity": "sha512-kfYGy8IdzTGy+z0vFGvExZtxkFlA4zAxgKEahG9KE1ScBjpQnFsNOX8KTU5ojNru5ed5CVoJYXFtoxaq5nFbjQ==", 38 | "cpu": [ 39 | "ppc64" 40 | ], 41 | "license": "MIT", 42 | "optional": true, 43 | "os": [ 44 | "aix" 45 | ], 46 | "engines": { 47 | "node": ">=18" 48 | } 49 | }, 50 | "node_modules/@esbuild/android-arm": { 51 | "version": "0.25.1", 52 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.1.tgz", 53 | "integrity": "sha512-dp+MshLYux6j/JjdqVLnMglQlFu+MuVeNrmT5nk6q07wNhCdSnB7QZj+7G8VMUGh1q+vj2Bq8kRsuyA00I/k+Q==", 54 | "cpu": [ 55 | "arm" 56 | ], 57 | "license": "MIT", 58 | "optional": true, 59 | "os": [ 60 | "android" 61 | ], 62 | "engines": { 63 | "node": ">=18" 64 | } 65 | }, 66 | "node_modules/@esbuild/android-arm64": { 67 | "version": "0.25.1", 68 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.1.tgz", 69 | "integrity": "sha512-50tM0zCJW5kGqgG7fQ7IHvQOcAn9TKiVRuQ/lN0xR+T2lzEFvAi1ZcS8DiksFcEpf1t/GYOeOfCAgDHFpkiSmA==", 70 | "cpu": [ 71 | "arm64" 72 | ], 73 | "license": "MIT", 74 | "optional": true, 75 | "os": [ 76 | "android" 77 | ], 78 | "engines": { 79 | "node": ">=18" 80 | } 81 | }, 82 | "node_modules/@esbuild/android-x64": { 83 | "version": "0.25.1", 84 | "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.1.tgz", 85 | "integrity": "sha512-GCj6WfUtNldqUzYkN/ITtlhwQqGWu9S45vUXs7EIYf+7rCiiqH9bCloatO9VhxsL0Pji+PF4Lz2XXCES+Q8hDw==", 86 | "cpu": [ 87 | "x64" 88 | ], 89 | "license": "MIT", 90 | "optional": true, 91 | "os": [ 92 | "android" 93 | ], 94 | "engines": { 95 | "node": ">=18" 96 | } 97 | }, 98 | "node_modules/@esbuild/darwin-arm64": { 99 | "version": "0.25.1", 100 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.1.tgz", 101 | "integrity": "sha512-5hEZKPf+nQjYoSr/elb62U19/l1mZDdqidGfmFutVUjjUZrOazAtwK+Kr+3y0C/oeJfLlxo9fXb1w7L+P7E4FQ==", 102 | "cpu": [ 103 | "arm64" 104 | ], 105 | "license": "MIT", 106 | "optional": true, 107 | "os": [ 108 | "darwin" 109 | ], 110 | "engines": { 111 | "node": ">=18" 112 | } 113 | }, 114 | "node_modules/@esbuild/darwin-x64": { 115 | "version": "0.25.1", 116 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.1.tgz", 117 | "integrity": "sha512-hxVnwL2Dqs3fM1IWq8Iezh0cX7ZGdVhbTfnOy5uURtao5OIVCEyj9xIzemDi7sRvKsuSdtCAhMKarxqtlyVyfA==", 118 | "cpu": [ 119 | "x64" 120 | ], 121 | "license": "MIT", 122 | "optional": true, 123 | "os": [ 124 | "darwin" 125 | ], 126 | "engines": { 127 | "node": ">=18" 128 | } 129 | }, 130 | "node_modules/@esbuild/freebsd-arm64": { 131 | "version": "0.25.1", 132 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.1.tgz", 133 | "integrity": "sha512-1MrCZs0fZa2g8E+FUo2ipw6jw5qqQiH+tERoS5fAfKnRx6NXH31tXBKI3VpmLijLH6yriMZsxJtaXUyFt/8Y4A==", 134 | "cpu": [ 135 | "arm64" 136 | ], 137 | "license": "MIT", 138 | "optional": true, 139 | "os": [ 140 | "freebsd" 141 | ], 142 | "engines": { 143 | "node": ">=18" 144 | } 145 | }, 146 | "node_modules/@esbuild/freebsd-x64": { 147 | "version": "0.25.1", 148 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.1.tgz", 149 | "integrity": "sha512-0IZWLiTyz7nm0xuIs0q1Y3QWJC52R8aSXxe40VUxm6BB1RNmkODtW6LHvWRrGiICulcX7ZvyH6h5fqdLu4gkww==", 150 | "cpu": [ 151 | "x64" 152 | ], 153 | "license": "MIT", 154 | "optional": true, 155 | "os": [ 156 | "freebsd" 157 | ], 158 | "engines": { 159 | "node": ">=18" 160 | } 161 | }, 162 | "node_modules/@esbuild/linux-arm": { 163 | "version": "0.25.1", 164 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.1.tgz", 165 | "integrity": "sha512-NdKOhS4u7JhDKw9G3cY6sWqFcnLITn6SqivVArbzIaf3cemShqfLGHYMx8Xlm/lBit3/5d7kXvriTUGa5YViuQ==", 166 | "cpu": [ 167 | "arm" 168 | ], 169 | "license": "MIT", 170 | "optional": true, 171 | "os": [ 172 | "linux" 173 | ], 174 | "engines": { 175 | "node": ">=18" 176 | } 177 | }, 178 | "node_modules/@esbuild/linux-arm64": { 179 | "version": "0.25.1", 180 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.1.tgz", 181 | "integrity": "sha512-jaN3dHi0/DDPelk0nLcXRm1q7DNJpjXy7yWaWvbfkPvI+7XNSc/lDOnCLN7gzsyzgu6qSAmgSvP9oXAhP973uQ==", 182 | "cpu": [ 183 | "arm64" 184 | ], 185 | "license": "MIT", 186 | "optional": true, 187 | "os": [ 188 | "linux" 189 | ], 190 | "engines": { 191 | "node": ">=18" 192 | } 193 | }, 194 | "node_modules/@esbuild/linux-ia32": { 195 | "version": "0.25.1", 196 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.1.tgz", 197 | "integrity": "sha512-OJykPaF4v8JidKNGz8c/q1lBO44sQNUQtq1KktJXdBLn1hPod5rE/Hko5ugKKZd+D2+o1a9MFGUEIUwO2YfgkQ==", 198 | "cpu": [ 199 | "ia32" 200 | ], 201 | "license": "MIT", 202 | "optional": true, 203 | "os": [ 204 | "linux" 205 | ], 206 | "engines": { 207 | "node": ">=18" 208 | } 209 | }, 210 | "node_modules/@esbuild/linux-loong64": { 211 | "version": "0.25.1", 212 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.1.tgz", 213 | "integrity": "sha512-nGfornQj4dzcq5Vp835oM/o21UMlXzn79KobKlcs3Wz9smwiifknLy4xDCLUU0BWp7b/houtdrgUz7nOGnfIYg==", 214 | "cpu": [ 215 | "loong64" 216 | ], 217 | "license": "MIT", 218 | "optional": true, 219 | "os": [ 220 | "linux" 221 | ], 222 | "engines": { 223 | "node": ">=18" 224 | } 225 | }, 226 | "node_modules/@esbuild/linux-mips64el": { 227 | "version": "0.25.1", 228 | "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.1.tgz", 229 | "integrity": "sha512-1osBbPEFYwIE5IVB/0g2X6i1qInZa1aIoj1TdL4AaAb55xIIgbg8Doq6a5BzYWgr+tEcDzYH67XVnTmUzL+nXg==", 230 | "cpu": [ 231 | "mips64el" 232 | ], 233 | "license": "MIT", 234 | "optional": true, 235 | "os": [ 236 | "linux" 237 | ], 238 | "engines": { 239 | "node": ">=18" 240 | } 241 | }, 242 | "node_modules/@esbuild/linux-ppc64": { 243 | "version": "0.25.1", 244 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.1.tgz", 245 | "integrity": "sha512-/6VBJOwUf3TdTvJZ82qF3tbLuWsscd7/1w+D9LH0W/SqUgM5/JJD0lrJ1fVIfZsqB6RFmLCe0Xz3fmZc3WtyVg==", 246 | "cpu": [ 247 | "ppc64" 248 | ], 249 | "license": "MIT", 250 | "optional": true, 251 | "os": [ 252 | "linux" 253 | ], 254 | "engines": { 255 | "node": ">=18" 256 | } 257 | }, 258 | "node_modules/@esbuild/linux-riscv64": { 259 | "version": "0.25.1", 260 | "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.1.tgz", 261 | "integrity": "sha512-nSut/Mx5gnilhcq2yIMLMe3Wl4FK5wx/o0QuuCLMtmJn+WeWYoEGDN1ipcN72g1WHsnIbxGXd4i/MF0gTcuAjQ==", 262 | "cpu": [ 263 | "riscv64" 264 | ], 265 | "license": "MIT", 266 | "optional": true, 267 | "os": [ 268 | "linux" 269 | ], 270 | "engines": { 271 | "node": ">=18" 272 | } 273 | }, 274 | "node_modules/@esbuild/linux-s390x": { 275 | "version": "0.25.1", 276 | "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.1.tgz", 277 | "integrity": "sha512-cEECeLlJNfT8kZHqLarDBQso9a27o2Zd2AQ8USAEoGtejOrCYHNtKP8XQhMDJMtthdF4GBmjR2au3x1udADQQQ==", 278 | "cpu": [ 279 | "s390x" 280 | ], 281 | "license": "MIT", 282 | "optional": true, 283 | "os": [ 284 | "linux" 285 | ], 286 | "engines": { 287 | "node": ">=18" 288 | } 289 | }, 290 | "node_modules/@esbuild/linux-x64": { 291 | "version": "0.25.1", 292 | "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.1.tgz", 293 | "integrity": "sha512-xbfUhu/gnvSEg+EGovRc+kjBAkrvtk38RlerAzQxvMzlB4fXpCFCeUAYzJvrnhFtdeyVCDANSjJvOvGYoeKzFA==", 294 | "cpu": [ 295 | "x64" 296 | ], 297 | "license": "MIT", 298 | "optional": true, 299 | "os": [ 300 | "linux" 301 | ], 302 | "engines": { 303 | "node": ">=18" 304 | } 305 | }, 306 | "node_modules/@esbuild/netbsd-arm64": { 307 | "version": "0.25.1", 308 | "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.1.tgz", 309 | "integrity": "sha512-O96poM2XGhLtpTh+s4+nP7YCCAfb4tJNRVZHfIE7dgmax+yMP2WgMd2OecBuaATHKTHsLWHQeuaxMRnCsH8+5g==", 310 | "cpu": [ 311 | "arm64" 312 | ], 313 | "license": "MIT", 314 | "optional": true, 315 | "os": [ 316 | "netbsd" 317 | ], 318 | "engines": { 319 | "node": ">=18" 320 | } 321 | }, 322 | "node_modules/@esbuild/netbsd-x64": { 323 | "version": "0.25.1", 324 | "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.1.tgz", 325 | "integrity": "sha512-X53z6uXip6KFXBQ+Krbx25XHV/NCbzryM6ehOAeAil7X7oa4XIq+394PWGnwaSQ2WRA0KI6PUO6hTO5zeF5ijA==", 326 | "cpu": [ 327 | "x64" 328 | ], 329 | "license": "MIT", 330 | "optional": true, 331 | "os": [ 332 | "netbsd" 333 | ], 334 | "engines": { 335 | "node": ">=18" 336 | } 337 | }, 338 | "node_modules/@esbuild/openbsd-arm64": { 339 | "version": "0.25.1", 340 | "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.1.tgz", 341 | "integrity": "sha512-Na9T3szbXezdzM/Kfs3GcRQNjHzM6GzFBeU1/6IV/npKP5ORtp9zbQjvkDJ47s6BCgaAZnnnu/cY1x342+MvZg==", 342 | "cpu": [ 343 | "arm64" 344 | ], 345 | "license": "MIT", 346 | "optional": true, 347 | "os": [ 348 | "openbsd" 349 | ], 350 | "engines": { 351 | "node": ">=18" 352 | } 353 | }, 354 | "node_modules/@esbuild/openbsd-x64": { 355 | "version": "0.25.1", 356 | "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.1.tgz", 357 | "integrity": "sha512-T3H78X2h1tszfRSf+txbt5aOp/e7TAz3ptVKu9Oyir3IAOFPGV6O9c2naym5TOriy1l0nNf6a4X5UXRZSGX/dw==", 358 | "cpu": [ 359 | "x64" 360 | ], 361 | "license": "MIT", 362 | "optional": true, 363 | "os": [ 364 | "openbsd" 365 | ], 366 | "engines": { 367 | "node": ">=18" 368 | } 369 | }, 370 | "node_modules/@esbuild/sunos-x64": { 371 | "version": "0.25.1", 372 | "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.1.tgz", 373 | "integrity": "sha512-2H3RUvcmULO7dIE5EWJH8eubZAI4xw54H1ilJnRNZdeo8dTADEZ21w6J22XBkXqGJbe0+wnNJtw3UXRoLJnFEg==", 374 | "cpu": [ 375 | "x64" 376 | ], 377 | "license": "MIT", 378 | "optional": true, 379 | "os": [ 380 | "sunos" 381 | ], 382 | "engines": { 383 | "node": ">=18" 384 | } 385 | }, 386 | "node_modules/@esbuild/win32-arm64": { 387 | "version": "0.25.1", 388 | "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.1.tgz", 389 | "integrity": "sha512-GE7XvrdOzrb+yVKB9KsRMq+7a2U/K5Cf/8grVFRAGJmfADr/e/ODQ134RK2/eeHqYV5eQRFxb1hY7Nr15fv1NQ==", 390 | "cpu": [ 391 | "arm64" 392 | ], 393 | "license": "MIT", 394 | "optional": true, 395 | "os": [ 396 | "win32" 397 | ], 398 | "engines": { 399 | "node": ">=18" 400 | } 401 | }, 402 | "node_modules/@esbuild/win32-ia32": { 403 | "version": "0.25.1", 404 | "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.1.tgz", 405 | "integrity": "sha512-uOxSJCIcavSiT6UnBhBzE8wy3n0hOkJsBOzy7HDAuTDE++1DJMRRVCPGisULScHL+a/ZwdXPpXD3IyFKjA7K8A==", 406 | "cpu": [ 407 | "ia32" 408 | ], 409 | "license": "MIT", 410 | "optional": true, 411 | "os": [ 412 | "win32" 413 | ], 414 | "engines": { 415 | "node": ">=18" 416 | } 417 | }, 418 | "node_modules/@esbuild/win32-x64": { 419 | "version": "0.25.1", 420 | "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.1.tgz", 421 | "integrity": "sha512-Y1EQdcfwMSeQN/ujR5VayLOJ1BHaK+ssyk0AEzPjC+t1lITgsnccPqFjb6V+LsTp/9Iov4ysfjxLaGJ9RPtkVg==", 422 | "cpu": [ 423 | "x64" 424 | ], 425 | "license": "MIT", 426 | "optional": true, 427 | "os": [ 428 | "win32" 429 | ], 430 | "engines": { 431 | "node": ">=18" 432 | } 433 | }, 434 | "node_modules/@mixmark-io/domino": { 435 | "version": "2.2.0", 436 | "resolved": "https://registry.npmjs.org/@mixmark-io/domino/-/domino-2.2.0.tgz", 437 | "integrity": "sha512-Y28PR25bHXUg88kCV7nivXrP2Nj2RueZ3/l/jdx6J9f8J4nsEGcgX0Qe6lt7Pa+J79+kPiJU3LguR6O/6zrLOw==", 438 | "license": "BSD-2-Clause" 439 | }, 440 | "node_modules/esbuild": { 441 | "version": "0.25.1", 442 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.1.tgz", 443 | "integrity": "sha512-BGO5LtrGC7vxnqucAe/rmvKdJllfGaYWdyABvyMoXQlfYMb2bbRuReWR5tEGE//4LcNJj9XrkovTqNYRFZHAMQ==", 444 | "hasInstallScript": true, 445 | "license": "MIT", 446 | "bin": { 447 | "esbuild": "bin/esbuild" 448 | }, 449 | "engines": { 450 | "node": ">=18" 451 | }, 452 | "optionalDependencies": { 453 | "@esbuild/aix-ppc64": "0.25.1", 454 | "@esbuild/android-arm": "0.25.1", 455 | "@esbuild/android-arm64": "0.25.1", 456 | "@esbuild/android-x64": "0.25.1", 457 | "@esbuild/darwin-arm64": "0.25.1", 458 | "@esbuild/darwin-x64": "0.25.1", 459 | "@esbuild/freebsd-arm64": "0.25.1", 460 | "@esbuild/freebsd-x64": "0.25.1", 461 | "@esbuild/linux-arm": "0.25.1", 462 | "@esbuild/linux-arm64": "0.25.1", 463 | "@esbuild/linux-ia32": "0.25.1", 464 | "@esbuild/linux-loong64": "0.25.1", 465 | "@esbuild/linux-mips64el": "0.25.1", 466 | "@esbuild/linux-ppc64": "0.25.1", 467 | "@esbuild/linux-riscv64": "0.25.1", 468 | "@esbuild/linux-s390x": "0.25.1", 469 | "@esbuild/linux-x64": "0.25.1", 470 | "@esbuild/netbsd-arm64": "0.25.1", 471 | "@esbuild/netbsd-x64": "0.25.1", 472 | "@esbuild/openbsd-arm64": "0.25.1", 473 | "@esbuild/openbsd-x64": "0.25.1", 474 | "@esbuild/sunos-x64": "0.25.1", 475 | "@esbuild/win32-arm64": "0.25.1", 476 | "@esbuild/win32-ia32": "0.25.1", 477 | "@esbuild/win32-x64": "0.25.1" 478 | } 479 | }, 480 | "node_modules/esbuild-plugin-bookmarklet": { 481 | "version": "1.0.0", 482 | "resolved": "https://registry.npmjs.org/esbuild-plugin-bookmarklet/-/esbuild-plugin-bookmarklet-1.0.0.tgz", 483 | "integrity": "sha512-gcrEbyAXR/skLTseC7zqfLR3E0Lp4adA502ua2IMdfQOo2y4hQ5n1WfVztkgjZjYieS5HV94Q2KTtIH1xsuzjQ==", 484 | "license": "GPL-v3.0-or-later", 485 | "dependencies": { 486 | "@deno/shim-deno": "~0.12.0" 487 | } 488 | }, 489 | "node_modules/isexe": { 490 | "version": "2.0.0", 491 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 492 | "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", 493 | "license": "ISC" 494 | }, 495 | "node_modules/turndown": { 496 | "version": "7.2.0", 497 | "resolved": "https://registry.npmjs.org/turndown/-/turndown-7.2.0.tgz", 498 | "integrity": "sha512-eCZGBN4nNNqM9Owkv9HAtWRYfLA4h909E/WGAWWBpmB275ehNhZyk87/Tpvjbp0jjNl9XwCsbe6bm6CqFsgD+A==", 499 | "license": "MIT", 500 | "dependencies": { 501 | "@mixmark-io/domino": "^2.2.0" 502 | } 503 | }, 504 | "node_modules/turndown-plugin-gfm": { 505 | "version": "1.0.2", 506 | "resolved": "https://registry.npmjs.org/turndown-plugin-gfm/-/turndown-plugin-gfm-1.0.2.tgz", 507 | "integrity": "sha512-vwz9tfvF7XN/jE0dGoBei3FXWuvll78ohzCZQuOb+ZjWrs3a0XhQVomJEb2Qh4VHTPNRO4GPZh0V7VRbiWwkRg==", 508 | "license": "MIT" 509 | }, 510 | "node_modules/which": { 511 | "version": "2.0.2", 512 | "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", 513 | "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", 514 | "license": "ISC", 515 | "dependencies": { 516 | "isexe": "^2.0.0" 517 | }, 518 | "bin": { 519 | "node-which": "bin/node-which" 520 | }, 521 | "engines": { 522 | "node": ">= 8" 523 | } 524 | } 525 | } 526 | } 527 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chatgpt-export", 3 | "version": "2.0.0", 4 | "main": "gpt2md.js", 5 | "scripts": { 6 | "build": "./build.js" 7 | }, 8 | "type": "module", 9 | "homepage": "https://geeksta.net/tools/chatgpt-to-markdown/", 10 | "author": "Ramiro Gómez (https://ramiro.org)", 11 | "license": "MIT", 12 | "description": "A browser bookmarklet for exporting conversations with ChatGPT as markdown files.", 13 | "dependencies": { 14 | "esbuild": "^0.25.0", 15 | "esbuild-plugin-bookmarklet": "^1.0.0", 16 | "turndown": "^7.2.0", 17 | "turndown-plugin-gfm": "^1.0.2" 18 | } 19 | } 20 | --------------------------------------------------------------------------------