summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps/pyblosxom-plugins/files/wbglast10summary.py')
-rw-r--r--www-apps/pyblosxom-plugins/files/wbglast10summary.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/www-apps/pyblosxom-plugins/files/wbglast10summary.py b/www-apps/pyblosxom-plugins/files/wbglast10summary.py
deleted file mode 100644
index cf086f9..0000000
--- a/www-apps/pyblosxom-plugins/files/wbglast10summary.py
+++ /dev/null
@@ -1,37 +0,0 @@
-"""
-Thrown-together plugin to summarize all entries after the first five
-in the html flavour.
-
-This uses the summary template. So make sure to build a summary template
-file. Also, you should probably fiddle with the values in this plugin to
-get it to meet your special needs.
-
-This code is placed in the public domain. Do with it as you will.
-"""
-
-__author__ = "Will Guaraldi - willg at bluesock dot org"
-__version__ = "1.0"
-__url__ = "http://www.bluesock.org/~willg/pyblosxom/"
-__description__ = "Summarizes old posts."
-
-
-def cb_prepare(args):
- request = args["request"]
- data = request.getData()
-
- flavour = data.get("flavour", "html")
-
- # we don't want to do anything if the flavour isn't html
- if not flavour in ["html"]:
- return
-
- # grab the entry list
- entry_list = data["entry_list"]
-
- # for all the entries after the 5th one, we set the template_name
- # to summary.
- i = 5
- while i < len(entry_list):
- if entry_list[i].get("template_name", "story") == "story":
- entry_list[i]["template_name"] = "summary"
- i = i + 1