<commit_before>In this directory you'll find some Python scripts to help with interacting with the [Close.io](http://close.io/) API.

Install basic dependencies
-----
Before you start, you should already have `git`, `python-2.7` and `virtualenv` installed. For OS X users, we recommend [MacPorts](http://www.macports.org/).

Setup
-----
1. `git clone <EMAIL>:elasticsales/closeio-api.git`
1. `cd closeio-api/scripts`
1. `virtualenv-2.7 --distribute venv`
1. `. venv/bin/activate`
1. `pip install -U -r requirements.txt`

How to run the CSV importing script
-----
1. Make sure your CSV has all of these columns, _in this order_: 

```
company_name
url
status
email
phone
contact_name
contact_title
address
city
state (2 letter abbreviation)
zip
country (2 letter abbreviation)
(any additional fields will be added as custom fields)
```
All fields are optional (can be blank), but you must have all of these columns.

2. Make sure (if you haven't already in Setup) you're in the `closeio-api/scripts` directory and you have activated your virtual environment by running `. venv/bin/activate`.

3. Run the import script: `./csv_to_cio.py --api_key YOUR_API_KEY_HERE ~/path/to/your/leads.csv

You can generate an API Key from Settings in Close.io.<commit_msg>Update scripts/README.md<commit_after>In this directory you'll find some Python scripts to help with interacting with the [Close.io](http://close.io/) API.

Install basic dependencies
-----
Before you start, you should already have `git`, `python-2.7` and `virtualenv` installed. For OS X users, we recommend [MacPorts](http://www.macports.org/).

Setup
-----
1. `git clone <EMAIL>:elasticsales/closeio-api.git`
1. `cd closeio-api/scripts`
1. `virtualenv-2.7 --distribute venv`
1. `. venv/bin/activate`
1. `pip install -U -r requirements.txt`

How to run the CSV importing script
-----
1. Make sure your CSV has all of these columns, _in this order_: 

```
company_name
url
status
email
phone
contact_name
contact_title
address
city
state (2 letter abbreviation)
zip
country (2 letter abbreviation)
(any additional fields will be added as custom fields)
```
All fields are optional (can be blank), but you must have all of these columns.

2. Make sure (if you haven't already in Setup) you're in the `closeio-api/scripts` directory and you have activated your virtual environment by running `. venv/bin/activate`.

3. Run the import script: `./csv_to_cio.py --api_key YOUR_API_KEY_HERE ~/path/to/your/leads.csv`

You can generate an API Key from Settings in Close.io.
{'fraction_non_alphanumeric': 0.10904044409199048, 'fraction_numerical': 0.011102299762093577, 'mean_word_length': 4.02589641434263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '5463109', 'n_tokens_mistral': 801, 'n_tokens_neox': 770, 'n_words': 326}