Browse Source

slight tweaks & reqs file

pull/1/head
rra 3 years ago
parent
commit
49e2247776
  1. 2
      index_template.md
  2. 12
      requirements.txt
  3. 5
      video-feed.py

2
index_template.md

@ -7,7 +7,7 @@ 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 }}"
preview_image: "{{ preview_image }}" preview_image: "{{ preview_image }}"
category: "tv" category: ["tv","{{ v.channel.display_name }}""]
--- ---

12
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

5
video-feed.py

@ -35,7 +35,6 @@ env = jinja2.Environment(
) )
env.filters['duration'] = duration env.filters['duration'] = duration
env.filters['linebreaks'] = linebreaks env.filters['linebreaks'] = linebreaks
env.filters['slugify'] = slugify
host = 'https://tv.lumbung.space' host = 'https://tv.lumbung.space'
@ -47,7 +46,7 @@ client = peertube.ApiClient(configuration)
v = peertube.VideoApi(client) 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 = response.to_dict()
videos = videos['data'] 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): if not os.path.exists(output_dir):
os.mkdir(output_dir) os.mkdir(output_dir)

Loading…
Cancel
Save