<commit_before># Last.fm / Libre.fm plugin for [Phergie](http://github.com/phergie/phergie-irc-bot-react/)

[Phergie](http://github.com/phergie/phergie-irc-bot-react/) plugin for returning the current or last played song for a user on last.fm or libre.fm.

[![Build Status](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/badges/build.png?b=master)](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/build-status/master)
[![Code Coverage](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/?branch=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/?branch=master)

## About
[Phergie](http://github.com/phergie/phergie-irc-bot-react/) plugin for returning the current or last played song for a user on 
last.fm or libre.fm.  By default, the plugin responds to the commands "lastfm username" and "librefm username" (without the quotes).

## Install

The recommended method of installation is [through composer](http://getcomposer.org).

```JSON
{
    "require": {
        "chrismou/phergie-irc-plugin-react-audioscrobbler": "~1"
    }
}
```

See Phergie documentation for more information on
[installing and enabling plugins](https://github.com/phergie/phergie-irc-bot-react/wiki/Usage#plugins).

## Configuration

For last.fm lookups, you need a free API key which you can get from [here](http://www.last.fm/api). 
LibreFM works out of the box.

```php
new \Chrismou\Phergie\Plugin\Audioscrobbler\Plugin(array(
    'lastfm' => 'YOUR_API_KEY'
))
```

## CommandHelp compatibility

The plugin activates lastfm when it sees you've included a lastfm config, so in order to get [CommandHelp](http://github.com/phergie/phergie-irc-plugin-react-commandhelp/) 
to show the plugin in it's command list , you'll need to pass a mock config file:

```php
'plugins' => array(
    new \Chrismou\Phergie\Plugin\Audioscrobbler\Plugin(array(
        'lastfm' => true
    )),
)
```

Adding this line to your CommandHelp config should force the lastfm command to be displayed.

## Tests

To run the unit test suite:

```
curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit
```

## License

Released under the BSD License. See `LICENSE`.
<commit_msg>readme update<commit_after># Last.fm / Libre.fm plugin for [Phergie](http://github.com/phergie/phergie-irc-bot-react/)

[Phergie](http://github.com/phergie/phergie-irc-bot-react/) plugin for returning the current or last played song for a user on last.fm or libre.fm.

[![Build Status](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/badges/build.png?b=master)](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/build-status/master)
[![Code Coverage](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/?branch=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/?branch=master)

## About
[Phergie](http://github.com/phergie/phergie-irc-bot-react/) plugin for returning the current or last played song for a user on 
last.fm or libre.fm.  By default, the plugin responds to the commands "lastfm username" and "librefm username" (without the quotes).

## Install

The recommended method of installation is [through composer](http://getcomposer.org).

```JSON
{
    "require": {
        "chrismou/phergie-irc-plugin-react-audioscrobbler": "~1"
    }
}
```

See Phergie documentation for more information on
[installing and enabling plugins](https://github.com/phergie/phergie-irc-bot-react/wiki/Usage#plugins).

## Configuration

For last.fm lookups, you need a free API key which you can get from [here](http://www.last.fm/api). 
LibreFM works out of the box.

```php
new \Chrismou\Phergie\Plugin\Audioscrobbler\Plugin(array(
    'lastfm' => 'YOUR_API_KEY'
))
```

## CommandHelp compatibility

The plugin activates lastfm when it sees you've included a lastfm config, so in order to get [CommandHelp](http://github.com/phergie/phergie-irc-plugin-react-commandhelp/) 
to show the plugin in it's command list , you'll need to pass a mock config file:

```php
new \Phergie\Irc\Plugin\React\CommandHelp\Plugin(array(
    'plugins' => array(
        new \Chrismou\Phergie\Plugin\Audioscrobbler\Plugin(array(
            'lastfm' => true
        )),
    )
))
```

Adding this line to your CommandHelp config should force the lastfm command to be displayed.

## Tests

To run the unit test suite:

```
curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit
```

## License

Released under the BSD License. See `LICENSE`.

{'fraction_non_alphanumeric': 0.13929193267556586, 'fraction_numerical': 0.0003869220352099052, 'mean_word_length': 4.459345300950369, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 16, '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': '7089492', 'n_tokens_mistral': 1806, 'n_tokens_neox': 1736, 'n_words': 395}