# Leech tool for NodeBB

Add a button to leech content from many sources and convert to NodeBB posts.

## Admin guide
### Installation

Install it from _ACP > Plugins > Install Plugins > Find Plugins_, or using CLI:

    npm install nodebb-plugin-leech-tool

### Setup

After installing this plugin and restarting NodeBB:
1. Navigate to _ACP > Extend > Widgets_.
2. Select **Leech Button** in _Available widgets_.
3. Drag and drop it to whichever _widget area_ you want. You may drop it in global,
   the button will only show up in appropriate pages (category and topic).

### Settings
(_developing_)

Navigate to _ACP > Plugins > Leech Tool_. Here you can customize parsing and rendering
behaviors.

_Note:_ using leech tool on a category page will create new topic in that category,
on a topic page will reply to that topic.

## Development
### Hot-reload

1. ~~Watch for source changes and rebuild es5 code by babel~~ (for now watching not working)

```
npm start dev
```

2. Watch for es5 code changes and reload NodeBB

```
cd path/to/NodeBB
grunt
```

### test

Lint (eslint):

```
npm start lint
```

Unittest:

```
npm start test
```

Code coverage:

```
npm start coverage
```

Test driven development:

```
npm start tdd
```

_Note:_ `grunt` won't watch for config files change, every time you change `plugin.json`
or language file, stop and start `grunt` again.
