March 14, 2019

Programming - enstars.info

Laravel error email stopped working

OK SO, it was using env() to read the email from the .env file BUT this doesn't work when things are cached which usually happens on production

SO I created a new config file enstars.php and created a mail address in there that reads from the .env file, this way even the cached ones know it

it is sending the emails out i see them in mailgun but only one has shown up in my mailbox so far??? Maybe this is some gmail rate limiting thing? cause one worked the next day

Time Spent: 1 days 4 hours 40 minutes


May 31, 2018

Programming - enstars.info

Pulling text out of story screen shots

I looked into this project last night, and finally got a working concept tonight!

Steps of mostly failure:

  1. Look for a way to pull text from images in PHP
  2. Find stack overflow mentioning Tessarect OCR https://stackoverflow.com/questions/2024238/read-text-from-an-image-with-php
  3. Go to wrapper mentioned https://github.com/thiagoalessio/tesseract-ocr-for-php
  4. Not understanding how it worked at all, I added it to my Laravel project through composer, but that didn't work.
  5. I then downloaded it on my mac through homebrew, this took a long time
  6. Decided to move this process to my windows box with more power
  7. Now late Thursday night
  8. Install Chocolatey package manager for windows through power shell
  9. Install the recommended windows package for tesseract
  10. Try to boot up my local xampp install, its completey broken.
  11. Abandon PHP, look for node package.
  12. There is one! http://tesseract.projectnaptha.com/
  13. Create a new project folder and install it
  14. Can't remember how to create projects from scratch in node, eventually remember how to run just the file name.
  15. Download example image, run test code, ERROR! Eng not found.
  16. Google around, no luck, just look through recent github issues and bingo! https://github.com/naptha/tesseract.js/issues/194
  17. Add in missing file
  18. rerun AND IT READS ENGLISH!!!
  19. Okay lets try Japanese, change language to Jpn, get language file
  20. Run and its completely garbled
  21. Move to browser as ghetto windows node shell probably can't handle Japanese font
  22. Some success but mostly garbled result!
  23. Crop picture so it's just the text
  24. Rerun - IT WORKS O M G

I can't believe I got it working! It was probably 3 hours of messing around over two nights, switching to JavaScript was the solution all along!

Next step is to start automating things, image cropping, file running, and then saving the text!

Time Spent: 2 hours 16 minutes