Barcode Generator

approved

by noxonad

Generate customizable barcodes into your notes.

10 stars2,968 downloadsUpdated 2y agoLGPL-3.0
View on GitHub

Obsidian Barcode Generator

A plugin for obsidian that generates and displays barcodes in different variations. It uses the JsBarcode plugin to generate the barcode.

For a plugin that generates qr codes, you might check this repository.

Installation

From Obsidian

You can activate this plugin within Obsidian by doing the following:

  • Open Settings > Comunity Plugins;
  • Make sure the Restricted Mode is off;
  • Click on Browse community plugins;
  • Search for "Barcode";
  • Click Install;
  • Don't forget to enable it before using.

Mobile

This plugin works on mobile as well. The installation processs is the same as on desktop.

Manual Installation

You can download this plugin manually from the latest releases. Copy the main.js and manifest.json into <vault>/.obsidian/plugins/obsidian-barcode. Then you can enable the plugin from Comunity Plugins in obsidian.

Usage

For an insertion of the default barcode, you can use the following codeblock structure:

```barcode
content
```

If you want to select a specific type of barcode, you can type dash and then the barcode types:

```barcode-code128
content
```

If you want to make a barcode different from the sandard settings, this can be done using barcode-custom:

```barcode-custom
lineColor: #fff
height: 10
format: pharmacode
1341
```

Note: after changing the options, the barcodes on the page won't be refreshed.

Barcodes

As for now, the following barcodes are supported:

CodeblockNameDescriptionImage
barcode-code128Code 128Automatic selection of Code 128. It has a range of 30 characters or 60 digits.code128
barcode-code128aCode 128 AEncodes ASCII characters 00 to 95 (0–9, A–Z and control codes), special characters, and FNC 1–4.code128a
barcode-code128bCode 128 BEncodes ASCII characters 32 to 127 (0–9, A–Z, a–z), special characters, and FNC 1–4.code128b
barcode-code128cCode 128 C00–99 (encodes two digits with a single code point) and FNC1.code128c
barcode-ean13EAN-13Encodes 13 digits. Used in labeling products. The last digit is a checksum. If the last digit is not specified, it'll be automatically generated.ean13
barcode-upcUPCEncodes 12 digits. Used in labeling products. The last digit is a checksum. If the last digit is not specified, it'll be automatically generated.upc
barcode-ean8EAN-8Encodes 8 ditis. The last digit is a checksum. If the last digit is not specified, it'll be automatically generated.ean8
barcode-ean5EAN 5Encodes 5 digits.ean5
barcode-ean2EAN 2Encodes 2 digits.ean2
barcode-code39Code 39Encodes numbers, uppercase letters and a number of special characters (-, ., $, /, +, %, and space)code39
barcode-itf4ITF-14Encodes 14 digits. The last digit is a checksum. If the last digit is not specified, it'll be automatically generated.itf14
barcode-msiMSIEncodes digits.msi
barcode-msi10MSI 10Encodes digits. The checksum modulo 10 is done automatically.msi10
barcode-msi11MSI 11Encodes digits. The checksum modulo 11 is done automatically.msi11
barcode-msi1010MSI 1010Encodes digits. The checksum modulo 1010 is done automatically.msi1010
barcode-msi1110MSI 1110Encodes digits. The checksum modulo 1110 is done automatically.msi1110
barcode-pharmacodePharmacodeEncodes numbers from 3 to 131070.pharmacode
barcode-codabarCodabarEncodes numbers and a number of special characters (, $, :, /, +, .). You can set start and stop characters to A, B, C or D but if no start and stop character is defined A will be used.codabar

Note that some barcodes have certain limitation of the content, and if the provided contents doesn't match them, the barcode won't be displayed. For more details about the barcodes, you can check out this resource.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.