gdriveocr
Advanced tools
Comparing version 0.1.3 to 0.1.4
@@ -78,6 +78,5 @@ const fs = require('fs'); | ||
async function auth(certfile){ | ||
let content = fs.readFileSync(certfile) | ||
return await authorize(JSON.parse(content)) | ||
try{ | ||
let content = fs.readFileSync('credentials.json') | ||
console.log(certfile) | ||
let content = fs.readFileSync(certfile) | ||
return await authorize(JSON.parse(content)) | ||
@@ -84,0 +83,0 @@ } catch (error){ |
@@ -14,3 +14,3 @@ #!/usr/bin/env node | ||
let drive, cloudFolderId, file, lang | ||
let drive, cloudFolderId, file, lang, certfile | ||
let promises = [] | ||
@@ -21,3 +21,2 @@ let tempsFiles = [] | ||
let openedFiles = [] | ||
let certfile = 'credentials.json' | ||
let active = 0 | ||
@@ -252,3 +251,3 @@ let status = { | ||
if(program.lang) lang = program.lang | ||
if(program.cert) certpath = program.cert | ||
if(program.cert) certfile = program.cert | ||
run() | ||
@@ -255,0 +254,0 @@ } |
{ | ||
"name": "gdriveocr", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "OCR by Google Drive API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
12818
4
338