Correct RECURSIVE param in cambalache-list-directory
Turns out vtable commands don't need to be interactive
Fix upload to root w/interactive call to cambalache-upload-file
Cambalache is a term used in some countries in South America for a flea market or swap, of the kind where you can find a mix of unexpected and bizarre items.
This package is a file manager for WebDAV.
So far only tested with Fastmail. I created this because I wanted to push some files to my account
programmatically from Emacs.
At the time of writing the second draft of this README, I still haven't uploaded a single file using
Elisp. BUT! I did write a file manager for WebDAV :)
Sample use-package
configuration:
(use-package cambalache
:load-path "path/to/cambalache"
:custom
(cambalache-root-url "https://myfiles.fastmail.com/")
:commands
(cambalache-list-contents cambalache-download-file cambalache-upload-file))
There are other commands that could be used as entry points (create dir, delete, etc.).
cambalache-root-url
: The "base URL" for your WebDAV server. The host for this URL is also used
to lookup credentials using auth-source
. MUST be set by the user for interactive use.
cambalache-last-modified-format-string
: How to format the "Last modified date" column. The value
must be something usable by format-time-string
. Default is "%F %r".
As (maybe too briefly :)) mentioned in the previous section, the host of cambalache-root-url
is
used to look up the credentials using auth-source
. The most common of these is ~/.authinfo
.
For example for the configuration above, you need something like:
machine myfiles.fastmail.com login my-user-name@fastmail.com password my-app-password
The main entry point for the package is cambalache-list-contents
which prompts for a directory
name to append to cambalache-root-url
. You can leave it empty to start from the root level.
From that vtable-based file list, use ?
to pop a help buffer: most bindings try to be reasonable
defaults and mimic what you would do in Dired.
Most of the commands can also be called programmatically, in that case the URL parameter is used as-is, so you could write some elisp to manipulate files in different servers if needed.
Finally, the buffer *cambalache-errors*
, as expected, will contain any responses that were
"unexpected" by the client. That includes server-side errors, but also corner cases not implemented
or bugs handling responses. If possible, report them so Cambalache becomes more robust over time.
CAUTION: As of the initial version of the package, there are no confirmation prompts when overwriting elements with uploads, move, or copy operations. This was by design, but it was already bitten me when testing (so, it might change). In any case, be careful!.
You can contact me at ~sebasmonia/conversations@lists.sr.ht
and also code@sebasmonia.com
. The
former is preferred for public exchanges about this package.