<commit_before># Belkin-WeMo-Command-Line-Tools

Install with npm https://www.npmjs.com/package/belkin-wemo-command-line-tools

This package provides a 'wemo' command that can be used to control your Belkin WeMo power switch (and can be easily extended to cater for other similar devices or new methods not yet implemented).  Written entirely out of base tools (such as curl, sed and awk) that will be on any current flavour of Linux/Unix (inc. Mac OSX) so this is a package that requires no external dependancies to be provided prior to use!

## Installation
### Global
For global installation of the package use:
```
    $ npm install -g belkin-wemo-command-line-tools
```
That will install the latest version of the package that has hit the NPM repository, globally to your system, (usually in /usr/local/bin) which as long as that is in your PATH variable, you can then simply run the 'wemo' command whenever you want without having to worry about where it is.

### Local
For local installation, if you run `npm install belkin-wemo-command-line-tools` without the `-g` flag, it will install it into your project locally under `./node_modules/belkin-wemo-command-line-tools` - doing this will require you to prefix the wemo command with a path that can locate it.

# Basic Usage
## Getting started with the CLI
If you have globally installed the 'wemo' command, you can now run it in your terminal without any arguments, which will show you the usage page:
```
    $ wemo

    Belkin WeMo Command Line Tool v1.0.16

    Script to control the Belkin WeMo power switch written entirely in shell
    and constructed out of commands that every computer should already have.

    Copyright © 2015 <NAME>, @github: agilemation
    Third-party trademarks mentioned are the property of their respective owners.

    Usage: wemo -h [ IP/HOSTNAME ] -a [ ACTION ]                         \
                [[ -ver ] | [ -? ]] | [ -s ] | [[ -v ] | [ -V ] | [ -t ] | 
                 [ -T ]] [[ -tt ]] 

    Arguments:
    [ -h | --host ]    IP_ADDRESS | HOSTNAME
    [ -a | --action ]  ON | OFF | GETSTATE | GETSIGNALSTRENGTH | GETNAME |
                       SETNAME NAME

    Optional Arguments: 
    [ -s | --silent ]        
    [ -v | --verbose ]        
    [ -V | --very-verbose ]   } 
    [ -t | --trace ]          } [ -tt | --trace-time ]  
    [ -T | --trace-raw ]      }
    [ -ver | --version ]
    [ -? | --help ]
```

## Getting the state
- To get the state you can use a command such as
```bash<commit_msg>James - bump version and render URL in link format<commit_after># Belkin-WeMo-Command-Line-Tools

Install with npm [Go to NPM package page...](https://www.npmjs.com/package/belkin-wemo-command-line-tools#star)

This package provides a 'wemo' command that can be used to control your Belkin WeMo power switch (and can be easily extended to cater for other similar devices or new methods not yet implemented).  Written entirely out of base tools (such as curl, sed and awk) that will be on any current flavour of Linux/Unix (inc. Mac OSX) so this is a package that requires no external dependancies to be provided prior to use!

## Installation
### Global
For global installation of the package use:
```
    $ npm install -g belkin-wemo-command-line-tools
```
That will install the latest version of the package that has hit the NPM repository, globally to your system, (usually in /usr/local/bin) which as long as that is in your PATH variable, you can then simply run the 'wemo' command whenever you want without having to worry about where it is.

### Local
For local installation, if you run `npm install belkin-wemo-command-line-tools` without the `-g` flag, it will install it into your project locally under `./node_modules/belkin-wemo-command-line-tools` - doing this will require you to prefix the wemo command with a path that can locate it.

# Basic Usage
## Getting started with the CLI
If you have globally installed the 'wemo' command, you can now run it in your terminal without any arguments, which will show you the usage page:
```
    $ wemo

    Belkin WeMo Command Line Tool v1.0.17

    Script to control the Belkin WeMo power switch written entirely in shell
    and constructed out of commands that every computer should already have.

    Copyright © 2015 <NAME>, @github: agilemation
    Third-party trademarks mentioned are the property of their respective owners.

    Usage: wemo -h [ IP/HOSTNAME ] -a [ ACTION ]                         \
                [[ -ver ] | [ -? ]] | [ -s ] | [[ -v ] | [ -V ] | [ -t ] | 
                 [ -T ]] [[ -tt ]] 

    Arguments:
    [ -h | --host ]    IP_ADDRESS | HOSTNAME
    [ -a | --action ]  ON | OFF | GETSTATE | GETSIGNALSTRENGTH | GETNAME |
                       SETNAME NAME

    Optional Arguments: 
    [ -s | --silent ]        
    [ -v | --verbose ]        
    [ -V | --very-verbose ]   } 
    [ -t | --trace ]          } [ -tt | --trace-time ]  
    [ -T | --trace-raw ]      }
    [ -ver | --version ]
    [ -? | --help ]
```

## Getting the state
- To get the state you can use a command such as
```bash
{'fraction_non_alphanumeric': 0.0955089233182977, 'fraction_numerical': 0.0031378701706216905, 'mean_word_length': 2.5664335664335662, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '2288732', 'n_tokens_mistral': 1513, 'n_tokens_neox': 1404, 'n_words': 657}