doc: add more from command pages (#1778)

* doc: add from-url command page

* doc: add missing link to existing from-xml page.

* doc: add from-ini command page
This commit is contained in:
Bruno Heridet 2020-05-13 19:23:33 +02:00 committed by GitHub
parent e3b7e47515
commit 6826a9aeac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 5 deletions

26
docs/commands/from-ini.md Normal file
View file

@ -0,0 +1,26 @@
# from ini
Converts ini data into table. Use this when nushell cannot determine the input file extension.
## Example
Let's say we have the following `.txt` file :
```shell
> open sample.txt
[SectionOne]
key = value
integer = 1234
string1 = 'Case 1'
```
This file is actually a ini file, but the file extension isn't `.ini`. That's okay, we can use the `from ini` command :
```shell
> open sample.txt | from ini | get SectionOne
━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━
key │ integer │ string1
───────┼─────────┼──────────
value │ 1234 │ 'Case 1'
━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━
```

View file

@ -1,5 +1,5 @@
# from toml
Converts toml data into table. Use this when nushell cannot dertermine the input file extension.
Converts toml data into table. Use this when nushell cannot determine the input file extension.
## Example
Let's say we have the following Rust .lock file :

14
docs/commands/from-url.md Normal file
View file

@ -0,0 +1,14 @@
# from url
Parse [url-encoded string](https://url.spec.whatwg.org/#application/x-www-form-urlencoded) as a table.
## Example
```shell
> echo 'bread=baguette&cheese=comt%C3%A9&meat=ham&fat=butter' | from url
━━━━━━━━━━┯━━━━━━━━┯━━━━━━┯━━━━━━━━
bread │ cheese │ meat │ fat
──────────┼────────┼──────┼────────
baguette │ comté │ ham │ butter
━━━━━━━━━━┷━━━━━━━━┷━━━━━━┷━━━━━━━━
```

View file

@ -10,17 +10,17 @@ Use this when nushell cannot determine the input file extension.
* [from csv](from-csv.md)
* from eml
* [from ics](from-ics.md)
* from ini
* [from ini](from-ini.md)
* [from json](from-json.md)
* [from ods](from-ods.md)
* from sqlite
* from ssv
* [from toml](from-toml.md)
* [from tsv](from-tsv.md)
* from url
* [from url](from-url.md)
* [from vcf](from-vcf.md)
* [from xlsx](from-xlsx.md)
* from xml
* [from xml](from-xml.md)
* [from yaml](from-yaml.md)
*Subcommands without links are currently missing their documentation.*

View file

@ -1,6 +1,6 @@
# to url
Converts table data into url-formatted text.
Converts table data into [url-encoded text](https://url.spec.whatwg.org/#application/x-www-form-urlencoded).
## Example