<commit_before># hubot-character

# Install

```
$npm install --save hubot-character
# edit external-scripts.json
$cat 
[
"hubot-character"
]
# edit config.json. also see config.sample.json
$cat config.json
{
    "characters": [
        {
            "name": "smiley",
            "icon": ":smiley:",
            "respond": "smile",
            "messages": [
                "hello world {name}"
            ]
        }
    ]
}
```

# Settings

## Environment variables

- HUBOT_CHARACTER_CONFIG
  - required
  - `config.json`'s path
- HUBOT_SLACK_TOKEN
  - required
  - your slack team's api token to reply with the character's message

## config.json

```
{
    "characters": [
        {
            "name": "the bot name",
            "icon": "slack icon for showing the bot's icon",
            "respond": "regular expression for the bot to respond",
            "messages": [
                "messages the bot will replay to you",
                "you can use the macro {name}.",
                "ex 'hello world {name}'",
            ]
        }
    ]
}
```

If your setting is something like the below, the bot's response will be like the picture.  

```
{
    "characters": [
        {
            "name": "smiley",
            "icon": ":smiley:",
            "respond": "smile",
            "messages": [
                "hello world {name}",
                "what's up {name}"
            ]
        }
    ]
}
```
<commit_msg>:books: Add image to readme<commit_after># hubot-character

# Install

```
$npm install --save hubot-character
# edit external-scripts.json
$cat 
[
"hubot-character"
]
# edit config.json. also see config.sample.json
$cat config.json
{
    "characters": [
        {
            "name": "smiley",
            "icon": ":smiley:",
            "respond": "smile",
            "messages": [
                "hello world {name}"
            ]
        }
    ]
}
```

# Settings

## Environment variables

- HUBOT_CHARACTER_CONFIG
  - required
  - `config.json`'s path
- HUBOT_SLACK_TOKEN
  - required
  - your slack team's api token to reply with the character's message

## config.json

```
{
    "characters": [
        {
            "name": "the bot name",
            "icon": "slack icon for showing the bot's icon",
            "respond": "regular expression for the bot to respond",
            "messages": [
                "messages the bot will replay to you",
                "you can use the macro {name}.",
                "ex 'hello world {name}'",
            ]
        }
    ]
}
```

If your setting is something like the below, the bot's response will be like the picture.  

```
{
    "characters": [
        {
            "name": "smiley",
            "icon": ":smiley:",
            "respond": "smile",
            "messages": [
                "hello world {name}",
                "what's up {name}"
            ]
        }
    ]
}
```

At here, hubot's name is "dark".  

![image](https://raw.githubusercontent.com/ara-ta3/hubot-character/images/hubot-character-screenshot-01.png)

{'fraction_non_alphanumeric': 0.1382838283828383, 'fraction_numerical': 0.0009900990099009901, 'mean_word_length': 1.665787159190853, 'pattern_counts': {'":': 34, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, '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': '2383443', 'n_tokens_mistral': 943, 'n_tokens_neox': 902, 'n_words': 249}