• Python 89.7%
  • Makefile 10.1%
  • Shell 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
JesseBot 66f9a4faa0
Some checks failed
test / test (3.11) (push) Failing after 1s
test / test (3.12) (push) Failing after 1s
test / test (3.13) (push) Failing after 1s
test / test (3.14) (push) Failing after 1s
already added the cli
2026-09-25 21:13:41 +02:00
.forgejo/workflows fix repo for python publishing (#2) 2026-09-25 18:24:15 +00:00
streepjescode update streepjescode to have a cli and combine __init__ and __main__ into one file 2026-09-25 20:21:33 +02:00
test Use a specific Exception (#14) 2022-07-26 10:14:45 +02:00
.editorconfig modernize project setup: 2020-11-04 08:25:58 +01:00
.flake8 Public release 2020-06-04 15:11:21 +02:00
.gitignore Update dependencies 2022-07-26 09:25:25 +02:00
.isort.cfg modernize project setup: 2020-11-04 08:25:58 +01:00
AI_POLICY.md fix AI Policy link to reach out from 2026-09-25 20:34:37 +02:00
example_inkscape.svg Automatically generate examples 2022-07-08 09:34:32 +02:00
example_path.svg Automatically generate examples 2022-07-08 09:34:32 +02:00
example_simple.svg Automatically generate examples 2022-07-08 09:34:32 +02:00
LICENSE initial commit after fork 2026-09-24 00:17:46 +02:00
Makefile Makefile: fix flynt invocations 2022-07-11 01:56:54 +02:00
poetry.lock rename project 2026-09-25 19:20:18 +02:00
publish.py fix publish scripts 2022-07-11 01:55:48 +02:00
pyproject.toml update streepjescode to have a cli and combine __init__ and __main__ into one file 2026-09-25 20:21:33 +02:00
pytest-ci.ini modernize project setup: 2020-11-04 08:25:58 +01:00
pytest.ini modernize project setup: 2020-11-04 08:25:58 +01:00
README.md already added the cli 2026-09-25 21:13:41 +02:00
run Public release 2020-06-04 15:11:21 +02:00
tox.ini modernize project setup: 2020-11-04 08:25:58 +01:00

streepjescode

Generate well-formatted, production-ready Barcodes.

By default, existing Python barcode libraries like python-barcode generate good barcodes, but any and all formatting of the text is left up to the user. streepjescode generates a nicely formatted barcode with interleaved text out of the box:

Example barcode

Depending on your renderer (and true by default), text in the barcode is not an SVG <text> element, as such an elment may render differently on different machines depending on font availability.

This library is currently limited to UPC-A/EAN and EPS/SVG – that's all we (the original authors) needed. Patches welcome!

Installation

You should use something like pipx to install this, so it doesn't interfere with any of your existing libraries.

$ pipx install streepjescode

From source

~$ git clone https://codeberg.org/jessebot/streepjescode.git
~$ cd streepjescode
~/streepjescode$ make
help                 List all commands
install-poetry       install or update poetry
install              install via poetry
update               Update the dependencies as according to the pyproject.toml file
lint                 Run code formatters and linter
fix-code-style       Fix code formatting
tox-listenvs         List all tox test environments
tox                  Run pytest via tox with all environments
tox-py36             Run pytest via tox with *python v3.6*
tox-py37             Run pytest via tox with *python v3.7*
tox-py38             Run pytest via tox with *python v3.8*
tox-py39             Run pytest via tox with *python v3.9*
pytest               Run pytest
pytest-ci            Run pytest with CI settings
publish              Release new version to PyPi
makemessages         Make and compile locales message files
~/streepjescode$ make install

Usage

In Python

>>> from streepjescode import GTIN
>>> GTIN('123456789012').write('output.svg')

Via the Command Line

$ streepjescode 123456789012 -o output.svg

# the streepjescode command could be aliased to barcode
$ alias barcode='streepjescode'
$ barcode 123456789012 -o output.svg
# to make the alias permanent, put it into your shell's rc file e.g. .bashrc

Attribution

This project was forked from boxine/beautiful_barcode in order to add a no AI policy, build for the latest version of Python (and poetry), and also add a proper CLI for convenience.

License

MIT

Fun Facts

streepjescode means barcode in Dutch :)