-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add title
option to feed generation
#13
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for your contribution! Just a few comments and questions to make sure I understand everything, but this looks great!
|
||
image_tag = "" | ||
|
||
if sub['image'] is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will KeyError
if the image key doesn't work, can you switch to sub.get('image')
?
%s | ||
<link href="%s" /> | ||
""" % (datetime.datetime.now(), | ||
sub['title'] or sub['name'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to use sub.get('title') here too, to avoid KeyError
if the user has not defined a title.
image_tag = "" | ||
|
||
if sub['image'] is not None: | ||
image_url = "/".join([sub["url_root"], sub["name"], sub["image"]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to fetch this image at some point right? Am I missing something?
for t in items: | ||
if t[1] not in unique_ids or unique_ids[t[1]]['timestamp'] < t[0]: | ||
unique_ids[t[1]] = { "timestamp": t[0], "xml": t[2] } | ||
|
||
for i in unique_ids: | ||
xml += unique_ids[i]['xml'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain what issue you're solving here?
75edd85
to
45cba06
Compare
No description provided.