Skip to content

jxl-info/deepl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: GPL v3 JCS-ELPA

deepl

Elisp library for the DeepL API

CI

The DeepL Elisp library provides convenient access to the DeepL API from applications written in the Elips language.

P.S. This package is expected to be used as a library, so there are only a few interactable commands you can use, and those are mostly examples.

📚 Documentation

Table of Contents

🔨 Usage

You will need to set up your API key before you can use this library.

(setq deepl-key "[YOUR API KEY]")

Alternatively, you can configure a function to retrieve the key from some external source. A function, deepl-key-auth-source is provided to retrieve the key from an auth-source entry under the :host key api.deepl.com

(setq deepl-key #deepl-key-auth-source)

For using another DEEPL endpoint,

(setq deepl-base-url "[DEEPL BASE URL]")

🔰 Example

Here is the simplest example that teaches you how to use this library. This is a function with a text, target-lang and a callback function.

(deepl-translate "How are you?" "ZH"  ; translate to Chinese
                 (lambda (data)
                   (message "%s" data)))

🛑 Debugging

While playing through this library, you might see this error quite often.

400 - Bad request.  Please check error message and your parameters

Try setting the variable deepl--show-log to t, it will show more error messages.

📂 Example projects

  • N/A

🔗 References

Contribute

PRs Welcome Elisp styleguide Donate on paypal Become a patron

If you would like to contribute to this project, you may either clone and make pull requests to this repository. Or you can clone the project and establish your own branch of this tool. Any methods are welcome!

About

Elisp library for the DeepL API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Emacs Lisp 93.2%
  • Makefile 6.8%