zint 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -34
- data/lib/zint/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b2c9c7adfbf1c0484fdeacc502bf260d2bc12f52a47981825ca33680a9b847eb
|
4
|
+
data.tar.gz: 90ca1024e6ec6e53a6dd4fc79cb687ae9ff01461a8bc447b6ad9f559b0968353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 754e6e1d9810aeb87392ccb70c253360693d294e8a3f0a861ee92ba78793be2700eecd0ecbec3b00daedeeaa1e00f74f79bcc7e5f2a93a92768df51aeca7d4d6
|
7
|
+
data.tar.gz: 7f62453605698c8a7223c0e21ad9e9c6cf4f1ba0f72e50c520ba330e259fc6b91601cbfaa227c087bb5c15e2202d876cf090327aa84f13c00ba8a8e72572f2f9
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
|
2
|
-
|
2
|
+
# Zint
|
3
3
|
|
4
4
|
This is a Ruby FFI wrapper for the Zint barcode generation library (http://www.zint.org.uk).
|
5
5
|
|
6
|
-
|
6
|
+
## Installing Zint
|
7
7
|
|
8
8
|
For OS X leverage the [Homebrew](https://brew.sh)
|
9
9
|
|
@@ -15,41 +15,40 @@ Other platforms require building [from source](https://sourceforge.net/projects/
|
|
15
15
|
|
16
16
|
**NOTE:** We assume that you are using Zint version [2.6.3_rc2](https://sourceforge.net/projects/zint/files/zint/2.6.3/) but future releases should work well enough.
|
17
17
|
|
18
|
-
|
18
|
+
## Installation
|
19
19
|
|
20
20
|
As mentioned, <b> you must install zint</b> to be able to use this gem. Once that dependency is satisfied, then you can just do the usual gem install.
|
21
21
|
|
22
|
-
```
|
22
|
+
```bash
|
23
23
|
gem install zint
|
24
|
-
|
25
24
|
```
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
require 'zint'
|
31
|
+
# Create a code-128 barcode
|
32
|
+
bc = Zint::Barcode.new("test")
|
33
|
+
bc.print! # file is now on relative path "out.png"
|
34
|
+
bc.path = "my_bc.png"
|
35
|
+
bc.print! # file is now on relative path "my_bc.png"
|
36
|
+
bc.path = "my_bc.svg"
|
37
|
+
bc.print!
|
38
|
+
bc.print! # file is now on relative path "my_bc.svg"
|
39
|
+
|
40
|
+
# create a qrcode
|
41
|
+
qrcode = Zint::Barcode.new("test", Zint::BARCODE_QRCODE)
|
42
|
+
qrcode.path = "qrcode.png"
|
43
|
+
qrcode.print! # file is now on relative path "qrcode.png"
|
44
|
+
qrcode_string = qrcode.buffer!
|
45
|
+
puts qrcode_string
|
46
|
+
|
47
|
+
#QRCode with more options, specifically set a high error correction capacity
|
48
|
+
qrcode = Zint::QRCode.new("test", Zint::QRCode::ECC_H)
|
49
|
+
qrcode.path = "qrcode.ecc_h.png"
|
50
|
+
qrcode.print! # file is now on relative path "qrcode.ecc_h.png"
|
51
|
+
# encode barcode as text
|
52
|
+
qrcode.path = "qrcode.ecc_h.txt"
|
53
|
+
puts qrcode.buffer!
|
54
|
+
```
|
data/lib/zint/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Angel Pizarro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|