2020-05-04 23:01:31 +02:00
|
|
|
# from vcf
|
2020-03-21 02:50:13 +01:00
|
|
|
|
|
|
|
Parse text as `.vcf` and create table.
|
|
|
|
|
2020-05-04 23:01:31 +02:00
|
|
|
Syntax: `from vcf`
|
2020-03-21 02:50:13 +01:00
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Suppose contacts.txt is a text file that is formatted like a `.vcf` (vCard) file:
|
|
|
|
|
|
|
|
```shell
|
|
|
|
> open contacts.txt
|
|
|
|
BEGIN:VCARD
|
|
|
|
VERSION:3.0
|
|
|
|
FN:John Doe
|
|
|
|
N:Doe;John;;;
|
|
|
|
EMAIL;TYPE=INTERNET:john.doe99@gmail.com
|
|
|
|
...
|
|
|
|
```
|
|
|
|
|
2020-05-04 23:01:31 +02:00
|
|
|
Pass the output of the `open` command to `from vcf` to get a correctly formatted table:
|
2020-03-21 02:50:13 +01:00
|
|
|
|
|
|
|
```shell
|
2020-05-04 23:01:31 +02:00
|
|
|
> open contacts.txt | from vcf
|
2020-03-21 02:50:13 +01:00
|
|
|
─────┬─────────────────
|
2020-05-04 23:01:31 +02:00
|
|
|
# │ properties
|
2020-03-21 02:50:13 +01:00
|
|
|
─────┼─────────────────
|
|
|
|
0 │ [table 8 rows]
|
|
|
|
```
|
|
|
|
|
|
|
|
```shell
|
2020-05-07 13:03:43 +02:00
|
|
|
> open contacts.txt | from vcf | get properties | where $it.name == "FN" | select value
|
2020-03-21 02:50:13 +01:00
|
|
|
─────┬──────────────────────
|
2020-05-04 23:01:31 +02:00
|
|
|
# │ value
|
2020-03-21 02:50:13 +01:00
|
|
|
─────┼──────────────────────
|
|
|
|
0 │ John Doe
|
2020-05-04 23:01:31 +02:00
|
|
|
```
|