Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ocr-command-line-tool

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ocr-command-line-tool - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

example.js

20

index.js

@@ -7,13 +7,19 @@ const Tesseract = require('tesseract.js')

load.frame(["\\", "|", "/", "–",]);
load.color = 'white';
load.text = 'Loading';
await Tesseract.recognize(
load.color = 'yellow';
load.text = ' Loading';
var bruh = await Tesseract.recognize(
x,
'eng',
{ }
).then(function ({ data: { text } }) {
fs.writeFile(y, text, function (err) {});
load.stop()
console.log("Successfully wrote to file.");
).then(async function ({ data: { text } }) {
if(typeof y == "string"){
await fs.writeFile(y, text, function (err) {});
console.log("Successfully wrote to file.");
} else {
console.log("\n")
return text
}
})
load.stop()
return bruh
}

@@ -20,0 +26,0 @@ module.exports = {

{
"name": "ocr-command-line-tool",
"version": "1.0.2",
"version": "1.0.3",
"description": "Scan images on CLI",

@@ -5,0 +5,0 @@ "main": "index.js",

# OCR Command Line Tool
OCR Command Line tool (OCR-CLT) is a global Node package that uses OCR technology to extract text from images. It is based on the Tesseract JS OCR library, so it is very efficient.
## Installation
Using npm:
Using npm to install CLI tool:
```shell

@@ -9,2 +10,7 @@ $ npm install -g npm

```
Using npm to install module:
```shell
$ npm install -g npm
$ npm install ocr-command-line-tool
```

@@ -16,4 +22,13 @@ ## Example

```
In NodeJS:
```js
const ocrCommandLineTool = require("./index.js").ocr
async function getText (imagepath) {
var mytext = await ocrCommandLineTool(imagepath)
console.log(mytext)
}
getText('<path to image>')
```
## Why OCR-CLT?
OCR-CLT text recognition easy with a simple command. Beyond this, most other competitors are made as API's, which come with hefty fees. Here, you can use the tool right from your own computer for free! Additionally you can take advantage of all the power your computer has.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc