Nils Durner's Blog Ahas, Breadcrumbs, Coding Epiphanies

Sharing OpenAI Deep Research

Sharing results from OpenAI Deep Research is not straightforward as simple copy & paste will cobble up attributions. What works instead is lifting the HTML fragment from ChatGPT and building a document from there. Step-by-step:

  1. In the browser version of ChatGPT, target the title in the response report. Do a left-click, open the Developer Console, and copy the grand-parent (../..) node of the h1 title to the clipboard (STRG + C or Cmd + C)
  2. Paste to Visual Studio Code or any other code editor
  3. Copy the header code (first fragment) from this gist to the clipboard, and paste it above the code from ChatGPT in Visual Studio Code. This will fix-up special characters and improve readability.
    1. Optionally, specify some title for the target document within <title></title>
  4. Copy the footer code (last fragment) from the gist, and paste it to at the end of the ChatGPT code
  5. Open search & replace, enable Regular Expression mode (.* icon in Visual Studio Code), and replace all instances of the following:

     (?:<div[^>]*>\s*)?<a href="([^"]+)"[^>]*>\s*<span[^>]*>(.*?)<\/span>\s*<\/a>(?:\s*<\/div>)?
    

    with:

     <a href="$1" target="_blank"><span class="link-icon">&nbsp;🔗</span>$2</a>
    
  6. Save the file with .html extension. Optionally, either open the HTML file in:
    1. Word and save as DOCX, or
    2. in your browser and print it to PDF
  7. Share the result