Metadata-Version: 2.4
Name: ocr_translate-libretranslate
Version: 0.1.1
Summary: Plugin to implement LibreTranslate translation for ocr_translate.
Keywords: django,translation
Author: Davide Grassano
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Natural Language :: English
Classifier: Topic :: Text Processing :: Linguistic
License-File: LICENSE.txt
Requires-Dist: requests
Requires-Dist: django-ocr_translate>=0.7.0,<1.0
Requires-Dist: pre-commit ; extra == "pre-commit"
Requires-Dist: pylint ; extra == "pre-commit"
Requires-Dist: pylint-pytest ; extra == "pre-commit"
Requires-Dist: pylint-django ; extra == "pre-commit"
Requires-Dist: flit ; extra == "release"
Requires-Dist: pytest ; extra == "tests"
Requires-Dist: pytest-cov ; extra == "tests"
Requires-Dist: pytest-django ; extra == "tests"
Project-URL: Source, https://github.com/crivella/ocr_translate-libretranslate
Provides-Extra: pre-commit
Provides-Extra: release
Provides-Extra: tests

# Plugin for using LibreTranslate with ocr_translate

This is a plugin for the [ocr_translate](https://github.com/Crivella/ocr_translate) server for implementing translations using [LibreTranslate](https://github.com/LibreTranslate/LibreTranslate)

## Usage

### For versions of the server `>=0.7`

- Install through the server plugin manager **OR** manually by running `pip install ocr_translate-libretranslate`


## IMPORTANT

[LibreTranslate](https://github.com/LibreTranslate/LibreTranslate) needs to be installed separately and reachable from the server.

For the plugin:

- The environment variable `OCT_LIBRETRANSLATE_ENDPOINT` should be set to the endpoint of the LibreTranslate server (WITHOUT the `/translate`).

  Example:

  ```bash
  export OCT_LIBRETRANSLATE_ENDPOINT=http://localhost:5000/
  ```

- If the server requires an API key, set the environment variable `OCT_LIBRETRANSLATE_API_KEY` to the API key.
  Example:

  ```bash
  export OCT_LIBRETRANSLATE_API_KEY=your_api_key_here
  ```

