semacode 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +21 -20
- data/ext/extconf.rb +2 -2
- data/ext/semacode.c +1 -1
- data/lib/semacode.rb +1 -0
- metadata +4 -3
data/README
CHANGED
@@ -27,26 +27,26 @@ available from <http://www.gnu.org>
|
|
27
27
|
You can contact me via <guido@sohne.net> if you have patches, bug fixes or
|
28
28
|
improvements.
|
29
29
|
|
30
|
-
* Based on the iec16022ecc200.c encoder by Adrian Kennard, Andrews & Arnold
|
31
|
-
|
30
|
+
* Based on the iec16022ecc200.c encoder by Adrian Kennard, Andrews & Arnold Ltd
|
31
|
+
|
32
32
|
* Copyright (C) 2007, Guido Sohne
|
33
33
|
|
34
34
|
|
35
35
|
== Quick Start
|
36
36
|
|
37
|
-
|
37
|
+
Configure the extension to your local system and ruby
|
38
38
|
|
39
39
|
<tt>ruby extconf.rb</tt>
|
40
|
-
|
41
|
-
|
40
|
+
|
41
|
+
Build the extension
|
42
42
|
|
43
43
|
<tt>make</tt>
|
44
|
-
|
45
|
-
|
44
|
+
|
45
|
+
Test that it works
|
46
46
|
|
47
47
|
<tt>ruby test.rb</tt>
|
48
|
-
|
49
|
-
|
48
|
+
|
49
|
+
Install the extension (you may need to become root)
|
50
50
|
|
51
51
|
<tt>make install</tt>
|
52
52
|
|
@@ -61,16 +61,17 @@ Here's some basic ways in which you can make use of this extension. It tries
|
|
61
61
|
to show by example, how the semacodes can be created and what can be done with
|
62
62
|
or to a semacode object.
|
63
63
|
|
64
|
-
|
64
|
+
|
65
|
+
Include this library
|
65
66
|
|
66
67
|
<tt>require 'rubygems'</tt>
|
67
68
|
<tt>require 'semacode'</tt>
|
68
69
|
|
69
|
-
|
70
|
+
Create a semacode
|
70
71
|
|
71
72
|
<tt>semacode = Barcode::Semacode.new "http://sohne.net/projects/semafox/"</tt>
|
72
73
|
|
73
|
-
|
74
|
+
Return the semacode as an array of arrays of boolean
|
74
75
|
|
75
76
|
The first element of the array is the top row, the last element is the
|
76
77
|
bottom row. the array length is the semacode height, and each element is
|
@@ -79,7 +80,7 @@ or to a semacode object.
|
|
79
80
|
<tt>grid = semacode.data</tt> or
|
80
81
|
<tt>grid = semacode.to_a</tt> or
|
81
82
|
|
82
|
-
|
83
|
+
Return the semacode as a string
|
83
84
|
|
84
85
|
The string is a comma separated list of character vectors. Each vector is a row
|
85
86
|
in the semacode symbol, the top row is first, and the bottom row is last. Inside
|
@@ -88,28 +89,28 @@ or to a semacode object.
|
|
88
89
|
<tt>semacode.to_s</tt> or
|
89
90
|
<tt>semacode.to_str</tt>
|
90
91
|
|
91
|
-
|
92
|
+
Encode another string
|
92
93
|
|
93
94
|
<tt>semacode.encode "http://sohne.net"</tt>
|
94
95
|
|
95
|
-
|
96
|
+
Get the width
|
96
97
|
|
97
98
|
<tt>semacode.width</tt>
|
98
99
|
|
99
|
-
|
100
|
+
Get the height
|
100
101
|
|
101
102
|
<tt>semacode.height</tt>
|
102
103
|
|
103
|
-
|
104
|
+
How long is the semacode? (width * height)
|
104
105
|
|
105
106
|
<tt>semacode.length</tt> or
|
106
107
|
<tt>semacode.size</tt>
|
107
|
-
|
108
|
-
|
108
|
+
|
109
|
+
Get the raw encoded length (before padding and before ecc)
|
109
110
|
|
110
111
|
<tt>semacode.raw_encoded_length</tt>
|
111
112
|
|
112
|
-
|
113
|
+
Get the symbol size
|
113
114
|
|
114
115
|
The max number of characters this semacode type
|
115
116
|
(specific width x height) can hold is called the
|
data/ext/extconf.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
require 'mkmf'
|
2
|
-
dir_config("
|
3
|
-
create_makefile('
|
2
|
+
dir_config("semacode_native")
|
3
|
+
create_makefile('semacode_native')
|
data/ext/semacode.c
CHANGED
data/lib/semacode.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'semacode_native'
|
metadata
CHANGED
@@ -3,11 +3,11 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: semacode
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.7.
|
7
|
-
date: 2007-03-
|
6
|
+
version: 0.7.1
|
7
|
+
date: 2007-03-04 00:00:00 +00:00
|
8
8
|
summary: Create semacodes (2D barcodes) using Ruby.
|
9
9
|
require_paths:
|
10
|
-
-
|
10
|
+
- lib
|
11
11
|
email: guido@sohne.net
|
12
12
|
homepage: http://sohne.net/projects/semafox/
|
13
13
|
rubyforge_project: semacode
|
@@ -36,6 +36,7 @@ files:
|
|
36
36
|
- ext/reedsol.h
|
37
37
|
- ext/semacode.c
|
38
38
|
- ext/semacode.h
|
39
|
+
- lib/semacode.rb
|
39
40
|
- tests/test.rb
|
40
41
|
- README
|
41
42
|
test_files:
|