NAME
Xul2ppt_mec.pm - convert Xul to ppt on Win32 Platform mechanically
SYNOPSIS
use strict;
use warnings;
use Win32::Xul2ppt_mec;
my $obj = Win32::Xul2ppt_mec->new(
'range' => [1, 10],
'interval' => 1,
'dir' => 'D:/tmp',
'name' => 'sample.ppt',
);
$obj->shoot(); #catch screen from mozilla firefox and generate images
#$obj->trim(); #trim the intermediate images
$obj->to_ppt(); #insert the images into your ppt
Note: (If you want to convert directly, please consult the bundled Xul2ppt utilities.)
DESCRIPTION
This module provides an interface to convert .Xul files to .ppt files with virtual or mechanical method. By the interfaces of controlling keys and mouse automacally provided by Win32::Guitest, you can convert your Xul to ppt in free time. To do so, Win32::Guitest module installer is prerequired. And if you need to trim the pictures to get a mini-ppt files Image-Magic installer also prerequired.
METHOD
$obj->new()
my $obj = Win32::Xul2ppt_mec->new( 'range' => [1, 10], 'interval' => 1, 'dir' => 'D:/tmp', 'name' => 'sample.ppt', );
The attributes of the Xul2ppt_mec are described below, in the ATTRIBUTES section.
$obj->shoot()
Before invoking this method, please make sure that your xul file has already been opened by mozilla firefox and the window not minimized.
$obj->trim()
After the shoot terminates, pictures of your Xul files displayed on mozilla firefox are catched and saved under a certain directory. However, some blemish remains in the intial pictures, further trimming the pictures are strongly recommended. Two command lines provided by Imagic-Magic are invoking:
"convert -crop +0+25 $file $file"
"convert -trim $file $file".
$obj->to_ppt();
Automacally inserts pictures into your ppt files. Before running, powerpoint should be started and not minimized!
ATTRIBUTES
$obj->{'range'} Set the start and end index of Xul shooted
$obj->{'interval'}
set the interval of seconds between each mechanical operation, if it runs on a fast machine, you can shorten it. 2 seconds is default value.
$obj->{'dir'}
set the directory, under which all the intermediate files will be saved. and 'D:\tmp' is default;
$obj->{'name'}
set the name of your ppt file, 'sample.ppt' is default
xul2ppt command tools to convert xul to ppt
SYNOPSIS
xul2ppt [ -r "[num1, num2]" | -i num | -d string | -n string ] xul2ppt.pl
OPTIONS
-r See $obj->{'range'}
-i See $obj->{'interval'}
-d See $obj->{'dir'}
-n See $obj->{'name'}
set the postfix of the intermediate images. 'png' is default.
AUTHOR
Sal Zhong (Zhong Wei Xiang)
Contact meCOPYRIGHT
Copyright (c) 2006 Sal Zhong. All rights reserved.