Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

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

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages