|
|
@ -66,7 +66,8 @@ def create_frontmatter(entry): |
|
|
|
'date': published.format(), |
|
|
|
'summary': '', |
|
|
|
'author': author, |
|
|
|
'original_link': entry.link |
|
|
|
'original_link': entry.link, |
|
|
|
'feed_name': entry['feed_name'] |
|
|
|
} |
|
|
|
|
|
|
|
return frontmatter |
|
|
@ -172,8 +173,8 @@ env = jinja2.Environment( |
|
|
|
loader=jinja2.FileSystemLoader(os.path.curdir) |
|
|
|
) |
|
|
|
|
|
|
|
#output_dir = os.environ.get('OUTPUT_DIR', '/home/r/Programming/lumbung.space/lumbung.space-web/content/posts/') |
|
|
|
output_dir = os.environ.get('OUTPUT_DIR', 'network/') |
|
|
|
output_dir = os.environ.get('OUTPUT_DIR', '/home/r/Programming/lumbung.space/lumbung.space-web/content/posts/') |
|
|
|
#output_dir = os.environ.get('OUTPUT_DIR', 'network/') |
|
|
|
|
|
|
|
if not os.path.exists(output_dir): |
|
|
|
os.makedirs(output_dir) |
|
|
@ -198,6 +199,7 @@ for feed_url in feed_urls: |
|
|
|
for entry in data.entries: |
|
|
|
# if 'tags' in entry: |
|
|
|
# print(entry.title, entry.tags) |
|
|
|
entry['feed_name'] = feed_name |
|
|
|
|
|
|
|
post_name = slugify(entry.title) |
|
|
|
post_dir = os.path.join(output_dir, feed_name, post_name) |
|
|
|