Skip to content

Commit

Permalink
added text
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-baumberger committed Feb 2, 2024
1 parent 65ead3e commit 99b3028
Showing 1 changed file with 42 additions and 16 deletions.
58 changes: 42 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,70 @@

# Obsidian Image to Text

Recognize Text on images in your notes. Replace the image with the text or append it to the image.
Recognize Text on images in your notes. Select the image and run the command. The recognized text will be appended to your image or will replace your image - depending on the command

## Commands

| Command | Description |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Image To Text: Replace Selection | Replace your image with the recognized text. Recognize text based on language defined in settings |
| Image To Text: Replace Selection - custom language | Replace your image with the recognized text. Recognize text based on custom selection |
| Image To Text: Append Selection | Append the recognized text to your image. Recognize text based on language defined in settings |
| Image To Text: Append Selection - custom language | Append the recognized text to your image. Recognize text based on custom selection |
| Command | Description |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| Image To Text: Replace Selection | Replace your image with the recognized text. Recognize text based on the language defined in settings |
| Image To Text: Replace Selection - custom language | Replace your image with the recognized text. Recognize text based on custom selection |
| Image To Text: Append Selection | Append the recognized text to your image. Recognize text based on language defined in settings |
| Image To Text: Append Selection - custom language | Append the recognized text to your image. Recognize text based on custom selection |

### Example
## Example

Example Image:
![Lorem ipsum Image](./demo/loremipsum.png)

Show Case:
![Lorem ipsum Animated](./demo/loremipsum.gif)

## Supported Image Types

- .jpg
- .jpeg
- .png
- .gif
- .bmp
- .pbm
- .webp

## Supported Markup

| Format | Example | Description |
| ----------------------------- | --------------------------------------------------- | ---------------------------------- |
| Obsidian Image | `![[example.png]]` | Obsidian image tag |
| Obsidian Image including size | `![[example.png\|300]]` | Obsidian image tag including size |
| Markdown Image | `![Image](https://www.example.com/example.png)` | Markdown image tag |
| URL | `https://www.example.com/example.png` | URL to an image |
| img Tag | `<img src="https://www.example.com/example.png" />` | Img tag with a valid src attribute |

## Installation

### Community Plugin

- Follow this link [Obsidian Plugin](https://obsidian.md/plugins?id=image-to-text-ocr)
- Or open Obsidian Settings, go to Community Plugins, browse "Image to Text OCR" click install and activte.
- Or open Obsidian Settings, go to Community Plugins, browse "Image to Text OCR" click install and activate.

### Manually installing the plugin

- Go to the latest [Releases](https://github.com/dario-baumberger/obsidian-image-to-text-ocr/releases)
- Download `main.js`, `manifest.json`
- save into your vault `VaultFolder/.obsidian/plugins/obsidian-image-to-text-ocr/`

## Roadmap
### Settings

| Name | Description |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Content language | Select language to recognize. Default is Englisch. If images contain special characters, changing the language may perform better results |
| Enable debug logging | If enabled, more will be logged in the console. |

- Enable recognition on images with defined size
## Ressources

This plugin uses [tesseract.js](https://github.com/naptha/tesseract.js/) to recognize text.

## Contribution

- Feel free to [open an issue](https://github.com/dario-baumberger/obsidian-image-to-text-ocr/issues) if you miss something
- Feel free to open a Pull request to implement a feature
- Please extend tests if you ad logic
- Please extend tests if you add logic

todo
command icons

0 comments on commit 99b3028

Please sign in to comment.