分页: 1 / 1

ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-12 14:44
eexpress
直接在终端输入命令,操作mldonkey。

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-12 15:02
枫叶饭团
离线下载无压力!

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-12 15:05
eexpress

代码: 全选

● git diff HEAD^^^ ml.sock.pl
diff --git a/ml.sock.pl b/ml.sock.pl
index 4a3e13f..cfd0ea0 100755
--- a/ml.sock.pl
+++ b/ml.sock.pl
@@ -2,14 +2,15 @@
   
 use IO::Socket::INET;  
   
-my $sock = IO::Socket::INET->new(PeerAddr => 'localhost', PeerPort => 4000) or 
+my $sock = IO::Socket::INET->new(PeerAddr => 'localhost', PeerPort => 4000) or 
 
 print "--命令: vd bw_toggle help kill etc.-->";
 while(<>){
+last if /^quit|^exit/;
 print $sock $_;
 while(<$sock>){last if /^>/;}
 print $_;
-while(<$sock>){last if /command-line/; print "$_\n";};
+while(<$sock>){last if /command-line/; print $_;};
 print "--命令-->";
 }
 close $sock;  
btw: 打倒不懂控制台的。 :em04

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-12 15:46
枫叶饭团
偶的离线下载脚本也是cli的≥﹏≤

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-12 15:49
eexpress
没交互式的,不叫控制台。

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-12 21:38
到处看看
wed界面拤路

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-13 14:54
ibear
不许用随机字符串写脚本 :em04

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-16 15:32
eexpress

代码: 全选

● git df ml.sock.pl
diff --git a/ml.sock.pl b/ml.sock.pl
index cfd0ea0..6d5be2d 100755
--- a/ml.sock.pl
+++ b/ml.sock.pl
@@ -4,13 +4,22 @@ use IO::Socket::INET;
   
 my $sock = IO::Socket::INET->new(PeerAddr => 'localhost', PeerPort => 4000) or die "没找
 
-print "--命令: vd bw_toggle help kill etc.-->";
+print "--命令: vd bw_toggle s vr help kill etc.-->";
 while(<>){
 last if /^quit|^exit/;
 print $sock $_;
+$vr=/vr/?1:0;
 while(<$sock>){last if /^>/;}
 print $_;
-while(<$sock>){last if /command-line/; print $_;};
+while(<$sock>){last if /command-line/;
+use Number::Format qw/format_bytes/;
+if($vr){
+s/]\ (\d)/]  $1/; @_=split /\s{2,}/;
+next if $_[2]!~/^\d+$/; next if $_[2]<10000000;
+$_=$_[0].$_[1]."  ".format_bytes($_[2])."  ".substr($_[4],0,50)."\n";
+}
+print $_;
+}
 print "--命令-->";
 }
 close $sock;  

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-17 9:33
eexpress
ml.sock.1.tar
(10 KiB) 已下载 32 次

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-17 9:40
YeLee
鼠标爪不错。

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-04-18 21:43
eexpress
https://github.com/eexpress/eexp-bin/bl ... ml.sock.pl
增加了/xxx 搜索。基本不改了。

Re: ml.sock.pl mldonkey的cli版本控制台。

发表于 : 2012-05-09 15:02
eexpress
手痒,增加了颜色。