Have you ever wished you could access your Amazon Simple Queue Service from the command line ? Now you can:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$ AWS_ACCESS_KEY_ID=<your access key>
$ AWS_SECRET_ACCESS_KEY="<the secret access key>"

$ clisqs create my-queue
Queue my-queue was created.

$ clisqs list
my-queue

$ clisqs push --data "this is the message" my-queue
Pushed 19 bytes to queue my-queue

$ cat README.txt | clisqs push my-queue
Pushed 2687 bytes to queue my-queue

$ clisqs push my-queue README.txt
Pushed 2687 bytes to queue my-queue

$ clisqs size my-queue
3

$ clisqs pop my-queue
this is the message

$ clisqs delete --force my-queue
Queue my-queue was deleted.

Installation

1
$ sudo gem install cliaws

Direct-code access

1
2
3
4
5
6
require "rubygems"
require "cliaws"

Cliaws.sqs.push("my-queue", "the data")
the_size = Cliaws.sqs.size("my-queue")
the_message = Cliaws.sqs.pop("my-queue")

S3 ?

This gem also works with S3. See my prior release announcement: Cliaws: command-line access to S3

I just released a new gem on RubyForge: cliaws. Using it, you have access to nice command line shortcuts:

1
2
3
4
5
6
$ AWS_ACCESS_KEY_ID=<your access key>
$ AWS_SECRET_ACCESS_KEY="<the secret access key>"
$ clis3 list BUCKET/PATH-PREFIX
$ clis3 put BUCKET/FULL/PATH/NAME /path/to/local/file
$ clis3 get BUCKET/FULL/PATH/NAME /path/to/local/file
$ clis3 cat BUCKET/FULL/PATH/NAME

This is not rocket science, but with the kind of work I’m doing at the moment, having quick command-line access to S3 is a boon.

Installation

1
$ gem install cliaws

Direct-code access

1
2
3
4
5
6
7
8
9
10
11
12
13
require "rubygems"
require "cliaws"

# Retrieve and store in a variable
value = Cliaws.s3.get("BUCKET/FULL/PATH/NAME")

# Retrieve and stream to specified file
File.open("/path/to/local/file", "w") do |f|
  Cliaws.s3.get("BUCKET/FULL/PATH/NAME", f)
end

# Returns an Array of full names
contents = Cliaws.s3.list("BUCKET")

Repository

The repository is hosted on GitHub, with a mirror on RubyForge.

The repository’s URLs are:

Go forth and fork !

Well, with much more testing, I’m releasing another preview release of Piston. This release should import Subversion or Git repositories into Subversion or Git working copies just fine. There’s one slight problem, which is when you use piston import URL (without a target directory), it will import into a folder named repository, which isn’t what it’s supposed to do. I’m missing a couple of tests, is all.

How to grab this release ? Two ways:

  • git clone git://github.com/francois/piston.git
  • Grab a tarball

Once you have the code, run rake install_gem to install the gem. Enjoy !

I’m making it official. I’m releasing 1.9.0 today:

http://github.com/francois/piston/tree/1.9.0

I’ll put up a gem tomorrow, but if you want to play with Piston now, the best way is to either clone the repository, or grab a tarball directly from GitHub.

What’s implemented in this release ?

  • piston import

But you can import from either SVN or Git, into either SVN or Git. All Piston metadata is stored in a .piston.yml file in the pistonized dir’s root.

If you have questions, problems, comments, go ahead and comment right here, or use Piston’s tracker

 

Search

A picture of me

I am François Beausoleil, a Ruby on Rails coder. During the day, I work on XLsuite. At night, I am interested many things. Read my biography

Tags

(3) (1) (0) (2) (1) (1) (2) (2) (1) (2) (1) (2) (1) (2) (1) (1) (1) (1) (2) (14) (1) (1) (1) (1) (2) (1) (1) (2) (0) (1) (2) (1) (3) (1) (1) (1) (1) (1) (1) (0) (3) (2) (1) (2) (2) (1) (3) (2) (8) (8) (9) (12) (1) (1) (3) (1) (1) (1) (1) (1) (1) (2) (2) (2) (1) (1) (3) (1) (3) (1) (0) (23) (1) (1) (0) (1) (1) (1) (23) (25) (1) (1) (13) (1) (1) (2) (3) (1) (1) (4) (1) (2) (3) (0) (1) (7) (3) (1) (5) (5) (2) (2) (2) (4) (6) (7) (1) (0) (1) (1) (2) (2) (1) (4) (12) (2) (1) (2) (4) (1) (1) (1) (2) (8) (2) (3) (2) (2) (1) (3) (1) (1)

Links

Projects I work on

Categories

Archives