Skip to content

Commit 32a139f

Browse files
committed
site: rebuild manual de la web [2026-04-20 01:19]
1 parent 0fc8d84 commit 32a139f

40 files changed

Lines changed: 4398 additions & 581 deletions

apps/ocr_demo/.formatter.exs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Used by "mix format"
2+
[
3+
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
4+
]

apps/ocr_demo/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# The directory Mix will write compiled artifacts to.
2+
/_build/
3+
4+
# If you run "mix test --cover", coverage assets end up here.
5+
/cover/
6+
7+
# The directory Mix downloads your dependencies sources to.
8+
/deps/
9+
10+
# Where third-party dependencies like ExDoc output generated docs.
11+
/doc/
12+
13+
# Temporary files, for example, from tests.
14+
/tmp/
15+
16+
# If the VM crashes, it generates a dump, let's ignore it too.
17+
erl_crash.dump
18+
19+
# Also ignore archive artifacts (built via "mix archive.build").
20+
*.ez
21+
22+
# Ignore package tarball (built via "mix hex.build").
23+
ocr_demo-*.tar
24+

apps/ocr_demo/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# OcrDemo
2+
3+
**TODO: Add description**
4+
5+
## Installation
6+
7+
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
8+
by adding `ocr_demo` to your list of dependencies in `mix.exs`:
9+
10+
```elixir
11+
def deps do
12+
[
13+
{:ocr_demo, "~> 0.1.0"}
14+
]
15+
end
16+
```
17+
18+
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
19+
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
20+
be found at <https://hexdocs.pm/ocr_demo>.
21+

apps/ocr_demo/lib/ocr_demo.ex

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
defmodule OcrDemo do
2+
@moduledoc """
3+
Modulo para realizar OCR sencillo usando Tesseract.
4+
"""
5+
6+
@doc """
7+
Procesa una imagen y devuelve el texto extraído.
8+
"""
9+
def process_image(path) do
10+
TesseractOcr.read(path)
11+
end
12+
end

apps/ocr_demo/mix.exs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
defmodule OcrDemo.MixProject do
2+
use Mix.Project
3+
4+
def project do
5+
[
6+
app: :ocr_demo,
7+
version: "0.1.0",
8+
elixir: "~> 1.19",
9+
start_permanent: Mix.env() == :prod,
10+
deps: deps()
11+
]
12+
end
13+
14+
# Run "mix help compile.app" to learn about applications.
15+
def application do
16+
[
17+
extra_applications: [:logger]
18+
]
19+
end
20+
21+
# Run "mix help deps" to learn about dependencies.
22+
defp deps do
23+
[
24+
{:tesseract_ocr, "~> 0.1.5"}
25+
]
26+
end
27+
end

apps/ocr_demo/mix.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
%{
2+
"secure_random": {:hex, :secure_random, "0.5.1", "c5532b37c89d175c328f5196a0c2a5680b15ebce3e654da37129a9fe40ebf51b", [:mix], [], "hexpm", "1b9754f15e3940a143baafd19da12293f100044df69ea12db5d72878312ae6ab"},
3+
"tesseract_ocr": {:hex, :tesseract_ocr, "0.1.5", "158d5f1a3b6507655f52c4cb55c7ddf638f1c1ede0dc464e027cd0e01d7c4b64", [:mix], [{:secure_random, ">= 0.0.0", [hex: :secure_random, repo: "hexpm", optional: false]}], "hexpm", "fdc09d9704ba2e162740f651db5a4dcf1643d6cb70e3e8f8d33352e4b6ac6d99"},
4+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
defmodule OcrDemoTest do
2+
use ExUnit.Case
3+
doctest OcrDemo
4+
5+
test "greets the world" do
6+
assert OcrDemo.hello() == :world
7+
end
8+
end

apps/ocr_demo/test/test_helper.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ExUnit.start()

apps/ocr_demo/verify_ocr.exs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
image_path = "C:/Users/USER/.gemini/antigravity/brain/2f198be2-0bf3-43c4-be5c-528cfd1e90d0/ocr_test_text_1776661518382.png"
2+
IO.puts("Procesando imagen: #{image_path}")
3+
resultado = OcrDemo.process_image(image_path)
4+
IO.puts("Resultado OCR:")
5+
IO.puts("-----------------")
6+
IO.puts(resultado)
7+
IO.puts("-----------------")
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)