Skip to content
/ ssu Public

Scala Syndication Utils - A Simple way to generate RSS feeds in Scala

License

Notifications You must be signed in to change notification settings

fredszaq/ssu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Scala Syndication Utils (SSU) Build Status

SSU is a simple and fluent Scala library to generate RSS feeds.

Creating a simple RSS feed

val items = ("title1", "content1", new URL("http://link1.com"), "[email protected]") ::
            ("title2", "content2", new URL("http://link2.com"), "[email protected]") ::
            Nil

val rss = (
        RssFeed("some title", new URL("http://someli.nk"), "some description")
            withWebMaster "[email protected]"
            withItems (items map (item => RssItem
                withTitle item._1 
                withDescription item._2
                withLink item._3
                withAuthor item._4))).toXml

Validation at compilation

Code with no enough information to produce a valid RSS feed will not compile, for example the following code will not compile because an item must have a title or a description

val rss = (
        RssFeed("some title", new URL("http://someli.nk"), "some description")
            withItems (items map (item => RssItem // error
                withLink item._3
                withAuthor item._4))).toXml

About

Scala Syndication Utils - A Simple way to generate RSS feeds in Scala

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published