|
|
@ -4,13 +4,14 @@ |
|
|
|
from pelican import signals |
|
|
|
from os import listdir |
|
|
|
from os.path import isfile, join |
|
|
|
# import os |
|
|
|
|
|
|
|
def getStream(page): |
|
|
|
dir = 'content/stream' |
|
|
|
images = [f for f in listdir(dir) if isfile(join(dir, f))] |
|
|
|
print('>>> The stream is streaming!', images) |
|
|
|
page.stream = 'jaja' |
|
|
|
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) |
|
|
|
# signals.article_generator_finalized.connect(getStream) |
|
|
|