Merge pull request #1 from imk/master

maven site and config
This commit is contained in:
Patrick Gotthard 2013-09-30 08:27:47 -07:00
commit c804c6fe9a
7 changed files with 218 additions and 8 deletions

6
README.md Normal file
View file

@ -0,0 +1,6 @@
rome
====
ROME is a set of RSS and Atom Utilities for Java. It makes it easy to work in Java with most syndication formats: RSS 0.90, RSS 0.91 Netscape, RSS 0.91 Userland, RSS 0.92, RSS 0.93, RSS 0.94, RSS 1.0, RSS 2.0, Atom 0.3, Atom 1.0
More Information: http://rometools.github.io/rome-opml/

68
pom.xml
View file

@ -7,11 +7,20 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<version>1.5-SNAPSHOT</version> <version>1.5-SNAPSHOT</version>
<name>rome-opml</name> <name>rome-opml</name>
<url>http://rometools.jira.com</url> <url>http://rometools.github.io/rome-opml/</url>
<description>Support for OPML 1 and OPML 2 in ROME</description> <description>Support for OPML 1 and OPML 2 in ROME</description>
<organization>
<name>ROME Project</name>
<url>https://github.com/rometools/</url>
</organization>
<issueManagement> <issueManagement>
<url>https://rometools.jira.com/secure/IssueNavigator.jspa</url> <url>https://github.com/rometools/rome-opml/issues</url>
</issueManagement> </issueManagement>
<scm>
<connection>scm:git:git@github.com:rometools/rome-opml.git</connection>
<developerConnection>scm:git:git@github.com:rometools/rome-opml.git</developerConnection>
<url>https://github.com/rometools/rome-opml/</url>
</scm>
<developers> <developers>
<developer> <developer>
<id>kebernet</id> <id>kebernet</id>
@ -26,11 +35,6 @@
<distribution>repo</distribution> <distribution>repo</distribution>
</license> </license>
</licenses> </licenses>
<scm>
<connection>scm:svn:https://rometools.jira.com/svn/MODULES/trunk</connection>
<developerConnection>scm:svn:https://rometools.jira.com/svn/MODULES/trunk</developerConnection>
<url>https://rometools.jira.com/source/browse/MODULES</url>
</scm>
<repositories> <repositories>
<repository> <repository>
<id>maven2-repository.dev.java.net</id> <id>maven2-repository.dev.java.net</id>
@ -74,11 +78,30 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <artifactId>maven-resources-plugin</artifactId>
<version>2.2</version> <version>2.6</version>
<configuration> <configuration>
<encoding>${project.build.sourceEncoding}</encoding> <encoding>${project.build.sourceEncoding}</encoding>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<configuration>
<port>9000</port>
<tempWebappDirectory>${basedir}/target/site/tempdir</tempWebappDirectory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-publish-plugin</artifactId>
<version>1.0-beta-2</version>
<configuration>
<scmBranch>gh-pages</scmBranch>
<pubScmUrl>scm:git:git@github.com:rometools/rome-opml.git</pubScmUrl>
<content>${project.build.directory}/site</content>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
<profiles> <profiles>
@ -148,4 +171,33 @@
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties> </properties>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<reportSets>
<reportSet>
<reports>
<report>javadoc</report>
<report>test-javadoc</report>
</reports>
</reportSet>
<reportSet>
<id>aggregate</id>
<inherited>false</inherited>
<reports>
<report>aggregate</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project> </project>

125
src/site/apt/index.apt Normal file
View file

