term-slides 0.16.0 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 4b9a135a61c1a85f823de507f66b5ccf646f3ac7
4
- data.tar.gz: b1c9d891dcb21f3e49c9248f3abfed4f1ea9c52c
2
+ SHA256:
3
+ metadata.gz: 03a27ee483431ddf603b668e15df223d15bf9a15f7be54463bb1f24a96275398
4
+ data.tar.gz: 03b22ebf0fd115fe8c02751b90ab62f3dce8d0a98127a18aba7af38513de20aa
5
5
  SHA512:
6
- metadata.gz: 3c2677806ab0cfbfd1a6a23d64b27675d416b92fabca7ce69939a9f07084df03068038b7af709772486c9285c0349d110c7217fc0fda29c6f2a363fcd7002913
7
- data.tar.gz: a2124e72212b7229994bffc44f0c788fdd4625ac35c034f9a8f232d0be0ad55eaf813a78a68f766d53fb5481710c036a8432fcb6bda08d811bc0125a03d3b865
6
+ metadata.gz: 4927fe553e068ec2ced3d08130dc3a9ca734cea178efe247d64f6fc973cf2d1fff9ea8caa4e355c7a9534ab262f7c8c59f8e4e481b3e8ed8af62554395ef798e
7
+ data.tar.gz: 6913dc595f17f621ae392b307a3f00b3c807cd7d8f8dcc59dcd82fba255981fdc66f98b234646390e809b7c37c13fa264de5b182a7dd0d4a1c3b71839fac1552
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TermSlides
2
2
 
3
- This is a DSL to make your own presentations in the shel in the shell.
3
+ This is a DSL to make your own presentations in the shell.
4
4
 
5
5
  Here is an example:
6
6
 
data/lib/term-slides.rb CHANGED
@@ -10,6 +10,7 @@ module TermSlides
10
10
  require 'rouge'
11
11
  require 'tempfile'
12
12
  require 'os'
13
+ require 'term-images'
13
14
 
14
15
  module MakeMakefile::Logging
15
16
  @logfile = File::NULL
@@ -30,36 +31,8 @@ module TermSlides
30
31
  def render_text text
31
32
  puts center(text.text)
32
33
  end
33
- def pstree pid = Process.pid
34
- processes = []
35
- while pid != 0
36
- `/bin/ps #{::OS.mac? ? "-p" : "axww -q"} #{pid} -o ppid,command`.each_line do |line|
37
- next if line !~ /^\s*\d+/
38
- line.strip!
39
- result = line.split(/\s+/, 2)
40
- processes << result[1].split(" ").first.split("/").last
41
- pid = result[0].to_i
42
- end
43
- end
44
- processes
45
- end
46
34
  def render_image_file path
47
- commands = {
48
- "kitty" => [(::OS.mac? ? "/Applications/kitty.app/Contents/MacOS/" : "") + "kitty", "+kitten", "icat"],
49
- "terminology" => %w(tycat),
50
- "iTerm" => %w(imgcat)
51
- }
52
- ptree = pstree
53
- terminals = commands.keys.map { |terminal| ptree.include?(terminal) ? terminal : nil }.select { |x| !x.nil? }
54
- if terminals.size > 0
55
- command = commands[terminals.first]
56
- else
57
- command = %w(icat)
58
- end
59
- if find_executable(command.first)
60
- co = (command << path)
61
- system(*co)
62
- end
35
+ ::TermImages::Image.new(path).puts
63
36
  end
64
37
  def render_image image
65
38
  render_image_file image.src
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Term
2
2
  module Slides
3
- VERSION = "0.16.0"
3
+ VERSION = "0.17.0"
4
4
  end
5
5
  end
data/term-slides.gemspec CHANGED
@@ -30,6 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_runtime_dependency "highline", "~> 2.0"
31
31
  spec.add_runtime_dependency "rouge", "~> 3.3"
32
32
  spec.add_runtime_dependency "os", "~> 1.0"
33
+ spec.add_runtime_dependency "term-images", "~> 0.3"
33
34
 
34
35
  spec.add_development_dependency "bundler", "~> 2.0"
35
36
  spec.add_development_dependency "rake", "~> 10.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: term-slides
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - yazgoo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-12 00:00:00.000000000 Z
11
+ date: 2019-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: term-images
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.3'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.3'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: bundler
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -178,8 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
178
192
  - !ruby/object:Gem::Version
179
193
  version: '0'
180
194
  requirements: []
181
- rubyforge_project:
182
- rubygems_version: 2.6.14
195
+ rubygems_version: 3.0.3
183
196
  signing_key:
184
197
  specification_version: 4
185
198
  summary: run presentations in your terminal