Skip to content

Commit

Permalink
Update readme file.
Browse files Browse the repository at this point in the history
  • Loading branch information
JayWood committed Nov 10, 2018
1 parent 0e0a040 commit f864f23
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,29 @@ _( showing the resulting CSV output )_

## Usage

### Installation
### Installation - Composer


`composer require jaywood/jw-shortcode-scraper`

If you happen to use the sweet [Composer Installers](https://github.com/composer/installers) library, this CLI script is
marked as a `wp-cli-package` for ease of use later.

### Installation - Manual

1. Download or clone the repository to `wp-content/mu-plugins/jw-wpcli-shortcode-scraper/` _( Name is up to you )_
1. Create a new file in `wp-content/mu-plugins` call it whatever you want, I use `init.php`
1. Require the file like so:
```
<?php
if ( defined( 'WP_CLI' ) && WP_CLI ) {
require_once 'jw-wpcli-shortcode-scraper/jw-shortcode-scraper.php';
}
```

Now since your `init.php` file is in `wp-content/mu-plugins` it will always load.

### Command Syntax
- `wp jw-shortcode-scraper scrape [--export] [--site=<slug>]`
- `export` - Exports to a csv file, if possible, relative to the current directory.
Expand Down

0 comments on commit f864f23

Please # to comment.