Change default format/template for Summarize Highlights > Markdown

Hi All,

Is it possible to change the default template for the Summarize Highlights > Markdown?

I would like it to look like this for easy copy/paste into Tana.

Any help would be appreciated, thank you in advance!

This isn’t customizable.

Readwise seems to be all the rage since they brought out the Readwise Reader, especially with the more recent updates to how they handle PDFs. Frankly, except for the fantastic way in which it integrates with other software, I don’t quite get it.

For me, when consuming content from PDF docs, highlighting important text, extracting said text, and having a deep link back to the location of the text within the PDF, is so much more efficient in DT.

On top of that, DT provides significant other benefits in terms of syncing, search and overall security that is not available from Readwise.

My only obstacle in this regard is the ability to export the extracted text, together with the deep link, in a format that I can effectively paste into Tana. Tana now has a native Readwise integration and the above import of text together with the link to the PDF location can be set-up to run automatically. Still, I have a preference for everything else in the information consumption process that DT provides. And I do not even mind that it needs to happen completely automatically (I believe the other benefits provided are significant enough to justify a bit of copy and paste now and then). However, I would be immensely helpful if the output from Summarize Annotations > as Markdown could provide something that could be used in Tana.

Someone previously provided the below script that assists to attach the location link to each highlight instead of grouping highlights from a specific page under one link:

tell application id "DNtp"
	repeat with thisRecord in (selection as list)
		-- Loop through selected documents
		if (type of thisRecord as string) = "markdown" then
			-- Only process Markdown docs
			set newText to {}
			-- Set up an empty list to push the paragraphs into)
			set currentText to (plain text of thisRecord)
			-- Get the current text of the document
			repeat with thisLine in (paragraphs of currentText)
				-- Loop through the document, paragraph by paragraph
				if thisLine begins with "##" then
					-- If this is an H2 page link
					set cachedText to (characters 4 thru -1 of thisLine as string) -- Cache all but the control characters in a variable
				else if thisLine begins with "* " then
					-- If it's just a bulleted paragraph 
					copy ((characters 3 thru -1 of thisLine as string) & " (" & (cachedText) & ")  " & return) to end of newText
					-- Get all but the control characters and concatenate the cachedText.
					-- Then push it to the newText list
					copy thisLine & return to end of newText
					-- Anything else, including the H1 line at the top, just push into the newText list
				end if
			end repeat
			set plain text of thisRecord to (newText as string)
			-- Set the text of the document to the new text
		end if
	end repeat
end tell

This was quite helpful, but I do not know enough about scripting to take this further and get the extracted text into Tana Paste format (Tana Paste).

If anyone is able to assist with this, or provide some guidance, it would be greatly appreciated.

Rather than run your work through an intermediary script – which is likely to need revisions since Tana changes frequently because it is not in public release yet – why not take your problem to the Tana Slack community and see what approaches other active users of Tana do to get their PDF annotations into Tana without using the Readwise loop. It’s usually better to discuss needs in the target software forum than here. That’s where the experts hang out.

1 Like

Thanks. Your suggestion makes sense and I did post there just shortly before my post above here. My thinking was, however, that I didn’t just want to get input on other approaches relating to PDF annotations, but specifically the output from DevonThink. Since I’ve been grappling with this issue for a while, I’ve opted to cast a wider net in the hopes of potentially catching the of someone that might have an efficient solution.