Help automating OCR export of handwritten notes on iPad

The new iPadOS 14 has pretty good handwriting OCR in the default Apple Notes app. I have lots of handwritten notes that I would love to move into Obsidian.

At the moment, a manual workflow would be:
open note > tap on page to get contextual options > “select all” > copy > tap text to get contextual options > “copy as text” > create new note in plaintext app > paste from clipboard > manually re-write note title (which is typed, not handwritten, in Apple Notes)

That is way too much effort. It must be possible to automate through Shortcuts or some other way, but I can’t figure it out. I have never created my own Shortcut, so maybe I have missed something obvious. But I don’t know how to automate the “copy as text” bit. I would love to have a shortcut in the share sheet (of even do all notes in a batch) that exports the OCR’d text into my Dropbox vault, and uses the note title as the .md file name. Anyone know how this could be done?

Sorry you haven’t gotten a response to this yet. You might want to ask on Discord. There has been some discussion on the forum about drawing, but not OCR specifically. It would be a great future plugin.

https://forum.obsidian.md/t/drawing-support-for-users-who-use-styluses-tablets/3090
https://forum.obsidian.md/t/diagram-drawing-plugin/3451

Thanks Sam – those are useful discussions. Although to be honest, I reckon handwriting/OCR is too far outside of scope for Obsidian’s core offering – not worth the devs limited bandwidth.

I am quite happy using the default Apple Notes iPadOS app when I am in a meeting. I am just thinking there must be a simple way to use Apple’s in-built OCR to extract text to a vault note. Really, this is a question about iOS Shortcuts, rather than Obsidian.

I had seen some other forum members (eg @50bbx @ryanjamurphy ) share some nifty applications of iOS Shortcuts. My skill at writing iOS Shortcuts is pretty limited, so I thought it worth throwing out the query just in case people had ideas. Any idea which Discord channel might be suitable for this? …as I said, not really an Obsidian question per se.

Well once the plugin API is out, then there will be more possibilities

Hm, so the goal is Apple Notes note in which the content is hand-written → Obsidian note?

I don’t use Apple Notes’s handwriting feature much… can you select hand written text and access the share sheet? If so, I’m curious as to what sharing it to a Quick Look shortcut produces. I can try to test this sometime in the next couple of weeks if you don’t get to it first.

Yep, that’s the goal.
You can select handwritten text, and you can also access the share sheet, but the two don’t seem to be connected. This is in the new iPadOS 14 with built-in OCR (but only on iPad, looking at the same note on i(Phone)OS or macOS gives no OCR).

The way it works is that you select the handwritten text and there is a special “Copy as Text” option:

Which puts the following text on the clipboard: “The Ocr is great, but if I selent this text and share with share sheet, it just grabs the title.”

In my opinion, that is pretty good OCR! Good enough that I would be happy using it to digitise my 100s of handwritten notes. Only problem is the “Copy as Text” option is not what happens when you go to the share sheet to export the note into some other app. Only the typed text is processed through the standard share sheet. For example, in this case, if I send it to Drafts, I just get “Test note to show Ryan”

I am hoping for a one button shortcut… too many steps if I have to open note, select text, copy as text, move to plain text app, open new note, etc etc etc. But maybe it is not possible.

Sounds like you won’t get better performance than the following:
Select text → Copy → Tap Shortcut

In the Shortcut, then, you’ll want to do something like:
Get Clipboard → Set Variable to “Input” → Run an action that sends the text to wherever you want it to go in order to get it into Obsidian (e.g., Drafts’s Run Action with Text).

If you need a sketch in Shortcuts to get started I’m happy to make one.

1 Like

Thanks for the offer, that’s very kind.

In the end, your response inspired me to find a solution. With your point about doing a manual copy and then going to the share sheet, I realised I could enter the shortcut with two sources of information: what comes through the share sheet (typed text) and what sits on the clipboard (OCR text).

I pulled this together, largely adapting from @50bbx 's Dropbox shortcut: https://www.icloud.com/shortcuts/ba96ca33c60e4f8caf0c519a6ac08b15

1 Like

You actually don’t need to action this via the share sheet. You could run it from a button on a Shortcuts widget, or by using the new Spotlight on iOS 14: hit cmd+space and then type the name of the shortcut to trigger it.

But yes, glad this could work!