GitXplorerGitXplorer
d

davclient

public
7 stars
6 forks
0 issues

Commits

List of commits on branch master.
Unverified
2074a10a40435f93a5e2724b22a0243116fe9247

absolutize relative to request URL rather than CWD

committed 15 years ago
Unverified
6dd205962149457583894e681dfb99ff7dcbd840

absolutize href from server also in find

committed 15 years ago
Unverified
8ce2887675c6ed658af46ddad402521b573c5f8e

update to 0.0.8

committed 15 years ago
Unverified
769b363d60a29c1c7b337bd4308b0888127c3d32

absolutize URI from server, use URI library to compute relative URIs to make leading slash work

committed 15 years ago
Unverified
76cb6963a2fff07a7f7b8c8e5066392d5159e75d

bumped version

committed 15 years ago
Unverified
863dfa7d61fd70b3c295ab922f86121185d4e050

writing cwurl to tempfile

committed 15 years ago

README

The README file for this repository.

= DavClient

== DESCRIPTION:

A scriptable WebDAV command line client for Ruby for managing content on webservers that support the WebDAV extensions.

This is still very much work in progress. Especially the command line interface is changed a lot recently. The ruby library however is starting to settle.

== Requirements

The command line utility curl installed and available in your unix path.

== LIRBRARY SYNOPSIS:

require 'rubygems' require 'davclient'

Print url of all files in webdav folder recursively

with basic tree walking

url = 'http://test.webdav.org/dav/' WebDAV.find(url, :recursive => true) do |item| puts item.href end

== COMMAND LINE UTILITIES:

DavClient includes the command line utility 'dav'. It is inspired by git and should be familiar to unix users. The command 'dav cd url' sets current working url, 'dav ls' list files and 'dav pwd' prints current working url. , users can access files, folders and their properties on webdav servers.

The only authentication method supported at the moment, is by reading usernames and passwords from a file named /.netrc. If username is missing, the 'dav' command will print out detailed instructions on how to add username etc. to the '/.netrc' file.

== COMMAND LINE SYNOPSIS:

bash $ dav cd http://test.webdav.org/dav/ http://test.webdav.org/dav/ bash $ dav ls images/ index.html bash $ dav pwd http://test.webdav.org/dav/ bash $ get ./index.html bash $ dav --help usage: dav COMMAND [ARGS]

Available dav commands: ls List files on webdav server pwd Print current working url cd Change current working url cp Copy resource mv Move resource rm Remove resource cat Print content of resource mkdir Create remote collection (directory) (mkcol alias) get Download resource put Upload local file propfind Print webdav properties for url mkcol Make collection options Display webservers WebDAV options edit Edit contents of remote file with editor

== USE WITH IRB:

IRB can also be used as an interactive dav console:

bash $ irb -rubygems -rdavclient/simple

cd "https://webdav.org/projects/" => "https://webdav.org/projects/" pwd => "https://webdav.org/projects/" content = get "index.html" => "index.html" ls index.html cd ".." => "https://webdav.org/"

== INSTALL:

If you can type the command 'curl' in your terminal window, everything is ok.

DavClient uses the command line utility cURL to interact with servers. Curl comes preinstalled on Mac OS X. It can also be downloaded from http://curl.haxx.se/ . If you are using debian or ubuntu, it can be installed with apt-get:

sudo apt-get install curl

Then install DavClient:

[sudo] gem install davclient

or

git clone git://github.com/thomasfl/davclient.git cd davclient sudo rake install

== Background:

There has been posted a few examples on the web of how to make a WebDAV client. The problem is that they all seem to support only one type of username and password authentication. DavClient instead uses the command line tool 'curl' to do all the authentication and networking. To avoid handling authentication all togheter, curl are told to look up all usernames and passwords are in a file named ~/.netrc.

The command line utility 'dav' is non-interactive and inspired by git, making it more suitable for use in scripts. If you can script in Ruby, the examples folder includes sample scripts using the davclient Ruby library.

== Licence

DavClient (davclient and the dav utility) is copyrighted free software by Thomas Flemming and contributors. You can redistribute it and/or modify it under either the terms of the GPL2 or the conditions below:

See LICENCE file for details.

== Comments

Feel free to contact me at thomas dot flemming at usit.uio.no.