{"id":25841593,"url":"https://github.com/chronicle-app/chronicle-email","last_synced_at":"2025-03-01T05:29:47.078Z","repository":{"id":56843478,"uuid":"287439164","full_name":"chronicle-app/chronicle-email","owner":"chronicle-app","description":"Email importer for chronicle-etl","archived":false,"fork":false,"pushed_at":"2024-05-02T02:55:19.000Z","size":34,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T22:46:49.622Z","etag":null,"topics":["chronicle","chronicle-etl","chronicle-plugin","email","google-takeout","imap","mail","mbox"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/chronicle-app.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-14T03:59:02.000Z","updated_at":"2024-05-02T02:55:19.000Z","dependencies_parsed_at":"2022-09-07T05:31:34.211Z","dependency_job_id":null,"html_url":"https://github.com/chronicle-app/chronicle-email","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronicle-app%2Fchronicle-email","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronicle-app%2Fchronicle-email/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronicle-app%2Fchronicle-email/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chronicle-app%2Fchronicle-email/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chronicle-app","download_url":"https://codeload.github.com/chronicle-app/chronicle-email/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240934416,"owners_count":19880991,"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":["chronicle","chronicle-etl","chronicle-plugin","email","google-takeout","imap","mail","mbox"],"created_at":"2025-03-01T05:29:46.548Z","updated_at":"2025-03-01T05:29:47.061Z","avatar_url":"https://github.com/chronicle-app.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Chronicle::Email\n[![Gem Version](https://badge.fury.io/rb/chronicle-email.svg)](https://badge.fury.io/rb/chronicle-email)\n\nExtract and work with your email using the command line with this plugin for [chronicle-etl](https://github.com/chronicle-app/chronicle-etl).\n\n## Usage\n\n```sh\n# Install chronicle-etl and this plugin\n$ gem install chronicle-etl\n$ chronicle-etl plugins:install email\n```\n\n### Extracting email from IMAP\n\nFor Gmail accounts, you can create an [app password](https://myaccount.google.com/apppasswords); your email address is your username.\n\n```sh\n# Save username and password\n$ chronicle-etl secrets:set imap username foo@gmail.com\n$ chronicle-etl secrets:set imap password APPPASSWORD\n\n# Then, retrieve your email from the last five days\n$ chronicle-etl --extractor email:imap --schema chronicle --since 5d\n\n# If you don't want to save your credentials as a secret, you can just pass\n# them to the extractor directly\n$ chronicle-etl --extractor email:imap --schema chronicle --since 5d --loader json \\\n    --extractor-opts username:foo@gmail.com --password:APPPASSWORD\n```\n\n### Processing email from an .mbox file\nThe MBOX format is used to archive an email mailbox. [Google Takeout](https://takeout.google.com/settings/takeout) exports emails from gmail in this format.\n\n```sh\n# Retrieve the subject lines of all emails in test.mbox\n$ chronicle-etl --extractor email:mbox --input ~/Downloads/inbox.mbox --fields subject\n```\n\n## Available Connectors\n### Extractors\n\n#### `imap`\nExtractor for importing recent emails from an IMAP server.\n\n##### Settings\n\n- `since`: Retrieve emails since this date\n- `until`: Retrieve emails until this date\n- `username`\n- `password`\n- `host`: (default: imap.gmail.com)\n- `port`: (default: 993) Use 143 for unencrypted connections\n- `mailbox`: (default: \"[Gmail]/All Mail\")\n- `search_query`: When using Gmail, you can pass in a search query (`from:foo has:attachment`) to filter messages by\n\nFor accessing Gmail, you can create a one-time [app password](https://myaccount.google.com/apppasswords). Your email address is your username.\n\n#### `mbox`\nExtractor for importing emails from an MBOX file\n\n##### Settings\n- `input`: A path to an .mbox file\n\n### Transformers\n\n#### `email`\nTransform an email (in the form of a string) into Chronicle Schema\n\n##### Settings\n- `body_as_markdown`: (default: false) Whether to convert the email body into markdown\n- `remove_signature`: (default: true) Whether to attempt to strip out the email signature (using the [`email_reply_parser`](https://github.com/github/email_reply_parser) gem)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronicle-app%2Fchronicle-email","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchronicle-app%2Fchronicle-email","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchronicle-app%2Fchronicle-email/lists"}