shellplay 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile +1 -0
- data/README.md +7 -1
- data/bin/shellexport +16 -5
- data/tpl/index.html +11 -0
- data/tpl/shellplay.css +2 -1
- data/tpl/shellplay.js +3 -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: 2937f66aa7223a0f607bc613c3e0c52200adad46
|
4
|
+
data.tar.gz: 1309d48512b243a4afcf98ea869492c85295a123
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e3d2748ef7a575673562b2c20b495f8327ed75e548e1ecedb0979fabac3afbbd37312128241ddd830a123c99a3fc085ecc9a0860901e741e3330855d0e211c8
|
7
|
+
data.tar.gz: 3be0f23a0cb1034ca0264f558bc7602f02376c6152b063e746bacb93205fe567102539bc1eb5a08c272c9c06b9db36f4eb11d4fc1e61d737e5857fb842926b31
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -103,12 +103,18 @@ To export
|
|
103
103
|
|
104
104
|
It will save the html in a dir in `.shellplay` under the name of the session. The dir contains index.html, css, and js files, ready to be played from your laptop or uploaded to your server.
|
105
105
|
|
106
|
+
Navigation on the html version is
|
107
|
+
|
108
|
+
- `p`, `left` for previous screen,
|
109
|
+
- `n`, `enter` or `right` for next screen
|
110
|
+
|
106
111
|
## Todo
|
107
112
|
|
108
113
|
- <s>handle the no-display entries</s>
|
114
|
+
- <s>when prototype is ready, switch to v0.1.0</s>
|
115
|
+
- make an html export
|
109
116
|
- write a shell colors parser of some sort because \e[1;33m sucks
|
110
117
|
- add a function in player to edit a screen
|
111
|
-
- when prototype is ready, switch to v0.1.0
|
112
118
|
- test coverage
|
113
119
|
- save and load sessions from gist
|
114
120
|
- add gist token to config or something
|
data/bin/shellexport
CHANGED
@@ -23,9 +23,20 @@ File.open(File.join(dest, "index.html"), 'w') do |f|
|
|
23
23
|
f.puts erb.result(binding)
|
24
24
|
end
|
25
25
|
|
26
|
-
|
27
|
-
FileUtils.cp(File.join(tpl, '
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
unless File.exist? File.join(dest, 'jquery-1.11.1.min.js')
|
27
|
+
FileUtils.cp(File.join(tpl, 'jquery-1.11.1.min.js'), dest)
|
28
|
+
end
|
29
|
+
|
30
|
+
unless File.exist? File.join(dest, 'shellplay.js')
|
31
|
+
FileUtils.cp(File.join(tpl, 'shellplay.js'), dest)
|
32
|
+
end
|
33
|
+
|
34
|
+
unless File.exist? File.join(dest, 'shellplay.css')
|
35
|
+
FileUtils.cp(File.join(tpl, 'shellplay.css'), dest)
|
36
|
+
end
|
37
|
+
|
38
|
+
unless File.exist? File.join(dest, 'colors.css')
|
39
|
+
File.open(File.join(dest, "colors.css"), 'w') do |f|
|
40
|
+
f.puts Shell2html.css
|
41
|
+
end
|
31
42
|
end
|
data/tpl/index.html
CHANGED
@@ -13,8 +13,12 @@
|
|
13
13
|
<div class="container">
|
14
14
|
<div class="row">
|
15
15
|
<div class="col-md-12 main">
|
16
|
+
<div class="screen" id="intro">
|
17
|
+
<%= Shell2html.to_html("\e[33m>\e[0m Type <enter> to begin.") %>
|
18
|
+
</div>
|
16
19
|
<% @session.sequence.each_with_index do |screen, i| %>
|
17
20
|
<div class="screen" id="s<%= i %>">
|
21
|
+
<% if screen.displaycommand %>
|
18
22
|
<% if screen.customprompt %>
|
19
23
|
<%= Shell2html.to_html(screen.customprompt) %>
|
20
24
|
<% else %>
|
@@ -22,10 +26,17 @@
|
|
22
26
|
<% end %>
|
23
27
|
<%= Shell2html.to_html(screen.stdin) %>
|
24
28
|
<br>
|
29
|
+
<% end %>
|
25
30
|
<%= Shell2html.to_html(screen.stdout) %>
|
26
31
|
<% if screen.stderr %>
|
27
32
|
<%= Shell2html.to_html(screen.stderr) %>
|
28
33
|
<% end %>
|
34
|
+
<% if screen.playprompt %>
|
35
|
+
<%= Shell2html.to_html("\n\e[33m>\e[0m ") %>
|
36
|
+
<% if screen.timespent != 0 && screen.displaycommand %>
|
37
|
+
<%= Shell2html.to_html(sprintf("\e[33melapsed: \e[0m\e[1;93m#{@session.config.timeformat}s\e[0m ", screen.timespent)) %>
|
38
|
+
<% end %>
|
39
|
+
<% end %>
|
29
40
|
</div>
|
30
41
|
<% end %>
|
31
42
|
</div>
|
data/tpl/shellplay.css
CHANGED
data/tpl/shellplay.js
CHANGED
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.1.
|
4
|
+
version: 0.1.4
|
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-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paint
|