summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gemfeed.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/gemfeed.py b/gemfeed.py
index b5b1d52..404cccd 100644
--- a/gemfeed.py
+++ b/gemfeed.py
@@ -102,6 +102,11 @@ def build_feed(directory, base_url, output="atom.xml", n=10, title="",
if not title:
title = get_feed_title(directory)
+ # Let user know feed title and URL
+ feed_url = urljoin(base_url, output)
+ if verbose:
+ print('Generating feed "{}", which should be served from {}'.format(title, feed_url))
+
# Setup feed
feed = FeedGenerator()
feed.id(base_url)
@@ -115,8 +120,8 @@ def build_feed(directory, base_url, output="atom.xml", n=10, title="",
author_details["email"] = email
if author_details:
feed.author(author_details)
+ feed.link(href=feed_url, rel='self')
feed.link(href=base_url, rel='alternate')
- feed.link(href=urljoin(base_url, output), rel='self')
# Add one entry per .gmi file
files = find_files(directory, n)