<commit_before># s3-utils

[![Build Status](https://secure.travis-ci.org/sphereio/node-s3-utils.png?branch=master)](http://travis-ci.org/sphereio/node-s3-utils) [![Coverage Status](https://coveralls.io/repos/sphereio/node-s3-utils/badge.png)](https://coveralls.io/r/sphereio/node-s3-utils) [![Dependency Status](https://david-dm.org/sphereio/node-s3-utils.png?theme=shields.io)](https://david-dm.org/sphereio/node-s3-utils) [![devDependency Status](https://david-dm.org/sphereio/node-s3-utils/dev-status.png?theme=shields.io)](https://david-dm.org/sphereio/node-s3-utils#info=devDependencies)


Utilities used for handling AWS resources (e.g. converting/resizing images stored in S3 folders).

## Getting Started
Install the module 

```bash
npm install s3-utils
```

Install imagemagic (used for image conversion)

```bash
apt-get install imagemagick
```

Create a credentials file (JSON) required for accessing AWS resources:
- object `credentials` - AWS credentials
  - string `aws_key` -  AWS key
  - string `aws_secret` - AWS secret
  - string `aws_bucket` - S3 bucket folder

Example:

```json
{
   "aws_key": "1111111",
   "aws_secret": "3333333",
   "aws_bucket": "s3-bucket-name"
}
```

## Documentation

Show available subcommands:

```bash
$ node lib/s3utils help

  Usage: s3utils [options] [command]

  Commands:

    images
       Image commands

    help [cmd]
       display help for [cmd]


  Options:

    -h, --help     output usage information
    -V, --version  output the version number
```

### Subcommands

Show available subcommands for `image` command:

```bash
$ s3utils help images

  Usage: s3utils-images [options] [command]

  Commands:

    convert<commit_msg>Fix command.<commit_after># s3-utils

[![Build Status](https://secure.travis-ci.org/sphereio/node-s3-utils.png?branch=master)](http://travis-ci.org/sphereio/node-s3-utils) [![Coverage Status](https://coveralls.io/repos/sphereio/node-s3-utils/badge.png)](https://coveralls.io/r/sphereio/node-s3-utils) [![Dependency Status](https://david-dm.org/sphereio/node-s3-utils.png?theme=shields.io)](https://david-dm.org/sphereio/node-s3-utils) [![devDependency Status](https://david-dm.org/sphereio/node-s3-utils/dev-status.png?theme=shields.io)](https://david-dm.org/sphereio/node-s3-utils#info=devDependencies)


Utilities used for handling AWS resources (e.g. converting/resizing images stored in S3 folders).

## Getting Started
Install the module 

```bash
npm install s3-utils
```

Install imagemagic (used for image conversion)

```bash
apt-get install imagemagick
```

Create a credentials file (JSON) required for accessing AWS resources:
- object `credentials` - AWS credentials
  - string `aws_key` -  AWS key
  - string `aws_secret` - AWS secret
  - string `aws_bucket` - S3 bucket folder

Example:

```json
{
   "aws_key": "1111111",
   "aws_secret": "3333333",
   "aws_bucket": "s3-bucket-name"
}
```

## Documentation

Show available subcommands:

```bash
$ s3utils help

  Usage: s3utils [options] [command]

  Commands:

    images
       Image commands

    help [cmd]
       display help for [cmd]


  Options:

    -h, --help     output usage information
    -V, --version  output the version number
```

### Subcommands

Show available subcommands for `image` command:

```bash
$ s3utils help images

  Usage: s3utils-images [options] [command]

  Commands:

    convert
{'fraction_non_alphanumeric': 0.14759928867812686, 'fraction_numerical': 0.018375815056312982, 'mean_word_length': 4.0, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 14, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '545947', 'n_tokens_mistral': 1241, 'n_tokens_neox': 1130, 'n_words': 255}