I had a C64 but no software, so I had to make my own by typing out the code from these books by hand. I love them though be warned that the programs are much simpler than the covers would lead one to believe.
When I was done, I realized I knew how to code basic. No one had to explain loops or goto or if after you type it in a few times.
I will add that OCR is not going to help you because a lot of the code was PEEK and POKE. I suppose your basic interpreter could also emulate the C64 memory space.