mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
make external links open in a new tab
This commit is contained in:
22
README.md
22
README.md
@@ -1,5 +1,23 @@
|
|||||||
CommaFeed
|
CommaFeed
|
||||||
=========
|
=========
|
||||||
Google Reader inspired self-hosted RSS reader.
|
Google Reader inspired self-hosted RSS reader, based on Wicket and AngularJS.
|
||||||
|
|
||||||
Deploy on any JavaEE6 container or better yet on OpenShift.
|
Deploy on any JavaEE6 container or better yet on OpenShift.
|
||||||
|
|
||||||
|
|
||||||
|
Deployment on OpenShift
|
||||||
|
----------
|
||||||
|
|
||||||
|
* Create an account on `http://www.openshift.com/`.
|
||||||
|
* Add an application, select `JBoss Enterprise Application Platform 6.0``.
|
||||||
|
* For the`Public URL` set the name you want (e.g. `commafeed`).
|
||||||
|
* For the`Source Code` option, click ``Change` and set this repository (`https://github.com/Athou/commafeed.git`)`.
|
||||||
|
* Click `Create Application`.
|
||||||
|
* Click `Add cartridge` and select `MySQL`.
|
||||||
|
* Wait a couple of minutes and access your application.
|
||||||
|
* The defaut user is `admin` and the password is `admin`.
|
||||||
|
|
||||||
|
Local development
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
`mvn clean package tomee:run` and access `http://localhost:8082`. Any changes to the source code will be applied immediatly.
|
||||||
54
pom.xml
54
pom.xml
@@ -56,7 +56,7 @@
|
|||||||
<tomeeVersion>1.6.0-SNAPSHOT</tomeeVersion>
|
<tomeeVersion>1.6.0-SNAPSHOT</tomeeVersion>
|
||||||
<tomeeClassifier>plus</tomeeClassifier>
|
<tomeeClassifier>plus</tomeeClassifier>
|
||||||
<tomeeHttpPort>8082</tomeeHttpPort>
|
<tomeeHttpPort>8082</tomeeHttpPort>
|
||||||
<args>-Xmx1024m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled</args>
|
<args>-Xmx1024m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled</args>
|
||||||
<reloadOnUpdate>true</reloadOnUpdate>
|
<reloadOnUpdate>true</reloadOnUpdate>
|
||||||
<synchronization>
|
<synchronization>
|
||||||
<updateInterval>1</updateInterval>
|
<updateInterval>1</updateInterval>
|
||||||
@@ -71,20 +71,6 @@
|
|||||||
</synchronization>
|
</synchronization>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
|
||||||
<groupId>org.zeroturnaround</groupId>
|
|
||||||
<artifactId>jrebel-maven-plugin</artifactId>
|
|
||||||
<version>1.1.3</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>generate-rebel-xml</id>
|
|
||||||
<phase>process-resources</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>generate</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
@@ -101,11 +87,6 @@
|
|||||||
<artifactId>EasyCriteria</artifactId>
|
<artifactId>EasyCriteria</artifactId>
|
||||||
<version>2.1.0</version>
|
<version>2.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.slf4j</groupId>
|
|
||||||
<artifactId>slf4j-simple</artifactId>
|
|
||||||
<version>1.7.4</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.guava</groupId>
|
<groupId>com.google.guava</groupId>
|
||||||
@@ -137,6 +118,16 @@
|
|||||||
<artifactId>commons-lang</artifactId>
|
<artifactId>commons-lang</artifactId>
|
||||||
<version>2.6</version>
|
<version>2.6</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.googlecode.lambdaj</groupId>
|
||||||
|
<artifactId>lambdaj</artifactId>
|
||||||
|
<version>2.3.3</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>joda-time</groupId>
|
||||||
|
<artifactId>joda-time</artifactId>
|
||||||
|
<version>2.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.java.dev.rome</groupId>
|
<groupId>net.java.dev.rome</groupId>
|
||||||
@@ -149,14 +140,20 @@
|
|||||||
<version>4.2.3</version>
|
<version>4.2.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>joda-time</groupId>
|
<groupId>org.jsoup</groupId>
|
||||||
<artifactId>joda-time</artifactId>
|
<artifactId>jsoup</artifactId>
|
||||||
<version>2.2</version>
|
<version>1.7.2</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.code.gson</groupId>
|
||||||
|
<artifactId>gson</artifactId>
|
||||||
|
<version>2.2.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.googlecode.lambdaj</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
<artifactId>lambdaj</artifactId>
|
<artifactId>slf4j-simple</artifactId>
|
||||||
<version>2.3.3</version>
|
<version>1.7.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
@@ -175,11 +172,6 @@
|
|||||||
<version>6.6.0</version>
|
<version>6.6.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.google.code.gson</groupId>
|
|
||||||
<artifactId>gson</artifactId>
|
|
||||||
<version>2.2.2</version>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<profiles>
|
<profiles>
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import javax.ejb.Stateless;
|
|||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.commons.lang.SystemUtils;
|
import org.apache.commons.lang.SystemUtils;
|
||||||
|
import org.jsoup.Jsoup;
|
||||||
|
import org.jsoup.nodes.Document;
|
||||||
|
|
||||||
import com.commafeed.model.Feed;
|
import com.commafeed.model.Feed;
|
||||||
import com.commafeed.model.FeedEntry;
|
import com.commafeed.model.FeedEntry;
|
||||||
@@ -65,6 +67,13 @@ public class FeedParser {
|
|||||||
}
|
}
|
||||||
}), SystemUtils.LINE_SEPARATOR);
|
}), SystemUtils.LINE_SEPARATOR);
|
||||||
}
|
}
|
||||||
|
content = handleContent(content);
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String handleContent(String content) {
|
||||||
|
Document doc = Jsoup.parse(content);
|
||||||
|
doc.select("a").attr("target", "_blank");
|
||||||
|
return doc.outerHtml();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.ObjectUtils;
|
||||||
import org.apache.wicket.request.mapper.parameter.PageParameters;
|
import org.apache.wicket.request.mapper.parameter.PageParameters;
|
||||||
|
|
||||||
import com.commafeed.backend.dao.FeedCategoryService;
|
import com.commafeed.backend.dao.FeedCategoryService;
|
||||||
@@ -78,7 +79,7 @@ public class FeedEntriesREST extends JSONPage {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int compare(Entry e1, Entry e2) {
|
public int compare(Entry e1, Entry e2) {
|
||||||
return e2.getDate().compareTo(e1.getDate());
|
return ObjectUtils.compare(e2.getDate(), e1.getDate());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return entries;
|
return entries;
|
||||||
|
|||||||
Reference in New Issue
Block a user