mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
Date: Tue, 14 Nov 2006 20:04:11 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       06/11/14 20:04:11

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonWeb.ml 

Log message:
        patch #5424

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1094&r2=1.1095
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonWeb.ml?cvsroot=mldonkey&r1=1.34&r2=1.35

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1094
retrieving revision 1.1095
diff -u -b -r1.1094 -r1.1095
--- distrib/ChangeLog   14 Nov 2006 18:42:59 -0000      1.1094
+++ distrib/ChangeLog   14 Nov 2006 20:04:11 -0000      1.1095
@@ -15,6 +15,12 @@
 =========
 
 2006/11/14
+5424: web_infos/rss: shell:// type url
+- can be used to parse broken RSS feeds
+- testcase:
+  echo "curl $1|xmllint -" > /tmp/rsscommand
+  chmod +x /tmp/rsscommand
+  urladd rss "shell:///tmp/rsscommand http://thepiratebay.org/rss.php?cat=D601";
 5549: EDK: Parse all data from server.met, new HTML javascript popup
 5553: EDK/OV/KAD: small updates (bogeyman)
 - EDK: log unknown client tags with verbosity mct

Index: src/daemon/common/commonWeb.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonWeb.ml,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- src/daemon/common/commonWeb.ml      14 Nov 2006 13:52:39 -0000      1.34
+++ src/daemon/common/commonWeb.ml      14 Nov 2006 20:04:11 -0000      1.35
@@ -57,7 +57,8 @@
   let kind_record = { f = f; description = descr } in
   file_kinds := (kind, kind_record) :: !file_kinds
 
-let mldonkey_wget url f =
+  
+let mldonkey_wget_url url f =
   let module H = Http_client in
   let r = {
       H.basic_request with
@@ -129,6 +130,19 @@
         (Printexc2.to_string e) url
     end
 
+let mldonkey_wget_shell url f =
+  let command_urlencoded = Str.string_after url 8 in
+  let command = Url.decode command_urlencoded in
+  let filename = Filename.temp_file "wget_" ".tmp" in
+    Sys.command (Printf.sprintf "%s > %s" command filename);
+    (f filename : unit)
+      
+let mldonkey_wget url f =
+  if Str.string_match (Str.regexp "shell://") url 0 then
+    mldonkey_wget_shell url f
+  else
+    mldonkey_wget_url url f
+      
 let load_url can_fail kind url =
   let f =
     try




reply via email to

[Prev in Thread] Current Thread [Next in Thread]