From 3936ba5b90dc0277460d89d0e336405bae3dcb07 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 23 Apr 2005 19:23:21 +0000 Subject: added to project; a do-nothing Writer git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3246 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/writers/null.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 docutils/writers/null.py (limited to 'docutils/writers/null.py') diff --git a/docutils/writers/null.py b/docutils/writers/null.py new file mode 100644 index 000000000..cf3566480 --- /dev/null +++ b/docutils/writers/null.py @@ -0,0 +1,23 @@ +# Author: David Goodger +# Contact: goodger@python.org +# Revision: $Revision$ +# Date: $Date$ +# Copyright: This module has been placed in the public domain. + +""" +A do-nothing Writer. +""" + +from docutils import writers + + +class Writer(writers.Writer): + + supported = ('null',) + """Formats this writer supports.""" + + config_section = 'null writer' + config_section_dependencies = ('writers',) + + def translate(self): + pass -- cgit v1.2.1 From 441b917b41e9d168ad1d4150d2f46007623699b8 Mon Sep 17 00:00:00 2001 From: wiemann Date: Sun, 19 Jun 2005 18:31:40 +0000 Subject: made Null writer return an empty string git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3518 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/writers/null.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/writers/null.py') diff --git a/docutils/writers/null.py b/docutils/writers/null.py index cf3566480..faf7bbfad 100644 --- a/docutils/writers/null.py +++ b/docutils/writers/null.py @@ -20,4 +20,4 @@ class Writer(writers.Writer): config_section_dependencies = ('writers',) def translate(self): - pass + self.output = u'' -- cgit v1.2.1 From d04b3b06ae8404240bd8ab5cd22bebb34dfdb0f3 Mon Sep 17 00:00:00 2001 From: goodger Date: Sat, 2 Jul 2005 23:08:53 +0000 Subject: revert docutils.writers.null.Writer.output to None, now with docutils.io.Output and test support git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3646 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/writers/null.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/writers/null.py') diff --git a/docutils/writers/null.py b/docutils/writers/null.py index faf7bbfad..cf3566480 100644 --- a/docutils/writers/null.py +++ b/docutils/writers/null.py @@ -20,4 +20,4 @@ class Writer(writers.Writer): config_section_dependencies = ('writers',) def translate(self): - self.output = u'' + pass -- cgit v1.2.1 From 67c57d6128cf805d676bd3ff38a3a8f8a7da274b Mon Sep 17 00:00:00 2001 From: wiemann Date: Mon, 15 Aug 2005 20:00:05 +0000 Subject: made Null writer "support" all formats git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3810 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/writers/null.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docutils/writers/null.py') diff --git a/docutils/writers/null.py b/docutils/writers/null.py index cf3566480..fb611dd88 100644 --- a/docutils/writers/null.py +++ b/docutils/writers/null.py @@ -21,3 +21,7 @@ class Writer(writers.Writer): def translate(self): pass + + def supports(self, format): + """This writer supports all format-specific elements.""" + return 1 -- cgit v1.2.1 From 12230a35702461fd90db1254371ad0050b74977e Mon Sep 17 00:00:00 2001 From: wiemann Date: Mon, 15 Aug 2005 20:10:27 +0000 Subject: committed too early; sorry git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@3811 929543f6-e4f2-0310-98a6-ba3bd3dd1d04 --- docutils/writers/null.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'docutils/writers/null.py') diff --git a/docutils/writers/null.py b/docutils/writers/null.py index fb611dd88..cf3566480 100644 --- a/docutils/writers/null.py +++ b/docutils/writers/null.py @@ -21,7 +21,3 @@ class Writer(writers.Writer): def translate(self): pass - - def supports(self, format): - """This writer supports all format-specific elements.""" - return 1 -- 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/writers/null.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docutils/writers/null.py') diff --git a/docutils/writers/null.py b/docutils/writers/null.py index cf3566480..4632c7457 100644 --- a/docutils/writers/null.py +++ b/docutils/writers/null.py @@ -11,7 +11,7 @@ A do-nothing Writer. from docutils import writers -class Writer(writers.Writer): +class Writer(writers.UnfilteredWriter): supported = ('null',) """Formats this writer supports.""" -- cgit v1.2.1