Screencast Scripting

Manfred Stienstra, 09 Oct 2006, 22:07 in ruby on rails, practices, and video, last updated 05 Feb 2008, 22:32 (edit).

Last week I posted a short screencast to show some features of ActiveSupport::Multibyte. After typing through the entire screencast twice I decided to automate the process. Screenager, the automated screencast typer, was born.

Download screencast (QuickTime, 544KB)

You can download Screenager from my personal Subversion repository, you will also need a recent version of ActiveSupport.

svn export https://dwerg.net/svn/screenager/trunk screenager
cd screenager
svn export --force http://svn.rubyonrails.org/rails/trunk/activesupport/lib
./screenager --speed 2 http://www.fngtps.com/files/2/2006/10/activesupport.rb

The version currently in SVN evaluates the Ruby code with eval using a clean binding every time you start a new screenplay. I really wanted to use the Freaky Freaky Sandbox for this, but it’s in heavy development and didn’t run at all when I was coding this. Sandbox and multiline Ruby statements are planned for future versions.

Comments

  1. Fred about 7 hours later: (delete | show email)

    Awesome stuff!

    (I need to ask, though, what are you using to record your screencasts? Can't find anything decent for macintels. Damn it.)

  2. Manfred Stienstra about 11 hours later: (delete)

    SnapzProX 2, it's a little tool created by Ambrosia. I used Quicktime Pro to edit it, because there is no other software on the Mac that lets you edit arbitrary sized movies.

  3. Dr Nic about 12 hours later: (delete | show email)

    Ha - automated typos. Genius! :)

  4. Dr Nic about 12 hours later: (delete | show email)

    Also, it will be great when the FFSandbox is ready for live sandbox/demoing + integrated tutorials like the original Try Ruby site. I think ppl will take more away from a demo when they type in commands themselves.

  5. Manfred Stienstra about 13 hours later: (delete)

    Yes, I agree. Moving things are a lot easier to endure that static letters on a page.

    It would also be nice if we could combine Screenager with a Balloon (http://balloon.hobix.com/).

  6. Dan Kubb about 23 hours later: (delete | show email)

    Hehe, I cracked up when I saw the typo handling. Makes it look more human ;)

    The only thing I'd suggest is making the typos more "believable", by using characters that are adjacent (in qwerty layout) to the character that was meant to be typed in. For example if the character was lower-cased "s", the typo character could be a lower-cased a, z, x, d, e or w.

  7. Manfred Stienstra 1 day later: (delete)

    I'll add it to the TODO list (:

  8. Nicolas Paton 11 days later: (delete)

    Hey Manfried this is truly simple, truly great.

    I've been playing arround with the app and I had 2 little questions as not been a very long-time ruby programmer (:
    1. Can this support Multybyte support ? French accents make him go into crazy-funny. (I imagine I'd manage something out but I'm as well sure you'd do so much better in 5 minutes)
    2. How could I pause the script ? I've found out putting "gets" in the code won't help and would bring out a mode similar to accents crazy-funny mode. STDIN.getc will stop the script until user input. But this is a trully ugly hack (:

    Thank you so much for this great idea and implementation.

  9. Manfred Stienstra 11 days later: (delete)

    1. Well, multibyte characters work for me, but I've only tested it on MacOS Terminal and UXTerm. Did you make sure the file encoding was set the UTF-8? I'll have a look if I can reproduce your problem.
    2. Currently there is no pause. I'll try to work that in there.

  10. murphy 45 days later: (delete)

    ConsoleCast!

    wonderful idea! thank you, I think I might be using this.

  11. Julik 107 days later: (delete)

    Love the thing. Just wonder how do I make it also type stuff like "sudo gem install --weird-option=xyz" - that is, take it outside the term

  12. Manfred Stienstra 107 days later: (delete)

    Julik, all the commands are run against the binding of a fresh anonymous class. In theory I could support loading gems, in practice it might be easier to combine the script with a balloon: http://balloon.hobix.com/.

  13. Jason Huggins 483 days later: (delete | show email)

    Your site "http://svn.dwerg.net/screenager/" doesn't appear to be available anymore. Also, a code search on codesearch.google.com, koders.com, and krugle.com didn't show any hits. Is your code still available? I'm interested in porting this idea to Python, and would like to see how you did it. Cool stuff! :-)

  14. Manfred Stienstra 484 days later: (delete)

    I updated the original article, the URLs should work now.

  15. Jason Huggins 484 days later: (delete | show email)

    Thank you, thank you, thank you!
    Next question... I would love to use some derivative of this down the road in my project (Selenium web testing framework). Can you add an explicit license to your code? I'm a fan of Apache2, but MIT or new BSD are fine with me, too. :-)

  16. Manfred Stienstra 484 days later: (delete)

    As far as I'm concerned you can just use the code as is without restrictions.

Add your comment

In order to fight spam on this blog, posting comments from a browser without javascript is currently not supported.