anystyle-cli 1.0.0 → 1.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3c832096f90a3cc1f233ecdd4f500c2bb63460cc733142f764616cd33fc95f9
4
- data.tar.gz: 11d151afafd488b955ba8f51863e60497007daf11fa192ec608769b9a670ac6e
3
+ metadata.gz: db54794068efeafdbcb793c71ffeff40fa3e67f5ac7e4564eb76c2cddc23ec09
4
+ data.tar.gz: 4db1f6bf5a8529cd9dbf736745401a83ef207642c595c16857d903468488ddb6
5
5
  SHA512:
6
- metadata.gz: 783c9e5ec5dcf5d456fda3d1a0db502da61670e525dff9927f0af3f1f3c120f8929fb47006173a0c5b2ce70925043811a4ff65d42913b68f69d3af7ad87a4425
7
- data.tar.gz: a1a737c36024f02252458a16c25f212594d658b5b825876b8c358c73e9b2b72c8c1010261c732a6fe1382bb2021787576d0552e5291386912a62eaaca0370774
6
+ metadata.gz: bda0fd4dd07c77a189a8964e4ec150d63a2ff80b324f5ea3e28188e6c1ce2947ca007df3fc5142dc84bc05b17a0cb0cfc960908c78532ec8723f940521ee900a
7
+ data.tar.gz: baecc0a27805e48906a23f9f08ddf1af1e22c83015993cef4624151778a5bdee3ad80bc50b6437d65f5a753c0f62f229463d8a8c162ff0faec44f4d6f206dbe9
@@ -80,7 +80,7 @@ module AnyStyle
80
80
  end
81
81
 
82
82
  def say(*args)
83
- STDERR.print(*args) if verbose?
83
+ STDERR.puts(*args) if verbose?
84
84
  end
85
85
 
86
86
  def walk(input)
@@ -10,29 +10,25 @@ module AnyStyle
10
10
  ref = doc[0].references
11
11
 
12
12
  if ref.length == 0
13
- say "no references found.\n"
13
+ say "no references found."
14
14
  else
15
- say "#{ref.length} references found.\n"
15
+ say "#{ref.length} references found."
16
16
  dst = nil
17
17
  each_format do |fmt|
18
18
  case fmt
19
19
  when 'ttx'
20
- say "Formatting document as #{fmt} ...\n"
21
20
  res = doc.to_txt tagged: true
22
21
  when 'txt'
23
- say "Formatting document as #{fmt} ...\n"
24
22
  res = doc.to_txt tagged: false
25
23
  when 'ref'
26
- say "Formatting references as #{fmt} ...\n"
27
24
  res = ref.join("\n")
28
25
  else
29
- say "Formatting references as #{fmt} ...\n"
30
26
  dst ||= parse(ref.join("\n"))
31
27
  res = format(dst, fmt)
32
28
  end
33
29
 
34
30
  out = extsub(path, ".#{fmt}")
35
- say "Writing #{out.relative_path_from(base_path)} ...\n"
31
+ say "Writing #{out.relative_path_from(base_path)} ..."
36
32
  write res, out, base_path
37
33
  end
38
34
  end
@@ -7,12 +7,11 @@ module AnyStyle
7
7
  walk args[0] do |path, base_path|
8
8
  say "Parsing #{path.relative_path_from(base_path)} ..."
9
9
  dataset = parse(path.to_s.untaint)
10
- say "#{dataset.length} references found.\n"
10
+ say "#{dataset.length} references found."
11
11
  each_format do |fmt|
12
- say "Formatting references as #{fmt} ...\n"
13
12
  res = format(dataset, fmt)
14
13
  out = extsub(path, ".#{fmt}")
15
- say "Writing #{out.relative_path_from(base_path)} ...\n"
14
+ say "Writing #{out.relative_path_from(base_path)} ..."
16
15
  write res, out, base_path
17
16
  end
18
17
  end
@@ -1,5 +1,5 @@
1
1
  module AnyStyle
2
2
  module CLI
3
- VERSION = '1.0.0'.freeze
3
+ VERSION = '1.0.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anystyle-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvester Keil