pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/www/py-blosxom
Module Name: pkgsrc
Committed By: hauke
Date: Tue May 7 14:26:06 UTC 2019
Modified Files:
pkgsrc/www/py-blosxom: Makefile distinfo
pkgsrc/www/py-blosxom/patches: patch-Pyblosxom_plugins_readmore.py
Log Message:
Make sure the readmore plugin produces valid html - browsers are not
as tolerant as they used to be.
The current version does not yet support python3, so mandate 2.7.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 pkgsrc/www/py-blosxom/Makefile
cvs rdiff -u -r1.9 -r1.10 pkgsrc/www/py-blosxom/distinfo
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/www/py-blosxom/patches/patch-Pyblosxom_plugins_readmore.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/www/py-blosxom/Makefile
diff -u pkgsrc/www/py-blosxom/Makefile:1.24 pkgsrc/www/py-blosxom/Makefile:1.25
--- pkgsrc/www/py-blosxom/Makefile:1.24 Fri Apr 26 13:14:20 2019
+++ pkgsrc/www/py-blosxom/Makefile Tue May 7 14:26:06 2019
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.24 2019/04/26 13:14:20 maya Exp $
+# $NetBSD: Makefile,v 1.25 2019/05/07 14:26:06 hauke Exp $
PYBLOXSOMVERS= 1.5.3
DISTNAME= pyblosxom-${PYBLOXSOMVERS}
PKGNAME= ${PYPKGPREFIX}-blosxom-${PYBLOXSOMVERS}
-PKGREVISION= 2
+PKGREVISION= 3
CATEGORIES= www
MASTER_SITES= http://pyblosxom.github.com/download/
@@ -23,11 +23,11 @@ DOCFILES= AUTHORS INSTALL LICENSE
BUILD_DEPENDS+= ${PYPKGPREFIX}-docutils>=0.12:../../textproc/py-docutils
-INSTALLATION_DIRS= ${DOC_SUBDIR}
+INSTALLATION_DIRS= ${DOC_SUBDIR}
-REPLACE_PYTHON= Pyblosxom/data/pyblosxom.cgi
+REPLACE_PYTHON= Pyblosxom/data/pyblosxom.cgi
-PYTHON_VERSIONS_INCOMPATIBLE= 36 37
+PYTHON_VERSIONS_ACCEPTED= 27
pre-configure:
cd ${WRKSRC} && ${FIND} Pyblosxom -type f -name '*.orig' \
Index: pkgsrc/www/py-blosxom/distinfo
diff -u pkgsrc/www/py-blosxom/distinfo:1.9 pkgsrc/www/py-blosxom/distinfo:1.10
--- pkgsrc/www/py-blosxom/distinfo:1.9 Wed Nov 4 02:47:24 2015
+++ pkgsrc/www/py-blosxom/distinfo Tue May 7 14:26:06 2019
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.9 2015/11/04 02:47:24 agc Exp $
+$NetBSD: distinfo,v 1.10 2019/05/07 14:26:06 hauke Exp $
SHA1 (pyblosxom-1.5.3/pyblosxom-1.5.3.tar.gz) = 62c7b178a5aa3a9df660bf6c357e0336ff473b9d
RMD160 (pyblosxom-1.5.3/pyblosxom-1.5.3.tar.gz) = fcf6be7c8d9c9fa1ec4e59d34b11afe173ced382
SHA512 (pyblosxom-1.5.3/pyblosxom-1.5.3.tar.gz) = d7829cc5fbcf7a277087bc3cd372bf7ad9f3c98429642d1304047b2b3a80473180c9a7694f9c691b57aa858a2f067a5e8fd07c2935c93861cb41ea851c107e26
Size (pyblosxom-1.5.3/pyblosxom-1.5.3.tar.gz) = 210669 bytes
-SHA1 (patch-Pyblosxom_plugins_readmore.py) = e699b9b9193c540e88727cf297e6e52d59fe1fc9
+SHA1 (patch-Pyblosxom_plugins_readmore.py) = 768a7fa63e11cd971668ee4a493eb968395e7ce5
Index: pkgsrc/www/py-blosxom/patches/patch-Pyblosxom_plugins_readmore.py
diff -u pkgsrc/www/py-blosxom/patches/patch-Pyblosxom_plugins_readmore.py:1.1 pkgsrc/www/py-blosxom/patches/patch-Pyblosxom_plugins_readmore.py:1.2
--- pkgsrc/www/py-blosxom/patches/patch-Pyblosxom_plugins_readmore.py:1.1 Fri May 22 14:01:16 2015
+++ pkgsrc/www/py-blosxom/patches/patch-Pyblosxom_plugins_readmore.py Tue May 7 14:26:06 2019
@@ -1,10 +1,30 @@
-$NetBSD: patch-Pyblosxom_plugins_readmore.py,v 1.1 2015/05/22 14:01:16 hauke Exp $
+$NetBSD: patch-Pyblosxom_plugins_readmore.py,v 1.2 2019/05/07 14:26:06 hauke Exp $
+
+Try to make sure the truncated text is valid HTML
Use the current flavour before the default one, if available.
--- Pyblosxom/plugins/readmore.py.orig 2013-07-31 00:53:58.000000000 +0000
+++ Pyblosxom/plugins/readmore.py
-@@ -209,7 +209,11 @@ def cb_story(args):
+@@ -194,8 +194,15 @@ def cb_story(args):
+ breakpoint = config.get("readmore_breakpoint", READMORE_BREAKPOINT)
+ template = config.get("readmore_template", READMORE_TEMPLATE)
+
+- # check to see if the breakpoint is in the body.
+- match = re.search(breakpoint, entry["body"])
++ """
++ Check to see if the breakpoint is in the body.
++
++ Since it might have been wrapped in html tags by a markdown
++ plugin, grab everything from the end of breakpoint up to, but
++ excluding, either the first opening tag, or newline.
++ """
++ match = re.search('(' + breakpoint + ')(.*?)(<[ ]*?[^/].+|[\n])',
++ entry["body"])
+
+ # if not, return because we don't have to do anything
+ if not match:
+@@ -209,7 +216,11 @@ def cb_story(args):
# otherwise we replace the breakpoint with the template
base_url = config["base_url"]
file_path = entry["file_path"]
@@ -17,3 +37,9 @@ Use the current flavour before the defau
url = '%s/%s.%s' % (base_url, file_path, flavour)
link = (template % {"url": url,
+@@ -218,4 +229,4 @@ def cb_story(args):
+ "flavour": flavour})
+
+ entry["just_summary"] = 1
+- entry["body"] = entry["body"][:match.start()] + link
++ entry["body"] = entry["body"][:match.start(1)] + link + str(match.group(2))
Home |
Main Index |
Thread Index |
Old Index