summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-Jie Lin <livibetter@gmail.com>2013-08-12 12:11:07 +0800
committerYu-Jie Lin <livibetter@gmail.com>2013-08-12 12:11:07 +0800
commit3ccc710d62d154cbb75782487cf533b5f4ddf3ae (patch)
treef47be57528fb65c536c8bea618fc9da713407c1f
parent9cbb19a3e9cba68b474221ea575f9bd410548be5 (diff)
downloadsmartypants-3ccc710d62d154cbb75782487cf533b5f4ddf3ae.tar.gz
deprecate Pyblosxom support
Since no one is going to main the Pyblosxom part of code, it's best for retirement for that. Futuremore, smartypants.py should keep generic rather than binding with specific softwares. It should be very easy to wrap smartypants.py and make a new plugin. The support will be removed at Version 2.0.0
-rw-r--r--CHANGES.rst22
-rw-r--r--README.rst89
-rwxr-xr-xsmartypants.py12
3 files changed, 39 insertions, 84 deletions
diff --git a/CHANGES.rst b/CHANGES.rst
index ab461c6..16a5966 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,6 +1,28 @@
CHANGES
=======
+Versions without timestamps mean they are future releases.
+
+2.0.0:
+ - drop Pyblosxom support
+
+1.7.0:
+ - deprecate Pyblosxom support
+ - add Python 3 support
+ - add unittest and checks
+
+----
+
+The following releases were made by Hao Lian:
+
+1.6.0.3: 2009-04-21
+
+1.6.0.2: 2008-12-20
+
+----
+
+The following releases were made by Chad Miller:
+
1.5_1.7: Fri, 09 Aug 2013 07:34:16 -0400
- Add HBS language translation. Patch by by Vera Djuraskovic from
Webhostinggeeks.com
diff --git a/README.rst b/README.rst
index 51e7a22..eacc396 100644
--- a/README.rst
+++ b/README.rst
@@ -2,28 +2,15 @@
smartypants.py
==============
-----------------------------
-SmartyPants ported to Python
-----------------------------
-
-Ported by `Chad Miller`_
-Copyright (c) 2004, 2007 Chad Miller
-
-original `SmartyPants`_ by `John Gruber`_
-Copyright (c) 2003 John Gruber
-
-
Synopsis
========
-A smart-quotes plugin for Pyblosxom_.
-
The priginal "SmartyPants" is a free web publishing plug-in for Movable Type,
Blosxom, and BBEdit that easily translates plain ASCII punctuation characters
into "smart" typographic punctuation HTML entities.
This software, *smartypants.py*, endeavours to be a functional port of
-SmartyPants to Python, for use with Pyblosxom_.
+SmartyPants to Python.
Description
@@ -77,9 +64,6 @@ foot and inch marks: 6'2" tall; a 17" iMac.
Options
=======
-For Pyblosxom users, the ``smartypants_attributes`` attribute is where you
-specify configuration options.
-
Numeric values are the easiest way to configure SmartyPants' behavior:
"0"
@@ -151,9 +135,6 @@ example, to educate normal quotes and em-dashes, but not ellipses or
regular quotes so SmartyPants can educate them, you should pass the
following to the smarty_pants attribute:
-The ``smartypants_forbidden_flavours`` list contains pyblosxom flavours for
-which no Smarty Pants rendering will occur.
-
Caveats
=======
@@ -253,70 +234,12 @@ testing of the original SmartyPants.
Copyright and License
=====================
-SmartyPants_ license::
-
- Copyright (c) 2003 John Gruber
- (http://daringfireball.net/)
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name "SmartyPants" nor the names of its contributors
- may be used to endorse or promote products derived from this
- software without specific prior written permission.
-
- This software is provided by the copyright holders and contributors "as
- is" and any express or implied warranties, including, but not limited
- to, the implied warranties of merchantability and fitness for a
- particular purpose are disclaimed. In no event shall the copyright
- owner or contributors be liable for any direct, indirect, incidental,
- special, exemplary, or consequential damages (including, but not
- limited to, procurement of substitute goods or services; loss of use,
- data, or profits; or business interruption) however caused and on any
- theory of liability, whether in contract, strict liability, or tort
- (including negligence or otherwise) arising in any way out of the use
- of this software, even if advised of the possibility of such damage.
-
-
-smartypants.py license::
-
- smartypants.py is a derivative work of SmartyPants.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are
- met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- This software is provided by the copyright holders and contributors "as
- is" and any express or implied warranties, including, but not limited
- to, the implied warranties of merchantability and fitness for a
- particular purpose are disclaimed. In no event shall the copyright
- owner or contributors be liable for any direct, indirect, incidental,
- special, exemplary, or consequential damages (including, but not
- limited to, procurement of substitute goods or services; loss of use,
- data, or profits; or business interruption) however caused and on any
- theory of liability, whether in contract, strict liability, or tort
- (including negligence or otherwise) arising in any way out of the use
- of this software, even if advised of the possibility of such damage.
-
+::
+ Copyright (c) 2013 Yu-Jie Lin
+ Copyright (c) 2004, 2005, 2007, 2013 Chad Miller
+ Copyright (c) 2003 John Gruber
+ Licensed under the BSD License, for detailed license information, see COPYING
.. _John Gruber: http://daringfireball.net/
.. _Chad Miller: http://web.chad.org/
diff --git a/smartypants.py b/smartypants.py
index a705d9b..78d7ac9 100755
--- a/smartypants.py
+++ b/smartypants.py
@@ -2,7 +2,7 @@
# Copyright (c) 2013 Yu-Jie Lin
# Copyright (c) 2004, 2005, 2007, 2013 Chad Miller
# Copyright (c) 2003 John Gruber
-# For detail license information, See COPYING
+# Licensed under the BSD License, for detailed license information, see COPYING
__author__ = 'Yu-Jie Lin'
__email__ = 'livibetter@gmail.com'
@@ -14,16 +14,26 @@ __description__ = 'Smart-quotes, smart-ellipses, and smart-dashes'
default_smartypants_attr = "1"
import re
+import warnings
tags_to_skip_regex = re.compile('<(/)?(pre|code|kbd|script|math)[^>]*>', re.I)
def verify_installation(request):
+
+ msg = 'Pyblosxom support will be removed at Version 2.0.0'
+ warnings.filterwarnings('once', msg, DeprecationWarning)
+ warnings.warn(msg, DeprecationWarning)
return 1
# assert the plugin is functional
def cb_story(args):
+
+ msg = 'Pyblosxom support will be removed at Version 2.0.0'
+ warnings.filterwarnings('once', msg, DeprecationWarning)
+ warnings.warn(msg, DeprecationWarning)
+
global default_smartypants_attr
try: