work in progress on the stream plugin!

This commit is contained in:
mb@mb 2018-03-06 21:41:20 +01:00
parent abb64b784e
commit 3a7fc865af
4 changed files with 17 additions and 0 deletions

1
stream/__init__.py Normal file
View File

@ -0,0 +1 @@
from .stream import *

Binary file not shown.

16
stream/stream.py Normal file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from pelican import signals
from os import listdir
from os.path import isfile, join
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 register():
signals.page_generator_finalized.connect(getStream)
# signals.article_generator_finalized.connect(getStream)

Binary file not shown.