Componentes de resposta e integração utilizados pelos serviços do OmniGit.
Encontrar um arquivo
Arquivos do repositório (último commit primeiro)
Nome de arquivo Última mensagem de commit Última data de commit
2024-05-31 20:07:04 +00:00
testdata Remove usenet signatures from incoming emails as well 2024-05-31 11:58:51 +02:00
.gitignore first version of reply. 2020-03-12 20:50:59 +01:00
.travis.yml Update the minimum Go version to 1.12 2020-03-12 21:02:39 +01:00
api.go Replace single \r on cleanup as well. 2020-03-15 10:41:48 +01:00
api_test.go updated go module path 2024-05-11 17:29:22 +02:00
classify.go Remove usenet signatures from incoming emails as well 2024-05-31 11:58:51 +02:00
doc.go Fix golint complains 2020-03-12 21:07:48 +01:00
go.mod updated go module path 2024-05-11 17:29:22 +02:00
go.sum first version of reply. 2020-03-12 20:50:59 +01:00
LICENSE updated LICENSE 2024-05-11 17:54:41 +02:00
pattern.go first version of reply. 2020-03-12 20:50:59 +01:00
README.md updated README.md to reflect fork 2024-05-11 17:10:21 +02:00
utilities.go Remove dead code. 2020-03-13 09:24:11 +01:00

go.dev reference Go Report Card

reply

Library to trim replies from plain text email. (Golang port of https://github.com/discourse/email_reply_trimmer)

Forked from https://github.com/dimiro1/reply

Why

Reply was forked because the original project does not seem to be maintained. Furthermore, the version before the fork removes parts of the mail that should not be removed. The project was forked to change this.

Usage

package main

import (
    "fmt"

    "code.forgejo.org/forgejo/reply"
)

func main() {
    message := `
        This is before the embedded email.
        
        On Wed, Sep 25, 2013, at 03:57 PM, richard_clark wrote:
        
        Richard> This is the embedded email
        
        This is after the embedded email and will not show up because 99% of the times
        this is the signature...
    `
	fmt.Println(reply.FromText(message))
}

will output:

This is before the embedded email.