mirror of
https://github.com/nushell/nushell.git
synced 2024-11-29 20:03:54 +01:00
8ab2b92405
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
41 lines
2.5 KiB
Markdown
41 lines
2.5 KiB
Markdown
# from ics
|
|
|
|
Parse text as `.ics` and create table.
|
|
|
|
Syntax: `from ics`
|
|
|
|
## Examples
|
|
|
|
Suppose calendar.txt is a text file that is formatted like a `.ics` (iCal) file:
|
|
|
|
```shell
|
|
> open calendar.txt
|
|
BEGIN:VCALENDAR
|
|
BEGIN:VEVENT
|
|
DTSTART:20171007T200000Z
|
|
DTEND:20171007T233000Z
|
|
DTSTAMP:20200319T182138Z
|
|
SUMMARY:Basketball Game
|
|
UID:4l80f6dcovnriq38g57g07btid@google.com
|
|
...
|
|
```
|
|
|
|
Pass the output of the `open` command to `from ics` to get a correctly formatted table:
|
|
|
|
```shell
|
|
> open calendar.txt | from ics
|
|
───┬────────────────┬──────────────────┬────────────────┬────────────────┬────────────────┬────────────────┬────────────────
|
|
# │ properties │ events │ alarms │ to-Dos │ journals │ free-busys │ timezones
|
|
───┼────────────────┼──────────────────┼────────────────┼────────────────┼────────────────┼────────────────┼────────────────
|
|
0 │ [table 0 rows] │ [table 1 row] │ [table 0 rows] │ [table 0 rows] │ [table 0 rows] │ [table 0 rows] │ [table 0 rows]
|
|
───┴────────────────┴──────────────────┴────────────────┴────────────────┴────────────────┴────────────────┴────────────────
|
|
```
|
|
|
|
```shell
|
|
> open calendar.txt | from ics | get events | get properties | where name == "SUMMARY"
|
|
─────┬─────────┬───────────────────────────────────────┬────────
|
|
# │ name │ value │ params
|
|
─────┼─────────┼───────────────────────────────────────┼────────
|
|
0 │ SUMMARY │ Basketball Game │
|
|
```
|