From 3a7fc865afdb674fe913fa9dcae783762e79ba0f Mon Sep 17 00:00:00 2001 From: "mb@mb" Date: Tue, 6 Mar 2018 21:41:20 +0100 Subject: [PATCH] work in progress on the stream plugin! --- stream/__init__.py | 1 + stream/__init__.pyc | Bin 206 -> 0 bytes stream/stream.py | 16 ++++++++++++++++ stream/stream.pyc | Bin 1057 -> 0 bytes 4 files changed, 17 insertions(+) create mode 100644 stream/__init__.py delete mode 100644 stream/__init__.pyc create mode 100644 stream/stream.py delete mode 100644 stream/stream.pyc diff --git a/stream/__init__.py b/stream/__init__.py new file mode 100644 index 0000000..ed2c9d4 --- /dev/null +++ b/stream/__init__.py @@ -0,0 +1 @@ +from .stream import * diff --git a/stream/__init__.pyc b/stream/__init__.pyc deleted file mode 100644 index 32f77a6f3f03df926d4b14da7470391aa46ffe2c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 206 zcmYL@O$x$5427pHhzNR)BG_C&iVN2+)Rmi|KS2jNGi8#oxbz@i!OM98Qz{tpzPx1d zNcLGSp6}PCQNK!M?nJZ_w9<*{lsdPmI^~(1Od`lf@QC$c@-y+o0V|t}Q-9D=R=9bK zU~Aa>CR%h%;2jSbdJJ%{f~h7J1J-01q3`0=INCIk*jt#AL2Kg-YhCmYo=fc3`Zji0 Jj*pN?eE|R;Fg^eP diff --git a/stream/stream.py b/stream/stream.py new file mode 100644 index 0000000..978d283 --- /dev/null +++ b/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) diff --git a/stream/stream.pyc b/stream/stream.pyc deleted file mode 100644 index c247a3b504362e400f86ade188baf958513ff38d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1057 zcmcgq&5qMB5FY2Jf7*o=LI`f%TP`#gxFLkZN^q)BiUbORDoxzfD?7>BQx;HrT3&;P z;1zf!9sp*XY8M^=qImq-^W*tuCj5Ck`TpZuUc%uEXn#h_y(Ll6FF*t2Jq|z%FahKN z2-bz5LogBK5ttbAxWA1+55No|AJRF7ujD?0YT&_`11^#w1y{f5nwf~m9hzE zfCDygYo#Sd1kYR5+*mqQH-&a3yT-KG`#CLVNPJqujvN5a-oJyr;P+mW_TmM$Xz8B@xxE6`ixgf7=xt@~rb zE;uGp%SPG)TkC7YQHTq*MOmUrE`1dZM^ESsUbt6;(oJh*YF6o4TW$>{=2A-VQrb@1 z^kZRF(aYJTTseg@?ew-*jeA&b9k%8`