|
@ -4,13 +4,14 @@ |
|
|
from pelican import signals |
|
|
from pelican import signals |
|
|
from os import listdir |
|
|
from os import listdir |
|
|
from os.path import isfile, join |
|
|
from os.path import isfile, join |
|
|
|
|
|
# import os |
|
|
|
|
|
|
|
|
def getStream(page): |
|
|
def getStream(generator): |
|
|
dir = 'content/stream' |
|
|
for page in generator.pages: |
|
|
|
|
|
dir = "/var/www/stream" |
|
|
images = [f for f in listdir(dir) if isfile(join(dir, f))] |
|
|
images = [f for f in listdir(dir) if isfile(join(dir, f))] |
|
|
print('>>> The stream is streaming!', images) |
|
|
print('>>> The stream is streaming!', images) |
|
|
page.stream = 'jaja' |
|
|
page.stream = images |
|
|
|
|
|
|
|
|
def register(): |
|
|
def register(): |
|
|
signals.page_generator_finalized.connect(getStream) |
|
|
signals.page_generator_finalized.connect(getStream) |
|
|
# signals.article_generator_finalized.connect(getStream) |
|
|
|
|
|