You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
430 B
17 lines
430 B
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*- #
|
|
|
|
from pelican import signals
|
|
from os import listdir
|
|
from os.path import isfile, join
|
|
# import os
|
|
|
|
def getStream(generator):
|
|
for page in generator.pages:
|
|
dir = "/var/www/stream"
|
|
images = [f for f in listdir(dir) if isfile(join(dir, f))]
|
|
print('>>> The stream is streaming!', images)
|
|
page.stream = images
|
|
|
|
def register():
|
|
signals.page_generator_finalized.connect(getStream)
|
|
|