From 101671ae44e1686680c80cd07b452aabeb88fb63 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 20 Apr 2002 03:01:52 +0000 Subject: Initial revision git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@18 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 docutils/__init__.py (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py new file mode 100644 index 000000000..0ee88d94a --- /dev/null +++ b/docutils/__init__.py @@ -0,0 +1,51 @@ +#! /usr/bin/env python + +""" +:Author: David Goodger +:Contact: goodger@users.sourceforge.net +:Revision: $Revision$ +:Date: $Date$ +:Copyright: This module has been placed in the public domain. + +This is the Docutils (Python Documentation Utilities) package. + +Package Structure +================= + +Modules: + +- __init__.py: Contains the package docstring only (this text). + +- core.py: Contains the ``Publisher`` class and ``publish()`` convenience + function. + +- nodes.py: DPS document tree (doctree) node class library. + +- roman.py: Conversion to and from Roman numerals. Courtesy of Mark + Pilgrim (http://diveintopython.org/). + +- statemachine.py: A finite state machine specialized for + regular-expression-based text filters. + +- urischemes.py: Contains a complete mapping of known URI addressing + scheme names to descriptions. + +- utils.py: Contains the ``Reporter`` system warning class and miscellaneous + utilities. + +Subpackages: + +- languages: Language-specific mappings of terms. + +- parsers: Syntax-specific input parser modules or packages. + +- readers: Context-specific input handlers which understand the data + source and manage a parser. + +- transforms: Modules used by readers and writers to modify DPS + doctrees. + +- writers: Format-specific output translators. +""" + +__docformat__ = 'reStructuredText' -- cgit v1.2.1 From 54237d053858226234c32fdd8a3faa00e2a849df Mon Sep 17 00:00:00 2001 From: goodger Date: Sun, 5 May 2002 14:47:14 +0000 Subject: - Added ``ApplicationError`` and ``DataError``, for use throughout the package. - Added ``Component`` base class for Docutils components; implements the ``supports`` method. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@69 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 0ee88d94a..e70a33167 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -49,3 +49,20 @@ Subpackages: """ __docformat__ = 'reStructuredText' + + +class ApplicationError(StandardError): pass +class DataError(ApplicationError): pass + + +class Component: + + """ + Base class for Docutils components. + """ + + names = () + """Names for this component. Override in subclasses.""" + + def supports(self, format): + return format in self.supported -- cgit v1.2.1 From 05e4910c4b36bdcc1534594160644f2bb2fec9c4 Mon Sep 17 00:00:00 2001 From: goodger Date: Wed, 22 May 2002 04:19:32 +0000 Subject: docstrings git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@136 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index e70a33167..db9d384cb 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -61,8 +61,15 @@ class Component: Base class for Docutils components. """ - names = () + supported = () """Names for this component. Override in subclasses.""" def supports(self, format): + """ + Is `format` supported by this component? + + To be used by transforms to ask the component (Reader or Writer) + controlling the transform if that component supports a certain input + context or output format. + """ return format in self.supported -- cgit v1.2.1 From 6f467ee322d74ec5c68592a4c9b97a96488d79b8 Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 30 May 2002 02:09:19 +0000 Subject: - Added support for an option values object which carries default settings and overrides (from command-line options and library use). git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@148 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index db9d384cb..fe63168b7 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -19,7 +19,9 @@ Modules: - core.py: Contains the ``Publisher`` class and ``publish()`` convenience function. -- nodes.py: DPS document tree (doctree) node class library. +- frontend.py: Command-line and common processing for Docutils front-ends. + +- nodes.py: Docutils document tree (doctree) node class library. - roman.py: Conversion to and from Roman numerals. Courtesy of Mark Pilgrim (http://diveintopython.org/). @@ -64,6 +66,10 @@ class Component: supported = () """Names for this component. Override in subclasses.""" + cmdline_options = () + """Command-line option specification. A list/tuple of tuples: + ``('help text', [list of option strings], {keyword arguments})``.""" + def supports(self, format): """ Is `format` supported by this component? -- cgit v1.2.1 From 7ce7476c958ae579fbd64bbbb00ebcee127d88ac Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 13 Jun 2002 03:23:39 +0000 Subject: Added __version__ git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@179 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 1 + 1 file changed, 1 insertion(+) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index fe63168b7..0ea2f1803 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,6 +51,7 @@ Subpackages: """ __docformat__ = 'reStructuredText' +__version__ = '0.1+' class ApplicationError(StandardError): pass -- cgit v1.2.1 From ce2f906d0b60ee6836aacc32bf2922e338b8a314 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 29 Jun 2002 00:39:38 +0000 Subject: docstrings git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@225 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 0ea2f1803..52a9e500b 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -21,8 +21,13 @@ Modules: - frontend.py: Command-line and common processing for Docutils front-ends. +- io.py: Provides a uniform API for low-level input and output. + - nodes.py: Docutils document tree (doctree) node class library. +- optik.py: Option parsing and command-line help; from Greg Ward's + http://optik.sf.net/ project, included for convenience. + - roman.py: Conversion to and from Roman numerals. Courtesy of Mark Pilgrim (http://diveintopython.org/). -- cgit v1.2.1 From 542dc656827c94acf719e1d942053787b5752b0a Mon Sep 17 00:00:00 2001 From: goodger Date: Wed, 31 Jul 2002 01:31:49 +0000 Subject: docstring git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@418 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 52a9e500b..ba75a4427 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -73,8 +73,8 @@ class Component: """Names for this component. Override in subclasses.""" cmdline_options = () - """Command-line option specification. A list/tuple of tuples: - ``('help text', [list of option strings], {keyword arguments})``.""" + """Command-line option specification. + See `docutils.frontend.OptionParser`.""" def supports(self, format): """ -- cgit v1.2.1 From 415ea7d3b8d5217275984c80b475d4cf2da5b00d Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 2 Aug 2002 03:34:18 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@441 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index ba75a4427..d2b58ae0e 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -56,7 +56,7 @@ Subpackages: """ __docformat__ = 'reStructuredText' -__version__ = '0.1+' +__version__ = '0.2+' class ApplicationError(StandardError): pass -- cgit v1.2.1 From f3c5decc4be60d2dd06c9dfbfef0f55788657c59 Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 9 Aug 2002 01:07:53 +0000 Subject: Bumped version to 0.2.1 to reflect changes to I/O classes. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@488 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index d2b58ae0e..9e3df1414 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -56,7 +56,10 @@ Subpackages: """ __docformat__ = 'reStructuredText' -__version__ = '0.2+' + +__version__ = '0.2.1' +"""``major.minor.micro`` version number. The ``micro`` number is bumped any +time there's a change in the API incompatible with one of the front ends.""" class ApplicationError(StandardError): pass -- cgit v1.2.1 From 3070c1c1a7f59b584446a7bc33c8c1169ade4a33 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 24 Aug 2002 01:18:09 +0000 Subject: - Bumped version to 0.2.2 to reflect changes to stylesheet options. - Factored ``OptionSpec`` out of ``Component``; separately useful. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@587 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 9e3df1414..097aa3944 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -57,7 +57,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.2.1' +__version__ = '0.2.2' """``major.minor.micro`` version number. The ``micro`` number is bumped any time there's a change in the API incompatible with one of the front ends.""" @@ -66,19 +66,34 @@ class ApplicationError(StandardError): pass class DataError(ApplicationError): pass -class Component: +class OptionSpec: - """ - Base class for Docutils components. - """ + """Runtime option specification base class.""" + + cmdline_options = () + """Command-line option specification. Override in subclasses. + Used by `docutils.frontend.OptionParser`. + + One or more sets of option group title, description, and a list/tuple of + tuples: ``('help text', [list of option strings], {keyword arguments})``. + Group title and/or description may be `None`; no group title implies no + group, just a list of single options.""" + + relative_path_options = () + """Options containing filesystem paths. Override in subclasses. + Used by `docutils.frontend.OptionParser`. + + Options listed here are to be interpreted relative to the current working + directory.""" + + +class Component(OptionSpec): + + """Base class for Docutils components.""" supported = () """Names for this component. Override in subclasses.""" - cmdline_options = () - """Command-line option specification. - See `docutils.frontend.OptionParser`.""" - def supports(self, format): """ Is `format` supported by this component? -- cgit v1.2.1 From 2b57d30609bb5efa7031d6aa3fdaaa9143c8041e Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 29 Aug 2002 02:49:34 +0000 Subject: Added ``option_default_overrides`` to ``docutils.OptionSpec``. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@609 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 097aa3944..c50574045 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -68,20 +68,26 @@ class DataError(ApplicationError): pass class OptionSpec: - """Runtime option specification base class.""" + """ + Runtime option specification base class. + + OptionSpec subclass objects used by `docutils.frontend.OptionParser`. + """ cmdline_options = () """Command-line option specification. Override in subclasses. - Used by `docutils.frontend.OptionParser`. One or more sets of option group title, description, and a list/tuple of tuples: ``('help text', [list of option strings], {keyword arguments})``. Group title and/or description may be `None`; no group title implies no group, just a list of single options.""" + option_default_overrides = None + """A dictionary of auxiliary defaults, to override defaults for options + defined in other components. Override in subclasses.""" + relative_path_options = () """Options containing filesystem paths. Override in subclasses. - Used by `docutils.frontend.OptionParser`. Options listed here are to be interpreted relative to the current working directory.""" -- cgit v1.2.1 From 49373e9eff9b650bd989452f2067cf2b78a5cebe Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 7 Sep 2002 02:42:09 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@653 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index c50574045..8dfc2d3a5 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -69,7 +69,7 @@ class DataError(ApplicationError): pass class OptionSpec: """ - Runtime option specification base class. + Runtime option specification base class. OptionSpec subclass objects used by `docutils.frontend.OptionParser`. """ @@ -85,7 +85,7 @@ class OptionSpec: option_default_overrides = None """A dictionary of auxiliary defaults, to override defaults for options defined in other components. Override in subclasses.""" - + relative_path_options = () """Options containing filesystem paths. Override in subclasses. -- cgit v1.2.1 From 3d74553eded7a541d1dd38f29dffc1fcaec07768 Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 12 Sep 2002 02:18:39 +0000 Subject: Bumped version to 0.2.3 because of the new ``--embed-stylesheet`` option and its effect on the PEP template & writer. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@668 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 8dfc2d3a5..229e85dee 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -57,7 +57,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.2.2' +__version__ = '0.2.3' """``major.minor.micro`` version number. The ``micro`` number is bumped any time there's a change in the API incompatible with one of the front ends.""" -- cgit v1.2.1 From 2bdb00f857c57628eba757fdf964045fb9308e1f Mon Sep 17 00:00:00 2001 From: goodger Date: Tue, 24 Sep 2002 02:09:08 +0000 Subject: Bumped version to 0.2.4 due to changes to the PEP template & stylesheet. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@707 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 229e85dee..547447bed 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -1,12 +1,10 @@ -#! /usr/bin/env python +# Author: David Goodger +# Contact: goodger@users.sourceforge.net +# Revision: $Revision$ +# Date: $Date$ +# Copyright: This module has been placed in the public domain. """ -:Author: David Goodger -:Contact: goodger@users.sourceforge.net -:Revision: $Revision$ -:Date: $Date$ -:Copyright: This module has been placed in the public domain. - This is the Docutils (Python Documentation Utilities) package. Package Structure @@ -57,7 +55,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.2.3' +__version__ = '0.2.4' """``major.minor.micro`` version number. The ``micro`` number is bumped any time there's a change in the API incompatible with one of the front ends.""" -- cgit v1.2.1 From 45d96016aabd12df32ac212fc5c5136d2b1f0dbb Mon Sep 17 00:00:00 2001 From: goodger Date: Tue, 8 Oct 2002 01:19:43 +0000 Subject: Bumped version to 0.2.5 to reflect changes to Reporter output. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@766 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 547447bed..15d1ea097 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -55,7 +55,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.2.4' +__version__ = '0.2.5' """``major.minor.micro`` version number. The ``micro`` number is bumped any time there's a change in the API incompatible with one of the front ends.""" -- cgit v1.2.1 From ba3923167324a379d0282beba72817ec0ca349fc Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 17 Oct 2002 01:38:42 +0000 Subject: Beginnings of transform overhaul. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@810 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 15d1ea097..a52dbb51d 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -91,7 +91,18 @@ class OptionSpec: directory.""" -class Component(OptionSpec): +class TransformSpec: + + """ + Runtime transform specification base class. + + TransformSpec subclass objects used by `docutils.transforms.Transformer`. + """ + + default_transforms = () + + +class Component(OptionSpec, TransformSpec): """Base class for Docutils components.""" -- cgit v1.2.1 From afeedfb343c2904e9357997d2a50f8f3cabb2568 Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 18 Oct 2002 04:55:21 +0000 Subject: Refactored names (options -> settings; .transform() -> .apply(); etc.); updated. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@825 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index a52dbb51d..7461d2f42 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -55,7 +55,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.2.5' +__version__ = '0.2.6' """``major.minor.micro`` version number. The ``micro`` number is bumped any time there's a change in the API incompatible with one of the front ends.""" @@ -64,30 +64,34 @@ class ApplicationError(StandardError): pass class DataError(ApplicationError): pass -class OptionSpec: +class SettingsSpec: """ - Runtime option specification base class. + Runtime setting specification base class. - OptionSpec subclass objects used by `docutils.frontend.OptionParser`. + SettingsSpec subclass objects used by `docutils.frontend.OptionParser`. """ - cmdline_options = () - """Command-line option specification. Override in subclasses. + settings_spec = () + """Runtime settings specification. Override in subclasses. - One or more sets of option group title, description, and a list/tuple of - tuples: ``('help text', [list of option strings], {keyword arguments})``. - Group title and/or description may be `None`; no group title implies no - group, just a list of single options.""" + Specifies runtime settings and associated command-line options, as used by + `docutils.frontend.OptionParser`. This tuple contains one or more sets of + option group title, description, and a list/tuple of tuples: ``('help + text', [list of option strings], {keyword arguments})``. Group title + and/or description may be `None`; no group title implies no group, just a + list of single options. Runtime settings names are derived implicitly + from long option names ("--a-setting" becomes ``settings.a_setting``) or + explicitly from the "destination" keyword argument.""" - option_default_overrides = None - """A dictionary of auxiliary defaults, to override defaults for options + settings_default_overrides = None + """A dictionary of auxiliary defaults, to override defaults for settings defined in other components. Override in subclasses.""" - relative_path_options = () - """Options containing filesystem paths. Override in subclasses. + relative_path_settings = () + """Settings containing filesystem paths. Override in subclasses. - Options listed here are to be interpreted relative to the current working + Settings listed here are to be interpreted relative to the current working directory.""" @@ -100,9 +104,10 @@ class TransformSpec: """ default_transforms = () + """Transforms required by this class. Override in subclasses.""" -class Component(OptionSpec, TransformSpec): +class Component(SettingsSpec, TransformSpec): """Base class for Docutils components.""" -- cgit v1.2.1 From 18c39f24ba6a4c6d170d750b2d8476d8e896adf1 Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 18 Oct 2002 23:39:31 +0000 Subject: Bumped version to 0.2.7 for new ``docutils.core.publish_*`` convenience functions. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@827 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 7461d2f42..f7ebd564d 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -55,7 +55,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.2.6' +__version__ = '0.2.7' """``major.minor.micro`` version number. The ``micro`` number is bumped any time there's a change in the API incompatible with one of the front ends.""" -- cgit v1.2.1 From 85e63d722ab2413ecc1a9de5b878bb7b83079a95 Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 24 Oct 2002 00:36:14 +0000 Subject: Added ``Component.component_type`` attribute. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@843 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index f7ebd564d..eab752cd2 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -111,6 +111,9 @@ class Component(SettingsSpec, TransformSpec): """Base class for Docutils components.""" + component_type = None + """Override in subclasses.""" + supported = () """Names for this component. Override in subclasses.""" @@ -118,8 +121,7 @@ class Component(SettingsSpec, TransformSpec): """ Is `format` supported by this component? - To be used by transforms to ask the component (Reader or Writer) - controlling the transform if that component supports a certain input - context or output format. + To be used by transforms to ask the dependent component if it supports + a certain input context or output format. """ return format in self.supported -- cgit v1.2.1 From 5157f1e2679a577144a6edaeb0d9e9a7e305eba9 Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 8 Nov 2002 01:26:22 +0000 Subject: Bumped version to 0.2.8 because of the internal parser switch from plain lists to the docutils.statemachine.StringList objects. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@908 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index eab752cd2..9c1f2569f 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -55,9 +55,12 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.2.7' -"""``major.minor.micro`` version number. The ``micro`` number is bumped any -time there's a change in the API incompatible with one of the front ends.""" +__version__ = '0.2.8' +"""``major.minor.micro`` version number. The micro number is bumped any time +there's a change in the API incompatible with one of the front ends. The +minor number is bumped whenever there is a project release. The major number +will be bumped when the project is complete, and perhaps if there is a major +change in the design.""" class ApplicationError(StandardError): pass -- cgit v1.2.1 From f4fc97209372be9399682ef969815a3557ceda88 Mon Sep 17 00:00:00 2001 From: goodger Date: Tue, 3 Jun 2003 02:19:25 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1374 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 9c1f2569f..4020133f9 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -55,7 +55,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.2.8' +__version__ = '0.2.9' """``major.minor.micro`` version number. The micro number is bumped any time there's a change in the API incompatible with one of the front ends. The minor number is bumped whenever there is a project release. The major number -- cgit v1.2.1 From ba5211d666e122eb662215bf4afc1148b614067d Mon Sep 17 00:00:00 2001 From: goodger Date: Sun, 8 Jun 2003 20:55:14 +0000 Subject: Added ``SettingsSpec.settings_defaults`` dict. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1398 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 4020133f9..5de8a7db4 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -87,6 +87,10 @@ class SettingsSpec: from long option names ("--a-setting" becomes ``settings.a_setting``) or explicitly from the "destination" keyword argument.""" + settings_defaults = None + """A dictionary of defaults for internal or inaccessible (by command-line + or config file) settings. Override in subclasses.""" + settings_default_overrides = None """A dictionary of auxiliary defaults, to override defaults for settings defined in other components. Override in subclasses.""" -- cgit v1.2.1 From 4d5856ed0b53ed121be993e520271fc0e4a1ce55 Mon Sep 17 00:00:00 2001 From: goodger Date: Mon, 16 Jun 2003 03:26:53 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1470 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 5de8a7db4..a631b7f0b 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -23,12 +23,6 @@ Modules: - nodes.py: Docutils document tree (doctree) node class library. -- optik.py: Option parsing and command-line help; from Greg Ward's - http://optik.sf.net/ project, included for convenience. - -- roman.py: Conversion to and from Roman numerals. Courtesy of Mark - Pilgrim (http://diveintopython.org/). - - statemachine.py: A finite state machine specialized for regular-expression-based text filters. @@ -55,7 +49,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.2.9' +__version__ = '0.2.10' """``major.minor.micro`` version number. The micro number is bumped any time there's a change in the API incompatible with one of the front ends. The minor number is bumped whenever there is a project release. The major number @@ -85,7 +79,7 @@ class SettingsSpec: and/or description may be `None`; no group title implies no group, just a list of single options. Runtime settings names are derived implicitly from long option names ("--a-setting" becomes ``settings.a_setting``) or - explicitly from the "destination" keyword argument.""" + explicitly from the "dest" keyword argument.""" settings_defaults = None """A dictionary of defaults for internal or inaccessible (by command-line -- cgit v1.2.1 From b48b803fa2457708113c059d539e9053abdaeb3f Mon Sep 17 00:00:00 2001 From: goodger Date: Wed, 25 Jun 2003 01:47:04 +0000 Subject: ready for release 0.3 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1504 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index a631b7f0b..188a3a711 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -49,12 +49,12 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.2.10' +__version__ = '0.3.0' """``major.minor.micro`` version number. The micro number is bumped any time there's a change in the API incompatible with one of the front ends. The minor number is bumped whenever there is a project release. The major number -will be bumped when the project is complete, and perhaps if there is a major -change in the design.""" +will be bumped when the project is feature-complete, and perhaps if there is a +major change in the design.""" class ApplicationError(StandardError): pass -- cgit v1.2.1 From 5745f8c2b09962cf2fb76bfc8b41af263363664c Mon Sep 17 00:00:00 2001 From: goodger Date: Wed, 27 Aug 2003 20:42:29 +0000 Subject: Bumped version to 0.3.1: Reorganized config file format (multiple sections); see docs/config.txt. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1641 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 188a3a711..45ec3b2b0 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -12,12 +12,14 @@ Package Structure Modules: -- __init__.py: Contains the package docstring only (this text). +- __init__.py: Contains component base classes, exception classes, and + Docutils `__version__`. -- core.py: Contains the ``Publisher`` class and ``publish()`` convenience - function. +- core.py: Contains the ``Publisher`` class and ``publish_*()`` convenience + functions. -- frontend.py: Command-line and common processing for Docutils front-ends. +- frontend.py: Runtime settings (command-line interface, configuration files) + processing, for Docutils front-ends. - io.py: Provides a uniform API for low-level input and output. @@ -49,12 +51,12 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.0' +__version__ = '0.3.1' """``major.minor.micro`` version number. The micro number is bumped any time -there's a change in the API incompatible with one of the front ends. The -minor number is bumped whenever there is a project release. The major number -will be bumped when the project is feature-complete, and perhaps if there is a -major change in the design.""" +there's a change in the API incompatible with one of the front ends or +significant new functionality. The minor number is bumped whenever there is a +project release. The major number will be bumped when the project is +feature-complete, and perhaps if there is a major change in the design.""" class ApplicationError(StandardError): pass @@ -91,10 +93,20 @@ class SettingsSpec: relative_path_settings = () """Settings containing filesystem paths. Override in subclasses. - Settings listed here are to be interpreted relative to the current working directory.""" + config_section = None + """The name of the config file section specific to this component + (lowercase, no brackets). Override in subclasses.""" + + config_section_dependencies = None + """A list of names of config file sections that are to be applied before + `config_section`, in order (from general to specific). In other words, + the settings in `config_section` are to be overlaid on top of the settings + from these sections. The "general" section is assumed implicitly. + Override in subclasses.""" + class TransformSpec: -- cgit v1.2.1 From 6bf1f3a52b24ff86ba93343d6a04e766601721de Mon Sep 17 00:00:00 2001 From: goodger Date: Mon, 1 Sep 2003 15:09:14 +0000 Subject: updated for setting validators git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1663 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 45ec3b2b0..2d2f012bc 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -78,10 +78,14 @@ class SettingsSpec: `docutils.frontend.OptionParser`. This tuple contains one or more sets of option group title, description, and a list/tuple of tuples: ``('help text', [list of option strings], {keyword arguments})``. Group title - and/or description may be `None`; no group title implies no group, just a - list of single options. Runtime settings names are derived implicitly - from long option names ("--a-setting" becomes ``settings.a_setting``) or - explicitly from the "dest" keyword argument.""" + and/or description may be `None`; a group title of `None` implies no + group, just a list of single options. The "keyword arguments" dictionary + contains arguments to the OptionParser/OptionGroup ``add_option`` method, + with the addition of a "validator" keyword (see the + `docutils.frontend.OptionParser.validators` instance attribute). Runtime + settings names are derived implicitly from long option names + ("--a-setting" becomes ``settings.a_setting``) or explicitly from the + "dest" keyword argument.""" settings_defaults = None """A dictionary of defaults for internal or inaccessible (by command-line -- cgit v1.2.1 From 34833a0410b1bbe9d6880b0b7c7be85b8b09383e Mon Sep 17 00:00:00 2001 From: mmgilbe Date: Mon, 22 Mar 2004 01:07:40 +0000 Subject: Added unknown_reference_resolvers attribute to TransformSpec. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1853 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 2d2f012bc..fe1c4c18e 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -122,6 +122,13 @@ class TransformSpec: default_transforms = () """Transforms required by this class. Override in subclasses.""" + + unknown_reference_resolvers = () + """List of functions to try to resolve unknown references. Called when + FinalCheckVisitor is unable to find a correct target. The list should + contain functions which will try to resolve unknown references. Each + function can have a default_priority attribute which will effect the order + the unknown_reference_resolvers are run. Override in subclass""" class Component(SettingsSpec, TransformSpec): @@ -133,7 +140,7 @@ class Component(SettingsSpec, TransformSpec): supported = () """Names for this component. Override in subclasses.""" - + def supports(self, format): """ Is `format` supported by this component? -- cgit v1.2.1 From b5ebdc72f8f412847de3fea77576b793372149f0 Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 2 Apr 2004 02:54:36 +0000 Subject: updated docstring git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1904 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index fe1c4c18e..7921ab022 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -124,11 +124,18 @@ class TransformSpec: """Transforms required by this class. Override in subclasses.""" unknown_reference_resolvers = () - """List of functions to try to resolve unknown references. Called when - FinalCheckVisitor is unable to find a correct target. The list should - contain functions which will try to resolve unknown references. Each - function can have a default_priority attribute which will effect the order - the unknown_reference_resolvers are run. Override in subclass""" + """List of functions to try to resolve unknown references. Called when + FinalCheckVisitor is unable to find a correct target. The list should + contain functions which will try to resolve unknown references, with the + following signature:: + + def reference_resolver(node): + '''Returns boolean: true if resolved, false if not.''' + + Each function must have a "priority" attribute which will affect the order + the unknown_reference_resolvers are run. + + Override in subclasses.""" class Component(SettingsSpec, TransformSpec): -- cgit v1.2.1 From 49604925a37cfb2a041cfdd3caefda2a27720f59 Mon Sep 17 00:00:00 2001 From: goodger Date: Mon, 12 Apr 2004 15:27:18 +0000 Subject: updated docstring git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1925 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 7921ab022..304e90ca4 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -133,7 +133,9 @@ class TransformSpec: '''Returns boolean: true if resolved, false if not.''' Each function must have a "priority" attribute which will affect the order - the unknown_reference_resolvers are run. + the unknown_reference_resolvers are run:: + + reference_resolver.priority = 100 Override in subclasses.""" -- cgit v1.2.1 From e6e72312d4b0a56b625c7e40ed9ffbf265c1d33b Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 16 Apr 2004 15:16:24 +0000 Subject: bumped micro version due to API changes (interpreted text roles, and accumulated changes to date) git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@1944 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 304e90ca4..dcf1fb8f9 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.1' +__version__ = '0.3.2' """``major.minor.micro`` version number. The micro number is bumped any time there's a change in the API incompatible with one of the front ends or significant new functionality. The minor number is bumped whenever there is a -- cgit v1.2.1 From de8c07d626555e33a0d6e28847e61efa439650ee Mon Sep 17 00:00:00 2001 From: goodger Date: Thu, 6 May 2004 18:22:37 +0000 Subject: docstrings git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2029 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index dcf1fb8f9..d47365229 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -145,7 +145,8 @@ class Component(SettingsSpec, TransformSpec): """Base class for Docutils components.""" component_type = None - """Override in subclasses.""" + """Name of the component type ('reader', 'parser', 'writer'). Override in + subclasses.""" supported = () """Names for this component. Override in subclasses.""" -- cgit v1.2.1 From 443647725c11fe07696d5814a3bf6ddd5b7feb37 Mon Sep 17 00:00:00 2001 From: wiemann Date: Sun, 9 May 2004 16:23:54 +0000 Subject: bumped version to 0.3.3, changed versioning policy git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2067 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index d47365229..0a5442506 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,12 +51,14 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.2' -"""``major.minor.micro`` version number. The micro number is bumped any time -there's a change in the API incompatible with one of the front ends or -significant new functionality. The minor number is bumped whenever there is a +__version__ = '0.3.3' +"""``major.minor.micro`` version number. The micro number is bumped +any time there's a change in the API incompatible with one of the +front ends or significant new functionality, and at any alpha or beta +release. The minor number is bumped whenever there is a stable project release. The major number will be bumped when the project is -feature-complete, and perhaps if there is a major change in the design.""" +feature-complete, and perhaps if there is a major change in the +design.""" class ApplicationError(StandardError): pass -- cgit v1.2.1 From 8d99e339fe3c08282cab199e9d6b032fd2577ffa Mon Sep 17 00:00:00 2001 From: wiemann Date: Sun, 9 May 2004 17:19:11 +0000 Subject: bumped version to 0.3.4 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2070 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 0a5442506..bcad2741c 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.3' +__version__ = '0.3.4' """``major.minor.micro`` version number. The micro number is bumped any time there's a change in the API incompatible with one of the front ends or significant new functionality, and at any alpha or beta -- cgit v1.2.1 From cee45a83ba3c6c983c5ca7a2166ca07886bc909f Mon Sep 17 00:00:00 2001 From: goodger Date: Sun, 27 Jun 2004 03:47:03 +0000 Subject: docstrings git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2392 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index bcad2741c..e3e15c4ec 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -1,5 +1,5 @@ # Author: David Goodger -# Contact: goodger@users.sourceforge.net +# Contact: goodger@python.org # Revision: $Revision$ # Date: $Date$ # Copyright: This module has been placed in the public domain. @@ -76,7 +76,7 @@ class SettingsSpec: settings_spec = () """Runtime settings specification. Override in subclasses. - Specifies runtime settings and associated command-line options, as used by + Defines runtime settings and associated command-line options, as used by `docutils.frontend.OptionParser`. This tuple contains one or more sets of option group title, description, and a list/tuple of tuples: ``('help text', [list of option strings], {keyword arguments})``. Group title @@ -90,8 +90,9 @@ class SettingsSpec: "dest" keyword argument.""" settings_defaults = None - """A dictionary of defaults for internal or inaccessible (by command-line - or config file) settings. Override in subclasses.""" + """A dictionary of defaults for settings not in `settings_spec` (internal + settings, intended to be inaccessible by command-line and config file). + Override in subclasses.""" settings_default_overrides = None """A dictionary of auxiliary defaults, to override defaults for settings -- cgit v1.2.1 From 071d1f5a99072ecac94a55c5a9b8800a1e46792a Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 2 Jul 2004 16:23:10 +0000 Subject: docstrings git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2418 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index e3e15c4ec..3b0ee40a3 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -127,14 +127,21 @@ class TransformSpec: """Transforms required by this class. Override in subclasses.""" unknown_reference_resolvers = () - """List of functions to try to resolve unknown references. Called when - FinalCheckVisitor is unable to find a correct target. The list should - contain functions which will try to resolve unknown references, with the - following signature:: + """List of functions to try to resolve unknown references. Unknown + references have a 'refname' attribute which doesn't correspond to any + target in the document. Called when FinalCheckVisitor is unable to find a + correct target. The list should contain functions which will try to + resolve unknown references, with the following signature:: def reference_resolver(node): '''Returns boolean: true if resolved, false if not.''' + If the function is able to resolve the reference, it should also remove + the 'refname' attribute and mark the node as resolved:: + + del node['refname'] + node.resolved = 1 + Each function must have a "priority" attribute which will affect the order the unknown_reference_resolvers are run:: -- cgit v1.2.1 From 84d4b4eab68b4f10db2977c415dbef137c74e687 Mon Sep 17 00:00:00 2001 From: cben Date: Sat, 10 Jul 2004 21:20:15 +0000 Subject: Docstring improvement: structured data asks for structured description. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2427 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 3b0ee40a3..606ad08aa 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -77,17 +77,30 @@ class SettingsSpec: """Runtime settings specification. Override in subclasses. Defines runtime settings and associated command-line options, as used by - `docutils.frontend.OptionParser`. This tuple contains one or more sets of - option group title, description, and a list/tuple of tuples: ``('help - text', [list of option strings], {keyword arguments})``. Group title - and/or description may be `None`; a group title of `None` implies no - group, just a list of single options. The "keyword arguments" dictionary - contains arguments to the OptionParser/OptionGroup ``add_option`` method, - with the addition of a "validator" keyword (see the - `docutils.frontend.OptionParser.validators` instance attribute). Runtime - settings names are derived implicitly from long option names - ("--a-setting" becomes ``settings.a_setting``) or explicitly from the - "dest" keyword argument.""" + `docutils.frontend.OptionParser`. This is a tuple of: + + - Option group title (string or `None` which implies no group, just a list + of single options). + + - Description (string or `None`). + + - A sequence of option tuples. Each consists of: + + - Help text (string) + + - List of option strings (e.g. ``['-Q', '--quux']``). + + - Dictionary of keyword arguments. It contains arguments to the + OptionParser/OptionGroup ``add_option`` method, possibly with the + addition of a 'validator' keyword (see the + `docutils.frontend.OptionParser.validators` instance attribute). Runtime + settings names are derived implicitly from long option names + ('--a-setting' becomes ``settings.a_setting``) or explicitly from the + 'dest' keyword argument. See optparse docs for more details. + + - More triples of group title, description, options, as many times as + needed. Thus, `settings_spec` tuples can be simply concatenated. + """ settings_defaults = None """A dictionary of defaults for settings not in `settings_spec` (internal -- cgit v1.2.1 From e59980f818cc3a524de9ca7620fb8a3e4089e348 Mon Sep 17 00:00:00 2001 From: goodger Date: Fri, 16 Jul 2004 23:17:40 +0000 Subject: corrected terminology git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2437 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 606ad08aa..d3b4adbca 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -55,7 +55,7 @@ __version__ = '0.3.4' """``major.minor.micro`` version number. The micro number is bumped any time there's a change in the API incompatible with one of the front ends or significant new functionality, and at any alpha or beta -release. The minor number is bumped whenever there is a stable +release. The minor number is bumped whenever there is a significant project release. The major number will be bumped when the project is feature-complete, and perhaps if there is a major change in the design.""" -- cgit v1.2.1 From f7873d1a0c07f4a1ce311a93e4e011dc8c6a3111 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 24 Jul 2004 14:09:22 +0000 Subject: updated git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2445 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index d3b4adbca..dd8945f11 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -52,13 +52,11 @@ Subpackages: __docformat__ = 'reStructuredText' __version__ = '0.3.4' -"""``major.minor.micro`` version number. The micro number is bumped -any time there's a change in the API incompatible with one of the -front ends or significant new functionality, and at any alpha or beta -release. The minor number is bumped whenever there is a significant -project release. The major number will be bumped when the project is -feature-complete, and perhaps if there is a major change in the -design.""" +"""``major.minor.micro`` version number. The micro number is bumped for API +changes, for new functionality, and for interim project releases. The minor +number is bumped whenever there is a significant project release. The major +number will be bumped when the project is feature-complete, and perhaps if +there is a major change in the design.""" class ApplicationError(StandardError): pass -- cgit v1.2.1 From d55cec685e1514c070b2eb77bc6015dfebbedc1f Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 29 Jul 2004 14:57:28 +0000 Subject: release 0.3.5 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2512 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index dd8945f11..2818a7dcf 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.4' +__version__ = '0.3.5' """``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major -- cgit v1.2.1 From 24c3144d3600279ca16a90df8448436637b17048 Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 29 Jul 2004 18:18:35 +0000 Subject: release 0.3.5 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2518 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 2818a7dcf..94c7c7282 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.5' +__version__ = '0.3.6' """``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major -- cgit v1.2.1 From f6253be6f54c20dbb4a65fa7c03d27c510299ebb Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 23 Dec 2004 16:34:24 +0000 Subject: added text about using the unicode directive for en and em dashes git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2888 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 94c7c7282..20dd8e51f 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.6' +__version__ = '0.3.7' """``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major -- cgit v1.2.1 From 58f039b55de17ed6b25baa7902b7ea1dcbb7b598 Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 23 Dec 2004 16:40:35 +0000 Subject: reverted accidentally committed files; sorry git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2889 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 20dd8e51f..94c7c7282 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.7' +__version__ = '0.3.6' """``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major -- cgit v1.2.1 From 16285d9ba32a086ce2f12c1af08b844cba7339ca Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 23 Dec 2004 23:04:11 +0000 Subject: Release 0.4.0: set version number to 0.4.0 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2894 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 94c7c7282..8b3ac2609 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.6' +__version__ = '0.4.0' """``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major -- cgit v1.2.1 From 740682332c3a17b86db19fa219a99e44e74e24af Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 23 Dec 2004 23:39:15 +0000 Subject: Release 0.3.7: set version number to 0.3.7 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2897 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 8b3ac2609..20dd8e51f 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.4.0' +__version__ = '0.3.7' """``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major -- cgit v1.2.1 From 74ef0ca97d6a845eb24a2fa0546612d34474d043 Mon Sep 17 00:00:00 2001 From: wiemann Date: Fri, 24 Dec 2004 00:55:16 +0000 Subject: Release 0.3.7: set version number to 0.3.8 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2901 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 20dd8e51f..662f0a097 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.7' +__version__ = '0.3.8' """``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major -- cgit v1.2.1 From e78956c8fc478dc7ef264531983024e8269130ea Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 26 May 2005 21:21:48 +0000 Subject: Release 0.3.9: set version number to 0.3.9 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3374 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 662f0a097..8484967f5 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.8' +__version__ = '0.3.9' """``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major -- cgit v1.2.1 From 63fff375aa144a601b0e9588f1868f1b15c21703 Mon Sep 17 00:00:00 2001 From: wiemann Date: Thu, 26 May 2005 22:52:48 +0000 Subject: Release 0.3.9: set version number to 0.3.10 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3379 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 8484967f5..10bc7fd46 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,7 +51,7 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.9' +__version__ = '0.3.10' """``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major -- cgit v1.2.1 From c61ca0c471901af237277d5700c4c22b04e4d3d3 Mon Sep 17 00:00:00 2001 From: wiemann Date: Sun, 29 May 2005 19:22:10 +0000 Subject: added version suffix for snapshots git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3411 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 10bc7fd46..fbac8caad 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -58,6 +58,8 @@ number is bumped whenever there is a significant project release. The major number will be bumped when the project is feature-complete, and perhaps if there is a major change in the design.""" +__version_suffix__ = '' +"""Version suffix for snapshots (e.g. ', 2005-05-29, r3410').""" class ApplicationError(StandardError): pass class DataError(ApplicationError): pass -- cgit v1.2.1 From 78ed5de20eb3c06ef02efd5710145321fc40596f Mon Sep 17 00:00:00 2001 From: goodger Date: Wed, 1 Jun 2005 14:44:50 +0000 Subject: docutils.__version_details__ renamed from .__version_suffix__ git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3417 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index fbac8caad..eeb54a413 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -13,7 +13,7 @@ Package Structure Modules: - __init__.py: Contains component base classes, exception classes, and - Docutils `__version__`. + Docutils version information. - core.py: Contains the ``Publisher`` class and ``publish_*()`` convenience functions. @@ -58,8 +58,9 @@ number is bumped whenever there is a significant project release. The major number will be bumped when the project is feature-complete, and perhaps if there is a major change in the design.""" -__version_suffix__ = '' -"""Version suffix for snapshots (e.g. ', 2005-05-29, r3410').""" +__version_details__ = 'repository' +"""Extra version details (e.g. 'snapshot 2005-05-29, r3410' or 'release'), +modified automatically.""" class ApplicationError(StandardError): pass class DataError(ApplicationError): pass -- cgit v1.2.1 From 6d8e20e47dc5ff3e07c555cf850937a8a8bcc99d Mon Sep 17 00:00:00 2001 From: goodger Date: Wed, 29 Jun 2005 19:44:52 +0000 Subject: Added ``docutils.TransformSpec.reprocess_transforms`` and ``docutils.transforms.Transformer.reprocess_transforms`` attributes git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3627 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index eeb54a413..26587b1ad 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -139,6 +139,10 @@ class TransformSpec: default_transforms = () """Transforms required by this class. Override in subclasses.""" + + reprocess_transforms = () + """Transforms suggested as replacements for `default_transforms` when + reprocessing a document tree.""" unknown_reference_resolvers = () """List of functions to try to resolve unknown references. Unknown -- cgit v1.2.1 From 5b111006c653af57889892100b7adc5ffcca8e6f Mon Sep 17 00:00:00 2001 From: wiemann Date: Tue, 20 Sep 2005 20:04:53 +0000 Subject: Merged "transforms" branch into trunk. - Replaced ``default_transforms`` attribute of TransformSpec with ``get_transforms()`` method. - Added universal.Decorations and universal.ExposeInternals transforms as default transforms for all readers. - Added universal.Messages and universal.FilterMessages transforms as default transforms for all writers. - Added ``ReReader`` base class for readers that reread an existing document tree. - Added ``UnfilteredWriter`` base class for writers that pass the document tree on unchanged. git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3892 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 26587b1ad..4a6e447f5 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -137,13 +137,19 @@ class TransformSpec: TransformSpec subclass objects used by `docutils.transforms.Transformer`. """ + def get_transforms(self): + """Transforms required by this class. Override in subclasses.""" + if self.default_transforms != (): + import warnings + warnings.warn('default_transforms attribute deprecated.\n' + 'Use get_transforms() method instead.', + DeprecationWarning) + return list(self.default_transforms) + return [] + + # Deprecated; for compatibility. default_transforms = () - """Transforms required by this class. Override in subclasses.""" - reprocess_transforms = () - """Transforms suggested as replacements for `default_transforms` when - reprocessing a document tree.""" - unknown_reference_resolvers = () """List of functions to try to resolve unknown references. Unknown references have a 'refname' attribute which doesn't correspond to any -- cgit v1.2.1 From b8025034708700bbfe2d6910f0fab73f2beecffd Mon Sep 17 00:00:00 2001 From: wiemann Date: Sat, 7 Jan 2006 17:05:13 +0000 Subject: Release 0.4: set version number to 0.4 git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4243 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 4a6e447f5..fbbef9baa 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -51,14 +51,14 @@ Subpackages: __docformat__ = 'reStructuredText' -__version__ = '0.3.10' +__version__ = '0.4' """``major.minor.micro`` version number. The micro number is bumped for API changes, for new functionality, and for interim project releases. The minor number is bumped whenever there is a significant project release. The major number will be bumped when the project is feature-complete, and perhaps if there is a major change in the design.""" -__version_details__ = 'repository' +__version_details__ = 'release' """Extra version details (e.g. 'snapshot 2005-05-29, r3410' or 'release'), modified automatically.""" -- cgit v1.2.1 From 6cdcca30337205e27278c5f4ba87abbda84273c4 Mon Sep 17 00:00:00 2001 From: goodger Date: Sun, 8 Jan 2006 02:01:56 +0000 Subject: revised version info to reflect the current limbo status git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4250 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index fbbef9baa..35671cfe6 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -58,9 +58,9 @@ number is bumped whenever there is a significant project release. The major number will be bumped when the project is feature-complete, and perhaps if there is a major change in the design.""" -__version_details__ = 'release' -"""Extra version details (e.g. 'snapshot 2005-05-29, r3410' or 'release'), -modified automatically.""" +__version_details__ = 'pre-release' +"""Extra version details (e.g. 'snapshot 2005-05-29, r3410', 'repository', +'release'), modified automatically & manually.""" class ApplicationError(StandardError): pass class DataError(ApplicationError): pass -- cgit v1.2.1 From d9e9593ec5300a630f2aaf03ce6ad73fd06bcd66 Mon Sep 17 00:00:00 2001 From: wiemann Date: Mon, 9 Jan 2006 18:28:09 +0000 Subject: changed version info to "release" git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@4260 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/__init__.py') diff --git a/docutils/__init__.py b/docutils/__init__.py index 35671cfe6..a390a9f2b 100644 --- a/docutils/__init__.py +++ b/docutils/__init__.py @@ -58,7 +58,7 @@ number is bumped whenever there is a significant project release. The major number will be bumped when the project is feature-complete, and perhaps if there is a major change in the design.""" -__version_details__ = 'pre-release' +__version_details__ = 'release' """Extra version details (e.g. 'snapshot 2005-05-29, r3410', 'repository', 'release'), modified automatically & manually.""" -- cgit v1.2.1