|
@ -61,13 +61,20 @@ def create_frontmatter(entry): |
|
|
else: |
|
|
else: |
|
|
author = '' |
|
|
author = '' |
|
|
|
|
|
|
|
|
|
|
|
if 'tags' in entry: |
|
|
|
|
|
#TODO finish categories |
|
|
|
|
|
tags = [] |
|
|
|
|
|
for t in entry.tags: |
|
|
|
|
|
tags.append(t['term']) |
|
|
|
|
|
|
|
|
frontmatter = { |
|
|
frontmatter = { |
|
|
'title':entry.title, |
|
|
'title':entry.title, |
|
|
'date': published.format(), |
|
|
'date': published.format(), |
|
|
'summary': '', |
|
|
'summary': '', |
|
|
'author': author, |
|
|
'author': author, |
|
|
'original_link': entry.link, |
|
|
'original_link': entry.link, |
|
|
'feed_name': entry['feed_name'] |
|
|
'feed_name': entry['feed_name'], |
|
|
|
|
|
'tags': str(tags) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return frontmatter |
|
|
return frontmatter |
|
@ -198,7 +205,10 @@ for feed_url in feed_urls: |
|
|
if data: |
|
|
if data: |
|
|
for entry in data.entries: |
|
|
for entry in data.entries: |
|
|
# if 'tags' in entry: |
|
|
# if 'tags' in entry: |
|
|
# print(entry.title, entry.tags) |
|
|
# for tag in entry.tags: |
|
|
|
|
|
# for x in ['lumbung.space', 'D15', 'lumbung']: |
|
|
|
|
|
# if x in tag['term']: |
|
|
|
|
|
# print(entry.title) |
|
|
entry['feed_name'] = feed_name |
|
|
entry['feed_name'] = feed_name |
|
|
|
|
|
|
|
|
post_name = slugify(entry.title) |
|
|
post_name = slugify(entry.title) |
|
|