mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
fix opml export not showing head and title
This commit is contained in:
@@ -27,7 +27,7 @@ public class OPMLExporter {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public Opml export(User user) {
|
public Opml export(User user) {
|
||||||
Opml opml = new Opml();
|
Opml opml = new Opml();
|
||||||
opml.setFeedType("opml_1.0");
|
opml.setFeedType("opml_1.1");
|
||||||
opml.setTitle(String.format("%s subscriptions in CommaFeed",
|
opml.setTitle(String.format("%s subscriptions in CommaFeed",
|
||||||
user.getName()));
|
user.getName()));
|
||||||
opml.setCreated(Calendar.getInstance().getTime());
|
opml.setCreated(Calendar.getInstance().getTime());
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.commafeed.backend.rome;
|
||||||
|
|
||||||
|
import org.jdom.Element;
|
||||||
|
|
||||||
|
import com.sun.syndication.feed.opml.Opml;
|
||||||
|
|
||||||
|
public class OPML11Generator extends
|
||||||
|
com.sun.syndication.io.impl.OPML10Generator {
|
||||||
|
|
||||||
|
public OPML11Generator() {
|
||||||
|
super("opml_1.1");
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Element generateHead(Opml opml) {
|
||||||
|
Element head = new Element("head");
|
||||||
|
addNotNullSimpleElement(head, "title", opml.getTitle());
|
||||||
|
return head;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,3 +4,5 @@ WireFeedParser.classes= com.commafeed.backend.rome.OPML11Parser \
|
|||||||
|
|
||||||
|
|
||||||
Converter.classes= com.commafeed.backend.rome.RSS090DescriptionConverter
|
Converter.classes= com.commafeed.backend.rome.RSS090DescriptionConverter
|
||||||
|
|
||||||
|
WireFeedGenerator.classes= com.commafeed.backend.rome.OPML11Generator
|
||||||
Reference in New Issue
Block a user