texsc 0.6.0 → 0.7.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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +5 -0
  3. data/bin/texsc +13 -10
  4. data/texsc.gemspec +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a0b900b5f83d63e4125937fd67a0ee1f633278fe34a5a38393057fa4a604019
4
- data.tar.gz: 2dc1b9b642e1789a7f4bdc0441c46f3bed2de18e4c59fefa93ae313ec19ed208
3
+ metadata.gz: ef95432484b7b9ba335b54f67ba8a6353ac200f029a02656644b65a08199e9e4
4
+ data.tar.gz: e8f5f024fe483de15e1aad8818c07b145223914a4adfb3ecb8f3725a22335534
5
5
  SHA512:
6
- metadata.gz: b943bf18daae7bbb2d1af521a6fc2c4e2477347b4c661a90a4a0cc1f97264fa776afadecf0a68422846b48bec9abdbb241f39ddc8df362067b53077ed56a11e3
7
- data.tar.gz: cc92c623781f8989dab859ebd07df50cd7c7757ca8f678ddc3be4c6da9065e1610fc8e29735d95a73fff715be3284e2065e897a3362b534ccc04f7c4618c529e
6
+ metadata.gz: 0dc98754b887f94d392eeab60b88bce43f6fe4c6ca73fc668b837d71824ace15d8952851022bdbaf37fbaf7b6e9e9e18d7bdd5e4e5cf8a6ca15e11ad07c7d563
7
+ data.tar.gz: 36489da384178533cff6b3b7e05d9bed796ff6d735bb3495ed1128a9ec524fad8865a7196f4612ab48b311ec9d947870a592b97cbc2667d6d6144885443a09fd
data/README.md CHANGED
@@ -57,6 +57,11 @@ this:
57
57
  personal_ws-1.1 en 1 utf-8
58
58
  ```
59
59
 
60
+ To make configuration easier, you can create `.texsc` file next to your
61
+ `.tex` file and place all your command line configuration options over there,
62
+ each one on its own line. You can also have a global configuration file
63
+ at `~/.texsc`, which will be read first.
64
+
60
65
  ## How to contribute
61
66
 
62
67
  Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
data/bin/texsc CHANGED
@@ -21,7 +21,7 @@
21
21
  # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  # SOFTWARE.
23
23
 
24
- VERSION = '0.6.0'
24
+ VERSION = '0.7.0'
25
25
 
26
26
  STDOUT.sync = true
27
27
 
@@ -31,17 +31,20 @@ require 'open3'
31
31
  require 'shellwords'
32
32
  require 'slop'
33
33
 
34
- begin
35
- log = Loog::REGULAR
34
+ def config(path)
36
35
  args = []
37
- if File.exist?('.texsc')
38
- cfg = File.new('.texsc')
39
- body = File.read(cfg)
40
- extra = body.split(/\s+/).map(&:strip)
41
- args += extra
42
- puts "Found #{body.split(/\n/).length} lines in #{File.absolute_path(cfg)}"
36
+ f = File.expand_path(path)
37
+ if File.exist?(f)
38
+ body = File.read(f)
39
+ args += body.split(/\s+/).map(&:strip)
40
+ puts "Found #{args.length} lines in #{File.absolute_path(f)}"
43
41
  end
44
- args += ARGV
42
+ args
43
+ end
44
+
45
+ begin
46
+ log = Loog::REGULAR
47
+ args = config('~/.texsc') + config('.texsc') + ARGV
45
48
 
46
49
  begin
47
50
  opts = Slop.parse(args, strict: true, help: true) do |o|
data/texsc.gemspec CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |s|
32
32
  s.rubygems_version = '2.2'
33
33
  s.required_ruby_version = '>= 2.3'
34
34
  s.name = 'texsc'
35
- s.version = '0.6.0'
35
+ s.version = '0.7.0'
36
36
  s.license = 'MIT'
37
37
  s.summary = 'Spell Checker for LaTeX'
38
38
  s.description = 'Simple command-line spell checker for LaTeX documents'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: texsc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yegor Bugayenko
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-16 00:00:00.000000000 Z
11
+ date: 2021-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: backtrace