{"id":16184334,"url":"https://github.com/mattmezza/email-lang-cli","last_synced_at":"2025-04-07T12:46:19.740Z","repository":{"id":57222808,"uuid":"83069575","full_name":"mattmezza/email-lang-cli","owner":"mattmezza","description":"The Email Language CLI","archived":false,"fork":false,"pushed_at":"2017-02-24T18:38:59.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-27T01:21:59.289Z","etag":null,"topics":["cli","compiler","email","language","parser","transpiler"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattmezza.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-24T18:12:38.000Z","updated_at":"2023-01-26T01:23:24.000Z","dependencies_parsed_at":"2022-08-28T23:23:19.536Z","dependency_job_id":null,"html_url":"https://github.com/mattmezza/email-lang-cli","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Femail-lang-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Femail-lang-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Femail-lang-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Femail-lang-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattmezza","download_url":"https://codeload.github.com/mattmezza/email-lang-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247656016,"owners_count":20974281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","compiler","email","language","parser","transpiler"],"created_at":"2024-10-10T07:09:53.398Z","updated_at":"2025-04-07T12:46:19.722Z","avatar_url":"https://github.com/mattmezza.png","language":"JavaScript","readme":"# SYNOPSIS\nThis is a CLI (command line interface) for [The Email Language](https://github.com/mattmezza/email-lang).\n\n# BUILD\n\n[![Travis](https://img.shields.io/travis/mattmezza/email-lang-cli.svg)]()\n\n# USAGE\n\n### Installation\n\n```bash\nnpm install -g email-lang-cli\n```\n\n### Input\nWrite an email file that follows the language specification\n\n```\nFrom: \"matteomerola.me\" \u003cmattmezza@gmail.com\u003e\nSubject: Comment about the novel\nDate: February 21, 2017 at 7:02:47 AM GMT+1\nTo: Tiffany \u003ctiffany.holsen@me.com\u003e\nReply-To: Matteo \u003cmattmezza@gmail.com\u003e\n\nWe all know the numerous film adaptations of the novel!\n\nCheers,\n  Matt.\n```\n\n### Use the CLI\n\nUse [email-lang-cli](https://github.com/mattmezza/email-lang-cli) to parse the file and produce a json output.\n\n```bash\nemail-lang-cli --file email.txt --out-file emails.json\n```\n\nThe full specification of the CLI can be obtained with `email-lang-cli -h` and is as follows\n\n```\nUsage: email lang-cli [options] [command]\n\nCommands:\n\n  help  Display help\n\nOptions:\n\n  -d, --dir               The directory containing the email text files you want to parse\n  -f, --file              The file containing the email text you want to parse\n  -h, --help              Output usage information\n  -o, --out-file [value]  The output file in which you want the emails to be parsed (defaults to \"emails.json\")\n  -v, --version           Output the version number\n```\n\n`--file`: takes a file in input. The file might contain one or more emails in the classic text format\n`--dir`: takes a directory in input. The directory contains all the email files to parse (by default it ignores file names not ending with `.txt`)\n`--out-file`: specifies the file name of the output json file\n\nTypical usage would be:\n\n`email-lang-cli -f email.txt -o emails.json`\n\nThis would print out some info and create the output file starting from the input file\n\n### Output\n\nThe result will be an array of emails structured as follows\n\n```json\n[\n  {\n    \"from\": {\n      \"name\": \"matteomerola.me\",\n      \"email\": \"mattmezza@gmail.com\"\n    },\n    \"subject\": \"Hello from Ibiza\",\n    \"date\": \"February 21, 2017 at 7:02:47 AM GMT+1\",\n    \"to\": {\n      \"name\": \"Tiffany\",\n      \"email\": \"tiffany.holsen@me.com\"\n    },\n    \"replyTo\": {\n      \"name\": \"Matteo\",\n      \"email\": \"mattmezza@gmail.com\"\n    },\n    \"text\": \"We all know the numerous film adaptations of the novel!\\n\\nCheers,\\n  Matt.\\n\"\n  }\n]\n```\n\n# LICENSE\n\nhttp://matteomerola.me\n\n[![License](https://img.shields.io/npm/l/array.from.svg)](/LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattmezza%2Femail-lang-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattmezza%2Femail-lang-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattmezza%2Femail-lang-cli/lists"}