trecs 0.1.6 → 0.1.7

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: 809876261c49aa7e3438e2aa09c14b3050fa366b
4
- data.tar.gz: a78011eebe829a75057a1c51e25c1a4a5793662e
3
+ metadata.gz: 11db22d959f646d759488d0e21e070a1dd131a86
4
+ data.tar.gz: 14ea24c099109043abf9ee864350c21406a36d58
5
5
  SHA512:
6
- metadata.gz: 8cfdc387dd0f709649d26d4090a65d4524337a7a3819bd2132afdd67101c7f922313952b5bcc328bcb9607b540a6ec45fb40b3a7b35947bc88ac71cdf45f892e
7
- data.tar.gz: 36394bfa8603542a1551bc18f5ec948aa4249eb27c144050741e2bae50a1ca11baab208a573342ebf17e9cbcbcc33cd58095ffd9ed8e697a427e527ac751c824
6
+ metadata.gz: 5f5c7a11191cb0b495ea2fbb8759cf6f4af6da622d7c397deba90bc2382662ab344b6b5ed8021c6a2ea7c0cb22932fa4f636694a1b216658cc3b563dac3449ec
7
+ data.tar.gz: b31502af511913ce740f5c8b05593223a5423b071b00344a443e3e0dc6fb34b9e3e61838b00cb6b84af2cf6401724900aff96cbdf01f2702eb5e77b4ec6c9172
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trecs (0.1.6)
4
+ trecs (0.1.7)
5
5
  trollop (~> 2.0)
6
6
 
7
7
  GEM
data/README.org CHANGED
@@ -20,14 +20,8 @@
20
20
  |_| |_| \_\___|\___|___/
21
21
 
22
22
  #+END_EXAMPLE
23
-
24
- Text Recordings.
25
-
26
23
  Record screencasts in plain text.
27
24
 
28
- ** Still under development
29
- This project is still under development. It's not yet ready for use.
30
-
31
25
  ** Installing TRecs
32
26
  To install TRecs, just run
33
27
  #+BEGIN_SRC bash
@@ -98,6 +92,87 @@ This will create 6 frames:
98
92
  - 200 millis :: "TRec"
99
93
  - 250 millis :: "TRecs"
100
94
 
95
+ **** Fly from right
96
+ Insert a message and se it fly from the right side of the screen
97
+
98
+ #+BEGIN_SRC bash
99
+ trecs_record my_banner.trecs --strategy=fly_from_right --step=50 --message="TRecs"
100
+ #+END_SRC
101
+
102
+ **** Shell command for message
103
+ On some recording strategies, there's also the posibility to run a custom shell command for each frame.
104
+
105
+ For example, you can use the =wc= shell command to count the characters (or lines or words) of a banner that, for example appears one char at the time
106
+
107
+ #+BEGIN_SRC bash
108
+ trecs_record my_banner.trecs --strategy=incremental --step=50 --message="TRecs" --command="echo <frame> | wc -c"
109
+ #+END_SRC
110
+
111
+ This will run, for each frame the command =<frame> | wc -c=
112
+
113
+ Where =<frame>= will be eplaced by the frame contents inside double quotes
114
+
115
+ And these are the generated frames with its corresponding commands:
116
+
117
+ - 0 millis ::
118
+ - frame ::
119
+ #+BEGIN_SRC bash
120
+ 0
121
+ #+END_SRC
122
+ - command ::
123
+ #+BEGIN_EXAMPLE
124
+ echo "" | wc -c
125
+ #+END_EXAMPLE
126
+ - 50 millis ::
127
+ - frame ::
128
+ #+BEGIN_SRC bash
129
+ 1
130
+ #+END_SRC
131
+ - command ::
132
+ #+BEGIN_EXAMPLE
133
+ echo "T" | wc -c
134
+ #+END_EXAMPLE
135
+ - 100 millis ::
136
+ - frame ::
137
+ #+BEGIN_SRC bash
138
+ 2
139
+ #+END_SRC
140
+ - command ::
141
+ #+BEGIN_EXAMPLE
142
+ echo "TR" | wc -c
143
+ #+END_EXAMPLE
144
+ - 150 millis ::
145
+ - frame ::
146
+ #+BEGIN_SRC bash
147
+ 3
148
+ #+END_SRC
149
+ - command ::
150
+ #+BEGIN_EXAMPLE
151
+ echo "TRe" | wc -c
152
+ #+END_EXAMPLE
153
+ - 200 millis ::
154
+ - frame ::
155
+ #+BEGIN_SRC bash
156
+ 4
157
+ #+END_SRC
158
+ - command ::
159
+ #+BEGIN_EXAMPLE
160
+ echo "TRec" | wc -c
161
+ #+END_EXAMPLE
162
+ - 250 millis ::
163
+ - frame ::
164
+ #+BEGIN_SRC bash
165
+ 5
166
+ #+END_SRC
167
+ - command ::
168
+ #+BEGIN_EXAMPLE
169
+ echo "TRecs" | wc -c
170
+ #+END_EXAMPLE
171
+
172
+ Currently applies to:
173
+ - Incremental Strategy
174
+ - Fly from right Strategy
175
+
101
176
  ** Extending TRecs
102
177
  Right now, you can extend TRecs in three possible ways
103
178
 
data/bin/trecs_record CHANGED
@@ -67,4 +67,4 @@ RECORDER.record
67
67
 
68
68
  puts "Recording finished"
69
69
  puts "Play with:"
70
- puts " bin/trecs #{opts[:trecs_file]}"
70
+ puts " trecs #{opts[:trecs_file]}"
@@ -4,8 +4,11 @@ module TRecs
4
4
 
5
5
  def current_content(str)
6
6
  if self.command
7
- comm_array = command.split(" ")
8
- str = IO.popen([*comm_array, "#{str}"]).read
7
+ #comm_array = command.split(" ")
8
+ #str = IO.popen([*comm_array, "#{str}"]).read
9
+
10
+ comm = command.gsub(/<frame>/, "\"#{str}\"")
11
+ str = IO.popen(comm).read
9
12
  end
10
13
  super(str)
11
14
  end
data/lib/trecs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TRecs
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
@@ -60,9 +60,5 @@ module TRecs
60
60
  Then { recorder.calls[12] == [:current_frame, [ {time: 1100, content: "abc" } ] ] }
61
61
 
62
62
  end
63
-
64
- context "shell command" do
65
- Then { skip("Test shell command") }
66
- end
67
63
  end
68
64
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trecs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Federico Iachetti