Browse Source

work in progress on the stream plugin!

master
mb@mb 6 years ago
parent
commit
3a7fc865af
  1. 1
      stream/__init__.py
  2. BIN
      stream/__init__.pyc
  3. 16
      stream/stream.py
  4. BIN
      stream/stream.pyc

1
stream/__init__.py

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

BIN
stream/__init__.pyc

Binary file not shown.

16
stream/stream.py

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

BIN
stream/stream.pyc

Binary file not shown.
Loading…
Cancel
Save