Implement OCR
This commit is contained in:
2
main.cjs
2
main.cjs
@@ -217,13 +217,13 @@ function getMatchingPhrase(inputString, targetCharacter) {
|
||||
checkString = ret.data.text;
|
||||
await worker.terminate();
|
||||
})();
|
||||
console.log("Checking OCR contents...");
|
||||
if (checkLoop(message, checkString)) {
|
||||
return;
|
||||
}
|
||||
checkString = checkString.replace(/[^a-zA-Z0-9]/g, '');
|
||||
checkLoop(message, checkString);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
/*
|
||||
|
Reference in New Issue
Block a user