From cd63c6f09a2e04c33ccc32085c02d621f0429828 Mon Sep 17 00:00:00 2001 From: endorphant Date: Fri, 20 May 2016 00:06:21 -0400 Subject: [PATCH] started nopub feature core file loading now checks files against a list of nopubs, stored in .ttbp/config/nopub --- bin/core.py | 12 ++++++++++-- bin/ttbp.py | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/bin/core.py b/bin/core.py index d85a239..9079b44 100644 --- a/bin/core.py +++ b/bin/core.py @@ -17,6 +17,7 @@ WWW = os.path.join(PATH, "www") CONFIG = os.path.join(PATH, "config") DATA = os.path.join(PATH, "entries") FEED = os.path.join(SOURCE, "www", "index.html") +NOPUB = os.path.join(CONFIG, "nopub") HEADER = "" FOOTER = "" @@ -34,8 +35,16 @@ def load(): def load_files(): global FILES + exclude = [] + + if os.path.isfile(NOPUB): + for line in open(NOPUB, "r"): + exclude.append(line.rstrip()) + FILES = [] for filename in os.listdir(DATA): + if filename in exclude: + continue filename = os.path.join(DATA, filename) if os.path.isfile(filename) and valid(filename): FILES.append(filename) @@ -165,7 +174,7 @@ def valid(filename): # check if the filename is YYYYMMDD.txt filesplit = os.path.splitext(os.path.basename(filename)) - + if filesplit[1] != ".txt": return False @@ -202,7 +211,6 @@ def write_global_feed(blogList):

 

live feels-sharing:

-

(time not exactly to scale)