# vue-tesseract

> Convert Image-to-Text in vueJS Using Tesseract

Latest version **1.0.1** (published 2023-01-23) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-tesseract
pnpm add vue-tesseract
yarn add vue-tesseract
bun add vue-tesseract
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2023-01-23 |
| First published | 2023-01-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Toni |
| Maintainers | isekaimaouyoki-sama |
| Keywords | tesseract.js, tesseract, vue, vueJS, vue-tesseract, tesseract-for-vuejs |

## Links

- npm: https://www.npmjs.com/package/vue-tesseract
- Repository: https://github.com/isekaimaou1109/vue-tesseract
- Homepage: https://github.com/isekaimaou1109/vue-tesseract#readme
- Issues: https://github.com/isekaimaou1109/vue-tesseract/issues
- npm.io page: https://npm.io/package/vue-tesseract

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^2.7.14
- [tesseract.js](https://npm.io/package/tesseract.js.md) ^4.0.2
- [vue-fragment](https://npm.io/package/vue-fragment.md) ^1.6.0

## Recent versions

- 1.0.1 (latest) — 2023-01-23

## README

# **A Vue Package for Image-To-Text Using Tesseract.js** #


## **Description:** ##  
This package can be used as Component or Plugin, that is also a wrapper for tesseract.js

## **Note**: ## 
I've tested in VueJS 2. That was okay after all.

## **Usage:** ##
> __Case 1__: ```Used as Component```
```javascript
<script>
export default {
  name: "HelloWorldComponent",
  props: {
    msg: {
      type: String
    }
  },
  data: () => ({
    example: {
      url: 'https://tesseract.projectnaptha.com/img/eng_bw.png',
      lang: 'eng'
    },
    testData: null
  }),
  methods: {
    logger: m => console.log(m),
    async demo(cb) {
      const res = (await cb(this.example.url, this.example.lang, this.logger)).data
      this.testData = res
    }
  }
}
</script>

<template>
  <div class="greetings">
    <vue-tesseract v-slot="{ $recognize }">
      <h1 class="green" @click="demo($recognize)">Click on Me!</h1>
      <h2 class="test-class">{{ testData?.text }}</h2>
    </vue-tesseract>
  </div>
</template>
```

> __Case 2__: ```Used as Plugin```
```javascript
import Vue from 'vue'

import App from './App.vue'
import router from './router'
import { TesseractPlugin } from 'vue-tesseracts'

Vue.use(TesseractPlugin)

new Vue({
  router,
  render: (h) => h(App)
}).$mount('#app')
```

**Hopefully this will help you. If you like, you can give a like. Thank you. :heart:**

---
_Source: https://npm.io/package/vue-tesseract · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
