Skip to content

Mattijah/JWZThreading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Swift 4.2 Git

JWZThreading

Implementation of the JWZ algorithm for threading email messages as described by Jamie Zawinski at http://www.jwz.org/doc/threading.html.

Usage

import JWZThreading

// Create an array of messages
let messages = downloadedMessages.map({
    JWZMessage(id: $0.header.messageID, message: $0, inReplyTo: $0.header.inReplyTo, references: $0.header.references)
})

// Call `thread(from:)` with a list of messages
let threads = JWZThread.thread(from: messages)

// Output the result
for container in threads {
    print(container.message?.id, container.children.count)
}

License

This project is licensed under the MIT License - see the LICENSE file for details

About

Email threading based on the JWZ algorithm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published