from eml
For formats.
Parse text as .eml and create record.
warning This command requires a plugin The
from emlcommand resides in theformatsplugin. To use this command, you must install and registernu_plugin_formats. See the Plugins chapter in the book for more information.
Command Type
plugin
Signature
> from eml {flags}
Flags
--preview-body, -b {int}: How many bytes of the body to preview.
Input/output types:
| input | output |
|---|---|
| string | record |
Examples
Convert eml structured data into record
> 'From: [email protected]
Subject: Welcome
To: [email protected]
Test' | from eml
╭─────────┬─────────────────────────────────────╮
│ Subject │ Welcome │
│ │ ╭─────────┬────────────────╮ │
│ From │ │ Name │ │ │
│ │ │ Address │ [email protected] │ │
│ │ ╰─────────┴────────────────╯ │
│ │ ╭─────────┬───────────────────────╮ │
│ To │ │ Name │ │ │
│ │ │ Address │ [email protected] │ │
│ │ ╰─────────┴───────────────────────╯ │
│ Body │ Test │
╰─────────┴─────────────────────────────────────╯
Convert eml structured data into record
> 'From: [email protected]
Subject: Welcome
To: [email protected]
Test' | from eml -b 1
╭─────────┬─────────────────────────────────────╮
│ Subject │ Welcome │
│ │ ╭─────────┬────────────────╮ │
│ From │ │ Name │ │ │
│ │ │ Address │ [email protected] │ │
│ │ ╰─────────┴────────────────╯ │
│ │ ╭─────────┬───────────────────────╮ │
│ To │ │ Name │ │ │
│ │ │ Address │ [email protected] │ │
│ │ ╰─────────┴───────────────────────╯ │
│ Body │ T │
╰─────────┴─────────────────────────────────────╯
Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.