Browse Source

added the missing line (loop through pages) that makes the stream plugin work

master
mb @ ts 3 years ago
parent
commit
5364009530
1 changed files with 7 additions and 6 deletions
  1. +7
    -6
      stream/stream.py

+ 7
- 6
stream/stream.py View File

@ -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)

Loading…
Cancel
Save