Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is -s option required? #1

Open
soichih opened this issue Jan 13, 2014 · 6 comments
Open

Is -s option required? #1

soichih opened this issue Jan 13, 2014 · 6 comments

Comments

@soichih
Copy link

soichih commented Jan 13, 2014

I have a tty record file, but I don't know what width/height it was recorded on. Do I need to know the size before running this tool? In another words, is -s option required?

If I run it without -s option, I get following error message.

2014-01-13 13:07:30 UTC [hayashis@soichi6]$ tty2js test.tty test.tty.js
frame 97 (13 skipped @ Thu Jan 01 1970 00:15:59 GMT+0000 (UTC)
/usr/local/node-v0.10.23-linux-x64/lib/node_modules/tty2js/node_modules/headless-terminal/vendor/term.js:1078
this.lines[this.y + this.ybase][this.x] = [this.curAttr, ch];
^
TypeError: Cannot set property '0' of undefined
at HeadlessTerminal.Terminal.write (/usr/local/node-v0.10.23-linux-x64/lib/node_modules/tty2js/node_modules/headless-terminal/vendor/term.js:1078:55)
at Object. (/usr/local/node-v0.10.23-linux-x64/lib/node_modules/tty2js/tty2js.js:103:16)
at Object.self.tap (/usr/local/node-v0.10.23-linux-x64/lib/node_modules/tty2js/node_modules/binary/index.js:248:12)
at Object.charset (/usr/local/node-v0.10.23-linux-x64/lib/node_modules/tty2js/tty2js.js:99:10)
at Object.self.tap (/usr/local/node-v0.10.23-linux-x64/lib/node_modules/tty2js/node_modules/binary/index.js:248:12)
at Object. (/usr/local/node-v0.10.23-linux-x64/lib/node_modules/tty2js/tty2js.js:97:6)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

@dtinth
Copy link
Member

dtinth commented Jan 15, 2014

Hello,

Yes, size is required. Unfortunately, this information is not recorded in a ttyrec file. You might have to try different values.

@soichih
Copy link
Author

soichih commented Jan 15, 2014

Wow. really? It sounds like a serious lack of metadata for ttyrec.

@dtinth
Copy link
Member

dtinth commented Jan 15, 2014

Yeah, ttyrec just stores the raw terminal data along with time
information.

See the wikipedia page
for more information.

On Wed, Jan 15, 2014 at 8:51 AM, Soichi Hayashi notifications@github.comwrote:

Wow. really? It sounds like a serious lack of metadata for ttyrec.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-32327715
.

@soichih
Copy link
Author

soichih commented Jan 15, 2014

I see.. So this warrants a need to implement ttyrec wrapper with its own data formats that can contain ttyrec data along with the display size; similar to .avi .mpg being a wrapper around the raw codec..

@dtinth
Copy link
Member

dtinth commented Jan 15, 2014

From the Wikipedia page, termrec already
does it. It injects both the encoding information and terminal size
using few control sequences. Maybe that does what you want.

However, right now, tty2js does not parse it. Right now you can parse it
for yourself and put it in the -s option.

On Wed, Jan 15, 2014 at 9:38 PM, Soichi Hayashi notifications@github.comwrote:

I see.. So this warrants a need to implement ttyrec wrapper with its own
data formats that can contain ttyrec data along with the display size;
similar to .avi .mpg being a wrapper around the raw codec..


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-32366444
.

@daixtr
Copy link

daixtr commented Jan 16, 2014

yo, i modified ttyrec and made my own version that contains these
metadata.. and much much more.. the output format is no longer compatible
to ttyrec. I'm still planning to add a ctrl key sequence, to signal when to
do capture and when not to, as often times there are times we do extra
stuff in commandline that we do not intend to be part of the record. There
are more features, still i will not mentioned here..

On Wed, Jan 15, 2014 at 8:56 AM, Thai Pangsakulyanont <
notifications@github.com> wrote:

Hello,

Yes, size is required. Unfortunately, this information is not recorded in
a ttyrec file. You might have to try different values.


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-32324922
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants