forked from ruangrupa/konfluks
Compare commits
3 Commits
9c824fcd3f
...
master
Author | SHA1 | Date | |
---|---|---|---|
b0f77831bd | |||
5ba944b6d1 | |||
ad591ea9cf |
@ -152,10 +152,13 @@ def parse_enclosures(post_dir, entry):
|
|||||||
#TODO handle the fact it could be multiple items
|
#TODO handle the fact it could be multiple items
|
||||||
|
|
||||||
for e in entry.enclosures:
|
for e in entry.enclosures:
|
||||||
|
if "type" in e:
|
||||||
print("found enclosed media", e.type)
|
print("found enclosed media", e.type)
|
||||||
if "image/" in e.type:
|
if "image/" in e.type:
|
||||||
featured_image = grab_media(post_dir, e.href)
|
featured_image = grab_media(post_dir, e.href)
|
||||||
entry["featured_image"] = featured_image
|
entry["featured_image"] = featured_image
|
||||||
|
else:
|
||||||
|
print("FIXME:ignoring enclosed", e.type)
|
||||||
return entry
|
return entry
|
||||||
|
|
||||||
|
|
||||||
@ -267,6 +270,7 @@ def grab_feed(feed_url):
|
|||||||
print(e)
|
print(e)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if "status" in data:
|
||||||
print(data.status, feed_url)
|
print(data.status, feed_url)
|
||||||
if data.status == 200:
|
if data.status == 200:
|
||||||
# 304 means the feed has not been modified since we last checked
|
# 304 means the feed has not been modified since we last checked
|
||||||
|
@ -7,6 +7,7 @@ authors: {% if frontmatter.author %} ["{{ frontmatter.author }}"] {% endif %}
|
|||||||
original_link: "{{ frontmatter.original_link }}"
|
original_link: "{{ frontmatter.original_link }}"
|
||||||
feed_name: "{{ frontmatter.feed_name}}"
|
feed_name: "{{ frontmatter.feed_name}}"
|
||||||
categories: ["{{ frontmatter.card_type }}", "{{ frontmatter.feed_name}}"]
|
categories: ["{{ frontmatter.card_type }}", "{{ frontmatter.feed_name}}"]
|
||||||
|
contributors: ["{{ frontmatter.feed_name}}"]
|
||||||
tags: {{ frontmatter.tags }}
|
tags: {{ frontmatter.tags }}
|
||||||
{% if frontmatter.featured_image %}featured_image: "{{frontmatter.featured_image}}"{% endif %}
|
{% if frontmatter.featured_image %}featured_image: "{{frontmatter.featured_image}}"{% endif %}
|
||||||
---
|
---
|
||||||
|
@ -2,11 +2,12 @@
|
|||||||
date: {{ post_metadata.created_at }} #2021-06-10T10:46:33+02:00
|
date: {{ post_metadata.created_at }} #2021-06-10T10:46:33+02:00
|
||||||
draft: false
|
draft: false
|
||||||
authors: ["{{ post_metadata.account.display_name }}"]
|
authors: ["{{ post_metadata.account.display_name }}"]
|
||||||
|
contributors: ["{{ post_metadata.account.acct}}"]
|
||||||
avatar: {{ post_metadata.account.avatar }}
|
avatar: {{ post_metadata.account.avatar }}
|
||||||
categories: ["shouts"]
|
categories: ["shouts"]
|
||||||
images: [{% for i in post_metadata.media_attachments %} {{ i.url }}, {% endfor %}]
|
images: [{% for i in post_metadata.media_attachments %} {{ i.url }}, {% endfor %}]
|
||||||
title: {{ post_metadata.account.display_name }}
|
title: {{ post_metadata.account.display_name }}
|
||||||
tags: [{% for i in post_metadata.tags %} {{ i.name }} {% endfor %}]
|
tags: [{% for i in post_metadata.tags %} "{{ i.name }}", {% endfor %}]
|
||||||
---
|
---
|
||||||
|
|
||||||
{% for item in post_metadata.media_attachments %}
|
{% for item in post_metadata.media_attachments %}
|
||||||
|
@ -6,6 +6,7 @@ uuid: "{{v.uuid}}"
|
|||||||
video_duration: "{{ v.duration | duration }} "
|
video_duration: "{{ v.duration | duration }} "
|
||||||
video_channel: "{{ v.channel.display_name }}"
|
video_channel: "{{ v.channel.display_name }}"
|
||||||
channel_url: "{{ v.channel.url }}"
|
channel_url: "{{ v.channel.url }}"
|
||||||
|
contributors: ["{{ v.account.display_name }}"]
|
||||||
preview_image: "{{ preview_image }}"
|
preview_image: "{{ preview_image }}"
|
||||||
images: ["./{{ preview_image }}"]
|
images: ["./{{ preview_image }}"]
|
||||||
categories: ["tv","{{ v.channel.display_name }}"]
|
categories: ["tv","{{ v.channel.display_name }}"]
|
||||||
|
Reference in New Issue
Block a user