diff options
author | Solderpunk <solderpunk@sdf.org> | 2020-03-17 21:05:30 +0100 |
---|---|---|
committer | Solderpunk <solderpunk@sdf.org> | 2020-03-17 21:05:30 +0100 |
commit | 352de60a163a04a0c7e6015b7b7a9180ef43b408 (patch) | |
tree | fd26db94b9a5f4767ec7be29bcbae23a7bbd2ce9 | |
parent | a033b7364017c28ce930c50ffbff09656fa1ebb4 (diff) |
Advise user of feed title and URL when run interactively.
-rw-r--r-- | gemfeed.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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) |