Skip to content

Commit

Permalink
add examples for --raw and using "-" as the payload, minor other fixe…
Browse files Browse the repository at this point in the history
…s, update changelog
  • Loading branch information
patinthehat authored and Patrick committed Jan 12, 2021
1 parent f6b93d9 commit 43c2836
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to `permafrost-dev/ray-cli` will be documented in this file.

---

## 1.6.0 - 2021-01-12

- add `--raw` flag to send contents without any pre-processing, such as sending the contents of an html file _(without `--raw`, the source will display instead)

- specifying the payload as as dash `"-"` is now treated as an indicator that data should be read from `stdin` _(this is the same as specifying `--stdin`)._

- code cleanup & reorganization

## 1.5.0 - 2021-01-12

- add `--sm` and `--lg` flags as shorter versions of `--small` and `--large`
Expand Down
24 changes: 20 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ vendor/bin/ray 'test message' --green --large
_would become:_

```bash
ray-1.4.0.phar 'test message' --green --large
ray-1.6.0.phar 'test message' --green --large
```

---
Expand Down Expand Up @@ -111,11 +111,11 @@ vendor/bin/ray --sm "hello world"

Arguments: `string`

Default: `none`
Default: `normal`

Possible Values: `large`, `lg`, `small`, `sm`, `normal`

Description: sends a payload with the specified text size. See `--large` and `--small`.
Description: sends a payload with the specified text size. See `--large` and `--small`. _Note that while included for completeness, specifying `normal` is not necessary as it is the default text size._

Example:

Expand Down Expand Up @@ -201,12 +201,28 @@ Arguments: `none`

Default: `false`

Description: Reads the payload data from the standard input instead of as a command line parameter.
Description: Reads the payload data from the standard input instead of as a command line parameter. Note that the payload data can be specified as as dash _(`"-"`)_ instead of specifying the `--stdin` flag.

Example:

```bash
echo "hello world" | vendor/bin/ray --stdin
echo "hello world" | vendor/bin/ray -
```

### `--raw`

Arguments: `none`

Default: `false`

Description: Forces the payload data to skip pre-processing. Normally, the data is processed to encode HTML entities, spaces, and converts new lines to `<br>` tags _(this is done to display HTML source code)_.

Example:

```bash
cat sample.html | vendor/bin/ray --stdin --raw
vendor/bin/ray --raw sample.html
```

### `--screen` or `-s`
Expand Down

0 comments on commit 43c2836

Please sign in to comment.