Soundless Screen Cast Helper-Tool

Written for my blog on linuxquestions.org

Posted 23rd Oct 2016 at 18:21 by Michael Uplawski

Tags console, ruby, screen cast, terminal, utility

The distribution of my very first screen cast in a local distribution network for locally produced, biological foodstuffs is the real cause for the publication of this entry.

I have no use for sound in my screen cast and when I played around with “recordMyDesktop” thought about how I should be able to type instructions in a terminal or text-editor, show manipulations in software and switch between the two, without getting lost, forgetting details or making dumb typos all the time. The last point cannot be neglected, because it's been months since I have used my own mother-language. My screen cast is in French.

The result of my reflection is a Ruby program “line_by_line” which reads a given plain-text document and prints it to screen... line by line (of all choices). The default is however to print character by character, which makes it look like I were about to type the text in a terminal at the time of the recording.

This technique allows me to construct a downright scenario for the screen cast, test it before recording, by just executing line_by_line on the document and even to include stage directions in the text..: A small arrow → at the end of a line indicates, where I must show something in a program. A backslash or return is directly interpreted by line_by_line and makes it continue with the next line of text. Otherwise a key-stroke is needed to advance.

As I said, this first screen cast is in French, but might give you an idea of how line_by_line is intended to work:https://www.petit-fichier.fr/2016/10...commande-1.ogv The video is in OGV format, its size is about 81M.

To download and install line_by_line, the easiest way is to call the gem-utility, which is normally included with the ruby-package that you can install on any Linux- or Windows®-system:

user@machine:~$ sudo gem install line_by_line

This installs the Ruby-gem “line_by_line”. But you can also find the package and even read some of the generated documentation on www.rubygems.org.

I am afraid, there is not much to see, there. But as the gem contains all the program-code, you can always find out how line_by_line has been programmed. For the usage-information, execute on the command-line

user@machine:~$ line_by_line -h

This produces the following output:

    Usage: /usr/bin/line_by_line -s [textfile] <options>
    Specific options:
      -s, --source FILE read this file
      -f, --fast display at once entire lines
      -l, --line LINE start reading file at line 'line'
    Common options:
      -h, --help Show this message
      -v, --version Show version and program information
    
Ω