summaryrefslogtreecommitdiff
path: root/pygments/formatters/other.py
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2007-02-12 23:38:46 +0100
committergbrandl <devnull@localhost>2007-02-12 23:38:46 +0100
commit8ac95bf314343f8db0ec8123296b60aefda8b02f (patch)
tree7813371046f03132d690b8556c857fc453e6c9b6 /pygments/formatters/other.py
parent16b1f0bb0fbc6ea7aab974cb220406632de4c7c0 (diff)
downloadpygments-8ac95bf314343f8db0ec8123296b60aefda8b02f.tar.gz
[svn] Quite a few things:
- new pygmentize options, -F for filters and -H for detail help. - an automatically-created formatter map - better HTML formatter subclassing
Diffstat (limited to 'pygments/formatters/other.py')
-rw-r--r--pygments/formatters/other.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/pygments/formatters/other.py b/pygments/formatters/other.py
index 6b70238e..d83c77ea 100644
--- a/pygments/formatters/other.py
+++ b/pygments/formatters/other.py
@@ -19,6 +19,10 @@ class NullFormatter(Formatter):
"""
Output the text unchanged without any formatting.
"""
+ name = 'Text only'
+ aliases = ['text', 'null']
+ filenames = ['*.txt']
+
def format(self, tokensource, outfile):
enc = self.encoding
for ttype, value in tokensource:
@@ -30,7 +34,7 @@ class NullFormatter(Formatter):
class RawTokenFormatter(Formatter):
r"""
- Formats tokens as a raw representation for storing token streams.
+ Format tokens as a raw representation for storing token streams.
The format is ``tokentype<TAB>repr(tokenstring)\n``. The output can later
be converted to a token stream with the `RawTokenLexer`, described in the
@@ -42,6 +46,9 @@ class RawTokenFormatter(Formatter):
If set to ``'gz'`` or ``'bz2'``, compress the output with the given
compression algorithm after encoding (default: ``''``).
"""
+ name = 'Raw tokens'
+ aliases = ['raw', 'tokens']
+ filenames = ['*.raw']
unicodeoutput = False