Skip to content

A .NET implementation of Mailgun's talon email signature processing library

License

Notifications You must be signed in to change notification settings

martydill/Talon.NET

Repository files navigation

Talon.NET

Talon.net is a .NET implementation of Mailgun's awesome talon email processing library (https://github.com/mailgun/talon)

Status

Please note that Talon.NET is incomplete, and is still a work in progress! It currently supports plaintext reply extraction and bruteforce signature extraction.

It does not yet support HTML reply extraction, machine learning signature extraction, or any other talon features.

Build status

Installation

Use NuGet!

PM> install-package Talon.NET

Usage

Extracting a reply from a text message:

using Talon;

class Program
{
    static void Main(string[] args)
    {
        var text = @"Reply

                    -----Original Message-----

                    Quote";

        var reply = Quotations.ExtractFrom(text, "text/plain");
        reply = Quotations.ExtractFromPlain(text);
        // reply == "Reply"
    }
}

Extracting a signature using the brute force method:

using Talon;

class Program
{
    static void Main(string[] args)
    {
        var text = @"Wow. Awesome!
                    --
                    Bob Smith";

        var result = Bruteforce.ExtractSignature(text);
        // result.Item1 = "Wow. Awesome!"
        // result.Item2 = "--\r\nBob Smith"
    }
}

About

A .NET implementation of Mailgun's talon email signature processing library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages