https://github.com/sleeplessone1917/lemmy-ocr-bot
A bot for lemmy, the fediverse link aggregator, that converts images with text into text.
https://github.com/sleeplessone1917/lemmy-ocr-bot
bot fediverse fediverse-bot lemmy lemmy-bot ocr
Last synced: about 1 month ago
JSON representation
A bot for lemmy, the fediverse link aggregator, that converts images with text into text.
- Host: GitHub
- URL: https://github.com/sleeplessone1917/lemmy-ocr-bot
- Owner: SleeplessOne1917
- License: agpl-3.0
- Created: 2023-04-16T20:05:23.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-13T18:01:47.000Z (4 months ago)
- Last Synced: 2025-01-24T20:31:25.955Z (3 months ago)
- Topics: bot, fediverse, fediverse-bot, lemmy, lemmy-bot, ocr
- Language: TypeScript
- Homepage:
- Size: 216 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lemmy-ocr-bot
A bot for [lemmy](https://github.com/LemmyNet/lemmy), the fediverse link aggregator, that converts images with text into text.
# Setup
Install the bot's dependencies with the javascript package manager of your choice.
Create a file called `.env` in the same directory as `bot.ts`. There are 4 environment variables that need to be set:
- `INSTANCE`: The lemmy instance the bot's account belongs to
- `USERNAME_OR_EMAIL`: The username or email of the bot
- `PASSWORD`: The password for the bot's account.
- `OCR_API_KEY`: The API key used for the OCR API. [Create an API key here if you do not already have one.](https://ocr.space/OCRAPI)When the bot is setup, it can be started by running `npm start`.
# Usage
To use the bot, mention the bot in a reply to a post or comment. It will scan any images for text and respond to you with the text. Alternatively, if you create a post or comment that includes both a mention to the OCR bot and images, the OCR bot will respond with the scans.