Skip to content

Commit

Permalink
[documentation] Add remote contents examples
Browse files Browse the repository at this point in the history
  • Loading branch information
yannoff committed Oct 13, 2023
1 parent ffd41a8 commit 20b2825
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 3 deletions.
59 changes: 57 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ _Input format is detected automatically, hence:_

```bash
# The classic way:
jaml <file.yaml>
jaml <file.yaml|url-to-yaml-contents>

# or using piped standard input:
cat file.yaml | jaml
Expand All @@ -26,12 +26,67 @@ cat file.yaml | jaml

```bash
# The classic way:
jaml <file.json>
jaml <file.json|url-to-json-contents>

# or using piped standard input:
cat file.json | jaml
```

### Examples

_**Converting remote JSON contents over https**_

```bash
jaml https://repo.packagist.org/packages/list.json?vendor=yannoff
```

_Output:_

```yaml
packageNames:
- yannoff/collections
- yannoff/composer-dotenv-handler
- yannoff/console
- yannoff/handyman
- yannoff/lumiere-ui
- yannoff/lumiere-utils
- yannoff/symfony-boilerplate
- yannoff/y-a-m-l
- yannoff/yamltools
```
_**Converting a YAML file contents**_
```bash
jaml composer.yaml
```

_Output:_

```json
{
"name": "yannoff/jaml",
"description": "Easy-to-use JSON <=> YAML converter",
"type": "project",
"license": "MIT",
"authors": [
{
"name": "Yannoff",
"homepage": "https://github.com/yannoff"
}
],
"autoload": {
"psr-4": {
"Yannoff\\Jaml\\": "src/"
}
},
"require": {
"yannoff/console": "^2.0",
"yannoff/yamltools": "^1.5"
}
}
```

### Available options

**`-i, --interactive`**
Expand Down
Binary file modified man/man1/jaml.1.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion md/jaml/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jaml - Easily convert YAML/JSON formats

Convert YAML => JSON or JSON => YAML

`jaml` [options] infile
`jaml` [options] infile|url

`cat infile | jaml` [options]

Expand Down

0 comments on commit 20b2825

Please sign in to comment.