@ -0,0 +1,125 @@
-----
Home
-----
kwebble
-----
2011-09-23 14:15:28.442
-----
ROME OPML
This project provides support for {{{http://www.opml.org/}OPML}} in ROME.
*Downloads
* {{{./apidocs/index.html}JavaDocs}}
[]
*Sample Usage
To use this parser, simply include the jar file in your classpath as you are using ROME. Be sure it exists at the same level as ROME,
such that, if ROME is in the common classpath of an application server, don't include this jar in your webapps WEB\-INF/lib.
+------+
WireFeedInput input = new WireFeedInput();
Opml feed = (Opml) input.build( new File("myOpml.xml") );
List<Outline> outlines = (List<Outline>) feed.getOutlines();
+------+
*Hierarchy vs Flat
Since OPML is a hierarchical format, some magic is required to preserve this information when they feed is moved to a Synd\* structure.
This is accomplished by adding categories indicating the tree structure to the {{{http://wiki.java.net/bin/edit/Javawsxml/SyndEntries?topicparent\=Javawsxml.OPML;nowysiwyg\=0}SyndEntries}} ...
For example:
+------+
<opml version="1.0">
<head>
<title>Top Ten Sources for podcasting</title>
<ownerName>Newsilike Media Group</ownerName>
<ownerEmail>opml@TopTenSources.com</ownerEmail>
</head>
<body>
<outline type="link" text="TopTenSources: podcasting"
url="http://podcasting.TopTenSources.com/TopTenSources/" />
<outline text="CBS Technology News Podcast - Larry Magid' Tech Report">
<outline type="link" text="Larry Magid's Tech Report" url="http://www.cbsnews.com" />
</outline>
<outline text="Adam Curry: Daily Source Code">
<outline type="link" text="#374 Daily Source Code for Tuesday April 25th 2006"
url="http://radio.weblogs.com/0001014/2006/04/26.html#a7304" />
<outline type="link" text="#373 Daily Source Code for Monday April 24th 2006"
url="http://radio.weblogs.com/0001014/2006/04/24.html#a7303" />
<outline type="link" text="#372 Daily Source Code for Friday April 21st 2006"
url="http://radio.weblogs.com/0001014/2006/04/21.html#a7302" />
<outline type="link" text="#371 Daily Source Code for Thursday April 20th 2006"
url="http://radio.weblogs.com/0001014/2006/04/20.html#a7301" />
<outline type="link" text="#370 Daily Source Code for Wednesday April 19th 2006"
url="http://radio.weblogs.com/0001014/2006/04/19.html#a7300" />
</outline>
<outline text="Gillmor Gang">
<outline type="link" text="Syndicate Gang Part I" url="http://gillmorgang.podshow.com/?p=44" />
<outline type="link" text="HughTrain Gang" url="http://gillmorgang.podshow.com/?p=43" />
<outline type="link" text="Phlegm at 11 Gang" url="http://gillmorgang.podshow.com/?p=42" />
<outline type="link" text="NDA Gang" url="http://gillmorgang.podshow.com/?p=41" />
<outline type="link" text="When the Music?s Over Gang" url="http://gillmorgang.podshow.com/?p=40" />
</outline>
+------+
...\
When converted to RSS2 becomes:
+------+
<channel>
<title>Top Ten Sources for podcasting</title>
<link>http://foo.com</link>
<description />
<managingEditor>Newsilike Media Group</managingEditor>
<item>
<title>TopTenSources: podcasting</title>
<link>http://podcasting.TopTenSources.com/TopTenSources/</link>
<category domain="urn:rome.tree">node.-1732517202</category>
<category domain="urn:rome.attribute#url">http://podcasting.TopTenSources.com/TopTenSources/</category>
<guid>http://podcasting.TopTenSources.com/TopTenSources/</guid>
</item>
<item>
<title>CBS Technology News Podcast - Larry Magid' Tech Report</title>
<category domain="urn:rome.tree">node.1353657827</category>
</item>
<item>
<title>Larry Magid's Tech Report</title>
<link>http://www.cbsnews.com</link>
<category domain="urn:rome.tree">node.-4085850</category>
<category domain="urn:rome.tree">parent.1353657827</category>
<category domain="urn:rome.attribute#url">http://www.cbsnews.com</category>
<guid>http://www.cbsnews.com</guid>
</item>
<item>
<title>Adam Curry: Daily Source Code</title>
<category domain="urn:rome.tree">node.835791399</category>
</item>
<item>
<title>#374 Daily Source Code for Tuesday April 25th 2006</title>
<link>http://radio.weblogs.com/0001014/2006/04/26.html#a7304</link>
<category domain="urn:rome.tree">node.222050897</category>
<category domain="urn:rome.tree">parent.835791399</category>
<category domain="urn:rome.attribute#url">http://radio.weblogs.com/0001014/2006/04/26.html#a7304</category>
<guid>http://radio.weblogs.com/0001014/2006/04/26.html#a7304</guid>
</item>
<item>
<title>#373 Daily Source Code for Monday April 24th 2006</title>
<link>http://radio.weblogs.com/0001014/2006/04/24.html#a7303</link>
<category domain="urn:rome.tree">node.2088220478</category>
<category domain="urn:rome.tree">parent.835791399</category>
<category domain="urn:rome.attribute#url">http://radio.weblogs.com/0001014/2006/04/24.html#a7303</category>
<guid>http://radio.weblogs.com/0001014/2006/04/24.html#a7303</guid>
</item>
+------+
Nodes get categories with the "urn:rome.tree" URI that is used to maintain the tree structure.
The other thing you will notice is the "urn:rome.attribute#url". Since OPML allows you to add arbitrary attributes to each outline element, these are used to preserve these values.

View file

View file

@ -0,0 +1,8 @@
h1 {
padding: 4px 4px 4px 6px;
border: 1px solid #999;
color: #900;
background-color: #ddd;
font-weight:900;
font-size: x-large;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

19
src/site/site.xml Normal file
View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/DECORATION/1.3.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/DECORATION/1.3.0 http://maven.apache.org/xsd/decoration-1.3.0.xsd"
name="ROME OPML">
<bannerLeft>
<name>ROME</name>
<src>images/romelogo.png</src>
<href>http://github.com/rometools/</href>
</bannerLeft>
<publishDate position="right"/>
<version position="right"/>
<body>
<menu name="ROME OPML">
<item name="Overview" href="index.html"/>
</menu>
<menu ref="reports" />
</body>
</project>