Script to get PDF annotations as Markdown on the clipboard?

Is there a script or feature in DevonThink that can get PDF annotations, and then drop them on the clipboard as Markdown?

PDF Expert as an example can get annotations as Markdown, and saves them to a file that looks like this as an example.

Very simple, and clean, ready to paste into a Markdown editor. I’d love to be able to get this text directly from DevonThink as a button or script, and be able to paste wherever.

Annotation Summary of 4 Things to Consider Before You Start Using AI in Personnel Decisions.pdf.

Highlight [page 2]: if the initial data used to build the model is biased, then the algorithm generated from that data will perpetuate that bias.

Highlight [page 2]: The algorithm may be less biased than the existing practices that generate the data in the first place.

# Annotation Summary of 4 Things to Consider Before You Start Using AI in Personnel Decisions.pdf.
 *Highlight [page 2]:* if the initial data used to build the model is biased, then the algorithm generated from that data will perpetuate that bias.

 *Highlight [page 2]:* The algorithm may be less biased than the existing practices that generate the data in the first place.

Edit: Just did see the Tools → Summarize → Markdown. Is there a way to take that directly to the clipboard?

This post was a double “Holy Cow - how did I not know this?” for me. Never knew PDF Expert could do this (I usually work in PDFPen PRO), but the Tools → Summarize → Markdown ??? I have been selecting all and copying the annotations inspector to get my highlights out of DT for so long (and then processing through BBEdit to clean it up). This will save me so much time. Thank you.

And if someone has the answer to the question you asked, so much the better

No there isn’t a built-in way at this time.
Development would have to assess this request.

However, why are you pasting into a Markdown editor when a Markdown file can already be produced?

I want to quickly be able to lift annotations I’m working with in DevonThink to other editors like IA Writer for longer form text-only editing outcomes. I don’t want to summarize to a file, open the file, select all, copy, task switch, paste, task switch, delete. I want to summarize, task-switch, paste, repeat.

I wonder if there’s something possible via AppleScript that could make this happen.

PDF Annotations are not available via plain AppleScript.

A smart rule could copy the summary to the clipboard by using a small embedded script.