]> git.phdru.name Git - extfs.d.git/blobdiff - obexftp
phdru.co.cc => phdru.cu.cc
[extfs.d.git] / obexftp
diff --git a/obexftp b/obexftp
index 2f9cd9ac4faf5a7dd93cef2db896c2a88c881802..76e35a13dd6828cf96cb48958aa326b9fc8b6529 100755 (executable)
--- a/obexftp
+++ b/obexftp
@@ -1,11 +1,6 @@
 #! /usr/bin/env python
 #! /usr/bin/env python
-
 """ObexFTP Virtual FileSystem for Midnight Commander
 
 """ObexFTP Virtual FileSystem for Midnight Commander
 
-Author: Oleg BroytMann <phd@phd.pp.ru>.
-Copyright (C) 2004-2007 PhiloSoft Design.
-License: GPL.
-
 Manipulate a cell phone's filesystem calling obexftp binary. This is a complete
 user-mode solution, no kernel modules required (unlike SieFS or such). The
 script implements all commands of Midnight Commander VFS, except for
 Manipulate a cell phone's filesystem calling obexftp binary. This is a complete
 user-mode solution, no kernel modules required (unlike SieFS or such). The
 script implements all commands of Midnight Commander VFS, except for
@@ -19,7 +14,8 @@ OpenOBEX 1.0.1+ (http://openobex.sourceforge.net/) and
 ObexFTP 0.10.4+ (http://triq.net/obexftp).
 
 Edit the script, and correct the the full path to the obexftp binary (see
 ObexFTP 0.10.4+ (http://triq.net/obexftp).
 
 Edit the script, and correct the the full path to the obexftp binary (see
-obexftp_prog below). Put the script in the /usr/[local/][lib|share]/mc/extfs,
+obexftp_prog below). For mc 4.7+ put the script in $HOME/.mc/extfs.d.
+For older versions put it in /usr/[local/][lib|share]/mc/extfs
 and add a line "obexftp" to the /usr/[local/][lib|share]/mc/extfs/extfs.ini.
 Make the script executable.
 
 and add a line "obexftp" to the /usr/[local/][lib|share]/mc/extfs/extfs.ini.
 Make the script executable.
 
@@ -36,6 +32,8 @@ and "channel" is the OBEX File Transfer channel; you can discover the address
 and the channel for your device by using commands like "hcitool scan" and
 "sdptool browse".
 
 and the channel for your device by using commands like "hcitool scan" and
 "sdptool browse".
 
+For the USB put the interface number: "usb interface".
+
 For the TTY put the device name: "tty /dev/ttyUSB0".
 
 For the IrDA: just put "IrDA" in the file.
 For the TTY put the device name: "tty /dev/ttyUSB0".
 
 For the IrDA: just put "IrDA" in the file.
@@ -66,15 +64,14 @@ named in $TMP environment variable.
 
 """
 
 
 """
 
-__version__ = "1.2.4"
-__revision__ = "$Id$"
-__date__ = "$Date$"[7:-2]
-__author__ = "Oleg Broytmann <phd@phd.pp.ru>"
-__copyright__ = "Copyright (C) 2004-2007 PhiloSoft Design"
+__version__ = "1.3.1"
+__author__ = "Oleg Broytman <phd@phdru.name>"
+__copyright__ = "Copyright (C) 2004-2012 PhiloSoft Design"
+__license__ = "GPL"
 
 
 # Change this to suite your needs
 
 
 # Change this to suite your needs
-obexftp_prog = "/usr/local/obex/bin/obexftp"
+obexftp_prog = "/usr/bin/obexftp"
 
 
 import sys, os, shutil
 
 
 import sys, os, shutil
@@ -337,6 +334,12 @@ def setup_transport():
       elif len(parts) > 3:
          transport_error("too many arguments for 'bluetooth' transport")
       return ' '.join(["-b", parts[1], "-B", parts[2]])
       elif len(parts) > 3:
          transport_error("too many arguments for 'bluetooth' transport")
       return ' '.join(["-b", parts[1], "-B", parts[2]])
+   elif transport == "usb":
+      if len(parts) < 2:
+         transport_error("not enough arguments for 'usb' transport")
+      elif len(parts) > 2:
+         transport_error("too many arguments for 'usb' transport")
+      return ' '.join(["-u", parts[1]])
    elif transport == "tty":
       if len(parts) < 2:
          transport_error("not enough arguments for 'tty' transport")
    elif transport == "tty":
       if len(parts) < 2:
          transport_error("not enough arguments for 'tty' transport")