Skip to content

Commit ff7ac28

Browse files
authored
Merge pull request #301 from apache/sebb-asfdata-fixes
Copy fixes from infrastructure-pelican
2 parents 6494ee2 + ed04414 commit ff7ac28

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pelican/plugins/asfdata.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,11 @@ def process_sequence(metadata, seq, sequence, load, debug):
349349
# determine the project or podling logo
350350
reference = add_logo(reference, sequence['logo'])
351351
if seq == 'featured_pods':
352-
# for podlings strip "Apache" from the beginning and "(incubating)" from the end.
352+
# for podlings strip "Apache " from the beginning and " (Incubating)" from the end.
353353
# this is Sally's request
354+
# It mainly applies to data fetched from https://projects.apache.org/json/foundation/podlings.json
354355
for item in reference:
355-
setattr(item, 'name', ' '.join(item.name.split(' ')[1:-1]))
356+
setattr(item, 'name', item.name.replace('Apache ', '').replace(' (Incubating)', ''))
356357
else:
357358
print(f'{seq} - logo requires an existing sequence')
358359

@@ -587,6 +588,7 @@ def process_blog(feed, count, words, debug):
587588
{
588589
'id': get_element_text(entry, 'id'),
589590
'title': get_element_text(entry, 'title'),
591+
'date': get_element_text(entry, 'published'),
590592
'content': content_text
591593
}
592594
)
@@ -596,6 +598,7 @@ def process_blog(feed, count, words, debug):
596598

597599
return [ Blog(href=s['id'],
598600
title=s['title'],
601+
date=s['date'],
599602
content=s['content'])
600603
for s in v]
601604

0 commit comments

Comments
 (0)