On Mon, 03/05 10:16, Paolo Bonzini wrote:
This converter compresses sequences involving carriage returns or backspaces,
to make them readable from an editor or mail reader.
Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
---
patchew/logviewer.py | 29 ++++++++++++++++++
patchew/settings.py | 3 ++
patchew/tags.py | 19 ++++++++++++
tests/test_ansi2html.py | 75
++++++++++++++++++++++++++++++++++++++++++++++-
tests/test_custom_tags.py | 27 +++++++++++++++++
5 files changed, 152 insertions(+), 1 deletion(-)
create mode 100644 patchew/tags.py
create mode 100755 tests/test_custom_tags.py
diff --git a/patchew/logviewer.py b/patchew/logviewer.py
index aa5d2bb..b84d487 100644
--- a/patchew/logviewer.py
+++ b/patchew/logviewer.py
@@ -286,6 +286,29 @@ class ANSIProcessor(object):
self._reset_attrs()
+class ANSI2TextConverter(ANSIProcessor):
+ FF = '\u2015' * 72 + '\n'