نديم ابن ﺤﻣﻮﺪﺓ الخمير - Nadim Khemir > App-Textcast-0.05.13 > App::Textcast

Download:
App-Textcast-0.05.13.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View Bugs
Report a bug
Module Version: 0.05   Source  

NAME ^

App::Textcast - Light weight text casting

SYNOPSIS ^

  use App::Textcast qw(record_textcast play_textcast) ;
  
  record_textcast(COMMAND => 'bash') ;
  play_textcast(TEXTCAST_DIRECTORY => $input_directory) ;

DESCRIPTION ^

What's a textcast?

It's a screencast of a terminal session. The idea is to record the terminal session and replay it in another terminal without loosing resolution, as screencasts do, nor using much disk space due to conversion from text to video. The terminal session can run a shell or any other program.

Why textcasts?

DOCUMENTATION ^

See record_textcast and play_textcast subbroutines.

SCRIPTS ^

Two commands, record_textcast and play_textcast, are installed on your computer when you install this module. Use them to record and replay your text casts.

Output

The textcast is a serie of files recorded in a directory. Tar/gzip the files before you send them. the compression ratio averages 95%.

SUBROUTINES/METHODS ^

record_textcast( %named_arguments )

Records the terminal output of a command. The output is stored as a set of files in a directory. The directory is later passed as argument to play_textcast for display.

  use App::Textcast 'record_textcast' ;
  
  record_textcast
        (
        COMMAND => 'bash',
        OUTPUT_DIRECTORY => shift @ARGV,
        COMPRESS => $compress,
        COLUMNS => $columns,
        ROWS => $rows,
        ) ;

Arguments

The arguments are named, order is not important.

Returns - Nothing

Exceptions

See scripts/record_textcast.

[p] check_output_directory( $output_directory)

Check that the given output directory does not exist. If $output_directory is not defined, a directory name is generated.

Arguments

Returns - The directory where the textcast is recorded.

Exceptions

play_textcast( %named_arguments)

Loads, checks, and initiates the textcast replay. Displays information after the textcast replay.

  use App::Textcast 'play_textcast' ;
  
  play_textcast
        (
        TEXTCAST_DIRECTORY => $input_directory,
        OVERLAY_DIRECTORY => $overlay_directory,
        DISPLAY_STATUS => $display_status,
        START_PAUSED => $start_paused,
        ) ; 

Arguments

Returns - Nothing

Exceptions

[p] display_text_cast_data($input_directory, \@screenshot_information, \%display_status )

Plays a screencast.

Arguments

Returns - A list containing

Exceptions - None

[p] print_play_information($total_play_time, $played_frames, \@skipped_frames)

Displays information about the textcast replay.

  print_play_information
        (
        $total_play_time,
        $total_frames,
        $played_frames,
        \@skipped_frames,
        ) ;

Arguments

Returns - Nothing

Exceptions - None

[p] status($status, $status_row, $status_column)

Displays a status on the status line.

Arguments

Returns - Nothing

Exceptions - None

[p] position_cursor($row, $column)

Create an ANSI command to position the cursor on the terminal.

Arguments

Returns - A string containing the ANSI command.

Exceptions - None

See xxx.

[p] load_index($input_directory)

Loads the screencast meta-data.

Arguments

Returns - The screencast meta-data, see the index file for format information.

Exceptions

[p] create_vt102_sub_process($shell_command, $columns, $rows)

Arguments

Returns - a vt_process handle

Exceptions

[p] close_vt102_sub_process( $vt_process)

Arguments

Returns - Nothing

Exceptions - None

[p] create_vt102_terminal($pty, $columns, $rows)

Arguments

$pty, $columns, $rows -

Returns - $vt, $terminal_change_buffer

Exceptions - None

[p] vt_output($vtobject, $type, $arg1, $arg2, $private)

Callback for OUTPUT events - for Term::VT102.

Arguments

$vtobject, $type, $arg1, $arg2, $private -

Returns - Nothing

Exceptions - Nothing

See Term::VT102.

[p] vt_rowchange($vtobject, $type, $arg1, $arg2, $private)

Callback for ROWCHANGE events. This just sets a time value for the changed row using the private data as a hash reference - the time represents the earliest that row was changed since the last screen update.

Arguments

$vtobject, $type, $arg1, $arg2, $private -

Returns - Nothing

Exceptions - Nothing

See Term::VT102.

[p] vt_changeall($vtobject, $type, $arg1, $arg2, $private)

Callback to trigger a full-screen repaint.

Arguments

$vtobject, $type, $arg1, $arg2, $private -

Returns - Nothing

Exceptions - None

See Term::VT102.

[p] create_child_process($shell_command, $pty, $vt)

Creqtes a child process to run a command in.

Arguments

$shell_command, $pty, $vt -

Returns - Nothing

Exceptions - Can not fork to run sub process

See xxx.

[p] run_child_process($command, $pty, $vt)

Arguments

$command, $pty, $vt -

Returns - Nothing

Exceptions - Error redirecting streams

[p] check_sub_process_output( $vt_process)

Check the sub process output.

Arguments

Returns - $eof, $screen_data, $cursor_x, $cursor_y

Exceptions - None

BUGS AND LIMITATIONS ^

None so far.

AUTHOR ^

        Nadim ibn hamouda el Khemir
        CPAN ID: NH
        mailto: nadim@cpan.org

LICENSE AND COPYRIGHT ^

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc App::Textcast

You can also look for information at:

SEE ALSO ^

screen (1), script(1), aewan, vte(1), evilvte(1).