shellplay 0.0.9 → 0.0.10

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
2
  SHA1:
3
- metadata.gz: ba6ca8828951742fde4d0454df7e456e52bcc4b2
4
- data.tar.gz: 7ff07ac4580c97d429b92dfc9922e85f7b71b47f
3
+ metadata.gz: 00b9a4846103821b147e8d665947c57e219c7a3e
4
+ data.tar.gz: 3fb558ebab3bef2e00619becbdb806ece5f63770
5
5
  SHA512:
6
- metadata.gz: 1feb5dee5f89cf4c1d85292c2418236254dbdb8234ec84f5cdcf045a12334297cfeaae26a0da8995cb5abc2811d7f600491ed32d4c3f9ff0def91fd3208c3c92
7
- data.tar.gz: 6ddec235ddd612b530eed54e97789427078313c208889d5ea0f5fe700b40100c90bef99cb6f0c848b0a16e216e19a29ad3007646d5ecf2725c16b983d7e5f9fe
6
+ metadata.gz: e825c995a55e64c209db6bef3fabd3bd1b8abc69a32ea7dcbc61add94380f1557fffee16c07e4278303130716f6a6eb3a37d4be0bff527f95d586e3cf47cda09
7
+ data.tar.gz: f9bfbea4345222fa0744c85e5481464b5f8f9c187f77d92cd2a7c0c09f65d4d28118c269441c032599cfa498731d2375e6950bf0c89c253fb6c75bf384ae6f57
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  Shellplay Changelog
2
2
  =========================
3
3
 
4
+ v0.0.10 - 2014-08-13
5
+ -------------------
6
+ - added a `shellcat` command to merge sessions
7
+
4
8
  v0.0.9 - 2014-08-13
5
9
  ------------------
6
10
  - fix the fix of creation of config dir
data/README.md CHANGED
@@ -21,7 +21,15 @@ For recording a session
21
21
 
22
22
  Then type the commands you want to record, amd type q at the end it will prompt you for a file name and a title.
23
23
 
24
- The session file is stored in json format and can be used to be played
24
+ The session file is stored in `$HOME/.shellplay/` in json format and can be used to be played.
25
+
26
+ You can record a session in several steps, and merge then afteerwards, with
27
+
28
+ shellcat session1 session2 session3
29
+
30
+ You will be prompted to provide a new title and a new name, and it will save the new concatenated session file.
31
+
32
+ The session file being a pretty-formatted jeson file, it's also convenient to just edit it for fixes or adjustments. Especially as this tool is still in development and all the optimal edit features are not yet implemented.
25
33
 
26
34
  ## Playing a session
27
35
 
data/bin/shellcat ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ lib = File.expand_path('../../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+
6
+ require 'shellplay/session'
7
+
8
+ @session = Shellplay::Session.new
9
+
10
+ ARGV.each do |file|
11
+ this_session = Shellplay::Session.new
12
+ this_session.import(file)
13
+ @session.add_screens(this_session.sequence)
14
+ @session.save
15
+ end
16
+
data/bin/shellplay CHANGED
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'paint'
4
- require 'json'
5
4
  require 'open3'
6
5
 
7
6
 
@@ -14,7 +13,6 @@ require 'shellplay/session'
14
13
  @session.import(ARGV[0])
15
14
 
16
15
  continue = true
17
- @sleeptime = 1.0/48.0
18
16
  @lastelapsed = 0
19
17
  @playprompt = true
20
18
  @sleeptime = (1.0/48.0)
@@ -36,6 +36,10 @@ module Shellplay
36
36
  @sequence << s
37
37
  end
38
38
 
39
+ def add_screens(screenarray)
40
+ @sequence += screenarray
41
+ end
42
+
39
43
  def drop_last_screen
40
44
  @sequence.pop
41
45
  previous
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shellplay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - mose
@@ -113,7 +113,7 @@ description: CLI tool for shell-based presentation. Think powerpoint in the cons
113
113
  email:
114
114
  - mose@mose.com
115
115
  executables:
116
- - scenario.json
116
+ - shellcat
117
117
  - shellplay
118
118
  - shellrecord
119
119
  extensions: []
@@ -126,7 +126,7 @@ files:
126
126
  - LICENSE.txt
127
127
  - README.md
128
128
  - Rakefile
129
- - bin/scenario.json
129
+ - bin/shellcat
130
130
  - bin/shellplay
131
131
  - bin/shellrecord
132
132
  - lib/shellplay.rb
data/bin/scenario.json DELETED
@@ -1,26 +0,0 @@
1
- {
2
- "title": "test prez",
3
- "prompt": "\e[30;40mrecord >\e[0m ",
4
- "content": [
5
- {
6
- "prompt": true,
7
- "command": "ls",
8
- "output": "bin CHANGELOG.md Gemfile Gemfile.lock lib LICENSE.txt Rakefile README.md shellprez.gemspec spec vendor"
9
- },
10
- {
11
- "prompt": true,
12
- "command": "ll",
13
- "output": "total 72\n-rw-r--r--+ 1 mose staff 3.5K Aug 8 14:15 CHANGELOG.md\n-rw-r--r--+ 1 mose staff 103B Sep 18 2013 Gemfile\n-rw-r--r--+ 1 mose staff 1.0K Dec 25 2013 Gemfile.lock\n-rw-r--r--+ 1 mose staff 1.1K Sep 23 2013 LICENSE.txt\n-rw-r--r--+ 1 mose staff 11K Aug 8 14:16 README.md\n-rw-r--r--+ 1 mose staff 497B Sep 23 2013 Rakefile\ndrwxr-xr-x+ 3 mose staff 102B Sep 18 2013 bin\ndrwxr-xr-x+ 4 mose staff 136B Oct 25 2013 coverage\ndrwxr-xr-x+ 4 mose staff 136B Oct 30 2013 lib\ndrwxr-xr-x+ 12 mose staff 408B Dec 25 2013 pkg\ndrwxr-xr-x+ 5 mose staff 170B Oct 23 2013 spec\ndrwxr-xr-x+ 3 mose staff 102B Sep 18 2013 templates\ndrwxr-xr-x+ 4 mose staff 136B Jan 21 2014 vendor\n-rw-r--r--+ 1 mose staff 1.1K Nov 9 2013 zabbix-ruby-client.gemspec\ndrwxr-xr-x+ 18 mose staff 612B Aug 8 15:42 zabbix-templates"
14
- },
15
- {
16
- "prompt": true,
17
- "command": "tree spec/lib/",
18
- "output": "spec/lib/\n├── cli_spec.rb\n├── data_spec.rb\n├── files\n│   └── logs\n├── logger_spec.rb\n├── plugin_base_spec.rb\n├── plugins\n│   ├── apache_spec.rb\n│   ├── apt_spec.rb\n│   ├── cpu_spec.rb\n│   ├── disk_spec.rb\n│   ├── load_spec.rb\n│   ├── memory_spec.rb\n│   └── network_spec.rb\n├── plugins_spec.rb\n├── runner_spec.rb\n└── store_spec.rb\n\n3 directories, 14 files"
19
- },
20
- {
21
- "prompt": true,
22
- "command": "head README.md",
23
- "output": "Zabbix Ruby Client"
24
- }
25
- ]
26
- }