nushell/docs/commands/from-vcf.md
Jörn Zaefferer 8ab2b92405
docs/commands: add from.md, update subcommands (#1712)
This adds a top-level document for the new `from` command, with a list of links of all the subcommands.

All the from-* subcommands keep their filename, but the content is updated to use the new subcommand syntax.

Needs matching update for to*

Ref #1709
2020-05-05 09:01:31 +12:00

917 B

from vcf

Parse text as .vcf and create table.

Syntax: from vcf

Examples

Suppose contacts.txt is a text file that is formatted like a .vcf (vCard) file:

> open contacts.txt
BEGIN:VCARD
VERSION:3.0
FN:John Doe
N:Doe;John;;;
EMAIL;TYPE=INTERNET:john.doe99@gmail.com
...

Pass the output of the open command to from vcf to get a correctly formatted table:

> open contacts.txt | from vcf
─────┬─────────────────
 #   │ properties
─────┼─────────────────
   0[table 8 rows]
> open contacts.txt | from vcf | get properties | where $it.name == "FN" | pick value
─────┬──────────────────────
 #   │ value
─────┼──────────────────────
   0 │ John Doe