1.1 --- a/ImprovedTableParser.py Mon Apr 02 20:08:41 2012 +0200
1.2 +++ b/ImprovedTableParser.py Wed Apr 18 01:20:51 2012 +0200
1.3 @@ -8,11 +8,12 @@
1.4 """
1.5
1.6 from MoinMoin import wikiutil
1.7 -from shlex import shlex
1.8 from StringIO import StringIO
1.9 from MoinSupport import *
1.10 import re
1.11
1.12 +__version__ = "0.2"
1.13 +
1.14 # Regular expressions.
1.15
1.16 syntax = {
1.17 @@ -268,65 +269,6 @@
1.18 table_attrs[name] = value
1.19 del attrs[name]
1.20
1.21 -def parseAttributes(s, escape=True):
1.22 -
1.23 - """
1.24 - Parse the table attributes string 's', returning a mapping of names to
1.25 - values. If 'escape' is set to a true value, the attributes will be suitable
1.26 - for use with the formatter API. If 'escape' is set to a false value, the
1.27 - attributes will have any quoting removed.
1.28 - """
1.29 -
1.30 - attrs = {}
1.31 - f = StringIO(s)
1.32 - name = None
1.33 - need_value = False
1.34 -
1.35 - for token in shlex(f):
1.36 -
1.37 - # Capture the name if needed.
1.38 -
1.39 - if name is None:
1.40 - name = escape and wikiutil.escape(token) or strip_token(token)
1.41 -
1.42 - # Detect either an equals sign or another name.
1.43 -
1.44 - elif not need_value:
1.45 - if token == "=":
1.46 - need_value = True
1.47 - else:
1.48 - attrs[name.lower()] = escape and "true" or True
1.49 - name = wikiutil.escape(token)
1.50 -
1.51 - # Otherwise, capture a value.
1.52 -
1.53 - else:
1.54 - # Quoting of attributes done similarly to wikiutil.parseAttributes.
1.55 -
1.56 - if token:
1.57 - if escape:
1.58 - if token[0] in ("'", '"'):
1.59 - token = wikiutil.escape(token)
1.60 - else:
1.61 - token = '"%s"' % wikiutil.escape(token, 1)
1.62 - else:
1.63 - token = strip_token(token)
1.64 -
1.65 - attrs[name.lower()] = token
1.66 - name = None
1.67 - need_value = False
1.68 -
1.69 - return attrs
1.70 -
1.71 -def strip_token(token):
1.72 -
1.73 - "Return the given 'token' stripped of quoting."
1.74 -
1.75 - if token[0] in ("'", '"') and token[-1] == token[0]:
1.76 - return token[1:-1]
1.77 - else:
1.78 - return token
1.79 -
1.80 # Formatting of embedded content.
1.81 # NOTE: Borrowed from EventAggregator.
1.82
2.1 --- a/PKG-INFO Mon Apr 02 20:08:41 2012 +0200
2.2 +++ b/PKG-INFO Wed Apr 18 01:20:51 2012 +0200
2.3 @@ -1,12 +1,12 @@
2.4 Metadata-Version: 1.1
2.5 Name: ImprovedTableParser
2.6 -Version: 0.1
2.7 +Version: 0.2
2.8 Author: Paul Boddie
2.9 Author-email: paul at boddie org uk
2.10 Maintainer: Paul Boddie
2.11 Maintainer-email: paul at boddie org uk
2.12 Home-page: http://moinmo.in/ParserMarket/ImprovedTableParser
2.13 -Download-url: http://moinmo.in/ParserMarket/ImprovedTableParser?action=AttachFile&do=view&target=ImprovedTableParser-0.1.tar.bz2
2.14 +Download-url: http://moinmo.in/ParserMarket/ImprovedTableParser?action=AttachFile&do=view&target=ImprovedTableParser-0.2.tar.bz2
2.15 Summary: Support an alternative table syntax for MoinMoin, together with improved presentation functionality
2.16 License: GPL (version 2 or later)
2.17 Description: The ImprovedTableParser extension for MoinMoin provides an alternative way of
3.1 --- a/README.txt Mon Apr 02 20:08:41 2012 +0200
3.2 +++ b/README.txt Wed Apr 18 01:20:51 2012 +0200
3.3 @@ -103,9 +103,16 @@
3.4 Packages Release Information
3.5 -------- -------------------
3.6
3.7 -MoinSupport Tested with 0.1
3.8 +MoinSupport Tested with 0.2
3.9 Source: http://hgweb.boddie.org.uk/MoinSupport
3.10
3.11 +New in ImprovedTableParser 0.2 (Changes since ImprovedTableParser 0.1)
3.12 +----------------------------------------------------------------------
3.13 +
3.14 + * Moved the section argument processing functions into the MoinSupport
3.15 + distribution.
3.16 + * Added the missing __version__ attribute to the common library module.
3.17 +
3.18 Release Procedures
3.19 ------------------
3.20
4.1 --- a/setup.py Mon Apr 02 20:08:41 2012 +0200
4.2 +++ b/setup.py Wed Apr 18 01:20:51 2012 +0200
4.3 @@ -8,6 +8,6 @@
4.4 author = "Paul Boddie",
4.5 author_email = "paul@boddie.org.uk",
4.6 url = "http://moinmo.in/ParserMarket/ImprovedTableParser",
4.7 - version = "0.1",
4.8 + version = "0.2",
4.9 py_modules = ["ImprovedTableParser"]
4.10 )