jenkins-bot has submitted this change and it was merged.
Change subject: terminal_interface_unix.py: added missing colors
......................................................................
terminal_interface_unix.py: added missing colors
Added colors missing in linux but defined in win32.
Running pywikibot in linux now does not output uninterpreted colors
if tags not defined before are used (e.g. \03{green} ).
Change-Id: I31ce8fc3d90bb528740e6b107d201e4fed49c660
---
M pywikibot/userinterfaces/terminal_interface_unix.py
1 file changed, 17 insertions(+), 25 deletions(-)
Approvals:
Merlijn van Deen: Looks good to me, approved
jenkins-bot: Verified
diff --git a/pywikibot/userinterfaces/terminal_interface_unix.py
b/pywikibot/userinterfaces/terminal_interface_unix.py
index 984a5e5..1da2a6a 100755
--- a/pywikibot/userinterfaces/terminal_interface_unix.py
+++ b/pywikibot/userinterfaces/terminal_interface_unix.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
-# (C) Pywikipedia bot team, 2003-2012
+# (C) Pywikipedia bot team, 2003-2014
#
# Distributed under the terms of the MIT license.
#
@@ -8,32 +8,24 @@
from . import terminal_interface_base
-# TODO: other colors:
- #0 = Black
- #1 = Blue
- #2 = Green
- #3 = Aqua
- #4 = Red
- #5 = Purple
- #6 = Yellow
- #7 = White
- #8 = Gray
- #9 = Light Blue
- #10 = Light Green
- #11 = Light Aqua
- #12 = Light Red
- #13 = Light Purple
- #14 = Light Yellow
- #15 = Bright White
-
unixColors = {
'default': chr(27) + '[0m', # Unix end tag to switch back to
default
- 'lightblue': chr(27) + '[94;1m', # Light Blue start tag
- 'lightgreen': chr(27) + '[92;1m', # Light Green start tag
- 'lightaqua': chr(27) + '[36;1m', # Light Aqua start tag
- 'lightred': chr(27) + '[91;1m', # Light Red start tag
- 'lightpurple': chr(27) + '[35;1m', # Light Purple start tag
- 'lightyellow': chr(27) + '[33;1m', # Light Yellow start tag
+ 'black': chr(27) + '[30m', # Black start tag
+ 'red': chr(27) + '[31m', # Red start tag
+ 'green': chr(27) + '[32m', # Green start tag
+ 'yellow': chr(27) + '[33m', # Yellow start tag
+ 'blue': chr(27) + '[34m', # Blue start tag
+ 'purple': chr(27) + '[35m', # Purple start tag (Magenta)
+ 'aqua': chr(27) + '[36m', # Aqua start tag (Cyan)
+ 'lightgray': chr(27) + '[37m', # Light gray start tag (White)
+ 'gray': chr(27) + '[90m', # Gray start tag
+ 'lightred': chr(27) + '[91m', # Light Red tag
+ 'lightgreen': chr(27) + '[92m', # Light Green tag
+ 'lightyellow': chr(27) + '[93m', # Light Yellow tag
+ 'lightblue': chr(27) + '[94m', # Light Blue tag
+ 'lightpurple': chr(27) + '[95m', # Light Purple tag (Magenta)
+ 'lightaqua': chr(27) + '[96m', # Light Aqua tag (Cyan)
+ 'white': chr(27) + '[97m', # White start tag (Bright White)
}
--
To view, visit
https://gerrit.wikimedia.org/r/125889
To unsubscribe, visit
https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I31ce8fc3d90bb528740e6b107d201e4fed49c660
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa <mpaa.wiki(a)gmail.com>
Gerrit-Reviewer: Ladsgroup <ladsgroup(a)gmail.com>
Gerrit-Reviewer: Merlijn van Deen <valhallasw(a)arctus.nl>
Gerrit-Reviewer: jenkins-bot <>