<commit_before># Slack Messaging

This is a simple project designed to post messages to a given Slack channel as a bot.

### Usage

First, run:

```
gem install bundler
bundle install
```

Then, the project should be ready to go! However, it won't necessarily know where to print to Slack. So, this project requires a config file called `~/.slack_messaging.yml`. The config file should look like this:

```
slack:
  channel: "#[AWESOME CHANNEL NAME]"
  username: [AWESOME USER NAME]
  webhook_url: [WEBHOOK URL]
  icon_emoji: ":[SOME EMOJI]:"
```

To obtain the webhook url, go to [this link](https://api.slack.com/incoming-webhooks).

Okay, now the project will _actually_ be ready to rock and roll.

To print a friendly message to Slack, run:

```
bin/slack-messaging slack
```

from the main directory. Here, no specific message is being given to print to Slack, so slack_messaging will choose a random quote, which are all defined in `lib/slack_messaging/random_message.rb`. Feel free to change the messages or add more to cater what you'd like slack_messaging to say.

However, what if you wanted to print something specific? Well, you can! Just run:

```
bin/slack-messaging slack "MESSAGE 1"
```

You can even print multiple messages at once:

```
bin/slack-messaging slack "MESSAGE 1" "MESSAGE 2" "MESSAGE 3" ... "MESSAGE N"
```

I hope you enjoy printing fun and specialized messages to Slack!

### Tests
<commit_msg>Adding a link<commit_after># Slack Messaging

This is a simple project designed to post messages to a given Slack channel as a bot.

### Usage

First, run:

```
gem install bundler
bundle install
```

Then, the project should be ready to go! However, it won't necessarily know where to print to Slack. So, this project requires a config file called `~/.slack_messaging.yml`. The config file should look like this:

```
slack:
  channel: "#[AWESOME CHANNEL NAME]"
  username: [AWESOME USER NAME]
  webhook_url: [WEBHOOK URL]
  icon_emoji: ":[SOME EMOJI]:"
```

To obtain the webhook url, go to [this link](https://api.slack.com/incoming-webhooks).

Okay, now the project will _actually_ be ready to rock and roll.

To print a friendly message to Slack, run:

```
bin/slack-messaging slack
```

from the main directory. Here, no specific message is being given to print to Slack, so slack_messaging will choose a random quote, which are all defined in [`lib/slack_messaging/random_message.rb`](https://github.com/emmasax1/slack_messaging/blob/master/lib/slack_messaging/random_message.rb). Feel free to change the messages or add more to cater what you'd like slack_messaging to say.

However, what if you wanted to print something specific? Well, you can! Just run:

```
bin/slack-messaging slack "MESSAGE 1"
```

You can even print multiple messages at once:

```
bin/slack-messaging slack "MESSAGE 1" "MESSAGE 2" "MESSAGE 3" ... "MESSAGE N"
```

I hope you enjoy printing fun and specialized messages to Slack!

### Tests

{'fraction_non_alphanumeric': 0.09494743981010512, 'fraction_numerical': 0.003051881993896236, 'mean_word_length': 4.363636363636363, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, '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': '1232048', 'n_tokens_mistral': 968, 'n_tokens_neox': 890, 'n_words': 404}