aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/web/templates/opml.xml2
-rw-r--r--src/web/views/views.py5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/web/templates/opml.xml b/src/web/templates/opml.xml
index 051d3af6..c6ebc251 100644
--- a/src/web/templates/opml.xml
+++ b/src/web/templates/opml.xml
@@ -9,6 +9,6 @@
<ownerEmail>{{ user.email }}</ownerEmail>
</head>
<body>
- {% for feed in user.feeds %} <outline title="{{ feed.title|escape }}" text="{{ feed.title|escape }}" description="{{ feed.description|escape }}" xmlUrl="{{ feed.link|escape }}" htmlUrl="{{ feed.site_link|escape }}" />
+ {% for feed in user.feeds %} <outline title="{{ feed.title|escape }}" text="{{ feed.title|escape }}" description="{{ feed.description|escape }}" category="{% if feed.category_id != None %}/{{ categories[feed.category_id].name }}{% endif %}" xmlUrl="{{ feed.link|escape }}" htmlUrl="{{ feed.site_link|escape }}" />
{% endfor %}</body>
</opml>
diff --git a/src/web/views/views.py b/src/web/views/views.py
index 84f2be5f..a4631d7d 100644
--- a/src/web/views/views.py
+++ b/src/web/views/views.py
@@ -412,8 +412,11 @@ def export_opml():
Export all feeds to OPML.
"""
user = UserController(g.user.id).get(id=g.user.id)
+ categories = {cat.id: cat.dump()
+ for cat in CategoryController(g.user.id).read()}
response = make_response(render_template('opml.xml', user=user,
- now=datetime.datetime.now()))
+ categories=categories,
+ now=datetime.datetime.now()))
response.headers['Content-Type'] = 'application/xml'
response.headers['Content-Disposition'] = 'attachment; filename=feeds.opml'
return response
bgstack15