Using Scriptable to pull text from an image and enter it into a database

Hi all. I'm a Software Engineer, but I've never done anything with iPhone. I have wanted to try Scriptable for a while but have not had any ideas, until now. I have a book of quotes - one quote on each page - no pictures or anything to get in the way, just a quote surrounded by white space. Ultimately I would like to set up an API for these quotes, but to do so I must enter them into a database. What I would like to do with Scriptable is to access the camera, take a photo of each quote, run OCR on it, and store it in some way so that I can turn around and automatically feed it into a noSQL database like MongoDB.

First question: is this possible with Scriptable? I really don't want to create a whole app, because 1) I have too many things already to keep up on without taking on Swift, whereas Scriptable is basically just JavaScript, right? (I already know JavaScript), and 2) I just want this to be for my personal use. I'm not wanting to create something to put on the app store. I have too many things to do without having to deal with putting an app on the app store.

Second Question: if it is possible with Scriptable, can you tell me in general terms an outline of how I would go about it? I am NOT looking for actual code - I want to code it myself. What I mean is, what tools on the iPhone will I need to be accessing, and what steps would I need to do this in?

For example, I've come across mention of two things when it comes to recognizing text with an iPhone - Vision and LiveText. Now what I saw for Vision was in the context of Swift documentation. Is that only accessible via Swift? What about LiveText? Can I use that in a Scriptable script? If not, is there some sort of tool that Scriptable scripts can access that will convert the text from an image into text that I can save to eventually load into a database? And what tools would I use to access the camera and to store stuff into memory, and is there a specific section of memory I need to look into to save it?

Basically, I just need the names of the things I need to read up on in order to accomplish my task. If I know the tools I need to use and have the Scriptable documentation, I'm pretty sure I can figure out the coding part myself.

I appreciate any help on this.

Replies

You might have more luck asking this on the forum for Scriptable users. Go to the Scriptable documentation and, on the top page, look for the Community section.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"