Archive

Posts Tagged ‘perl’

Standalone Executable Perl script

August 19th, 2008 Albertux 1 comment

Standalone Executable Perl script

We need a PAR::Packer module of Perl

On GNU/Linux Perl is al ready installed, on Win32 you need to install Strawberry Perl (ActivePerl don’t work).

Now in your system command line (cmd.exe/bash) you need run:

cpan -i pp

You asume yes on all questions (Par::Packer needs another modules to work)

Now you can compile standalone executable perl scripts using this:

pp -o standalone myscript.pl

Note: on Win32 you can change standalone to standalone.exe (take more time make a standalone on Win32).

Categories: Uncategorized Tags: ,

Compile Perl Win32

August 17th, 2008 Albertux No comments

Compile Perl Win32

First you need download the Visual Studio 2008 C++ Express and Perl source code.

Use 7-zip to decompress perl-5.10.0.tar.gz

Edit Makefile (on perl-5.10.0\win32\) to set C++ Compiler:

CCTYPE = MSVC90FREE

Run CMD.EXE and write this:

"C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat"
cd perl-5.10.0
cd win32
nmake
nmake test
nmake install

Compile process will take some time but you can download MyPerl-5.10.0.zip
extract on C:\Perl to include Perl on your path:

set PATH=%PATH%;C:\Perl\bin

Alternatives if you don’t want to compile: ActivePerl or Strawberry Perl.

Categories: windows Tags: , ,

Include eBay and MercadoLibre on Search

August 5th, 2008 Albertux No comments

Include eBay and MercadoLibre on Search

This is for the project MRL

Categories: Uncategorized Tags: , ,

YouTube URL2MP3 Perl

August 4th, 2008 Albertux No comments

YouTube URL2MP3 Perl

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl
use LWP::Simple;
print "\nYouTube URL to MP3 Beta By Albertux [2008-08-04]\n";
print "[http://albertux.ayalasoft.net/2008/08/04/youtube-url2mp3-perl/]\n\n";
$total= @ARGV;
if ($total < 2) {
	print "Use: \$perl url2mp3.pl url_video name_video\n\n";
}
else {
	$URL=$ARGV[0];
	$VNAME=$ARGV[1];
	$aux=index($URL,"?v=");
	$a = substr $URL,$aux+3,11;
	$content = get($URL);
	@lines = split("\n",$content);
	foreach(@lines) {
		my $aux=index($_,"&t=");
		if ($aux > -1) {
			$t= substr $_, $aux+3,32;
		}
	}
	system "wget -c -O \"$VNAME.flv\" \"http://youtube.com/get_video?video_id=$a&t=$t\"";
	system "ffmpeg -i \"$VNAME.flv\" -ab 128k \"$VNAME.mp3\""; }
print "url2mp3.pl feedback to <albertoi7\@gmail.com>\n\n";

Need WGET and FFMPEG.

Categories: Uncategorized Tags: ,

Embed Videos to MRL

July 16th, 2008 Albertux No comments

Embed Videos to MRL

Aunque ya había desarrollado un código que insertaba el vídeo en MRL, me di cuenta de que el servidor no soportaba Python, pero si tenia soporte para Perl, así que después de leer un poco, este es el resultado:

[ Video Tester ]

Espero tener mas avances de MRL en las próximas semanas.

Urls de vídeos soportados: YouTube, Metacafe, Dailymotion., Megavideo, Vreel, Wuapi.

Categories: Uncategorized Tags: , , ,