Skip to content
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

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

tarkus
Copy link

@tarkus tarkus commented Jun 16, 2022

No description provided.

Copy link
Owner

@nbr23 nbr23 left a 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:
Copy link
Owner

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'],
Copy link
Owner

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"]])
Copy link
Owner

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?

Comment on lines +251 to +256
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']
Copy link
Owner

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?

@nbr23 nbr23 force-pushed the master branch 2 times, most recently from 75edd85 to 45cba06 Compare November 11, 2022 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants