diff --git a/docs/rome-modules/apple-itunes-podcasting.md b/docs/rome-modules/apple-itunes-podcasting.md index c263bdf..ad96be0 100644 --- a/docs/rome-modules/apple-itunes-podcasting.md +++ b/docs/rome-modules/apple-itunes-podcasting.md @@ -5,7 +5,7 @@ This plugin is for use with iTunes Music Service podcast listings. -### Sample Usage +## Sample Usage ```java SyndFeedInput input = new SyndFeedInput(); diff --git a/docs/rome-modules/atom-threading-extensions.md b/docs/rome-modules/atom-threading-extensions.md index 71937b2..b5ca131 100644 --- a/docs/rome-modules/atom-threading-extensions.md +++ b/docs/rome-modules/atom-threading-extensions.md @@ -1,4 +1,98 @@ # Atom Threading Extensions -!!! warning "TODO" - This page needs to be revised \ No newline at end of file +This plugin is for use with Atom 1.0 elements inside RSS feeds + +If you have an RSS feed that uses Atom extensions like link, author or +contributor, with Rome you can parse these elements + +```xml + + + Lorem Ipsum + http://example.org + Lorem Ipsum + + + + Lorem Ipsum + test@example.org + http://example.org + + + Lorem Ipsum + test@example.org + http://example.org + + + Lorem Ipsum + http://example.org/episode1 + + + Lorem Ipsum + test@example.org + http://example.org + + + Lorem Ipsum + test@example.org + http://example.org + + + + +``` + +## Create feed + +```java +Link link1 = new Link(); +link1.setHref("http://test.com"); +link1.setType("application/rss+xml"); +link1.setRel("self"); + +SyndPerson author1 = new SyndPersonImpl(); +author1.setName("Lorem Ipsum"); +author1.setEmail("test@example.org"); +author1.setUri("http://example.org"); + +SyndPerson contributor1 = new SyndPersonImpl(); +contributor1.setName("Lorem Ipsum"); +contributor1.setEmail("test@example.org"); +contributor1.setUri("http://example.org"); + +AtomLinkModule atomLink = new AtomLinkModuleImpl(); +atomLink.getLinks().add(link1); +atomLink.getAuthors().add(author1); +atomLink.getContributors().add(contributor1); + +SyndContent description = new SyndContentImpl(); +description.setValue("Lorem Ipsum"); + +SyndEntry entry = new SyndEntryImpl(); +entry.setTitle("Lorem Ipsum"); +entry.setDescription(description); +entry.setLink("http://example.org"); +entry.getModules().add(atomLink); + +SyndFeed feed = new SyndFeedImpl(); +feed.setFeedType("rss_2.0"); +feed.setTitle("test-title"); +feed.setDescription("test-description"); +feed.setLink("https://example.org"); +feed.getEntries().add(entry); +feed.getModules().add(atomLink); + +System.out.println(new SyndFeedOutput().outputString(feed)); +``` + +### Read feed + +```java +SyndFeed feed = new SyndFeedInput().build( + new XmlReader(new File("/foo_rss_atom.xml")))); + +AtomLinkModule feedAtomModule = (AtomLinkModule) feed.getModule(AtomLinkModule.URI); +for (SyndPerson author : feedAtomModule.getAuthors()) { + System.out.println(author.getEmail()); +} +``` diff --git a/docs/rome-modules/feedburner.md b/docs/rome-modules/feedburner.md index f7c5e68..261b620 100644 --- a/docs/rome-modules/feedburner.md +++ b/docs/rome-modules/feedburner.md @@ -1,4 +1,75 @@ # FeedBurner -!!! warning "TODO" - Check if the module is used at all +On June 3, 2007, FeedBurner was acquired by Google. On May 26, 2011, Google +announced that the FeedBurner APIs were deprecated. Google shut down the APIs on October 20, 2012. + +Google “retired” AdSense for Feeds on October 2, 2012 and shut it down on December 3, 2012. + +FeedBurner [module|http://rssnamespace.org/feedburner/ext/1.0] implementation allows to include +special elements into RSS feeds and entries + +You can include awareness, origLink and origEnclosureLink elements in your feed. + +## Sample + +```xml + + + + Lorem Ipsum + http://example.org + Lorem Ipsum + + Lorem Ipsum + http://example.org/episode1 + false + http://orig.example.org + http://enclosure.example.org + Lorem Ipsum + http://example.org/episode1 + + + +``` + +## Create feed + +```java +FeedBurner feedBurner = new FeedBurnerImpl(); +feedBurner.setAwareness("false"); +feedBurner.setOrigLink("http://orig.example.org"); +feedBurner.setOrigEnclosureLink("http://enclosure.example.org"); + +SyndContent description = new SyndContentImpl(); +description.setValue("Lorem Ipsum"); + +SyndEntry entry = new SyndEntryImpl(); +entry.setTitle("Lorem Ipsum"); +entry.setDescription(description); +entry.setLink("http://example.org"); +entry.getModules().add(feedburner); + +SyndFeed feed = new SyndFeedImpl(); +feed.setFeedType("rss_2.0"); +feed.setTitle("test-title"); +feed.setDescription("test-description"); +feed.setLink("https://example.org"); +feed.getEntries().add(entry); + +System.out.println(new SyndFeedOutput().outputString(feed)); +``` + +## Read feed + +```java +SyndFeedInput input = new SyndFeedInput(); +SyndFeed feed = input.build(new XmlReader(new File("feedburner/rss.xml"))); +feed.getModule(FeedBurner.URI); +SyndEntry entry = feed.getEntries().get(0); +entry.getModule(FeedBurner.URI); +SyndFeedOutput output = new SyndFeedOutput(); +StringWriter writer = new StringWriter(); +output.output(feed, writer); + +System.out.println(writer); +``` diff --git a/docs/rome-modules/feedpress.md b/docs/rome-modules/feedpress.md index f4455f8..b8eab8c 100644 --- a/docs/rome-modules/feedpress.md +++ b/docs/rome-modules/feedpress.md @@ -1,4 +1,64 @@ # FeedPress -!!! warning "TODO" - This page needs to be revised +The FeedPress module ([namespace|http://feed.press]) allows to specify custom +elements based on FeedPress public namespace. You have four elements available: +newsletterId, locale, podcastId and cssFile. + +## Sample + +```xml + + + Lorem Ipsum + http://example.org + Lorem Ipsum + abc123 + en + xyz123 + http://example.org/style.css + + Lorem Ipsum + http://example.org/episode1 + + + + +``` + +## Create feed + +```java +SyndContent description = new SyndContentImpl(); +description.setValue("Lorem Ipsum"); + +SyndEntry entry = new SyndEntryImpl(); +entry.setTitle("Lorem Ipsum"); +entry.setDescription(description); +entry.setLink("http://example.org"); + +FeedpressModule feedpress = new FeedpressModuleImpl(); +feedpress.setCssFile("http://example.org/style.css"); +feedpress.setLocale("en"); +feedpress.setNewsletterId("abc123"); +feedpress.setPodcastId("xyz123"); + +SyndFeed feed = new SyndFeedImpl(); +feed.setFeedType("rss_2.0"); +feed.setTitle("test-title"); +feed.setDescription("test-description"); +feed.setLink("https://example.org"); +feed.getEntries().add(entry); +feed.getModules().add(feedpress); + +System.out.println(new SyndFeedOutput().outputString(feed)); +``` + +## Read feed + +```java +SyndFeedInput input = new SyndFeedInput(); +SyndFeed feed = input.build(new XmlReader(new File(getTestFile("feedpress/rss.xml")))); +FeedpressModule feedpress = (FeedpressModule) feed.getModule(FeedpressModule.URI); + +System.out.println(feedpress.getCssFile()); +``` diff --git a/docs/rome-modules/fyyd.md b/docs/rome-modules/fyyd.md index 391de74..2629a7d 100644 --- a/docs/rome-modules/fyyd.md +++ b/docs/rome-modules/fyyd.md @@ -1,4 +1,56 @@ # fyyd -!!! warning "TODO" - This page needs to be revised +This is a ROME module that provides support for the [https://fyyd.de/fyyd-ns/] namespace. + +By example, get the Fyyd verification token in RSS or Atom feed. + +## Sample + +```xml + + Lorem Ipsum + + abcdefg + + Lorem Ipsum + + + + +``` + +## Create feed + +```java +SyndEnclosure encl = new SyndEnclosureImpl(); +encl.setUrl("http://example.org/episode1.m4a"); + +SyndEntry entry = new SyndEntryImpl(); +entry.setTitle("Lorem Ipsum"); +entry.setLink("http://example.org/episode1"); +entry.getEnclosures().add(encl); + +FyydModule fyyd = new FyydModuleImpl(); +fyyd.setVerify("abcdefg"); + +SyndFeed feed = new SyndFeedImpl(); +feed.setFeedType("atom_1.0"); +feed.setTitle("Lorem Ipsum"); +feed.setLink("https://example.org"); +feed.getEntries().add(entry); +feed.getModules().add(fyyd); + +System.out.println(new SyndFeedOutput().outputString(feed)); +``` + +## Read feed + +```java +SyndFeedInput input = new SyndFeedInput(); +SyndFeed feed = input.build(new XmlReader(new File("fyyd/atom.xml"))); +FyydModule fyyd = (FyydModule) feed.getModule(FyydModule.URI); + + +System.out.println(fyyd.getVerify()); +``` diff --git a/docs/rome-modules/index.md b/docs/rome-modules/index.md index cea9701..4d225f5 100644 --- a/docs/rome-modules/index.md +++ b/docs/rome-modules/index.md @@ -5,22 +5,21 @@ a single distribution for users. | Module | Description | | ------------------------------------------------------------------------------| ------------------------------------------------------------------------ | -| [ActivityStreams](activitystreams.md) | Support for ActivityStreams | -| [Apple iPhoto Photocasting](apple-iphoto-photocasting.md) | Support or Apple iPhoto Photocasts | +| [ActivityStreams](activitystreams.md) | Support for ActivityStreams. | +| [Apple iPhoto Photocasting](apple-iphoto-photocasting.md) | Support or Apple iPhoto Photocasts. | | [Apple iTunes Podcasting](apple-itunes-podcasting.md) | Support for the Apple iTunes podcast directory listing. | -| [Atom](atom.md) | Support for Atom elements in RSS 2.0 feeds | -| [Atom Threading Extensions](atom-threading-extensions.md) | ??? | +| [Atom Threading Extensions](atom-threading-extensions.md) | Support for Atom elements in RSS 2.0 feeds. | | [Content](content.md) | Support for the RSS Content module. | | [Creative Commons](creative-commons.md) | Support for Creative Commons License informations in RSS and Atom feeds. | -| [FeedBurner](feedburner.md) | ??? | -| [FeedPress](feedpress.md) | ??? | -| [fyyd](fyyd.md) | ??? | +| [FeedBurner](feedburner.md) | Support for Google FeedBurner namespace. | +| [FeedPress](feedpress.md) | Support for Feed.press namespace. | +| [fyyd](fyyd.md) | Support for fyyd.de namespace. | | [GeoRSS](georss.md) | Support for GeoRSS. | | [Google Base](google-base.md) | Support for Google Base types and custom tagsets. | | [Microsoft Simple List Extensions](microsoft-simple-list-extensions.md) | for sorting and grouping entries. | | [Microsoft Simple Sharing Extensions](microsoft-simple-sharing-extensions.md) | for synchronizing across bi-directional RSS and [OPML](index.md) feeds. | | [OpenSearch](opensearch.md) | Support for OpenSearch. | -| [Podlove Simple Chapters](podlove-simple-chapters.md) | ??? | +| [Podlove Simple Chapters](podlove-simple-chapters.md) | Support for Podlove Simple Chapters RSS extension. | | [Portable Contacts](portable-contacts.md) | ??? | | [Slash](slash.md) | Used by Slash-based blogs. | | [Yahoo! MediaRSS](yahoo-mediarss.md) | For working with Yahoo! MediaRSS feeds (and Flickr Photostreams) | diff --git a/docs/rome-modules/podlove-simple-chapters.md b/docs/rome-modules/podlove-simple-chapters.md index c0038c1..2ad7544 100644 --- a/docs/rome-modules/podlove-simple-chapters.md +++ b/docs/rome-modules/podlove-simple-chapters.md @@ -1,4 +1,79 @@ # Podlove Simple Chapters -!!! warning "TODO" - This page needs to be revised +This is a ROME plug in that implements the [Podlove Simple Chapters](https://podlove.org/simple-chapters/) RSS extension. + +## Sample + +```xml + + + + Lorem Ipsum + http://example.org + Lorem Ipsum + + Lorem Ipsum + http://example.org/episode1 + Lorem Ipsum + http://example.org/episode1 + + + + + + +``` + +## Create feed + +```java +SyndContent description = new SyndContentImpl(); +description.setValue("Lorem Ipsum"); + +PodloveSimpleChapterModule psc = new PodloveSimpleChapterModuleImpl(); +SimpleChapter sc = new SimpleChapter(); +sc.setStart("00:00:00.000"); +sc.setTitle("Lorem Ipsum"); +sc.setHref("http://example.org"); +sc.setImage("http://example.org/cover"); +psc.getChapters().add(sc); + +SimpleChapter sc2 = new SimpleChapter(); +sc2.setStart("00:00:01.000"); +sc2.setTitle("Lorem Ipsum 1"); +sc2.setHref("http://example1.org"); +sc2.setImage("http://example1.org/cover"); +psc.getChapters().add(sc2); + +SyndEntry entry = new SyndEntryImpl(); +entry.setTitle("Lorem Ipsum"); +entry.setDescription(description); +entry.setLink("http://example.org"); +entry.getModules().add(psc); + +SyndFeed feed = new SyndFeedImpl(); +feed.setFeedType("rss_2.0"); +feed.setTitle("Lorem Ipsum"); +feed.setDescription("test-description"); +feed.setLink("https://example.org"); +feed.getEntries().add(entry); + +System.out.println(new SyndFeedOutput().outputString(feed)); +``` + +## Read feed + +```java +SyndFeedInput input = new SyndFeedInput(); +SyndFeed syndfeed = input.build(new XmlReader(feed.toURL())); + +for (SyndEntry syndEntry : syndfeed.getEntries()) { + Module module = syndEntry.getModule(PodloveSimpleChapterModule.URI); + PodloveSimpleChapterModule chapterModule = ((PodloveSimpleChapterModule) module); + + List chapters = chapterModule.getChapters(); + for (SimpleChapter c : chapters) { + System.out.println( c.toString ); + } +} +```