Workflow or Applescript to Rename basename from contents of self
Hello Everybody,
I want to merge physical SAT flash cards into an Evernote Peek notebook for my girlfriend on her iPad mini. I have a box of 500 cards and a ScanSnap that'll duplex scan the cards pretty nicely. The front of each card is a word, and the back is the definition/part of speech.
Evernote sees the basename of the files I upload to it as the vocab word/hint and the content of the file as the definition/answer.
My first thought was to use the OCR from ABBYY then use Automator "Extract PDF text" and make a plain text file with the same basename for each card, but the scansnap makes the filename a date and time string. So I need a script that will open the files individually and return a string from the first line delimited by the return stroke or spaces. Then rename the file by that string, close the file and keep instancing through the files.
Can anyone help with the script? I'm not too handy with the scripting these days. If not, I'll see if I can decipher some tutorials on teh Google.
Thank you in advance,
Derek
OS X Mountain Lion (10.8.2)