On Mon, Jul 10, 2017 at 3:05 PM, Edward K. Ream <[email protected]> wrote:

​I have created ftp2.py by rewriting almost every line of ftp.py. At
present, it's only in the ftp branch.

*Warning*: Imo, neither ftp.py nor ftp2.py is safe to use.

The json provides no way to associate paths on the server with paths in the
file system. This limitation exists with the original ftp.py plugin as
well. Imo, this makes the plugins almost useless.

In ftp2.py, the expected format of the json is:​

[
​  ​
["user-name", "host-name", "password"],
​  ​
["
​filename1"],
​  ​
["
​filename2"]
]

​This must change somehow so that (at least) a common prefix can be
stripped from the file-system paths to yield a server path.

For example, there must be some way to strip away
c:\leo.repo\leo-editor
from the paths on the server.

At present, the ftp2 code uses a hack: it just uses the base name of the
original file.  This will work only for top-level files!

*Improvements*

​
​
​ftp2 carefully and clearly reports all errors.  ftp does not.

ftp2 (probably) uses a different, flatter json representation.  This is
easier to use, but a bit less flexible.

ftp2 updates the @data ftp node with timestamp data.  ftp also does this,
but ftp2 pretty-prints the results.​

Coming:

1. (Essential) Change the json representation as discussed above.

2. (Essential) A real docstring.

3. (Important) The ftp2 plugin will use an ftp-upload command rather than
an icon.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to