ChatGPT Export Markdown

Exports ChatGPT chat messages to Markdown with automatic extraction of all grouped citation URLs (+N). Unlike alternatives, reliably expands and exports every source link from grouped references.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

Autore
zayac_volk
Installazioni giornaliere
0
Installazioni totali
4
Valutazione
0 0 0
Versione
4.9.5
Creato il
03/11/2025
Aggiornato il
29/11/2025
Dimensione
45 KB
Licenza
MIT
Applica a

English description

A script for exporting selected messages from ChatGPT chat to Markdown (UTF-8) format.

Key Features:

  • Extraction of grouped links: The main distinction from similar scripts is its ability to automatically expand and reliably extract all links from grouped citations (displayed as URL+X). The script emulates user actions to collect every source.
  • Complete list of links: Links are inserted both directly into the text at the grouping location (in the format [source] (url1) (url2)) and as a general numbered list ("Links:") at the bottom of each message.
  • URL cleanup: Automatically removes common tracking parameters (refs) from links.
  • Message order: Strictly preserves the order of messages as they appear on the page, independent of the selection order.
  • Formatting: Uses #User_question (N) and #GPT_answer (N) headings to structure the dialogue.

Interface:

The script adds checkboxes to each chat message and a minimalist control panel at the bottom right with two buttons: Select all and Export MD.

  1. Select all: Works as a toggle (All/None).
    • First click selects all loaded messages (text changes to "Select all (off)").
    • Second click deselects all messages (text changes back to "Select all").
  2. Export MD: Starts the link extraction process and saves selected messages to a .md file.

Tested in Opera/Chrome. Created for personal use, but may be useful to others as well.

Описание на русском

ChatGPT Export Markdown

Скрипт для экспорта выделенных сообщений из чата ChatGPT в формат Markdown (UTF-8).

Ключевые особенности:

  • Извлечение сгруппированных ссылок: Главное отличие от аналогов - способность автоматически раскрывать и надежно извлекать все ссылки из сгруппированных цитат (отображаемых как URL+X). Скрипт эмулирует действия пользователя для сбора всех источников.
  • Полный список ссылок: Ссылки вставляются как непосредственно в текст на месте группировки (в формате [источник] (url1) (url2)), так и в общем нумерованном списке Links: внизу каждого сообщения.
  • Очистка URL: Автоматически удаляет распространенные tracking-параметры (refs) из ссылок.
  • Порядок сообщений: Сохраняет сообщения строго в порядке их расположения на странице, независимо от порядка выделения пользователем.
  • Форматирование: Использует заголовки #User_question (N) и #GPT_answer (N) для структурирования диалога.

Интерфейс:

Скрипт добавляет чекбоксы к каждому сообщению в чате и минималистичную панель управления справа снизу с двумя кнопками: Select all и Export MD.

  1. Select all: Работает как переключатель (Все/Ничего).
    • Первое нажатие выделяет все загруженные сообщения (текст меняется на Select all (off)).
    • Второе нажатие снимает все выделения (текст меняется на Select all).
  2. Export MD: Запускает процесс извлечения ссылок и сохраняет выделенные сообщения в .md файл.

Тестировалось в Opera/Chrome. Сделано для себя, может кому пригодится.