technomancy/leiningen — pull request #1252 by gphil (2013-07-11 19:54:04+00:00)
Title: automate collection and reporting of leiningen download statistics

I wrote some code to fetch and parse the leiningen download logs and report some summary statistics.

It can be run with:

```
lein run -m leiningen.downloads
```

But you'll need the appropriate AWS credentials for it to work in
~/.secrets/leiningen_downloads_aws_cred.clj:

```clojure
{:access-key "AWS_ACCESS_KEY"
:secret-key "AWS_SECRET_KEY"}
```

It takes a while to run, since it has to fetch all the logs from S3 (there are a lot of log files, so it has to make a lot of requests.) It also requires a fair amount of memory to process all the files, so you may need to set ```JVM_OPTS=-Xmx512m```.

Additionally, it uses Pomegranate to download some additional dependencies at runtime so as not to pollute the project.clj.

I had to add the bin/ directory to the classpath in order to run the code using leiningen. I'm not sure if this is OK. If not, there may be a better place to put this file, or a better way of running it that I'm not aware of. I'm happy to change this given a better solution.