diff --git a/streams-feed.py b/streams-feed.py deleted file mode 100644 index 08e2f6b..0000000 --- a/streams-feed.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/python3 - -#lumbung.space video feed generator -#c 2021 roel roscam abbing gpvl3 etc - -import peertube -import jinja2 -import json -import os -import datetime - - -def duration(n): - """ - convert '6655' in '1:50:55' - - """ - return str(datetime.timedelta(seconds = n)) - -#def base64ify(url): - #download url to object - #run base64 lib on object - #format a data: string - #return base64string - -def linebreaks(text): - if not text: - return text - else: - import re - br = re.compile(r"(\r\n|\r|\n)") - return br.sub(r"
\n", text) - - - -env = jinja2.Environment( - loader=jinja2.FileSystemLoader(os.path.curdir) - ) -env.filters['duration'] = duration -env.filters['linebreaks'] = linebreaks - -host = 'https://tv.lumbung.space' - -configuration = peertube.Configuration( - host = host+"/api/v1" -) - -client = peertube.ApiClient(configuration) - -v = peertube.VideoApi(client) - -response = v.videos_get(count=6, filter='local')#, tags_one_of='publish') - -videos = response.to_dict() -videos = videos['data'] - -template = env.get_template('video-feed.html') - -html = template.render(videos=videos, host=host) - -with open('video-feed-prototype.html','w') as f: - f.write(html) - print(html) - diff --git a/video-feed-prototype.html b/video-feed-prototype.html deleted file mode 100644 index c4cac22..0000000 --- a/video-feed-prototype.html +++ /dev/null @@ -1,406 +0,0 @@ - - - - - - - lumbung.space video archive prototype - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- - -
- - 1:06:35 - -
-
-
-
- -
- -
- -
-
- - -
- - 0:14:39 - -
-
-
-
- -
- -
- -
-
- - -
- - 0:11:55 - -
-
-
-
- -
- -
- -
-
- - -
- - 1:31:07 - -
-
-
-
- -
- -
- -
-
- - -
- - 1:24:29 - -
-
-
-
- -
- -
- -
-
- - -
- - 1:42:16 - -
-
-
-
- -
- -
- -
- - - - \ No newline at end of file