email_reply_parser

Small library to parse plain text email content

  • Owner: github/email_reply_parser
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Email Reply Parser

EmailReplyParser is a small library to parse plain text email content.
See the rocco-documented source code for specifics on how it works.

This is what GitHub uses to display comments that were created from
email replies. This code is being open sourced in an effort to
crowdsource the quality of our email representation.

See the Ruby docs for more information.

Usage

To parse reply body:

parsed_body = EmailReplyParser.parse_reply(email_body)

Problem?

If you have a question about the behavior and formatting of email replies on GitHub, check out support. If you have a specific issue regarding this library, then hit up the Issues.

Installation

Get it from GitHub or gem install email_reply_parser. Run rake to run the tests.

Contribute

If you'd like to hack on EmailReplyParser, start by forking the repo on GitHub:

https://github.com/github/email_reply_parser

The best way to get your changes merged back into core is as follows:

  • Clone down your fork
  • Create a thoughtfully named topic branch to contain your change
  • Hack away
  • Add tests and make sure everything still passes by running rake
  • If you are adding new functionality, document it in the README
  • Do not change the version number, I will do that on my end
  • If necessary, rebase your commits into logical chunks, without errors
  • Push the branch up to GitHub
  • Send a pull request to the github/email_reply_parser project.

Known Issues

Quoted Headers

Quoted headers aren't picked up if the email client breaks it up into multiple
lines. GMail breaks up any lines over 80 characters for you.

On <date>, <author>
wrote:
> blah

Not to mention that we're searching for "on" and "wrote". It won't work
with other languages.

Possible solution: Remove "reply@reply.github.com" lines...

Weird Signatures

Lines starting with - or _ sometimes mark the beginning of
signatures:

Hello

--
Rick

Not everyone follows this convention:

Hello

Mr Rick Olson
Galactic President Superstar Mc Awesomeville
GitHub

**********************DISCLAIMER***********************************
* Note: blah blah blah                                            *
**********************DISCLAIMER***********************************

Main metrics

Overview
Name With Ownergithub/email_reply_parser
Primary LanguageRuby
Program languageRuby (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2011-02-23 02:13:11
Pushed At2024-04-02 17:39:26
Last Commit At2024-04-02 10:38:41
Release Count15
Last Release Namev0.5.11 (Posted on )
First Release Namev0.2.0 (Posted on )
用户参与
Stargazers Count680
Watchers Count328
Fork Count157
Commits Count119
Has Issues Enabled
Issues Count37
Issue Open Count20
Pull Requests Count24
Pull Requests Open Count8
Pull Requests Close Count17
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private