>>>> "Anirban" == Anirban Majumdar
<anirban_majumdar(a)yahoo.com> writes:
Anirban> Hey Adrian:
Anirban> I am sending you a perl script to convert IE explorer
Anirban> favorites to webjump elisp code. Please use it and post
Anirban> this if you find a place for this.
Hello Anirban,
thanks for the offer.
Since your script is writtern in perl as opposed to emacs lisp (the
Emacs extension language), I don't think it's directly relevant to the
XEmacs website.
You might want to submit it at
http://www.emacswiki.org/
or some such.
Best regards,
Adrian
Anirban> Anirban
Anirban> #Script to convert your favorites to webjump
Anirban> #@author Anirban Majumdar
Anirban> use File::Find;
Anirban> print "This script will create a webjump file for the
favorites\n";
Anirban> print "Please input the location of the favorites folder(c:/Documents
and Settings/amajumda/Favorites/):";
Anirban> #Flushes the output
Anirban> select((select(STDOUT), $| = 1)[0]);
Anirban> $replyDir = <STDIN>;
Anirban> chomp $replyDir;
Anirban> print "The reply is: $replyDir\n";
Anirban> #Flushes the output
Anirban> select((select(STDOUT), $| = 1)[0]);
Anirban> print "Please input the location where you want to put the
webplus(f:/SharedDirectory/dotemacs/webjumpall.el):";
Anirban> #Flushes the output
Anirban> select((select(STDOUT), $| = 1)[0]);
Anirban> $replyFile = <STDIN>;
Anirban> chomp $replyFile;
Anirban> print "The reply is: $replyFile\n";
Anirban> #Flushes the output
Anirban> select((select(STDOUT), $| = 1)[0]);
Anirban> local $concatall;
Anirban> open(WFH,">".$replyFile);
Anirban> print WFH ("(setq webjump-sites
Anirban> (append '(");
Anirban> close(WFH);
Anirban> find(\&edits, $replyDir);
Anirban> open(WFH,">>".$replyFile);
Anirban> print WFH ($concatall);
Anirban> close(WFH);
Anirban> sub edits() {
Anirban> # print "File name is $_\n\t\tFull path is
$File::Find::name\n";
Anirban> @fname = split(/Favorites\//,$File::Find::name);
Anirban> my $urlfile=$_;
Anirban> #print "Running for ....$mapfile";
Anirban> open URLIN, $urlfile;
Anirban> my @urllines = <URLIN>;
Anirban> close URLIN;
Anirban> for $urlline ( @urllines ) {
Anirban> if ( $urlline =~ /^URL=/){
Anirban> @urlarr = split(/URL=/,$urlline);
Anirban> my $url = $urlarr[1];
Anirban> if($url =~ /http:\/\/|file:\/\//){
Anirban> #Things to do ..
Anirban> #Remove the \ with the \\ or forward slash
Anirban> $url =~ s/\\/\\\\/g ;
Anirban> $url =~ s/\r\n//g;
Anirban> $url =~ s/\n//g;
Anirban> print "Printing the url\n";
Anirban> print $url;
Anirban> $concatall =
$concatall."\n"."(\"".$fname[1]."\" .
\"".$url."\")";
Anirban> }
Anirban> #print "(\"$fname[1]\" . \"$1\") \n";
Anirban> }
Anirban> }
Anirban> }
Anirban> open(WFH,">>".$replyFile);
Anirban> print WFH (" \n )
Anirban> webjump-plus-sites
Anirban> webjump-sample-sites)) \n");
Anirban> close(WFH);
Anirban> ---------------------------------
Anirban> Do you Yahoo!?
Anirban> Yahoo! Mail Plus - Powerful. Affordable. Sign up now
--
Adrian Aichner
mailto:adrian@xemacs.org
http://www.xemacs.org/