labrat 1.2.2 → 1.2.3
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 +4 -4
- data/.github/workflows/main.yml +27 -0
- data/.github/workflows/ruby.yml +38 -0
- data/.rubocop.yml +177 -2
- data/Gemfile +11 -5
- data/Gemfile.lock +57 -46
- data/README.org +26 -21
- data/Rakefile +1 -1
- data/bin/labrat +0 -1
- data/labrat.gemspec +5 -14
- data/lib/config_files/labeldb.yml +17 -0
- data/lib/labrat/arg_parser.rb +202 -96
- data/lib/labrat/config.rb +32 -12
- data/lib/labrat/hash.rb +2 -8
- data/lib/labrat/label.rb +28 -12
- data/lib/labrat/options.rb +46 -20
- data/lib/labrat/read_files.rb +3 -2
- data/lib/labrat/version.rb +1 -1
- metadata +17 -129
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f670030c9b1823ffc3cd869dd6f765294960b52d0102ec197b626c23d1a1eb53
|
4
|
+
data.tar.gz: 54a962fe1c2756107d0176a833fdc5620fd6742b67552a34aa73efbf1f4f7a61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79e44478bd2593586dc2922b1aa0bb82ab38cdf9c49644dc1fb9835ed15990031c726bd5e9188289af1fabd81872e19194a9d5119085b89338de5a9705719fad
|
7
|
+
data.tar.gz: d0b6fe7f577acc010e47769c63c85b59f82c5038851204766bab8e7847f9e9f0e7625575ab9ac376b5217514a311486233e77e8bf1bc6d476ff3b12d0787527e
|
@@ -0,0 +1,27 @@
|
|
1
|
+
name: Ruby
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
|
8
|
+
pull_request:
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
build:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
name: Ruby ${{ matrix.ruby }}
|
14
|
+
strategy:
|
15
|
+
matrix:
|
16
|
+
ruby:
|
17
|
+
- '3.3.5'
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v4
|
21
|
+
- name: Set up Ruby
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: ${{ matrix.ruby }}
|
25
|
+
bundler-cache: true
|
26
|
+
- name: Run the default task
|
27
|
+
run: bundle exec rake
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby Versions
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ "master" ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ "master" ]
|
15
|
+
|
16
|
+
permissions:
|
17
|
+
contents: read
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
test:
|
21
|
+
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
strategy:
|
24
|
+
matrix:
|
25
|
+
ruby-version: ['3.2', '3.3', '3.4']
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v4
|
29
|
+
- name: Set up Ruby
|
30
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
31
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
32
|
+
# uses: ruby/setup-ruby@v1
|
33
|
+
uses: ruby/setup-ruby@v1 # v1.146.0
|
34
|
+
with:
|
35
|
+
ruby-version: ${{ matrix.ruby-version }}
|
36
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
37
|
+
- name: Run tests
|
38
|
+
run: bundle exec rake
|
data/.rubocop.yml
CHANGED
@@ -1,2 +1,177 @@
|
|
1
|
-
|
2
|
-
-
|
1
|
+
plugins:
|
2
|
+
- rubocop-rspec
|
3
|
+
- rubocop-performance
|
4
|
+
|
5
|
+
inherit_gem:
|
6
|
+
rubocop-shopify: rubocop.yml
|
7
|
+
|
8
|
+
AllCops:
|
9
|
+
NewCops: enable
|
10
|
+
TargetRubyVersion: 3.1
|
11
|
+
|
12
|
+
Style/DateTime:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Style/StringLiteralsInInterpolation:
|
16
|
+
Enabled: true
|
17
|
+
EnforcedStyle: single_quotes
|
18
|
+
|
19
|
+
Style/MethodCallWithArgsParentheses:
|
20
|
+
Enabled: false
|
21
|
+
|
22
|
+
Style/StringLiterals:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Style/WordArray:
|
26
|
+
Enabled: false
|
27
|
+
|
28
|
+
Style/SymbolArray:
|
29
|
+
Enabled: false
|
30
|
+
|
31
|
+
Style/TrailingCommaInHashLiteral:
|
32
|
+
Enabled: false
|
33
|
+
|
34
|
+
Style/TrailingCommaInArrayLiteral:
|
35
|
+
Enabled: false
|
36
|
+
|
37
|
+
Style/HashSyntax:
|
38
|
+
Enabled: false
|
39
|
+
|
40
|
+
Style/ClassMethodsDefinitions:
|
41
|
+
Enabled: true
|
42
|
+
EnforcedStyle: def_self
|
43
|
+
|
44
|
+
Layout/LineLength:
|
45
|
+
Enabled: true
|
46
|
+
Max: 120
|
47
|
+
# To make it possible to copy or click on URIs in the code, we allow lines
|
48
|
+
# containing a URI to be longer than Max.
|
49
|
+
AllowHeredoc: true
|
50
|
+
AllowURI: true
|
51
|
+
URISchemes:
|
52
|
+
- http
|
53
|
+
- https
|
54
|
+
|
55
|
+
Layout/ArgumentAlignment:
|
56
|
+
Enabled: true
|
57
|
+
EnforcedStyle: with_first_argument
|
58
|
+
|
59
|
+
Naming/InclusiveLanguage:
|
60
|
+
Enabled: false
|
61
|
+
|
62
|
+
Metrics/AbcSize:
|
63
|
+
# The ABC size is a calculated magnitude, so this number can be a Fixnum or
|
64
|
+
# a Float.
|
65
|
+
Enabled: false
|
66
|
+
Max: 50
|
67
|
+
|
68
|
+
Metrics/BlockNesting:
|
69
|
+
Enabled: false
|
70
|
+
Max: 3
|
71
|
+
|
72
|
+
Metrics/BlockLength:
|
73
|
+
Enabled: false
|
74
|
+
Max: 25
|
75
|
+
|
76
|
+
Metrics/ClassLength:
|
77
|
+
Enabled: false
|
78
|
+
CountComments: false # count full line comments?
|
79
|
+
Max: 100
|
80
|
+
|
81
|
+
Metrics/ModuleLength:
|
82
|
+
Enabled: false
|
83
|
+
CountComments: false # count full line comments?
|
84
|
+
Max: 100
|
85
|
+
|
86
|
+
Metrics/MethodLength:
|
87
|
+
Enabled: false
|
88
|
+
CountComments: false # count full line comments?
|
89
|
+
Max: 10
|
90
|
+
|
91
|
+
# Avoid complex methods.
|
92
|
+
Metrics/CyclomaticComplexity:
|
93
|
+
Enabled: false
|
94
|
+
Max: 20
|
95
|
+
|
96
|
+
Metrics/ParameterLists:
|
97
|
+
Max: 5
|
98
|
+
CountKeywordArgs: false
|
99
|
+
|
100
|
+
Metrics/PerceivedComplexity:
|
101
|
+
Enabled: false
|
102
|
+
Max: 8
|
103
|
+
|
104
|
+
Layout/MultilineOperationIndentation:
|
105
|
+
EnforcedStyle: aligned
|
106
|
+
|
107
|
+
Layout/MultilineMethodCallIndentation:
|
108
|
+
EnforcedStyle: indented_relative_to_receiver
|
109
|
+
SupportedStyles:
|
110
|
+
- aligned
|
111
|
+
- indented
|
112
|
+
- indented_relative_to_receiver
|
113
|
+
# By default, the indentation width from Style/IndentationWidth is used
|
114
|
+
# But it can be overridden by setting this parameter
|
115
|
+
IndentationWidth: ~
|
116
|
+
|
117
|
+
# Though the style guides recommend against them, I like perl back references.
|
118
|
+
# They are much more concise than the recommended: $2 vs. Regexp.last_match(2).
|
119
|
+
# Two characters versus 18!
|
120
|
+
# Cop supports --auto-correct.
|
121
|
+
Style/PerlBackrefs:
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
# Cop supports --auto-correct.
|
125
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
|
126
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining
|
127
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
128
|
+
# FunctionalMethods: let, let!, subject, watch
|
129
|
+
# IgnoredMethods: lambda, proc, it
|
130
|
+
Style/BlockDelimiters:
|
131
|
+
EnforcedStyle: braces_for_chaining
|
132
|
+
ProceduralMethods: expect
|
133
|
+
|
134
|
+
# Cop supports --auto-correct.
|
135
|
+
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
|
136
|
+
Layout/ExtraSpacing:
|
137
|
+
AllowForAlignment: true
|
138
|
+
|
139
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
140
|
+
# SupportedStyles: format, sprintf, percent
|
141
|
+
Style/FormatString:
|
142
|
+
Enabled: false
|
143
|
+
|
144
|
+
# Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist.
|
145
|
+
# NamePrefix: is_, has_, have_
|
146
|
+
# NamePrefixBlacklist: is_, has_, have_
|
147
|
+
# NameWhitelist: is_a?
|
148
|
+
Naming/PredicateName:
|
149
|
+
AllowedMethods: has_overlaps_within?
|
150
|
+
Exclude:
|
151
|
+
- 'spec/**/*'
|
152
|
+
|
153
|
+
# Cop supports --auto-correct.
|
154
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
155
|
+
# SupportedStyles: always, never
|
156
|
+
Style/FrozenStringLiteralComment:
|
157
|
+
Enabled: false
|
158
|
+
EnforcedStyle: always
|
159
|
+
|
160
|
+
# I like using !! to convert a value to boolean.
|
161
|
+
Style/DoubleNegation:
|
162
|
+
Enabled: false
|
163
|
+
|
164
|
+
RSpec/MultipleExpectations:
|
165
|
+
Enabled: false
|
166
|
+
|
167
|
+
RSpec/ExampleLength:
|
168
|
+
Enabled: false
|
169
|
+
|
170
|
+
RSpec/DescribedClass:
|
171
|
+
Enabled: false
|
172
|
+
|
173
|
+
RSpec/MultipleMemoizedHelpers:
|
174
|
+
Max: 10
|
175
|
+
|
176
|
+
RSpec/NestedGroups:
|
177
|
+
Max: 5
|
data/Gemfile
CHANGED
@@ -5,8 +5,14 @@ source "https://rubygems.org"
|
|
5
5
|
# Specify your gem's dependencies in labrat.gemspec
|
6
6
|
gemspec
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
gem
|
11
|
-
|
12
|
-
gem
|
8
|
+
group :development do
|
9
|
+
gem 'debug', '>= 1.0.0'
|
10
|
+
gem 'pry'
|
11
|
+
gem 'rake'
|
12
|
+
gem 'rspec'
|
13
|
+
gem 'rubocop'
|
14
|
+
gem 'rubocop-performance'
|
15
|
+
gem 'rubocop-rspec'
|
16
|
+
gem 'rubocop-shopify'
|
17
|
+
gem 'simplecov'
|
18
|
+
end
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
labrat (1.2.
|
4
|
+
labrat (1.2.3)
|
5
5
|
activesupport
|
6
|
-
fat_config (>= 0.
|
6
|
+
fat_config (>= 0.4.2)
|
7
7
|
fat_core
|
8
8
|
matrix
|
9
9
|
prawn (~> 2.0)
|
@@ -11,7 +11,7 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: https://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activesupport (8.0.
|
14
|
+
activesupport (8.0.2)
|
15
15
|
base64
|
16
16
|
benchmark (>= 0.3)
|
17
17
|
bigdecimal
|
@@ -24,70 +24,78 @@ GEM
|
|
24
24
|
securerandom (>= 0.3)
|
25
25
|
tzinfo (~> 2.0, >= 2.0.5)
|
26
26
|
uri (>= 0.13.1)
|
27
|
-
ast (2.4.
|
27
|
+
ast (2.4.3)
|
28
28
|
base64 (0.2.0)
|
29
29
|
benchmark (0.4.0)
|
30
|
-
bigdecimal (3.1.
|
30
|
+
bigdecimal (3.1.9)
|
31
31
|
coderay (1.1.3)
|
32
|
-
concurrent-ruby (1.3.
|
33
|
-
connection_pool (2.
|
32
|
+
concurrent-ruby (1.3.5)
|
33
|
+
connection_pool (2.5.0)
|
34
34
|
damerau-levenshtein (1.3.3)
|
35
|
-
|
35
|
+
date (3.4.1)
|
36
|
+
debug (1.10.0)
|
36
37
|
irb (~> 1.10)
|
37
38
|
reline (>= 0.3.8)
|
38
|
-
diff-lcs (1.
|
39
|
+
diff-lcs (1.6.0)
|
39
40
|
docile (1.4.1)
|
40
41
|
drb (2.2.1)
|
41
|
-
fat_config (0.
|
42
|
+
fat_config (0.4.2)
|
42
43
|
activesupport
|
44
|
+
fat_core (>= 5.6.1)
|
43
45
|
inifile
|
44
46
|
tomlib
|
45
|
-
fat_core (5.
|
47
|
+
fat_core (5.6.1)
|
46
48
|
activesupport
|
47
49
|
damerau-levenshtein
|
48
50
|
ostruct
|
49
51
|
stringio (>= 3.1.2)
|
50
|
-
i18n (1.14.
|
52
|
+
i18n (1.14.7)
|
51
53
|
concurrent-ruby (~> 1.0)
|
52
54
|
inifile (3.0.0)
|
53
|
-
io-console (0.
|
54
|
-
irb (1.
|
55
|
+
io-console (0.8.0)
|
56
|
+
irb (1.15.1)
|
57
|
+
pp (>= 0.6.0)
|
55
58
|
rdoc (>= 4.0.0)
|
56
59
|
reline (>= 0.4.2)
|
57
|
-
json (2.
|
58
|
-
language_server-protocol (3.17.0.
|
59
|
-
|
60
|
+
json (2.10.2)
|
61
|
+
language_server-protocol (3.17.0.4)
|
62
|
+
lint_roller (1.1.0)
|
63
|
+
logger (1.6.6)
|
60
64
|
matrix (0.4.2)
|
61
65
|
method_source (1.1.0)
|
62
|
-
minitest (5.25.
|
66
|
+
minitest (5.25.5)
|
63
67
|
ostruct (0.6.1)
|
64
68
|
parallel (1.26.3)
|
65
|
-
parser (3.3.
|
69
|
+
parser (3.3.7.1)
|
66
70
|
ast (~> 2.4.1)
|
67
71
|
racc
|
68
72
|
pdf-core (0.10.0)
|
73
|
+
pp (0.6.2)
|
74
|
+
prettyprint
|
69
75
|
prawn (2.5.0)
|
70
76
|
matrix (~> 0.4)
|
71
77
|
pdf-core (~> 0.10.0)
|
72
78
|
ttfunk (~> 1.8)
|
73
|
-
|
79
|
+
prettyprint (0.2.0)
|
80
|
+
pry (0.15.2)
|
74
81
|
coderay (~> 1.1)
|
75
82
|
method_source (~> 1.0)
|
76
|
-
psych (5.2.
|
83
|
+
psych (5.2.3)
|
84
|
+
date
|
77
85
|
stringio
|
78
86
|
racc (1.8.1)
|
79
87
|
rainbow (3.1.1)
|
80
88
|
rake (13.2.1)
|
81
|
-
rdoc (6.
|
89
|
+
rdoc (6.12.0)
|
82
90
|
psych (>= 4.0.0)
|
83
|
-
regexp_parser (2.
|
84
|
-
reline (0.
|
91
|
+
regexp_parser (2.10.0)
|
92
|
+
reline (0.6.0)
|
85
93
|
io-console (~> 0.5)
|
86
94
|
rspec (3.13.0)
|
87
95
|
rspec-core (~> 3.13.0)
|
88
96
|
rspec-expectations (~> 3.13.0)
|
89
97
|
rspec-mocks (~> 3.13.0)
|
90
|
-
rspec-core (3.13.
|
98
|
+
rspec-core (3.13.3)
|
91
99
|
rspec-support (~> 3.13.0)
|
92
100
|
rspec-expectations (3.13.3)
|
93
101
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -95,45 +103,48 @@ GEM
|
|
95
103
|
rspec-mocks (3.13.2)
|
96
104
|
diff-lcs (>= 1.2.0, < 2.0)
|
97
105
|
rspec-support (~> 3.13.0)
|
98
|
-
rspec-support (3.13.
|
99
|
-
rubocop (1.
|
106
|
+
rspec-support (3.13.2)
|
107
|
+
rubocop (1.74.0)
|
100
108
|
json (~> 2.3)
|
101
|
-
language_server-protocol (
|
109
|
+
language_server-protocol (~> 3.17.0.2)
|
110
|
+
lint_roller (~> 1.1.0)
|
102
111
|
parallel (~> 1.10)
|
103
112
|
parser (>= 3.3.0.2)
|
104
113
|
rainbow (>= 2.2.2, < 4.0)
|
105
|
-
regexp_parser (>= 2.
|
106
|
-
rubocop-ast (>= 1.
|
114
|
+
regexp_parser (>= 2.9.3, < 3.0)
|
115
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
107
116
|
ruby-progressbar (~> 1.7)
|
108
117
|
unicode-display_width (>= 2.4.0, < 4.0)
|
109
|
-
rubocop-ast (1.
|
118
|
+
rubocop-ast (1.40.0)
|
110
119
|
parser (>= 3.3.1.0)
|
111
|
-
rubocop-performance (1.
|
112
|
-
|
113
|
-
rubocop
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
rubocop (~> 1.
|
120
|
+
rubocop-performance (1.24.0)
|
121
|
+
lint_roller (~> 1.1)
|
122
|
+
rubocop (>= 1.72.1, < 2.0)
|
123
|
+
rubocop-ast (>= 1.38.0, < 2.0)
|
124
|
+
rubocop-rspec (3.5.0)
|
125
|
+
lint_roller (~> 1.1)
|
126
|
+
rubocop (~> 1.72, >= 1.72.1)
|
127
|
+
rubocop-shopify (2.16.0)
|
128
|
+
rubocop (~> 1.62)
|
118
129
|
ruby-progressbar (1.13.0)
|
119
|
-
securerandom (0.
|
130
|
+
securerandom (0.4.1)
|
120
131
|
simplecov (0.22.0)
|
121
132
|
docile (~> 1.1)
|
122
133
|
simplecov-html (~> 0.11)
|
123
134
|
simplecov_json_formatter (~> 0.1)
|
124
135
|
simplecov-html (0.13.1)
|
125
136
|
simplecov_json_formatter (0.1.4)
|
126
|
-
stringio (3.1.
|
127
|
-
tomlib (0.7.
|
137
|
+
stringio (3.1.5)
|
138
|
+
tomlib (0.7.3)
|
128
139
|
bigdecimal
|
129
140
|
ttfunk (1.8.0)
|
130
141
|
bigdecimal (~> 3.1)
|
131
142
|
tzinfo (2.0.6)
|
132
143
|
concurrent-ruby (~> 1.0)
|
133
|
-
unicode-display_width (3.1.
|
144
|
+
unicode-display_width (3.1.4)
|
134
145
|
unicode-emoji (~> 4.0, >= 4.0.4)
|
135
146
|
unicode-emoji (4.0.4)
|
136
|
-
uri (1.0.
|
147
|
+
uri (1.0.3)
|
137
148
|
|
138
149
|
PLATFORMS
|
139
150
|
x86_64-linux
|
@@ -142,9 +153,9 @@ DEPENDENCIES
|
|
142
153
|
debug (>= 1.0.0)
|
143
154
|
labrat!
|
144
155
|
pry
|
145
|
-
rake
|
146
|
-
rspec
|
147
|
-
rubocop
|
156
|
+
rake
|
157
|
+
rspec
|
158
|
+
rubocop
|
148
159
|
rubocop-performance
|
149
160
|
rubocop-rspec
|
150
161
|
rubocop-shopify
|
data/README.org
CHANGED
@@ -5,10 +5,15 @@ This is for markdown output:
|
|
5
5
|
[](https://travis-ci.org/ddoherty03/labrat)
|
6
6
|
|
7
7
|
The following is for org.
|
8
|
-
#+END_COMMENT
|
9
8
|
|
10
|
-
|
9
|
+
NOTE: in order to get the README to render the tilde character properly as
|
10
|
+
"code" in org syntax, I used a unicode character, ˜ called TILDE OPERATOR,
|
11
|
+
inside regular tildes, like this ~∼∼~. Though it looks like four tildes in a
|
12
|
+
row, its actually tilde - TILDE OPERATOR - TILDE OPERATOR - tilde, which
|
13
|
+
renders nicely on Github.
|
14
|
+
#+END_COMMENT
|
11
15
|
|
16
|
+
[[https://github.com/ddoherty03/labrat/actions/workflows/main.yml/badge.svg]]
|
12
17
|
|
13
18
|
* Table of Contents :toc_4:
|
14
19
|
- [[#labrat][Labrat]]
|
@@ -107,8 +112,8 @@ in any buffer and get it generated with very little ceremony.
|
|
107
112
|
As mentioned, one of my main motivations for writing =labrat= was the need to
|
108
113
|
easily create file-folder labels. I got into creating files after reading
|
109
114
|
/Getting Things Done/ by David Allen. One of his recommendations for keeping
|
110
|
-
organized is having a
|
111
|
-
retrieved.
|
115
|
+
organized is having a filing system so that documents can be easily archived
|
116
|
+
and retrieved.
|
112
117
|
|
113
118
|
I have long used Dymo's 30327 label, which is just the right size for file
|
114
119
|
folders. But after several years of use, I started to notice something
|
@@ -152,7 +157,7 @@ config file in =/etc/xdg/labrat/config.yml= and a system-wide label database
|
|
152
157
|
in =/etc/xdg/labrat/labeldb.yml=.
|
153
158
|
|
154
159
|
It will also install an annotated sample user config file in
|
155
|
-
=~/.config/labrat/labrat.
|
160
|
+
=~/.config/labrat/labrat.yml= and a sample user-level label database in
|
156
161
|
=~/.config/labrat/labeldb.yml=.
|
157
162
|
|
158
163
|
For the benefit of Emacs users, it also installs the =labrat.el= elisp library
|
@@ -162,7 +167,8 @@ in =~/.config/labrat= as well. You may want to add this directory to your
|
|
162
167
|
|
163
168
|
If you invoke =labrat-install= multiple times, it will refuse to overwrite any
|
164
169
|
existing config or database files that you may have already installed. If you
|
165
|
-
want to re-install them you have to remove
|
170
|
+
want to re-install them you have to remove the existing files or move them out
|
171
|
+
of the way.
|
166
172
|
|
167
173
|
** Setting options
|
168
174
|
You can control how =labrat= composes a label completely from the
|
@@ -208,7 +214,7 @@ configuration files, string values need not be quoted.
|
|
208
214
|
Labrat can handle multi-label pages such as Avery-style label sheets. These
|
209
215
|
options deal with the page-level dimensions of the, potentially, multi-label
|
210
216
|
page. By contrast, the dimensions of individual labels are dealt with by the
|
211
|
-
label setup options described in the next section.
|
217
|
+
label setup options described in the [[* Label Setup Options][next]] section.
|
212
218
|
|
213
219
|
*** Orientation
|
214
220
|
- ~-L~, ~--[no-]landscape~ :: Orient the label grid and the printing direction
|
@@ -309,7 +315,7 @@ label, but the following options allow you to alter that.
|
|
309
315
|
label (default center)
|
310
316
|
|
311
317
|
*** Fonts and styling
|
312
|
-
=labrat= provides a few simple
|
318
|
+
=labrat= provides a few simple means for styling the label text. Note that all
|
313
319
|
of these apply to the whole label text: there is no provision yet for doing
|
314
320
|
in-line changes of font styles.
|
315
321
|
|
@@ -353,18 +359,18 @@ later pages always start on the first label position.
|
|
353
359
|
|
354
360
|
*** New line marker
|
355
361
|
You can embed a special text-sequence in the label text to indicate where a
|
356
|
-
line-break should occur. By default it is the sequence
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
362
|
+
line-break should occur. By default it is the sequence =∼∼=. This means that
|
363
|
+
=labrat= will translate all occurrences of =∼∼= in the text into a line-break,
|
364
|
+
even consecutive occurrences. There is no way to escape this in the text, so
|
365
|
+
if you want labels that use =∼∼= as part of the text, you are going to have
|
366
|
+
difficulty printing. But you can change the marker to something else with
|
367
|
+
~--nlsep~. This is especially helpful when you are using the command-line to
|
368
|
+
supply the label text since specifying line-breaks on a shell command can be
|
369
|
+
difficult. However note that this substitution takes place even when reading
|
370
|
+
label texts from a file or standard input.
|
365
371
|
|
366
372
|
- ~-n~, ~--nlsep=SEPARATOR~ :: Specify text to be translated into a line-break
|
367
|
-
(default '
|
373
|
+
(default ' =∼∼= ')
|
368
374
|
|
369
375
|
*** Label separator
|
370
376
|
The only way to print more than one label from the command-line is to indicate
|
@@ -456,7 +462,7 @@ disregarding comments.
|
|
456
462
|
|
457
463
|
**** Template exception
|
458
464
|
Notwithstanding all of the above, if the ~-T~ (~--template~) option is given
|
459
|
-
(see below at [[*
|
465
|
+
(see below at [[* Aids to testing label layouts]]), all label texts from the
|
460
466
|
command-line, an ~in-file~, or standard input are ignored and a template is
|
461
467
|
generated.
|
462
468
|
|
@@ -509,8 +515,7 @@ setting the ~--delta-x~ or ~--delta-y~ values for your setup.
|
|
509
515
|
|
510
516
|
Normally, =labrat= does not print an outline for the labels, but if you are
|
511
517
|
testing things out on plain paper, it helps to know where =labrat= thinks the
|
512
|
-
boundaries of the labels are.
|
513
|
-
provide.
|
518
|
+
boundaries of the labels are. The ~--grid~ or ~-g~ options provide this.
|
514
519
|
|
515
520
|
- ~-g~, ~--[no-]grid~ :: Add grid lines to output
|
516
521
|
|
data/Rakefile
CHANGED
data/bin/labrat
CHANGED
data/labrat.gemspec
CHANGED
@@ -24,9 +24,9 @@ Gem::Specification.new do |spec|
|
|
24
24
|
For Emacs users, labrat includes elisp code for invoking labrat from within a
|
25
25
|
buffer, providing a quick way to print labels.
|
26
26
|
|
27
|
-
DESC
|
27
|
+
DESC
|
28
28
|
|
29
|
-
spec.homepage
|
29
|
+
spec.homepage = "http://github.com/ddoherty03/labrat"
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
|
31
31
|
|
32
32
|
spec.metadata["homepage_uri"] = spec.homepage
|
@@ -42,18 +42,9 @@ DESC
|
|
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.add_dependency "matrix"
|
46
|
-
spec.add_dependency "prawn", "~> 2.0"
|
47
45
|
spec.add_dependency "activesupport"
|
46
|
+
spec.add_dependency "fat_config", '>=0.4.2'
|
48
47
|
spec.add_dependency "fat_core"
|
49
|
-
spec.add_dependency "
|
50
|
-
|
51
|
-
spec.add_development_dependency 'rake'
|
52
|
-
spec.add_development_dependency 'rspec'
|
53
|
-
spec.add_development_dependency 'pry'
|
54
|
-
spec.add_development_dependency 'simplecov'
|
55
|
-
spec.add_development_dependency 'debug', '>= 1.0.0'
|
56
|
-
spec.add_development_dependency 'rubocop-performance'
|
57
|
-
spec.add_development_dependency 'rubocop-shopify'
|
58
|
-
spec.add_development_dependency 'rubocop-rspec'
|
48
|
+
spec.add_dependency "matrix"
|
49
|
+
spec.add_dependency "prawn", "~> 2.0"
|
59
50
|
end
|
@@ -1009,3 +1009,20 @@ avery88662:
|
|
1009
1009
|
|
1010
1010
|
avery95662:
|
1011
1011
|
label: avery18662
|
1012
|
+
|
1013
|
+
# Divider Tabs
|
1014
|
+
# 07708, 07712, 07714, 07720, 11110, 11113, 11121, 11122, 11160, 11178, 11185,
|
1015
|
+
# 11220, 11221, 11227, 11273, 11835, 11900, 11902, 11906, 11908, 11956, 11982,
|
1016
|
+
# 11988, 23280, 23281, 71109, 71900, 71906, 81310
|
1017
|
+
avery11109:
|
1018
|
+
page-width: 8.5in
|
1019
|
+
page-height: 11in
|
1020
|
+
rows: 20
|
1021
|
+
columns: 2
|
1022
|
+
top-page-margin: 13mm
|
1023
|
+
bottom-page-margin: 13mm
|
1024
|
+
left-page-margin: 70mm
|
1025
|
+
right-page-margin: 70mm
|
1026
|
+
row-gap: 0mm
|
1027
|
+
column-gap: 0mm
|
1028
|
+
landscape: false
|