factful / ocr_testing

Scripts and results from our OCR roundup, available on Source
https://source.opennews.org/articles/so-many-ocr-options/
150 stars 46 forks source link

Clarify setting ENV #1

Closed amandabee closed 5 years ago

amandabee commented 5 years ago

@knowtheory

At the top of the azure.rb we need to clarify setting the ENV variable -- if you set it in a virtualenv will that stick? Are you assuming a virtualenv? Or will that AZURE_KEY be available globally?

knowtheory commented 5 years ago

Yep! The Azure and GCP scripts both read some data off the commandline, i'd like to make the Azure script run the way the GCP one does (you pass a file in as an ENV variable) and then it does the right thing. But haven't gotten there yet, it's on the todo list:

knowtheory commented 5 years ago

Okay, the script now takes credentials if they are required. So for example you do this:

ruby ./lib/ocr.rb google google_cloud_vision/credentials.json documents/*

likewise the Azure instructions are:

ruby ./lib/ocr.rb azure azure/credentials.json documents/*

amandabee commented 5 years ago

It sounds like we need a "how to use this repo" section in the README.md for the whole repo. So, see #9

amandabee commented 5 years ago

Closing b/c the instructions have moved past this.