work in progress on the stream plugin!
This commit is contained in:
parent
abb64b784e
commit
3a7fc865af
1
stream/__init__.py
Normal file
1
stream/__init__.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
from .stream import *
|
Binary file not shown.
16
stream/stream.py
Normal file
16
stream/stream.py
Normal 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.
Loading…
Reference in New Issue
Block a user