showterm 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/LICENSE.MIT +19 -0
  2. data/README.md +30 -0
  3. data/lib/showterm.rb +7 -5
  4. data/showterm.gemspec +1 -1
  5. metadata +3 -1
data/LICENSE.MIT ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2012 Conrad Irwin <conrad.irwin@gmail.com>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,30 @@
1
+ [showterm.io](http://showterm.herokuapp.com/)
2
+ =============
3
+
4
+ It's showtime for your terminal!
5
+
6
+ Showterm lets your record a terminal session exactly as you experience it, right down to
7
+ the syntax highlighting.
8
+
9
+ Installation instructions (`gem install showterm`) and usage instructions (`showterm <program`) are available in the [showterm](https://showterm.herokuapp.com/b6803679cb1c9fbcf667cb7cfe8f605e3ce1fe03). :)
10
+
11
+ (yes, this is me using showterm inside showterm; it's like inception, but with more
12
+ syntax highlighting)
13
+
14
+ TODO
15
+ ====
16
+
17
+ * Allow embedders to chose colourschemes (at least light vs. dark background).
18
+ * Fix problems with non-80 column terminals
19
+ * Fix problems with vim which sometimes goes out-of-bounds for term.js
20
+
21
+ Meta-fu
22
+ =======
23
+
24
+ As usual, bug-reports and pull requests are welcome; everything is MIT licensed (see
25
+ LICENSE.MIT).
26
+
27
+ Credit
28
+ ======
29
+
30
+ This would not have been doable without the excellent terminal emulator I borrowed from Christopher Jeffrey's incredible [tty.js](https://github.com/chjj/tty.js).
data/lib/showterm.rb CHANGED
@@ -10,8 +10,10 @@ module Showterm
10
10
  scriptfile = Tempfile.new('showterm.script')
11
11
  timingfile = Tempfile.new('showterm.time')
12
12
 
13
- scriptfile.close(false)
14
- timingfile.close(false)
13
+ sf, tf = [scriptfile, timingfile].map(&:path)
14
+
15
+ scriptfile.close(true)
16
+ timingfile.close(true)
15
17
 
16
18
  args = []
17
19
  if cmd.size > 0
@@ -19,8 +21,8 @@ module Showterm
19
21
  end
20
22
 
21
23
  args << '-q'
22
- args << '-t' + timingfile.path
23
- args << scriptfile.path
24
+ args << '-t' + tf
25
+ args << sf
24
26
 
25
27
  puts "showterm is recording, quit when you're done."
26
28
 
@@ -30,7 +32,7 @@ module Showterm
30
32
 
31
33
  puts 'showterm recording finished'
32
34
 
33
- [scriptfile.path, timingfile.path]
35
+ [sf, tf]
34
36
  end
35
37
 
36
38
  def upload!(scriptfile, timingfile, cols=80)
data/showterm.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "showterm"
3
- s.version = "0.1"
3
+ s.version = "0.1.1"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.author = "Conrad Irwin"
6
6
  s.email = "conrad.irwin@gmail.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: showterm
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -18,6 +18,8 @@ executables:
18
18
  extensions: []
19
19
  extra_rdoc_files: []
20
20
  files:
21
+ - LICENSE.MIT
22
+ - README.md
21
23
  - bin/showterm
22
24
  - lib/showterm.rb
23
25
  - showterm.gemspec