labrat 1.3.0 → 1.4.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 07527254f70ab94358c248e5abe969594cc89d6d37849d7f61cc4539482dea84
4
- data.tar.gz: 787d233bd3bfdf40e2f0e5aeb8f718b9059abb0767e27c8e301b4924ad643040
3
+ metadata.gz: 4176256183f1ade3758c0fcd55ae20002060b8b3650539363cd181af55e60378
4
+ data.tar.gz: 8422fc730d0128911971e2500e3dc7e8b58d502b84889704efa7590ee025aa4e
5
5
  SHA512:
6
- metadata.gz: 57b117317e0e01278c7a696d99346f9763c844124ad7fd39b4bb82b5e727972b8caf644de6c7e2d886446425348abc4ed041f3b3e2860c19ac8e236cad31c34f
7
- data.tar.gz: 644418e7af582f9985f2df17f49292446a39f9114007e90f4bd1babd92011b85cf7feeba77938563b1eb772fd163d5f741456c56e1139847c9fdb89e9f4ed0ee
6
+ metadata.gz: 1a6af154ef18495dc6bea768df4c6e49f32619417204286f4f848c20570c0e55f5f45f771c96a670842411b527d516f18a7b1e07aa9d22978f4e86bf83bac2d9
7
+ data.tar.gz: 10be19c1cbc8456c84de278e37cfabac9fce866aa3230498510239650caecd4aa7ea51dcc6930516aa39637738a4c2f30f55a332e1ee04ecfd8b1e0ee2de015e
data/CHANGELOG.md ADDED
@@ -0,0 +1,77 @@
1
+ - [Version 1.4.0 <span class="timestamp-wrapper"><span class="timestamp">[2025-12-28 Sun]</span></span>](#orgd9bda62)
2
+ - [Version 1.3.0 <span class="timestamp-wrapper"><span class="timestamp">[2025-12-26 Fri]</span></span>](#org30f121f)
3
+ - [Version 1.2.3 <span class="timestamp-wrapper"><span class="timestamp">[2025-03-20 Thu]</span></span>](#org90cce10)
4
+ - [Version 1.2.2 <span class="timestamp-wrapper"><span class="timestamp">[2024-11-29 Fri]</span></span>](#orgfab08de)
5
+ - [Version 1.2.1 <span class="timestamp-wrapper"><span class="timestamp">[2024-09-20 Fri]</span></span>](#org43b5f02)
6
+ - [Version 1.2.0 <span class="timestamp-wrapper"><span class="timestamp">[2023-01-19 Thu]</span></span>](#orgf8928a6)
7
+ - [Version 1.1.0 <span class="timestamp-wrapper"><span class="timestamp">[2023-01-06 Fri]</span></span>](#orgd6ce9e5)
8
+ - [Version 0.1.14 <span class="timestamp-wrapper"><span class="timestamp">[2022-02-03 Thu]</span></span>](#org456e64e)
9
+ - [Version 0.1.13 <span class="timestamp-wrapper"><span class="timestamp">[2021-11-04 Thu]</span></span>](#org87689d9)
10
+
11
+
12
+ <a id="orgd9bda62"></a>
13
+
14
+ # Version 1.4.0 <span class="timestamp-wrapper"><span class="timestamp">[2025-12-28 Sun]</span></span>
15
+
16
+ - Added a `vim` plugin to allow printing or viewing labels from within a vim buffer as was possible in Emacs with `labrat.el`.
17
+
18
+
19
+ <a id="org30f121f"></a>
20
+
21
+ # Version 1.3.0 <span class="timestamp-wrapper"><span class="timestamp">[2025-12-26 Fri]</span></span>
22
+
23
+ - By default, labrat no longer puts the output file in labrat.pdf; instead, all labels go to `~/.local/share/labrat` and uses the run time for a time-stamp file name.
24
+ - Output file can still be overridden with the `-o` or `--out-file` option
25
+
26
+
27
+ <a id="org90cce10"></a>
28
+
29
+ # Version 1.2.3 <span class="timestamp-wrapper"><span class="timestamp">[2025-03-20 Thu]</span></span>
30
+
31
+ - No user-visible changes
32
+
33
+
34
+ <a id="orgfab08de"></a>
35
+
36
+ # Version 1.2.2 <span class="timestamp-wrapper"><span class="timestamp">[2024-11-29 Fri]</span></span>
37
+
38
+ - Used `fat_config` gem to read config files
39
+
40
+
41
+ <a id="org43b5f02"></a>
42
+
43
+ # Version 1.2.1 <span class="timestamp-wrapper"><span class="timestamp">[2024-09-20 Fri]</span></span>
44
+
45
+ - Fixed `labrat.el` view command
46
+
47
+
48
+ <a id="orgf8928a6"></a>
49
+
50
+ # Version 1.2.0 <span class="timestamp-wrapper"><span class="timestamp">[2023-01-19 Thu]</span></span>
51
+
52
+ - Changed `nlsep` to '~~'
53
+ - Changed `label-sep` to '@@'
54
+ - Minor bug fixes
55
+
56
+
57
+ <a id="orgd6ce9e5"></a>
58
+
59
+ # Version 1.1.0 <span class="timestamp-wrapper"><span class="timestamp">[2023-01-06 Fri]</span></span>
60
+
61
+ - Changed `nl-sep` to '&#x2013;>'
62
+ - Changed `label-sep` to '==>'
63
+ - Added label name to template output
64
+
65
+
66
+ <a id="org456e64e"></a>
67
+
68
+ # Version 0.1.14 <span class="timestamp-wrapper"><span class="timestamp">[2022-02-03 Thu]</span></span>
69
+
70
+ - Nothing important
71
+
72
+
73
+ <a id="org87689d9"></a>
74
+
75
+ # Version 0.1.13 <span class="timestamp-wrapper"><span class="timestamp">[2021-11-04 Thu]</span></span>
76
+
77
+ - Initial release
data/CHANGELOG.org CHANGED
@@ -1,5 +1,35 @@
1
1
 
2
- * [1.3.0] - [2025-12-26 Fri]
2
+ * Version 1.4.0 [2025-12-28 Sun]
3
+ - Added a ~vim~ plugin to allow printing or viewing labels from within a vim
4
+ buffer as was possible in Emacs with ~labrat.el~.
3
5
 
4
- * [0.1.0] - [2021-07-28 Wed]
6
+ * Version 1.3.0 [2025-12-26 Fri]
7
+ - By default, labrat no longer puts the output file in labrat.pdf; instead,
8
+ all labels go to =~/.local/share/labrat= and uses the run time for a
9
+ time-stamp file name.
10
+ - Output file can still be overridden with the ~-o~ or ~--out-file~ option
11
+
12
+ * Version 1.2.3 [2025-03-20 Thu]
13
+ - No user-visible changes
14
+
15
+ * Version 1.2.2 [2024-11-29 Fri]
16
+ - Used ~fat_config~ gem to read config files
17
+
18
+ * Version 1.2.1 [2024-09-20 Fri]
19
+ - Fixed ~labrat.el~ view command
20
+
21
+ * Version 1.2.0 [2023-01-19 Thu]
22
+ - Changed =nlsep= to '~~'
23
+ - Changed =label-sep= to '@@'
24
+ - Minor bug fixes
25
+
26
+ * Version 1.1.0 [2023-01-06 Fri]
27
+ - Changed =nl-sep= to '-->'
28
+ - Changed =label-sep= to '==>'
29
+ - Added label name to template output
30
+
31
+ * Version 0.1.14 [2022-02-03 Thu]
32
+ - Nothing important
33
+
34
+ * Version 0.1.13 [2021-11-04 Thu]
5
35
  - Initial release
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gemspec
7
7
 
8
8
  group :development do
9
9
  gem 'debug', '>= 1.0.0'
10
- gem 'gem_docs'
10
+ gem 'gem_docs', '>=0.3.1'
11
11
  gem 'pry'
12
12
  gem 'rake'
13
13
  gem 'rspec'
data/Gemfile.lock CHANGED
@@ -12,10 +12,9 @@ GIT
12
12
  PATH
13
13
  remote: .
14
14
  specs:
15
- labrat (1.3.0)
15
+ labrat (1.4.0)
16
16
  activesupport
17
17
  fat_config (>= 0.4.2)
18
- matrix
19
18
  prawn (~> 2.0)
20
19
 
21
20
  GEM
@@ -38,14 +37,14 @@ GEM
38
37
  base64 (0.3.0)
39
38
  bigdecimal (3.3.1)
40
39
  coderay (1.1.3)
41
- concurrent-ruby (1.3.5)
42
- connection_pool (3.0.1)
40
+ concurrent-ruby (1.3.6)
41
+ connection_pool (3.0.2)
43
42
  damerau-levenshtein (1.3.3)
44
43
  date (3.5.1)
45
- debug (1.10.0)
44
+ debug (1.11.1)
46
45
  irb (~> 1.10)
47
46
  reline (>= 0.3.8)
48
- diff-lcs (1.6.0)
47
+ diff-lcs (1.6.2)
49
48
  docile (1.4.1)
50
49
  drb (2.2.3)
51
50
  erb (6.0.1)
@@ -59,68 +58,70 @@ GEM
59
58
  damerau-levenshtein
60
59
  ostruct
61
60
  stringio (>= 3.1.2)
62
- gem_docs (0.2.0)
61
+ gem_docs (0.3.1)
63
62
  rake
64
63
  yard
65
- i18n (1.14.7)
64
+ i18n (1.14.8)
66
65
  concurrent-ruby (~> 1.0)
67
66
  inifile (3.0.0)
68
- io-console (0.8.0)
69
- irb (1.15.1)
67
+ io-console (0.8.2)
68
+ irb (1.16.0)
70
69
  pp (>= 0.6.0)
71
70
  rdoc (>= 4.0.0)
72
71
  reline (>= 0.4.2)
73
- json (2.16.0)
72
+ json (2.18.0)
74
73
  language_server-protocol (3.17.0.5)
75
74
  lint_roller (1.1.0)
76
75
  logger (1.7.0)
77
76
  matrix (0.4.3)
78
77
  method_source (1.1.0)
79
- minitest (5.26.2)
78
+ minitest (6.0.1)
79
+ prism (~> 1.5)
80
80
  ostruct (0.6.3)
81
81
  parallel (1.27.0)
82
82
  parser (3.3.10.0)
83
83
  ast (~> 2.4.1)
84
84
  racc
85
85
  pdf-core (0.10.0)
86
- pp (0.6.2)
86
+ pp (0.6.3)
87
87
  prettyprint
88
88
  prawn (2.5.0)
89
89
  matrix (~> 0.4)
90
90
  pdf-core (~> 0.10.0)
91
91
  ttfunk (~> 1.8)
92
92
  prettyprint (0.2.0)
93
- prism (1.6.0)
94
- pry (0.15.2)
93
+ prism (1.7.0)
94
+ pry (0.16.0)
95
95
  coderay (~> 1.1)
96
96
  method_source (~> 1.0)
97
+ reline (>= 0.6.0)
97
98
  psych (5.3.1)
98
99
  date
99
100
  stringio
100
101
  racc (1.8.1)
101
102
  rainbow (3.1.1)
102
- rake (13.2.1)
103
+ rake (13.3.1)
103
104
  rdoc (7.0.3)
104
105
  erb
105
106
  psych (>= 4.0.0)
106
107
  tsort
107
108
  regexp_parser (2.11.3)
108
- reline (0.6.0)
109
+ reline (0.6.3)
109
110
  io-console (~> 0.5)
110
- rspec (3.13.0)
111
+ rspec (3.13.2)
111
112
  rspec-core (~> 3.13.0)
112
113
  rspec-expectations (~> 3.13.0)
113
114
  rspec-mocks (~> 3.13.0)
114
- rspec-core (3.13.3)
115
+ rspec-core (3.13.6)
115
116
  rspec-support (~> 3.13.0)
116
- rspec-expectations (3.13.3)
117
+ rspec-expectations (3.13.5)
117
118
  diff-lcs (>= 1.2.0, < 2.0)
118
119
  rspec-support (~> 3.13.0)
119
- rspec-mocks (3.13.2)
120
+ rspec-mocks (3.13.7)
120
121
  diff-lcs (>= 1.2.0, < 2.0)
121
122
  rspec-support (~> 3.13.0)
122
- rspec-support (3.13.2)
123
- rubocop (1.81.7)
123
+ rspec-support (3.13.6)
124
+ rubocop (1.82.1)
124
125
  json (~> 2.3)
125
126
  language_server-protocol (~> 3.17.0.2)
126
127
  lint_roller (~> 1.1.0)
@@ -128,22 +129,22 @@ GEM
128
129
  parser (>= 3.3.0.2)
129
130
  rainbow (>= 2.2.2, < 4.0)
130
131
  regexp_parser (>= 2.9.3, < 3.0)
131
- rubocop-ast (>= 1.47.1, < 2.0)
132
+ rubocop-ast (>= 1.48.0, < 2.0)
132
133
  ruby-progressbar (~> 1.7)
133
134
  unicode-display_width (>= 2.4.0, < 4.0)
134
- rubocop-ast (1.48.0)
135
+ rubocop-ast (1.49.0)
135
136
  parser (>= 3.3.7.2)
136
- prism (~> 1.4)
137
- rubocop-performance (1.24.0)
137
+ prism (~> 1.7)
138
+ rubocop-performance (1.26.1)
138
139
  lint_roller (~> 1.1)
139
- rubocop (>= 1.72.1, < 2.0)
140
- rubocop-ast (>= 1.38.0, < 2.0)
140
+ rubocop (>= 1.75.0, < 2.0)
141
+ rubocop-ast (>= 1.47.1, < 2.0)
141
142
  rubocop-rake (0.7.1)
142
143
  lint_roller (~> 1.1)
143
144
  rubocop (>= 1.72.1)
144
- rubocop-rspec (3.7.0)
145
+ rubocop-rspec (3.8.0)
145
146
  lint_roller (~> 1.1)
146
- rubocop (~> 1.72, >= 1.72.1)
147
+ rubocop (~> 1.81)
147
148
  rubocop-shopify (2.18.0)
148
149
  rubocop (~> 1.62)
149
150
  ruby-progressbar (1.13.0)
@@ -152,7 +153,7 @@ GEM
152
153
  docile (~> 1.1)
153
154
  simplecov-html (~> 0.11)
154
155
  simplecov_json_formatter (~> 0.1)
155
- simplecov-html (0.13.1)
156
+ simplecov-html (0.13.2)
156
157
  simplecov_json_formatter (0.1.4)
157
158
  stringio (3.2.0)
158
159
  tomlib (0.7.3)
@@ -164,16 +165,17 @@ GEM
164
165
  concurrent-ruby (~> 1.0)
165
166
  unicode-display_width (3.2.0)
166
167
  unicode-emoji (~> 4.1)
167
- unicode-emoji (4.1.0)
168
+ unicode-emoji (4.2.0)
168
169
  uri (1.1.1)
169
170
  yard (0.9.38)
170
171
 
171
172
  PLATFORMS
173
+ ruby
172
174
  x86_64-linux
173
175
 
174
176
  DEPENDENCIES
175
177
  debug (>= 1.0.0)
176
- gem_docs
178
+ gem_docs (>= 0.3.1)
177
179
  labrat!
178
180
  pry
179
181
  rake
@@ -182,5 +184,78 @@ DEPENDENCIES
182
184
  rubocop-ddoherty!
183
185
  simplecov
184
186
 
187
+ CHECKSUMS
188
+ activesupport (8.1.1) sha256=5e92534e8d0c8b8b5e6b16789c69dbea65c1d7b752269f71a39422e9546cea67
189
+ ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
190
+ base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
191
+ bigdecimal (3.3.1) sha256=eaa01e228be54c4f9f53bf3cc34fe3d5e845c31963e7fcc5bedb05a4e7d52218
192
+ coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b
193
+ concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
194
+ connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
195
+ damerau-levenshtein (1.3.3) sha256=d4320a5fc2aeaa5c023a7c6c45cb4acd4f03a9241c7735c8a7da3eee2ff2407e
196
+ date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
197
+ debug (1.11.1) sha256=2e0b0ac6119f2207a6f8ac7d4a73ca8eb4e440f64da0a3136c30343146e952b6
198
+ diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
199
+ docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
200
+ drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
201
+ erb (6.0.1) sha256=28ecdd99c5472aebd5674d6061e3c6b0a45c049578b071e5a52c2a7f13c197e5
202
+ fat_config (0.4.2) sha256=5136d00289d0fa12a60897e7e70e931b2465007e0a11ffc7b8e350c470119676
203
+ fat_core (7.1.3) sha256=54aae0da4edcfb77cd2370c46c8a36f792cb0a890069191a47c776c5fce5d367
204
+ gem_docs (0.3.1) sha256=cdd4ec7f65e15e12947f8b8db0d9dea7cc0603c3415c06526263cdab8e32ea65
205
+ i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
206
+ inifile (3.0.0) sha256=b103eb3655ec93cc626cf2de00950e91f7e69b8398842968e17e1815cfacbfb0
207
+ io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
208
+ irb (1.16.0) sha256=2abe56c9ac947cdcb2f150572904ba798c1e93c890c256f8429981a7675b0806
209
+ json (2.18.0) sha256=b10506aee4183f5cf49e0efc48073d7b75843ce3782c68dbeb763351c08fd505
210
+ labrat (1.4.0)
211
+ language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
212
+ lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
213
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
214
+ matrix (0.4.3) sha256=a0d5ab7ddcc1973ff690ab361b67f359acbb16958d1dc072b8b956a286564c5b
215
+ method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5
216
+ minitest (6.0.1) sha256=7854c74f48e2e975969062833adc4013f249a4b212f5e7b9d5c040bf838d54bb
217
+ ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912
218
+ parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
219
+ parser (3.3.10.0) sha256=ce3587fa5cc55a88c4ba5b2b37621b3329aadf5728f9eafa36bbd121462aabd6
220
+ pdf-core (0.10.0) sha256=0a5d101e2063c01e3f941e1ee47cbb97f1adfc1395b58372f4f65f1300f3ce91
221
+ pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6
222
+ prawn (2.5.0) sha256=f4e20e3b4f30bf5b9ae37dad15eb421831594553aa930b2391b0fa0a99c43cb6
223
+ prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
224
+ prism (1.7.0) sha256=10062f734bf7985c8424c44fac382ac04a58124ea3d220ec3ba9fe4f2da65103
225
+ pry (0.16.0) sha256=d76c69065698ed1f85e717bd33d7942c38a50868f6b0673c636192b3d1b6054e
226
+ psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
227
+ racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
228
+ rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
229
+ rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
230
+ rdoc (7.0.3) sha256=dfe3d0981d19b7bba71d9dbaeb57c9f4e3a7a4103162148a559c4fc687ea81f9
231
+ regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4
232
+ reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
233
+ rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
234
+ rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
235
+ rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
236
+ rspec-mocks (3.13.7) sha256=0979034e64b1d7a838aaaddf12bf065ea4dc40ef3d4c39f01f93ae2c66c62b1c
237
+ rspec-support (3.13.6) sha256=2e8de3702427eab064c9352fe74488cc12a1bfae887ad8b91cba480ec9f8afb2
238
+ rubocop (1.82.1) sha256=09f1a6a654a960eda767aebea33e47603080f8e9c9a3f019bf9b94c9cab5e273
239
+ rubocop-ast (1.49.0) sha256=49c3676d3123a0923d333e20c6c2dbaaae2d2287b475273fddee0c61da9f71fd
240
+ rubocop-ddoherty (0.1.2)
241
+ rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
242
+ rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d
243
+ rubocop-rspec (3.8.0) sha256=28440dccb3f223a9938ca1f946bd3438275b8c6c156dab909e2cb8bc424cab33
244
+ rubocop-shopify (2.18.0) sha256=dafa25e5617ce4600ff86b1de3d5b78e43ab3d58cc5729df38e492b8e10294eb
245
+ ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
246
+ securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
247
+ simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
248
+ simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
249
+ simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
250
+ stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
251
+ tomlib (0.7.3) sha256=85e562eeaa40b2aca552a13515f41fc6ae9dc522154bc1089c8d3ef94dcebd9b
252
+ tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
253
+ ttfunk (1.8.0) sha256=a7cbc7e489cc46e979dde04d34b5b9e4f5c8f1ee5fc6b1a7be39b829919d20ca
254
+ tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
255
+ unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
256
+ unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
257
+ uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
258
+ yard (0.9.38) sha256=721fb82afb10532aa49860655f6cc2eaa7130889df291b052e1e6b268283010f
259
+
185
260
  BUNDLED WITH
186
- 2.3.4
261
+ 4.0.3
data/README.md CHANGED
@@ -1,46 +1,51 @@
1
- - [Introduction](#org4d16654)
2
- - [Usage](#orgb0dde75)
3
- - [Motivation](#orgffc8c18)
4
- - [A Tip on Buying File Folder Labels](#org1fb41c3)
5
- - [Installation](#org839bba6)
6
- - [Setting options](#org2e4d2b2)
7
- - [Dimensions and other values in options](#org8cd44c2)
8
- - [Page Setup Options](#orga75d88b)
9
- - [Orientation](#orge8d75f2)
10
- - [Page Dimensions](#org0ef6fd8)
11
- - [Page Grid](#org45d27d9)
12
- - [Label Setup Options](#org075f790)
13
- - [Padding](#orgbef67ba)
14
- - [Alignment](#orgf219d81)
15
- - [Fonts and styling](#org6ce71d4)
16
- - [Position Adjustment](#org0c82ae8)
17
- - [Job Processing Options](#orgce10771)
18
- - [Starting label](#orgbaf8b37)
19
- - [New line marker](#org3474e9b)
20
- - [Label separator](#orgbc886e8)
21
- - [Number of copies](#org5d67dcc)
22
- - [Input and output files](#org38fe995)
23
- - [Printing or viewing](#org6a94c60)
24
- - [Printing and viewing shell commands](#org92d8d58)
25
- - [Aids to testing label layouts](#orgc587ea4)
26
- - [The Label Database and the label option](#org078c353)
27
- - [Listing labels](#org5c65ea4)
28
- - [System label database](#org9de8226)
29
- - [Trying out a label definition](#org8d64088)
30
- - [Nesting label definitions](#org92c357f)
31
- - [Label database entries as configuration sets](#orge654259)
32
- - [A Caution about option order](#org0918e62)
33
- - [Development](#org6460480)
34
- - [Contributing](#org40db825)
1
+ - [Introduction](#org56fb828)
2
+ - [Usage](#org974093b)
3
+ - [Motivation](#orgd8b82a3)
4
+ - [Quick Start](#orgfd1ca0b)
5
+ - [Editor Integration](#orgc67a2fd)
6
+ - [Emacs](#org2d923c0)
7
+ - [Vim](#org58ddd36)
8
+ - [Installing the Libraries](#org19960cd)
9
+ - [A Tip on Buying File Folder Labels](#orgf7d8f9d)
10
+ - [Installation](#orgfff2f5d)
11
+ - [Setting options](#orgb21e4d6)
12
+ - [Dimensions and other values in options](#org6b63666)
13
+ - [Page Setup Options](#org383399f)
14
+ - [Orientation](#org2f32488)
15
+ - [Page Dimensions](#org7f80091)
16
+ - [Page Grid](#org7756925)
17
+ - [Label Setup Options](#orga23cfc9)
18
+ - [Padding](#org6e340b5)
19
+ - [Alignment](#org44fbd0b)
20
+ - [Fonts and styling](#org91b1428)
21
+ - [Position Adjustment](#org6ecc377)
22
+ - [Job Processing Options](#orgb130f7b)
23
+ - [Starting label](#org8e17103)
24
+ - [New line marker](#orgdae0b4d)
25
+ - [Label separator](#orgd282e3f)
26
+ - [Number of copies](#org3616573)
27
+ - [Input and output files](#orgc219619)
28
+ - [Printing or viewing](#org18b6d40)
29
+ - [Printing and viewing shell commands](#org0a3ddbe)
30
+ - [Aids to testing label layouts](#org72cfe80)
31
+ - [The Label Database and the label option](#org5a0f691)
32
+ - [Listing labels](#org8cf306f)
33
+ - [System label database](#org8f4e843)
34
+ - [Trying out a label definition](#orgca1435c)
35
+ - [Nesting label definitions](#org5d2c388)
36
+ - [Label database entries as configuration sets](#org4eaa1a5)
37
+ - [A Caution about option order](#org65dfc16)
38
+ - [Development](#org7a15b9d)
39
+ - [Contributing](#org92ab19d)
35
40
 
36
41
  [![CI](https://github.com/ddoherty03/labrat/actions/workflows/main.yml/badge.svg?branch=master)](https://github.com/ddoherty03/labrat/actions/workflows/main.yml)
37
42
 
38
43
 
39
- <a id="org4d16654"></a>
44
+ <a id="org56fb828"></a>
40
45
 
41
46
  # Introduction
42
47
 
43
- This gem provides a command-line application, `labrat`, for the easy printing of labels after suitable configuration. It also provides an Emacs library for easily invoking `labrat` from within Emacs to make a label from the paragraph at point.
48
+ This gem provides a command-line application, `labrat`, for the easy printing of labels after suitable configuration. It also provides Emacs and `vim` libraries for easily invoking `labrat` from within the editor to make a label from the paragraph at point.
44
49
 
45
50
  It can handle everything from label printers such as the Dymo LabelWriter geared toward single label printing to full-size printers for printing a series of labels on label sheets from Avery or other suppliers of label sheets. It includes a library of pre-configured settings for around 250 label products, and provides a convenient way to define new ones or variations on the pre-configured ones.
46
51
 
@@ -51,7 +56,7 @@ Easy-to-print labels can make the process of creating file folders trivial, but
51
56
  Buy your copy today while supplies last!
52
57
 
53
58
 
54
- <a id="orgb0dde75"></a>
59
+ <a id="org974093b"></a>
55
60
 
56
61
  # Usage
57
62
 
@@ -68,12 +73,17 @@ And you will get a two-line file-folder label printed that looks like this:
68
73
  Note that an outline was added to make the size of the label apparent and is not actually printed with the label by default.
69
74
 
70
75
 
71
- <a id="orgffc8c18"></a>
76
+ <a id="orgd8b82a3"></a>
72
77
 
73
78
  ## Motivation
74
79
 
75
80
  I need to print labels. And in my case, mostly I need file folder labels. I typically want to print to a Dymo LabelWriter, of which I own several variants. The problem is that I work almost entirely in Linux, but the simple task of printing a file folder label has required opening a GUI application, such as the very fine [glabels](https://help.gnome.org/users/glabels/stable/), or worse, switching to a machine running Windows or to a Mac to run Dymo's proprietary GUI. The Dymo GUI is particularly irksome because it takes a long time to start up and demands that you register every time you open it.
76
81
 
82
+
83
+ <a id="orgfd1ca0b"></a>
84
+
85
+ ## Quick Start
86
+
77
87
  That's too much ceremony for generating simple labels. I wanted a way to print a file label from the command line, or even better, from within my editor, Emacs. After giving up looking for such a thing without success, I decided to write my own. Hence labrat. With it&#x2014;after due configuration&#x2014;printing a file folder label is as simple as:
78
88
 
79
89
  ```sh
@@ -86,10 +96,55 @@ Or, you can preview the label in your previewer of choice (mine is qpdfview) by
86
96
  $ labrat -V 'First Line of Label ~~ And the Second Line'
87
97
  ```
88
98
 
99
+
100
+ <a id="orgc67a2fd"></a>
101
+
102
+ ## Editor Integration
103
+
104
+
105
+ <a id="org2d923c0"></a>
106
+
107
+ ### Emacs
108
+
89
109
  Even better, I have included with `labrat` an elisp file (`labrat.el`) that will invoke `labrat` to form a label with the text of the paragraph at or before point. So within Emacs, you can bind keys to the commands, `labrat-print` and `labrat-view` to print or view the current or prior paragraph as your default label. Thus, in Emacs, I have `C-z C-l C-l` bound to `labrat-print` and `C-z C-l C-v` to `labrat-view`, and I can type a label in any buffer and get it generated with very little ceremony.
90
110
 
91
111
 
92
- <a id="org1fb41c3"></a>
112
+ <a id="org58ddd36"></a>
113
+
114
+ ### Vim
115
+
116
+ There is also a vim plugin that you can copy to you `~.vim/plugins/labrat.vim` directory to invoke `labrat` from within `vim`. Suggested keybindings are included for copying to `~/.vim/after/plugin/labrat.vim` that bind `<leader>lp` and `<leader>lv` to invoke `labrat` in normal and visual modes.
117
+
118
+
119
+ <a id="org19960cd"></a>
120
+
121
+ ### Installing the Libraries
122
+
123
+ After running `labrat-install` both the emacs and vim libraries will be copied to `~/.config/labrat`. It's up to you to copy them from there to you Emacs load-path or vim `plugin` and `after/plugin` directories respectively.
124
+
125
+ Or, you can just add symlinks to the distributed files, so you get updates whenever you update `labrat`:
126
+
127
+ For emacs:
128
+
129
+ ```sh
130
+ $ cd ~/.emacs.d/lisp # Assuming this is on your load-path
131
+ $ ln -s ~/.config/labrat/labrat.el labrat.el
132
+ ```
133
+
134
+ Then, \`require 'labrat'\` in you Emacs init file.
135
+
136
+ And for vim:
137
+
138
+ ```sh
139
+ $ cd ~/.vim/plugin
140
+ $ ln -s ~/.config/labrat/vim/plugin/labrat.vim labrat.vim
141
+
142
+ $ cd ~/.vim/after/plugin
143
+ $ ln -s ~/.config/labrat/vim/after/plugin/labrat.vim labrat.vim
144
+ ```
145
+
146
+
147
+ <a id="orgf7d8f9d"></a>
93
148
 
94
149
  ## A Tip on Buying File Folder Labels
95
150
 
@@ -102,7 +157,7 @@ After looking for alternative printers, I found the solution, not in a new print
102
157
  Thermal labels may be fine for ephemeral applications like name tags or shipping labels, but are terrible for long-term applications like file folders, marking cables, marking electrical breakers, or any other number of applications where long-term readability is essential.
103
158
 
104
159
 
105
- <a id="org839bba6"></a>
160
+ <a id="orgfff2f5d"></a>
106
161
 
107
162
  ## Installation
108
163
 
@@ -127,7 +182,7 @@ For the benefit of Emacs users, it also installs the `labrat.el` elisp library i
127
182
  If you invoke `labrat-install` multiple times, it will refuse to overwrite any existing config or database files that you may have already installed. If you want to re-install them you have to remove the existing files or move them out of the way.
128
183
 
129
184
 
130
- <a id="org2e4d2b2"></a>
185
+ <a id="orgb21e4d6"></a>
131
186
 
132
187
  ## Setting options
133
188
 
@@ -140,7 +195,7 @@ Labrat reads options from the following locations, with the locations listed fro
140
195
  3. Finally, it reads options from the command-line, where, of course, the leading hyphens are mandatory.
141
196
 
142
197
 
143
- <a id="org8cd44c2"></a>
198
+ <a id="org6b63666"></a>
144
199
 
145
200
  ## Dimensions and other values in options
146
201
 
@@ -157,14 +212,14 @@ Many of the options deal with specifying some sort of distance. Those are design
157
212
  Most other options are strings, which need to be quoted on the command-line if they contain any spaces or other characters special to your shell. In the configuration files, string values need not be quoted.
158
213
 
159
214
 
160
- <a id="orga75d88b"></a>
215
+ <a id="org383399f"></a>
161
216
 
162
217
  ## Page Setup Options
163
218
 
164
- Labrat can handle multi-label pages such as Avery-style label sheets. These options deal with the page-level dimensions of the, potentially, multi-label page. By contrast, the dimensions of individual labels are dealt with by the label setup options described in the [next](#org075f790) section.
219
+ `Labrat` can handle multi-label pages such as Avery-style label sheets. These options deal with the page-level dimensions of the, potentially, multi-label page. By contrast, the dimensions of individual labels are dealt with by the label setup options described in the [next](#orga23cfc9) section.
165
220
 
166
221
 
167
- <a id="orge8d75f2"></a>
222
+ <a id="org2f32488"></a>
168
223
 
169
224
  ### Orientation
170
225
 
@@ -172,7 +227,7 @@ Labrat can handle multi-label pages such as Avery-style label sheets. These opti
172
227
  - **`-P`, `--[no-]portrait`:** This is simply a convenience switch meaning `--no-landscape` and is the default.
173
228
 
174
229
 
175
- <a id="org0ef6fd8"></a>
230
+ <a id="org7f80091"></a>
176
231
 
177
232
  ### Page Dimensions
178
233
 
@@ -191,7 +246,7 @@ With that in mind, specifying the page dimensions is just a matter of getting ou
191
246
  - **`--page-margin=DIM`:** Distance from all sides of page (in portrait) to the print area; short for `--top-page-margin`, `--bottom-page-margin`, `--left-page-margin` and `--right-page-margin`
192
247
 
193
248
 
194
- <a id="org45d27d9"></a>
249
+ <a id="org7756925"></a>
195
250
 
196
251
  ### Page Grid
197
252
 
@@ -203,7 +258,7 @@ By default, `labrat` considers a page of labels to contain only one row and one
203
258
  - **`--column-gap=DIM`:** The distance between columns of labels on a page
204
259
 
205
260
 
206
- <a id="org075f790"></a>
261
+ <a id="orga23cfc9"></a>
207
262
 
208
263
  ## Label Setup Options
209
264
 
@@ -217,7 +272,7 @@ These options determine the layout of individual labels within the page grid rat
217
272
  The remaining space on the page is divided into a grid of identically-sized labels, which determines the size of each label.
218
273
 
219
274
 
220
- <a id="orgbef67ba"></a>
275
+ <a id="org6e340b5"></a>
221
276
 
222
277
  ### Padding
223
278
 
@@ -232,7 +287,7 @@ Within each label, the following options allow you to set the margins on each si
232
287
  - **`--pad=DIM`:** Short for `--top-pad=DIM`, `--bottom-pad=DIM`, `--left-pad=DIM` and `--right-pad=DIM`
233
288
 
234
289
 
235
- <a id="orgf219d81"></a>
290
+ <a id="org44fbd0b"></a>
236
291
 
237
292
  ### Alignment
238
293
 
@@ -242,7 +297,7 @@ By default the label text is centered horizontally and vertically within the lab
242
297
  - **`--v-align=[top|center|bottom]`:** Vertical alignment of text within the label (default center)
243
298
 
244
299
 
245
- <a id="org6ce71d4"></a>
300
+ <a id="org91b1428"></a>
246
301
 
247
302
  ### Fonts and styling
248
303
 
@@ -253,7 +308,7 @@ By default the label text is centered horizontally and vertically within the lab
253
308
  - **`--font-style=[normal|bold|italic|bold-italic]`:** Style of font to use for text (default normal)
254
309
 
255
310
 
256
- <a id="org0c82ae8"></a>
311
+ <a id="org6ecc377"></a>
257
312
 
258
313
  ### Position Adjustment
259
314
 
@@ -263,14 +318,14 @@ Despite our best efforts, the vagaries of printer hardware, print drivers, and c
263
318
  - **`-y, --delta-y=DIM`:** Up-down adjustment (positive moves up, negative down) of label text within the label print area.
264
319
 
265
320
 
266
- <a id="orgce10771"></a>
321
+ <a id="orgb130f7b"></a>
267
322
 
268
323
  ## Job Processing Options
269
324
 
270
325
  The following options control the processing of labels by `labrat`.
271
326
 
272
327
 
273
- <a id="orgbaf8b37"></a>
328
+ <a id="org8e17103"></a>
274
329
 
275
330
  ### Starting label
276
331
 
@@ -281,7 +336,7 @@ When printing onto a multi-label page, some of the labels may have already been
281
336
  This only affects the placement of the first label on the first page. Any later pages always start on the first label position.
282
337
 
283
338
 
284
- <a id="org3474e9b"></a>
339
+ <a id="orgdae0b4d"></a>
285
340
 
286
341
  ### New line marker
287
342
 
@@ -290,7 +345,7 @@ You can embed a special text-sequence in the label text to indicate where a line
290
345
  - **`-n`, `--nlsep=SEPARATOR`:** Specify text to be translated into a line-break (default ' `∼∼` ')
291
346
 
292
347
 
293
- <a id="orgbc886e8"></a>
348
+ <a id="orgd282e3f"></a>
294
349
 
295
350
  ### Label separator
296
351
 
@@ -299,7 +354,7 @@ The only way to print more than one label from the command-line is to indicate w
299
354
  - **`--label-sep=SEPARATOR`:** Specify text that indicates the start of a new label (default '@@')
300
355
 
301
356
 
302
- <a id="org5d67dcc"></a>
357
+ <a id="org3616573"></a>
303
358
 
304
359
  ### Number of copies
305
360
 
@@ -308,7 +363,7 @@ This option causes `labrat` to generate multiple copies of each label with all t
308
363
  - **`-c NUM`, `--copies=NUM`:** Number of copies of each label to generate.
309
364
 
310
365
 
311
- <a id="org38fe995"></a>
366
+ <a id="orgc219619"></a>
312
367
 
313
368
  ### Input and output files
314
369
 
@@ -376,10 +431,10 @@ This option causes `labrat` to generate multiple copies of each label with all t
376
431
 
377
432
  5. Template exception
378
433
 
379
- Notwithstanding all of the above, if the `-T` (`--template`) option is given (see below at [2.8.8](#orgc587ea4)), all label texts from the command-line, an `in-file`, or standard input are ignored and a template is generated.
434
+ Notwithstanding all of the above, if the `-T` (`--template`) option is given (see below at [2.10.8](#org72cfe80)), all label texts from the command-line, an `in-file`, or standard input are ignored and a template is generated.
380
435
 
381
436
 
382
- <a id="org6a94c60"></a>
437
+ <a id="org18b6d40"></a>
383
438
 
384
439
  ### Printing or viewing
385
440
 
@@ -388,7 +443,7 @@ By default, `labrat` prints the generated output file to the printer named with
388
443
  - **`-V`, `--[no-]view`:** View rather than print
389
444
 
390
445
 
391
- <a id="org92d8d58"></a>
446
+ <a id="org0a3ddbe"></a>
392
447
 
393
448
  ### Printing and viewing shell commands
394
449
 
@@ -414,7 +469,7 @@ to launch the previewer when the `--view` or `-V` options are given. It also '%o
414
469
  - **`-:`, `--view-command=VIEWCMD`:** Command to use for viewing with %o for label file name (the \`:\` is meant to remind you of a pair of eyes looking at the purdy label)
415
470
 
416
471
 
417
- <a id="orgc587ea4"></a>
472
+ <a id="org72cfe80"></a>
418
473
 
419
474
  ### Aids to testing label layouts
420
475
 
@@ -439,14 +494,14 @@ to launch the previewer when the `--view` or `-V` options are given. It also '%o
439
494
  - **`-v`, `--[no-]verbose`:** Run verbosely, that is, print out lots of information about what `labrat` is doing as it processes the job.
440
495
 
441
496
 
442
- <a id="org078c353"></a>
497
+ <a id="org5a0f691"></a>
443
498
 
444
499
  ## The Label Database and the label option
445
500
 
446
501
  One of the nice things about `labrat` is that it comes with a database of pre-defined label configurations for many standard labels, especially Avery labels since they were good enough to publish PDF templates for all their products at <https://www.avery.com/templates>.
447
502
 
448
503
 
449
- <a id="org5c65ea4"></a>
504
+ <a id="org8cf306f"></a>
450
505
 
451
506
  ### Listing labels
452
507
 
@@ -459,7 +514,7 @@ $ labrat --list-labels
459
514
  Any users who create useful label definitions can propose them for inclusion with `labrat's` distributed label database by filing a pull request at this git repository.
460
515
 
461
516
 
462
- <a id="org9de8226"></a>
517
+ <a id="org8f4e843"></a>
463
518
 
464
519
  ### System label database
465
520
 
@@ -483,7 +538,7 @@ avery8987:
483
538
  Note that it restricts itself to page-level settings. It would be inappropriate to, for example, include something like `font-style` in a system-wide label definition, though such things can be useful in a user's private label configuration.
484
539
 
485
540
 
486
- <a id="org8d64088"></a>
541
+ <a id="orgca1435c"></a>
487
542
 
488
543
  ### Trying out a label definition
489
544
 
@@ -500,7 +555,7 @@ $ labrat -V -c30 --label=avery8987 'Four score and seven years ago ~~ Our father
500
555
  ```
501
556
 
502
557
 
503
- <a id="org92c357f"></a>
558
+ <a id="org5d2c388"></a>
504
559
 
505
560
  ### Nesting label definitions
506
561
 
@@ -514,7 +569,7 @@ avery8986:
514
569
  In other words, it defines the `avery8986` label with a nested `--label` option that simply incorporates the `avery8987` entry settings.
515
570
 
516
571
 
517
- <a id="orge654259"></a>
572
+ <a id="org4eaa1a5"></a>
518
573
 
519
574
  ### Label database entries as configuration sets
520
575
 
@@ -560,7 +615,7 @@ $ labrat -V -c14 --label=badge 'Daniel E. Doherty ~~ (Amateur Programmer)'
560
615
  ```
561
616
 
562
617
 
563
- <a id="org0918e62"></a>
618
+ <a id="org65dfc16"></a>
564
619
 
565
620
  ### A Caution about option order
566
621
 
@@ -579,7 +634,7 @@ $ labrat --label=ff --font-style=italic 'Four score and seven years ago ~~ Our f
579
634
  ```
580
635
 
581
636
 
582
- <a id="org6460480"></a>
637
+ <a id="org7a15b9d"></a>
583
638
 
584
639
  # Development
585
640
 
@@ -588,7 +643,7 @@ After checking out the repo, run \`bin/setup\` to install dependencies. Then, ru
588
643
  To install this gem onto your local machine, run \`bundle exec rake install\`.
589
644
 
590
645
 
591
- <a id="org40db825"></a>
646
+ <a id="org92ab19d"></a>
592
647
 
593
648
  # Contributing
594
649
 
data/README.org CHANGED
@@ -12,9 +12,9 @@
12
12
 
13
13
  * Introduction
14
14
  This gem provides a command-line application, ~labrat~, for the easy printing
15
- of labels after suitable configuration. It also provides an Emacs library for
16
- easily invoking ~labrat~ from within Emacs to make a label from the paragraph
17
- at point.
15
+ of labels after suitable configuration. It also provides Emacs and ~vim~
16
+ libraries for easily invoking ~labrat~ from within the editor to make a label
17
+ from the paragraph at point.
18
18
 
19
19
  It can handle everything from label printers such as the Dymo LabelWriter
20
20
  geared toward single label printing to full-size printers for printing a
@@ -34,10 +34,15 @@ Buy your copy today while supplies last!
34
34
 
35
35
  * Table of Contents :toc_5:noexport:
36
36
  - [[#introduction][Introduction]]
37
+ - [[#motivation][Motivation]]
38
+ - [[#quick-start][Quick Start]]
39
+ - [[#installation][Installation]]
40
+ - [[#editor-integration][Editor Integration]]
41
+ - [[#emacs][Emacs]]
42
+ - [[#vim][Vim]]
43
+ - [[#installing-the-libraries][Installing the Libraries]]
44
+ - [[#a-tip-on-buying-file-folder-labels][A Tip on Buying File Folder Labels]]
37
45
  - [[#usage][Usage]]
38
- - [[#motivation][Motivation]]
39
- - [[#a-tip-on-buying-file-folder-labels][A Tip on Buying File Folder Labels]]
40
- - [[#installation][Installation]]
41
46
  - [[#setting-options][Setting options]]
42
47
  - [[#dimensions-and-other-values-in-options][Dimensions and other values in options]]
43
48
  - [[#page-setup-options][Page Setup Options]]
@@ -76,23 +81,7 @@ Buy your copy today while supplies last!
76
81
  - [[#development][Development]]
77
82
  - [[#contributing][Contributing]]
78
83
 
79
- * Usage
80
- =labrat= is a linux command-line program for quickly printing labels. It uses
81
- the [[https://github.com/prawnpdf/prawn][Prawn gem]] to generate PDF files with label formatting in mind. With
82
- =labrat= properly configured, printing a label is as simple as:
83
-
84
- #+begin_example
85
- $ labrat 'Income Taxes 2021 ~~ Example Maker, Inc.'
86
- #+end_example
87
-
88
- And you will get a two-line file-folder label printed that looks like this:
89
-
90
- [[./img/sample.png]]
91
-
92
- Note that an outline was added to make the size of the label apparent and is
93
- not actually printed with the label by default.
94
-
95
- ** Motivation
84
+ * Motivation
96
85
  I need to print labels. And in my case, mostly I need file folder labels. I
97
86
  typically want to print to a Dymo LabelWriter, of which I own several
98
87
  variants. The problem is that I work almost entirely in Linux, but the simple
@@ -102,6 +91,7 @@ Windows or to a Mac to run Dymo's proprietary GUI. The Dymo GUI is
102
91
  particularly irksome because it takes a long time to start up and demands that
103
92
  you register every time you open it.
104
93
 
94
+ * Quick Start
105
95
  That's too much ceremony for generating simple labels. I wanted a way to
106
96
  print a file label from the command line, or even better, from within my
107
97
  editor, Emacs. After giving up looking for such a thing without success, I
@@ -112,8 +102,6 @@ configuration---printing a file folder label is as simple as:
112
102
  $ labrat 'First Line of Label ~~ And the Second Line'
113
103
  #+end_src
114
104
 
115
- #+RESULTS:
116
-
117
105
  Or, you can preview the label in your previewer of choice (mine is qpdfview)
118
106
  by adding the -V flag:
119
107
 
@@ -121,44 +109,7 @@ by adding the -V flag:
121
109
  $ labrat -V 'First Line of Label ~~ And the Second Line'
122
110
  #+end_src
123
111
 
124
- #+RESULTS:
125
-
126
- Even better, I have included with =labrat= an elisp file (=labrat.el=) that
127
- will invoke =labrat= to form a label with the text of the paragraph at or
128
- before point. So within Emacs, you can bind keys to the commands,
129
- =labrat-print= and =labrat-view= to print or view the current or prior
130
- paragraph as your default label. Thus, in Emacs, I have ~C-z C-l C-l~ bound
131
- to =labrat-print= and ~C-z C-l C-v~ to =labrat-view=, and I can type a label
132
- in any buffer and get it generated with very little ceremony.
133
-
134
- ** A Tip on Buying File Folder Labels
135
- As mentioned, one of my main motivations for writing =labrat= was the need to
136
- easily create file-folder labels. I got into creating files after reading
137
- /Getting Things Done/ by David Allen. One of his recommendations for keeping
138
- organized is having a filing system so that documents can be easily archived
139
- and retrieved.
140
-
141
- I have long used Dymo's 30327 label, which is just the right size for file
142
- folders. But after several years of use, I started to notice something
143
- alarming: I could no longer read the text of the labels, they had nearly faded
144
- into oblivion. The problem is that the labels use a thermal printing
145
- technology that is affected by light and time, and over a period of years,
146
- they get lighter and lighter. You may have seen the same thing on old
147
- thermal-printed store receipts.
148
-
149
- After looking for alternative printers, I found the solution, not in a new
150
- printer technology, but in a new label technology. DuraReady makes labels
151
- that can be printed on a thermal printer like the Dymo LabelWriter, but print
152
- on a "Gloss white polypropylene BOPP plastic." I'm not sure what that is, but
153
- the labels come out with nice black lettering on a white background, and they
154
- don't fade. Check it out here: [[https://www.duraready.com/file-folder-labels/1034d-9/16-x-3-7/16-white-bopp-plastic-label/][DuraReady]].
155
-
156
- Thermal labels may be fine for ephemeral applications like name tags or
157
- shipping labels, but are terrible for long-term applications like file
158
- folders, marking cables, marking electrical breakers, or any other number of
159
- applications where long-term readability is essential.
160
-
161
- ** Installation
112
+ * Installation
162
113
  Since =labrat= is distributed as a Ruby gem, you have to have a ruby
163
114
  installation. Look [[https://www.ruby-lang.org/en/documentation/installation/][here]] for ruby installation instructions. You can then
164
115
  install =labrat= with:
@@ -187,16 +138,95 @@ It will also install an annotated sample user config file in
187
138
  =~/.config/labrat/labrat.yml= and a sample user-level label database in
188
139
  =~/.config/labrat/labeldb.yml=.
189
140
 
190
- For the benefit of Emacs users, it also installs the =labrat.el= elisp library
191
- in =~/.config/labrat= as well. You may want to add this directory to your
192
- ~load-path~ or copy, move, or link it to a directory already in your
193
- ~load-path~.
194
-
195
141
  If you invoke =labrat-install= multiple times, it will refuse to overwrite any
196
142
  existing config or database files that you may have already installed. If you
197
143
  want to re-install them you have to remove the existing files or move them out
198
144
  of the way.
199
145
 
146
+ * Editor Integration
147
+ ** Emacs
148
+ Included with =labrat= is an elisp file (=labrat.el=) that will invoke
149
+ =labrat= to form a label with the text of the paragraph at or before point.
150
+ So within Emacs, you can bind keys to the commands, =labrat-print= and
151
+ =labrat-view= to print or view the current or prior paragraph as your default
152
+ label. Thus, in Emacs, I have ~C-z C-l C-l~ bound to =labrat-print= and ~C-z
153
+ C-l C-v~ to =labrat-view=, and I can type a label in any buffer and get it
154
+ generated with very little ceremony.
155
+
156
+ ** Vim
157
+ There is also a vim plugin that you can copy to you =~.vim/plugins/labrat.vim=
158
+ directory to invoke ~labrat~ from within ~vim~. Suggested keybindings are
159
+ included for copying to =~/.vim/after/plugin/labrat.vim= that bind
160
+ =<leader>lp= and =<leader>lv= to invoke ~labrat~ in normal and visual modes.
161
+
162
+ ** Installing the Libraries
163
+ After running ~labrat-install~ both the emacs and vim libraries will be copied
164
+ to =~/.config/labrat=. It's up to you to copy them from there to you Emacs
165
+ load-path or vim ~plugin~ and ~after/plugin~ directories respectively.
166
+
167
+ Or, you can just add symlinks to the distributed files, so you get updates
168
+ whenever you update ~labrat~:
169
+
170
+ For emacs:
171
+ #+begin_src sh
172
+ $ cd ~/.emacs.d/lisp # Assuming this is on your load-path
173
+ $ ln -s ~/.config/labrat/labrat.el labrat.el
174
+ #+end_src
175
+
176
+ Then, `require 'labrat'` in you Emacs init file.
177
+
178
+ And for vim:
179
+ #+begin_src sh
180
+ $ cd ~/.vim/plugin
181
+ $ ln -s ~/.config/labrat/vim/plugin/labrat.vim labrat.vim
182
+
183
+ $ cd ~/.vim/after/plugin
184
+ $ ln -s ~/.config/labrat/vim/after/plugin/labrat.vim labrat.vim
185
+ #+end_src
186
+
187
+ * A Tip on Buying File Folder Labels
188
+ As mentioned, one of my main motivations for writing =labrat= was the need to
189
+ easily create file-folder labels. I got into creating files after reading
190
+ /Getting Things Done/ by David Allen. One of his recommendations for keeping
191
+ organized is having a filing system so that documents can be easily archived
192
+ and retrieved.
193
+
194
+ I have long used Dymo's 30327 label, which is just the right size for file
195
+ folders. But after several years of use, I started to notice something
196
+ alarming: I could no longer read the text of the labels, they had nearly faded
197
+ into oblivion. The problem is that the labels use a thermal printing
198
+ technology that is affected by light and time, and over a period of years,
199
+ they get lighter and lighter. You may have seen the same thing on old
200
+ thermal-printed store receipts.
201
+
202
+ After looking for alternative printers, I found the solution, not in a new
203
+ printer technology, but in a new label technology. DuraReady makes labels
204
+ that can be printed on a thermal printer like the Dymo LabelWriter, but print
205
+ on a "Gloss white polypropylene BOPP plastic." I'm not sure what that is, but
206
+ the labels come out with nice black lettering on a white background, and they
207
+ don't fade. Check it out here: [[https://www.duraready.com/file-folder-labels/1034d-9/16-x-3-7/16-white-bopp-plastic-label/][DuraReady]].
208
+
209
+ Thermal labels may be fine for ephemeral applications like name tags or
210
+ shipping labels, but are terrible for long-term applications like file
211
+ folders, marking cables, marking electrical breakers, or any other number of
212
+ applications where long-term readability is essential.
213
+
214
+ * Usage
215
+ =labrat= is a linux command-line program for quickly printing labels. It uses
216
+ the [[https://github.com/prawnpdf/prawn][Prawn gem]] to generate PDF files with label formatting in mind. With
217
+ =labrat= properly configured, printing a label is as simple as:
218
+
219
+ #+begin_example
220
+ $ labrat 'Income Taxes 2021 ~~ Example Maker, Inc.'
221
+ #+end_example
222
+
223
+ And you will get a two-line file-folder label printed that looks like this:
224
+
225
+ [[./img/sample.png]]
226
+
227
+ Note that an outline was added to make the size of the label apparent and is
228
+ not actually printed with the label by default.
229
+
200
230
  ** Setting options
201
231
  You can control how =labrat= composes a label completely from the
202
232
  command-line, though that would be a very tedious thing to have to do.
@@ -238,7 +268,7 @@ they contain any spaces or other characters special to your shell. In the
238
268
  configuration files, string values need not be quoted.
239
269
 
240
270
  ** Page Setup Options
241
- Labrat can handle multi-label pages such as Avery-style label sheets. These
271
+ ~Labrat~ can handle multi-label pages such as Avery-style label sheets. These
242
272
  options deal with the page-level dimensions of the, potentially, multi-label
243
273
  page. By contrast, the dimensions of individual labels are dealt with by the
244
274
  label setup options described in the [[* Label Setup Options][next]] section.
data/bin/labrat-install CHANGED
@@ -83,3 +83,10 @@ lsp_dest_path = File.join(usr_dest_dir, 'labrat.el')
83
83
  warn "Installing Emacs lisp library '#{lsp_dest_path}'."
84
84
  icmd = "install -m 0664 '#{lsp_src_path}' '#{lsp_dest_path}'"
85
85
  system(icmd)
86
+
87
+ # Copy vim plugin
88
+ vim_src_dir = File.expand_path(File.join(__dir__, '../lib/vim'))
89
+ warn "Copying vim plugin to '#{usr_dest_dir}/vim'."
90
+ Dir.chdir(vim_src_dir) do
91
+ FileUtils.cp_r(vim_src_dir, usr_dest_dir)
92
+ end
data/labrat.gemspec CHANGED
@@ -42,10 +42,9 @@ Gem::Specification.new do |spec|
42
42
  spec.executables = spec.files.grep(%r{\Abin/labrat}) { |f| File.basename(f) }
43
43
  spec.require_paths = ["lib"]
44
44
  spec.post_install_message = 'To install config and label database files, run labrat-install.'
45
- spec.rdoc_options += ['-D', '--ri', '--exclude', '^lib/lisp.*']
45
+ spec.rdoc_options += ['-D', '--ri', '--exclude', '^lib/lisp.*', '--exclude', '^lib/vim.*']
46
46
 
47
47
  spec.add_dependency "activesupport"
48
48
  spec.add_dependency "fat_config", '>=0.4.2'
49
- spec.add_dependency "matrix"
50
49
  spec.add_dependency "prawn", "~> 2.0"
51
50
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Labrat
4
- VERSION = "1.3.0"
4
+ VERSION = "1.4.0"
5
5
  end
data/lib/labrat.rb CHANGED
@@ -9,15 +9,14 @@ require 'prawn/measurement_extensions'
9
9
  require 'optparse'
10
10
  require 'yaml'
11
11
  require 'pp'
12
- require 'debug'
13
12
 
14
13
  # Gem Overview (extracted from README.org by gem_docs)
15
14
  #
16
15
  # * Introduction
17
16
  # This gem provides a command-line application, ~labrat~, for the easy printing
18
- # of labels after suitable configuration. It also provides an Emacs library for
19
- # easily invoking ~labrat~ from within Emacs to make a label from the paragraph
20
- # at point.
17
+ # of labels after suitable configuration. It also provides Emacs and ~vim~
18
+ # libraries for easily invoking ~labrat~ from within the editor to make a label
19
+ # from the paragraph at point.
21
20
  #
22
21
  # It can handle everything from label printers such as the Dymo LabelWriter
23
22
  # geared toward single label printing to full-size printers for printing a
@@ -0,0 +1,7 @@
1
+ " Normal mode
2
+ nnoremap <leader>lp :LabratPrint<CR>
3
+ nnoremap <leader>lv :LabratView<CR>
4
+
5
+ " Visual mode
6
+ vnoremap <leader>lp :LabratPrint<CR>
7
+ vnoremap <leader>lv :LabratView<CR>
@@ -0,0 +1,112 @@
1
+ " labrat.vim — Print labels via labrat from Vim/Neovim
2
+
3
+ if exists('g:loaded_labrat')
4
+ finish
5
+ endif
6
+ let g:loaded_labrat = 1
7
+
8
+ " -----------------------
9
+ " Configuration
10
+ " -----------------------
11
+
12
+ if !exists('g:labrat_executable')
13
+ let g:labrat_executable = 'labrat'
14
+ endif
15
+
16
+ if !exists('g:labrat_nl_sep')
17
+ let g:labrat_nl_sep = '~~'
18
+ endif
19
+
20
+ if !exists('g:labrat_label_sep')
21
+ let g:labrat_label_sep = '@@'
22
+ endif
23
+
24
+ if !exists('g:labrat_output')
25
+ let g:labrat_output = expand('~/labrat.pdf')
26
+ endif
27
+
28
+ " -----------------------
29
+ " Helpers
30
+ " -----------------------
31
+
32
+ function! s:strip_comments(lines) abort
33
+ return filter(copy(a:lines), 'v:val !~ "^#"')
34
+ endfunction
35
+
36
+ function! s:normalize_paragraph(lines) abort
37
+ let lines = s:strip_comments(a:lines)
38
+ let text = trim(join(lines, "\n"))
39
+ return substitute(text, "\n", g:labrat_nl_sep, 'g')
40
+ endfunction
41
+
42
+ function! s:get_paragraph_at_point() abort
43
+ let cur = line('.')
44
+
45
+ " Find start
46
+ let start = cur
47
+ while start > 1 && getline(start - 1) !~ '^\s*$'
48
+ let start -= 1
49
+ endwhile
50
+
51
+ " Find end
52
+ let end = cur
53
+ let last = line('$')
54
+ while end < last && getline(end + 1) !~ '^\s*$'
55
+ let end += 1
56
+ endwhile
57
+
58
+ return getline(start, end)
59
+ endfunction
60
+
61
+ function! s:get_paragraphs_from_visual() abort
62
+ let start = getpos("'<")[1]
63
+ let end = getpos("'>")[1]
64
+
65
+ let paras = []
66
+ let i = start
67
+
68
+ while i <= end
69
+ " skip blank lines
70
+ while i <= end && getline(i) =~ '^\s*$'
71
+ let i += 1
72
+ endwhile
73
+ if i > end | break | endif
74
+
75
+ let pstart = i
76
+ while i <= end && getline(i) !~ '^\s*$'
77
+ let i += 1
78
+ endwhile
79
+
80
+ call add(paras, s:normalize_paragraph(getline(pstart, i - 1)))
81
+ endwhile
82
+
83
+ return join(paras, g:labrat_label_sep)
84
+ endfunction
85
+
86
+ function! s:get_label_text() abort
87
+ if mode() =~# 'v'
88
+ return s:get_paragraphs_from_visual()
89
+ else
90
+ return s:normalize_paragraph(s:get_paragraph_at_point())
91
+ endif
92
+ endfunction
93
+
94
+ " -----------------------
95
+ " Commands
96
+ " -----------------------
97
+
98
+ function! labrat#run(args) abort
99
+ let label = s:get_label_text()
100
+ let cmd = [g:labrat_executable] + a:args + ['-o', g:labrat_output, label]
101
+
102
+ if has('nvim')
103
+ call jobstart(cmd, {'detach': v:true})
104
+ else
105
+ call system(join(map(copy(cmd), 'shellescape(v:val)'), ' '))
106
+ endif
107
+
108
+ echo "labrat: label sent"
109
+ endfunction
110
+
111
+ command! -range LabratPrint call labrat#run([])
112
+ command! -range LabratView call labrat#run(['-V'])
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: labrat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel E. Doherty
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-12-26 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport
@@ -37,20 +37,6 @@ dependencies:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
39
  version: 0.4.2
40
- - !ruby/object:Gem::Dependency
41
- name: matrix
42
- requirement: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: '0'
47
- type: :runtime
48
- prerelease: false
49
- version_requirements: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: '0'
54
40
  - !ruby/object:Gem::Dependency
55
41
  name: prawn
56
42
  requirement: !ruby/object:Gem::Requirement
@@ -97,6 +83,7 @@ files:
97
83
  - ".simplecov"
98
84
  - ".travis.yml"
99
85
  - ".yardopts"
86
+ - CHANGELOG.md
100
87
  - CHANGELOG.org
101
88
  - Gemfile
102
89
  - Gemfile.lock
@@ -127,6 +114,8 @@ files:
127
114
  - lib/labrat/read_files.rb
128
115
  - lib/labrat/version.rb
129
116
  - lib/lisp/labrat.el
117
+ - lib/vim/after/plugin/labrat.vim
118
+ - lib/vim/plugin/labrat.vim
130
119
  - texlabels/sample.dvi
131
120
  - texlabels/sample.pdf
132
121
  - texlabels/sample.tex
@@ -142,6 +131,8 @@ rdoc_options:
142
131
  - "--ri"
143
132
  - "--exclude"
144
133
  - "^lib/lisp.*"
134
+ - "--exclude"
135
+ - "^lib/vim.*"
145
136
  require_paths:
146
137
  - lib
147
138
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -155,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
146
  - !ruby/object:Gem::Version
156
147
  version: '0'
157
148
  requirements: []
158
- rubygems_version: 3.6.3
149
+ rubygems_version: 4.0.3
159
150
  specification_version: 4
160
151
  summary: Command-line and Emacs label print software.
161
152
  test_files: []