No description
  • C 85.4%
  • Elixir 14%
  • Makefile 0.6%
Find a file
2026-05-30 14:35:27 +00:00
.woodpecker Add Woodpecker CI configuration 2026-05-13 16:37:42 +04:00
changelog.d Install generated captcha executable into app priv 2026-05-13 22:30:16 +04:00
config Fix warnings on modern Elixir 2024-06-27 12:10:01 -04:00
lib Use System.cmd instead of Port.open 2019-12-27 13:23:38 +07:00
priv use absolute bin path 2017-03-27 16:39:12 +08:00
src Fix headers path to avoid needing -I./src 2024-11-27 23:23:35 +01:00
test Install generated captcha executable into app priv 2026-05-13 22:30:16 +04:00
.formatter.exs Add formatter.exs 2019-11-10 15:22:04 +03:00
.gitignore Install generated captcha executable into app priv 2026-05-13 22:30:16 +04:00
.gitlab-ci.yml Update CI image to Elixir 1.13 2024-06-27 12:10:01 -04:00
LICENSE first commit 2017-03-27 16:14:16 +08:00
Makefile Remove gnu make | prerequisite operator 2026-05-22 16:48:02 +02:00
mix.exs Install generated captcha executable into app priv 2026-05-13 22:30:16 +04:00
mix.lock Fix docs generation for Hex publication 2026-05-13 21:51:10 +04:00
README.md Update README to reflect fork status and correct package name 2026-05-13 16:47:51 +04:00

pleroma-captcha

This is the Pleroma fork of the elixir-captcha library for generating CAPTCHAs. No dependencies. It draws captcha images with C code. No ImageMagick, No RMagick.

C code from: https://github.com/huacnlee/rucaptcha

Installation

If available in Hex, the package can be installed as:

  1. Add pleroma-captcha to your list of dependencies in mix.exs:
```elixir
def deps do
  [{:pleroma_captcha, "~> 1.0.0"}]
end
```
  1. Ensure captcha is started before your application:
```elixir
def application do
  [applications: [:captcha]]
end
```

Usage

# allow customize receive timeout, default: 10_000
case Captcha.get() do
  {:ok, text, img_binary } ->
    # save text in session, then send img to client
  {:timeout} ->
    # log some error
end