diff --git a/ansi2html/style.py b/ansi2html/style.py index 9731b72..568a893 100644 --- a/ansi2html/style.py +++ b/ansi2html/style.py @@ -16,8 +16,6 @@ # along with this program. If not, see # . -import sys - class Rule(object): @@ -49,21 +47,30 @@ def index2(grey): return str(232 + grey) # http://en.wikipedia.org/wiki/ANSI_escape_code#Colors -SCHEME = { # black red green brown/yellow blue magenta cyan grey/white - 'ansi2html': ("#000316", "#aa0000", "#00aa00", "#aa5500", "#0000aa", - "#E850A8", "#00aaaa", "#F5F1DE"), - 'xterm': ("#000000", "#cd0000", "#00cd00", "#cdcd00", "#0000ee", - "#cd00cd", "#00cdcd", "#e5e5e5"), - 'xterm-bright': ("#7f7f7f", "#ff0000", "#00ff00", "#ffff00", "#5c5cff", - "#ff00ff", "#00ffff", "#ffffff"), - 'osx': ("#000000", "#c23621", "#25bc24", "#adad27", "#492ee1", - "#d338d3", "#33bbc8", "#cbcccd"), +SCHEME = { + # black red green brown/yellow blue magenta cyan grey/white + 'ansi2html': ( + "#000316", "#aa0000", "#00aa00", "#aa5500", + "#0000aa", "#E850A8", "#00aaaa", "#F5F1DE", + "#7f7f7f", "#ff0000", "#00ff00", "#ffff00", + "#5c5cff", "#ff00ff", "#00ffff", "#ffffff"), + + 'xterm': ( + "#000000", "#cd0000", "#00cd00", "#cdcd00", + "#0000ee", "#cd00cd", "#00cdcd", "#e5e5e5", + "#7f7f7f", "#ff0000", "#00ff00", "#ffff00", + "#5c5cff", "#ff00ff", "#00ffff", "#ffffff"), + + 'osx': ( + "#000000", "#c23621", "#25bc24", "#adad27", + "#492ee1", "#d338d3", "#33bbc8", "#cbcccd") * 2, # http://ethanschoonover.com/solarized - 'solarized': ("#262626", "#d70000", "#5f8700", "#af8700", "#0087ff", - "#af005f", "#00afaf", "#e4e4e4", - "#1c1c1c", "#d75f00", "#585858", "#626262", "#808080", - "#5f5faf", "#8a8a8a", "#ffffd7", ), + 'solarized': ( + "#262626", "#d70000", "#5f8700", "#af8700", + "#0087ff", "#af005f", "#00afaf", "#e4e4e4", + "#1c1c1c", "#d75f00", "#585858", "#626262", + "#808080", "#5f5faf", "#8a8a8a", "#ffffd7"), } diff --git a/tests/ansicolor.html b/tests/ansicolor.html index 9ba5de5..e6db8e4 100644 --- a/tests/ansicolor.html +++ b/tests/ansicolor.html @@ -4,6 +4,7 @@ -
+
  black  red  green  yellow  blue  magenta cyan  white 
  black  red  green  yellow  blue  magenta cyan  white 
  black  red  green  yellow  blue  magenta cyan  white 
diff --git a/tests/ansicolor_eix.html b/tests/ansicolor_eix.html
index af1b89e..435852e 100644
--- a/tests/ansicolor_eix.html
+++ b/tests/ansicolor_eix.html
@@ -4,6 +4,7 @@
 
 
 
 
 
-
+
 [U] dev-python/pysvn
      Available versions:  1.7.6 (~)1.7.7^t{tbz2} (~)1.7.8^t {doc examples PYTHON_TARGETS="python2_6 python2_7 python3_2 python3_3"}
      Installed versions:  1.7.7^t{tbz2}(22:19:41 13.03.2013)(-doc -examples PYTHON_TARGETS="python2_7 python3_2 -python2_5 -python2_6 -python3_1")
diff --git a/tests/produce_headers.txt b/tests/produce_headers.txt
index af2fe81..798498d 100644
--- a/tests/produce_headers.txt
+++ b/tests/produce_headers.txt
@@ -1,4 +1,5 @@