<commit_before># docsbox

Docsbox converts yours doc/docx/etc. documents into pdf/html/txt and creates png previews.

```bash
$ curl -F "<EMAIL>" -i http://localhost:5000/api/v1/

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 77
Server: Werkzeug/0.11.10 Python/3.5.1+
Date: Fri, 08 Jul 2016 02:31:54 GMT

{
    "id": "9b643d78-d0c8-4552-a0c5-111a89896176",
    "status": "queued"
}

$ curl -i http://localhost:5000/api/v1/9b643d78-d0c8-4552-a0c5-111a89896176

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 148
Server: Werkzeug/0.11.10 Python/3.5.1+
Date: Fri, 08 Jul 2016 02:32:27 GMT

{
    "id": "9b643d78-d0c8-4552-a0c5-111a89896176",
    "result_url": "/media/9b643d78-d0c8-4552-a0c5-111a89896176.zip",
    "status": "finished"
}

$ curl -O http://localhost:5000/media/9b643d78-d0c8-4552-a0c5-111a89896176.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   233  100   233    0     0   9052      0 --:--:-- --:--:-- --:--:--  9320

$ unzip -l 9b643d78-d0c8-4552-a0c5-111a89896176.zip 
Archive:  9b643d78-d0c8-4552-a0c5-111a89896176.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
    11135  2016-07-08 05:31   txt
   373984  2016-07-08 05:31   pdf
   147050  2016-07-08 05:31   html
---------                     -------
   532169                     3 files
```

# Settings
```
ORIGINAL_FILE_TTL - original file (word document/presentation/etc.) TTL (default: 10 minutes)
RESULT_FILE_TTL - result file (zip archive) TTL (default: 24 hours)
```
<commit_msg>Add API section<commit_after># docsbox

Docsbox converts yours doc/docx/etc. documents into pdf/html/txt and creates png previews.

```bash
$ curl -F "<EMAIL>" -i http://localhost:5000/api/v1/

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 77
Server: Werkzeug/0.11.10 Python/3.5.1+
Date: Fri, 08 Jul 2016 02:31:54 GMT

{
    "id": "9b643d78-d0c8-4552-a0c5-111a89896176",
    "status": "queued"
}

$ curl -i http://localhost:5000/api/v1/9b643d78-d0c8-4552-a0c5-111a89896176

HTTP/1.0 200 OK
Content-Type: application/json
Content-Length: 148
Server: Werkzeug/0.11.10 Python/3.5.1+
Date: Fri, 08 Jul 2016 02:32:27 GMT

{
    "id": "9b643d78-d0c8-4552-a0c5-111a89896176",
    "result_url": "/media/9b643d78-d0c8-4552-a0c5-111a89896176.zip",
    "status": "finished"
}

$ curl -O http://localhost:5000/media/9b643d78-d0c8-4552-a0c5-111a89896176.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   233  100   233    0     0   9052      0 --:--:-- --:--:-- --:--:--  9320

$ unzip -l 9b643d78-d0c8-4552-a0c5-111a89896176.zip 
Archive:  9b643d78-d0c8-4552-a0c5-111a89896176.zip
  Length      Date    Time    Name
---------  ---------- -----   ----
    11135  2016-07-08 05:31   txt
   373984  2016-07-08 05:31   pdf
   147050  2016-07-08 05:31   html
---------                     -------
   532169                     3 files
```

# API

```
POST (multipart/form-data) /api/v1/
file=@kittens.docx
options={ # optional
    "formats": ["pdf"] # desired formats to be converted in, optional
    "thumbnails": { # optional
        "size": "320x240",
    } 
}

GET /api/v1/{task_id}

# Settings
```
ORIGINAL_FILE_TTL - original file (word document/presentation/etc.) TTL (default: 10 minutes)
RESULT_FILE_TTL - result file (zip archive) TTL (default: 24 hours)
```

{'fraction_non_alphanumeric': 0.15777525539160045, 'fraction_numerical': 0.19012485811577753, 'mean_word_length': 2.282122905027933, 'pattern_counts': {'":': 13, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3884730', 'n_tokens_mistral': 1815, 'n_tokens_neox': 1407, 'n_words': 296}