eml2html

package module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 15 Imported by: 0

README

pkg.go.dev

About

eml2html is a library and command line tool used to transform RFC 822 (eml) files into html files viewable in a browser.

Installing

Library, using Go Modules:

go get github.com/korylprince/eml2html

CLI Tool:

mkdir build
cd build
go mod init build
go get github.com/korylprince/eml2html/cmd/eml2html@<version>
go build github.com/korylprince/eml2html/cmd/eml2html
./eml2html -h

If you have any issues or questions create an issue.

Documentation

Overview

package eml2html is a library used to transform RFC 822 (eml) files into html files viewable in a browser.

Index

Constants

View Source
const ContentTypeMessageRFC822 = "message/rfc822"
View Source
const ContentTypeMultipartAlternative = "multipart/alternative"
View Source
const ContentTypeMultipartMixed = "multipart/mixed"
View Source
const ContentTypeMultipartPrefix = "multipart/"
View Source
const ContentTypeMultipartRelated = "multipart/related"
View Source
const ContentTypeMultipartReport = "multipart/report"
View Source
const ContentTypeTextHTML = "text/html"
View Source
const ContentTypeTextPlain = "text/plain"

Variables

This section is empty.

Functions

func WriteDir

func WriteDir(root, name string, files []fs.File, meta *Meta) error

WriteDir parses and writes all of the given files in a directory with the given name at root. meta is used to provide navigational links to neighbors or a parent. WriteDir writes links to sub directories, but does not parse them. Subsequent calls to WriteDir should be called for each sub directory

func WriteMsg

func WriteMsg(root, name string, msg *enmime.Envelope, meta *Meta) error

WriteMsg parses and writes the given name/reader as an RFC 822 (eml) message and outputs an HTML representation at root. meta is used to provide navigational links to neighbors or a parent

Types

type Meta

type Meta struct {
	Prev   string
	Next   string
	Parent string
}

Meta is used to link pages to other pages

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL