Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rome-modules docs #1

Open
wants to merge 4 commits into
base: 1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/rome-modules/apple-itunes-podcasting.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

This plugin is for use with iTunes Music Service podcast listings.

### Sample Usage
## Sample Usage

```java
SyndFeedInput input = new SyndFeedInput();
Expand Down
98 changes: 96 additions & 2 deletions docs/rome-modules/atom-threading-extensions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,98 @@
# Atom Threading Extensions

!!! warning "TODO"
This page needs to be revised
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
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
<channel>
<title>Lorem Ipsum</title>
<link>http://example.org</link>
<description>Lorem Ipsum</description>
<atom:link href="http://test.com" type="application/rss+xml" rel="self" />
<atom:link href="http://test.com/alt" type="application/rss+xml" rel="alternate" />
<atom:author>
<atom:name>Lorem Ipsum</atom:name>
<atom:email>[email protected]</atom:email>
<atom:uri>http://example.org</atom:uri>
</atom:author>
<atom:contributor>
<atom:name>Lorem Ipsum</atom:name>
<atom:email>[email protected]</atom:email>
<atom:uri>http://example.org</atom:uri>
</atom:contributor>
<item>
<title>Lorem Ipsum</title>
<link>http://example.org/episode1</link>
<description><![CDATA[Lorem Ipsum]]></description>
<atom:author>
<atom:name>Lorem Ipsum</atom:name>
<atom:email>[email protected]</atom:email>
<atom:uri>http://example.org</atom:uri>
</atom:author>
<atom:contributor>
<atom:name>Lorem Ipsum</atom:name>
<atom:email>[email protected]</atom:email>
<atom:uri>http://example.org</atom:uri>
</atom:contributor>
</item>
</channel>
</rss>
```

## 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("[email protected]");
author1.setUri("http://example.org");

SyndPerson contributor1 = new SyndPersonImpl();
contributor1.setName("Lorem Ipsum");
contributor1.setEmail("[email protected]");
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());
}
```
75 changes: 73 additions & 2 deletions docs/rome-modules/feedburner.md
Original file line number Diff line number Diff line change
@@ -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
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
<channel>
<title>Lorem Ipsum</title>
<link>http://example.org</link>
<description>Lorem Ipsum</description>
<item>
<title>Lorem Ipsum</title>
<link>http://example.org/episode1</link>
<feedburner:awareness>false</feedburner:awareness>
<feedburner:origLink>http://orig.example.org</feedburner:origLink>
<feedburner:origEnclosureLink>http://enclosure.example.org</feedburner:origEnclosureLink>
<description>Lorem Ipsum</description>
<guid isPermaLink="false">http://example.org/episode1</guid>
</item>
</channel>
</rss>
```

## 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);
```
64 changes: 62 additions & 2 deletions docs/rome-modules/feedpress.md
Original file line number Diff line number Diff line change
@@ -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
<rss xmlns:feedpress="https://feed.press/xmlns" version="2.0">
<channel>
<title>Lorem Ipsum</title>
<link>http://example.org</link>
<description>Lorem Ipsum</description>
<feedpress:newsletterId>abc123</feedpress:newsletterId>
<feedpress:locale>en</feedpress:locale>
<feedpress:podcastId>xyz123</feedpress:podcastId>
<feedpress:cssFile>http://example.org/style.css</feedpress:cssFile>
<item>
<title>Lorem Ipsum</title>
<link>http://example.org/episode1</link>
<description><![CDATA[Lorem Ipsum]]></description>
</item>
</channel>
</rss>
```

## 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());
```
56 changes: 54 additions & 2 deletions docs/rome-modules/fyyd.md
Original file line number Diff line number Diff line change
@@ -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
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:fyyd="https://fyyd.de/fyyd-ns/">
<title>Lorem Ipsum</title>
<link href="http://example.org"/>
<fyyd:verify>abcdefg</fyyd:verify>
<entry>
<title>Lorem Ipsum</title>
<link href="http://example.org/episode1"/>
<link rel="enclosure"
href="http://example.org/episode1.m4a" />
</entry>
</feed>
```

## 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());
```
15 changes: 7 additions & 8 deletions docs/rome-modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down
Loading