From 49e2247776bb76855fe5431c9b93bba8bd4ff90c Mon Sep 17 00:00:00 2001 From: rra Date: Fri, 9 Jul 2021 11:17:35 +0200 Subject: [PATCH] slight tweaks & reqs file --- index_template.md | 2 +- requirements.txt | 12 ++++++++++++ video-feed.py | 5 ++--- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 requirements.txt diff --git a/index_template.md b/index_template.md index d8678a3..0394304 100644 --- a/index_template.md +++ b/index_template.md @@ -7,7 +7,7 @@ video_duration: "{{ v.duration | duration }} " video_channel: "{{ v.channel.display_name }}" channel_url: "{{ v.channel.url }}" preview_image: "{{ preview_image }}" -category: "tv" +category: ["tv","{{ v.channel.display_name }}""] --- diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..b8296e3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,12 @@ +# Automatically generated by https://github.com/damnever/pigar. + +# video_feed/streams-feed.py: 7 +# video_feed/video-feed.py: 7 +Jinja2 == 2.10 + +# video_feed/streams-feed.py: 6 +# video_feed/video-feed.py: 6 +peertube == 1.0.0 + +# video_feed/video-feed.py: 12 +requests == 2.21.0 diff --git a/video-feed.py b/video-feed.py index 363f01c..ca77984 100644 --- a/video-feed.py +++ b/video-feed.py @@ -35,7 +35,6 @@ env = jinja2.Environment( ) env.filters['duration'] = duration env.filters['linebreaks'] = linebreaks -env.filters['slugify'] = slugify host = 'https://tv.lumbung.space' @@ -47,7 +46,7 @@ client = peertube.ApiClient(configuration) v = peertube.VideoApi(client) -response = v.videos_get(count=1000, filter='local', tags_one_of='publish') +response = v.videos_get(count=100, filter='local', tags_one_of='publish') videos = response.to_dict() videos = videos['data'] @@ -84,7 +83,7 @@ def create_post(post_directory, video_metadata): -output_dir = '/home/r/Programming/lumbung.space/ssg_experiment/content/video' +output_dir = '/home/r/Programming/lumbung.space/lumbung.space-web/content/video' if not os.path.exists(output_dir): os.mkdir(output_dir)