https://github.com/alekpopovic/barcoder
Production-Ready Code 39 Barcode Generator
https://github.com/alekpopovic/barcoder
elixir mix
Last synced: 4 months ago
JSON representation
Production-Ready Code 39 Barcode Generator
- Host: GitHub
- URL: https://github.com/alekpopovic/barcoder
- Owner: alekpopovic
- Created: 2025-06-14T16:03:27.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-14T16:41:07.000Z (about 1 year ago)
- Last Synced: 2025-08-06T11:29:11.328Z (11 months ago)
- Topics: elixir, mix
- Language: Elixir
- Homepage: https://hex.pm/packages/barcoder
- Size: 10.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Barcoder 
[](https://github.com/alekpopovic/barcoder/actions/workflows/elixir.yml)
## Production-Ready Code 39 Barcode Generator
## Features
- Code 39 Support: Implements the widely-supported Code 39 barcode standard
- Input Validation: Validates characters before encoding to prevent runtime errors
- Multiple Output Formats:
- ASCII art for console/terminal display
- SVG format for web applications and printing
- Error Handling: Comprehensive error handling with descriptive messages
- Configurable Options: Customizable width, height, and quiet zones
- Production Ready: Includes proper documentation, validation, and error handling
## Supported Characters
- Numbers: 0-9
- Uppercase letters: A-Z
- Special characters: space, -, ., $, /, +, %
## Usage Examples
```elixir
# Basic ASCII output
{:ok, barcode} = BarcodeGenerator.generate("HELLO123")
IO.puts(barcode)
# SVG output for web use
{:ok, svg} = BarcodeGenerator.generate("PRODUCT001", format: :svg, width: 3, height: 50)
File.write!("barcode.svg", svg)
# Validate input
case BarcodeGenerator.validate_input("TEST123") do
:ok -> IO.puts("Valid input")
{:error, reason} -> IO.puts("Error: #{reason}")
end
```
## Installation
```elixir
def deps do
[
{:barcoder, "~> 0.1.0"}
]
end
```
Documentation can be found at .