Do yourself a favor - use a project that is well maintained and loved, rather than this languishing tool. There are now many projects that are far superior and far better maintained than cf. I personally like Swiftly and Posthaste. The former is written by an original, core dev on Swift, and the latter is one to which I've contributed. You may find one of them matches your use case.
#####A Command-Line Interface to Rackspace Cloud Files
It's not beautiful, or amazing, or even spectacular. But it will will let you upload stuff to Cloud Files hosted in Rackspace. Simple commands like cf list all or cf put somecontainer file1 file2 don't suck too bad, right? So far, you can:
- List containers
- List objects in containers
- Create and delete containers
- Delete, upload, and download objects
In the future, I hope it'll also:
- Delete containers w/ objects (override default safeties)
- Make containers public and get URLs
- Shorten CDN URLs for public files
- Enable CDN logging
- Modify CDN TTL vals
$ sudo pip install cf
OR
$ sudo easy_install cf
$ git clone https://github.com/angstwad/cf.git
$ cd cf/
$ sudo python ./setup.py install
The setup.py script will attempt to download and install the python-cloudfiles module for you, but if it doesn't, then you'll have to manually install it:
$ sudo pip install python-cloudfiles
OR
$ sudo easy_install python-cloudfiles
Credentials (username and API key) are supplied three ways:
- Arguments:
$ cf --username <username> --apikey <apikey> - Environment variables: CF_USER and CF_APIKEY
- Config file at
$HOME/.cf, created by running$ cf config --create-config
Credentials supplied as arguments override a config file or enviroment variables -- in fact, they're prioritized in the order above. Arguments > envvars > config file.
$ cf config --test-login
>>> Successfully authenticated to Rackspace Cloud Files.
$ cf list all
$ cf list mycontainer
$ cf cont --create someContainer
$ cf cont [ --delete | -D ] someContainer
$ cf put new_container file1 file2
$ cf put someContainer ~/Documents/*
$ cf get that_old_container pic1.jpg file2.html
$ cf get that_old_container pic1.jpg file2.html -d /home/user
$ cf obj someContainer [ --delete | -d ] file1 file2
- It does now check for overwrites!
- Haven't tested on Windows. I don't even have a clue if it'll work for you.
Released under the Apache 2.0 license.