shellplay 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +3 -2
- data/bin/shellplay +26 -8
- data/bin/shellrecord +1 -1
- data/lib/shellplay/session.rb +5 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f8f5cb88df6cc5ab166a35c6edec2e75d3c0539
|
4
|
+
data.tar.gz: 31a54955f161ff904ddd3deeac0a9936d01ac777
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f250f0d76cc07130935c499b16dd36bf193df2f188a1e8e4e18decc1c8cd48e21ac3357bfb042e76b44dc36252151e9bf5b6f06c0335de5891212d5f3758bc28
|
7
|
+
data.tar.gz: 80ed723b12f5755967e8ea57a504cdb6e2f325469c0afbd8de7408367062877cde6274d499aef11a58109812b0ea02486f567fac08c231b05991f8ff5ed28848
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
Shellplay Changelog
|
2
2
|
=========================
|
3
3
|
|
4
|
+
v0.0.7 - 2014-08-13
|
5
|
+
-------------------
|
6
|
+
- fix exec of commandfs in shellplay
|
7
|
+
- implement a `p` command in play mode for switching to previous screen
|
8
|
+
- added management of bash escape char for colorization in output texts
|
9
|
+
|
10
|
+
|
4
11
|
v0.0.6 - 2014-08-13
|
5
12
|
--------------------
|
6
13
|
- save json session in pretty format for manual intervention
|
data/README.md
CHANGED
@@ -5,7 +5,7 @@ This is a CLI tool for recording and presenting step by step operations from the
|
|
5
5
|
|
6
6
|
It can record a session and playback from it, so if internet fails in your conference room you are safe.
|
7
7
|
|
8
|
-
**Note: this is a
|
8
|
+
**Note: this is a barely working, use at your own risk.**
|
9
9
|
|
10
10
|
## Installation
|
11
11
|
|
@@ -39,7 +39,8 @@ Then type enter to go next, or `?` to display list of available commands.
|
|
39
39
|
|
40
40
|
## Todo
|
41
41
|
|
42
|
-
- handle the no-display entries
|
42
|
+
- <s>handle the no-display entries</s>
|
43
|
+
- write a shell colors parser of some sort because \e[1;33m sucks
|
43
44
|
- add a function in player to edit a screen
|
44
45
|
- when prototype is ready, switch to v0.1.0
|
45
46
|
- test coverage
|
data/bin/shellplay
CHANGED
@@ -17,6 +17,7 @@ continue = true
|
|
17
17
|
@sleeptime = 1.0/48.0
|
18
18
|
@lastelapsed = 0
|
19
19
|
@playprompt = true
|
20
|
+
@sleeptime = (1.0/48.0)
|
20
21
|
|
21
22
|
counter = 1
|
22
23
|
def usage
|
@@ -70,8 +71,19 @@ def shownext
|
|
70
71
|
end
|
71
72
|
end
|
72
73
|
|
74
|
+
def showprevious
|
75
|
+
if @session.pointer > 0
|
76
|
+
@session.previous
|
77
|
+
@session.previous
|
78
|
+
display @session.current_screen
|
79
|
+
@session.next
|
80
|
+
else
|
81
|
+
puts "There is no previous screen."
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
73
85
|
def show(index)
|
74
|
-
if @session.show(index).stdin
|
86
|
+
if @session.show(index) && @session.show(index).stdin
|
75
87
|
display @session.show(index)
|
76
88
|
@session.next
|
77
89
|
else
|
@@ -92,6 +104,8 @@ while continue do
|
|
92
104
|
continue = false
|
93
105
|
when /^(?:\?|h)$/
|
94
106
|
usage
|
107
|
+
when /^p$/
|
108
|
+
showprevious
|
95
109
|
when /^s$/
|
96
110
|
@session.sequence.map { |c| c.stdin }.each_with_index do |l, i|
|
97
111
|
printf(" s%-3s %s\n", i, l)
|
@@ -101,14 +115,18 @@ while continue do
|
|
101
115
|
when ''
|
102
116
|
shownext
|
103
117
|
else
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
118
|
+
begin
|
119
|
+
Open3.popen3(command.strip) do |i, o, e, t|
|
120
|
+
o.read.split("\n").each do |line|
|
121
|
+
puts line
|
122
|
+
sleep @sleeptime
|
123
|
+
end
|
124
|
+
e.read.split("\n").each do |line|
|
125
|
+
puts Paint[line, :red, :bold]
|
126
|
+
end
|
111
127
|
end
|
128
|
+
rescue Exception => e
|
129
|
+
puts Paint[e.message, :red, :bold]
|
112
130
|
end
|
113
131
|
end
|
114
132
|
end
|
data/bin/shellrecord
CHANGED
data/lib/shellplay/session.rb
CHANGED
@@ -38,13 +38,17 @@ module Shellplay
|
|
38
38
|
|
39
39
|
def drop_last_screen
|
40
40
|
@sequence.pop
|
41
|
-
|
41
|
+
previous
|
42
42
|
end
|
43
43
|
|
44
44
|
def next
|
45
45
|
@pointer += 1
|
46
46
|
end
|
47
47
|
|
48
|
+
def previous
|
49
|
+
@pointer -= 1
|
50
|
+
end
|
51
|
+
|
48
52
|
def show(index)
|
49
53
|
@pointer = index.to_i
|
50
54
|
current_screen
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shellplay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mose
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paint
|