Commit graph

49 commits

Author SHA1 Message Date
Griatch
4505ace90d Make IRCbot handler irc->ansi colors. Add support for reset etc. See #1255. 2017-08-27 18:06:21 +02:00
Griatch
b278337172 Make PEP8 cleanup of line spaces and character distances as well as indents 2017-08-19 23:16:36 +02:00
Griatch
7ff783fea1 Resolve merge conflicts with master. 2017-08-19 21:30:42 +02:00
Griatch
3da28c5ba9 Change |- into a 4-space indent and shift the TAB character to the |t tag. Resolves 1393. 2017-08-13 18:08:06 +02:00
Jonathan Piacenti
9825f254a8 Force ANSIString into bytestring before sessions send it over the wire. 2017-08-13 09:38:51 -05:00
Griatch
9f03e4a3f4 Fix isolated unittests for color markup. Issues with module reloading. 2017-07-20 22:09:44 +02:00
Griatch
03f4ecb3a4 Move {- and %c color markup to contrib, make easily extendable, as per #1229 2017-07-20 22:09:44 +02:00
Vincent Le Goff
62bd9fb4ab The ansi.raw utility now escapes vertical bars 2017-03-19 12:33:09 -07:00
BlauFeuer
dc1545cb27 Docstring, comments and whitespace fixes 2017-02-20 01:36:58 -05:00
Griatch
61ffe5f9fa Rename ADDITIONA_ANSI_MAPPING to COLOR_ANSI_EXTRA_MAP to better match the settings naming scheme. 2017-02-12 10:53:50 +01:00
Tehom
982108da33 correct import 2017-02-12 10:53:50 +01:00
Tehom
f263ea2aaa Allow additional ansi mappings to be passed from settings for easier customization. 2017-02-12 10:53:50 +01:00
Kimadi
43f310c2f8 Use color cube palette for pure black and pure white. 2017-02-05 20:03:50 +01:00
Kimadi
10467ac3ba Fixed variable names. 2017-02-05 20:03:50 +01:00
Kimadi
9e6bb2c74e Implemented xterm grayscale palette. 2017-02-05 20:03:50 +01:00
Kimadi
97d46abe85 Removed useless double entries for xterm256 regular expressions. 2017-02-05 20:03:50 +01:00
Griatch
c6d9c0619e Refactor code for readability and compatibility. 2017-01-27 00:19:27 +01:00
Griatch
2c6227774a Fix a minor issue in ANSIString.rstrip(). 2016-11-17 00:34:40 +01:00
Griatch
f00fbb9d88 Implement ANSIString.strip() .lstrip() and .rstrip() as tag-aware methods. This handles the last prblem with #1117. 2016-11-17 00:21:05 +01:00
Griatch
6b3f92dcbf Add support for ANSIString.strip() and .rstrip(), matching normal string equivalents. Resolve #1022. 2016-10-22 21:30:52 +02:00
Griatch
6fbdc88a27 Fix webclient ANSI background handling. Made bright ANSI backgrounds visible in color command. Resolves #1001. 2016-08-28 19:31:19 +02:00
Griatch
668029e82e Changed xterm256 formatting to work with Potato. Also added Potato as a TTYPE exception since the client doesn't report itself correctly. 2016-08-28 16:36:44 +02:00
Griatch
ecf6852d46 Made EvCels auto-close colors rather than bleed over. This is necessary to avoid accidental color clashes in tables that fill the cells to a |-border edge (particularly for EvForm. 2016-05-23 23:56:44 +02:00
Griatch
8f12dd83a3 Fixed an error in the MXP implementation and also removed the deprecated {-form for MXP. Resolves #966. 2016-05-22 20:49:45 +02:00
Griatch
8709ffefb8 Fixed a non-functioning MXP call using the |-style format. 2016-05-22 20:45:41 +02:00
Griatch
5f0ba55ce1 Fixed color display of xterm256 with the xterm256 support turned off. 2016-05-22 20:45:41 +02:00
Griatch
7de036c1d9 Merged nested inlinefuncs from the dev branch. Added |-style ansi-markers. Resolves #818. 2015-11-28 20:30:01 +01:00
Griatch
492e2e2411 Put back standard {-style ansi background colors that were accidentally removed. 2015-11-28 18:25:05 +01:00
Griatch
419ff1cc79 Added |-style color markings (in parallel with {-style ones) as per #818 as a test for public review. 2015-11-28 18:25:05 +01:00
Ahmed Charles
bcd8674ef3 Use python3 range.
Including potential memory reduction due to not created unnecessary lists.
2015-11-02 11:47:07 +00:00
Ahmed Charles
11b61fe335 Import python3 compatible object. 2015-11-02 00:19:04 +01:00
Ahmed Charles
cbe1eefcf0 Move to python3 style division.
All of these are currently integer division in python2.
2015-11-01 20:47:18 +00:00
Ahmed Charles
99f0fec7cf Use comprehension rather than map. 2015-11-01 21:16:41 +01:00
Ahmed Charles
8a66fc40a9 Use with_metaclass from future.utils for python3 compat. 2015-11-01 15:11:12 +01:00
Ahmed Charles
bc340fbf0d Remove commented out print statements. 2015-10-19 23:31:19 +02:00
Griatch
eb2bd8d44c Converted a large part of utils/ folder to google code docstrings as per #709. 2015-09-27 20:24:03 +02:00
Jake Shasteen
7d3ed681ac Added {u to the ansi parser for underlining text. 2015-08-15 00:33:57 -04:00
Griatch
8c5dddd062 Added ansi.strip_ansi as a convenience shortcut to remove ansi markup from a string. 2015-07-09 14:37:09 +02:00
Griatch
8d37627dfe Fixed a bug in ansi string caching that didn't take mxp into account. 2015-07-09 14:37:09 +02:00
Griatch
a2500389e4 Removed long deprecated %c-style color syntax as per #683. 2015-05-17 14:42:10 +02:00
Griatch
c524e3f297 Added support bright highlighted backgrounds using xterm256 wrapper (will fallback to standard ANSI if not supported). Also made normal-color tags use the unhilight ANSI tag rather than the full normal-tag making them work better with backgrounds. Also added {H as the unhilight tag. See #725. 2015-03-24 12:31:19 +01:00
Griatch
3f1a887841 Made numberered lists with full numbers for clarity when reading sources. See #724. 2015-03-22 10:07:37 +01:00
Jonathan Piacenti
b50dbdc651 Fix bug with ANSI concatination. 2015-03-12 08:31:26 +01:00
Jonathan Piacenti
571b1d5fad Added m_len and made ANSIString ignore MXP. 2015-03-12 08:31:25 +01:00
tajmone
972b5cd2e2 docstrings and typos in "\utils\" and "\scripts\" 2015-03-09 11:33:55 +01:00
Griatch
94b8532f59 Added highlitable color tags on the form {\!R, {\!G etc to make the features of %c-type commands (highlightability) available also to {-type commands. See #683. 2015-03-07 19:14:09 +01:00
Griatch
caa9dbccaf Partial solution of #625 - introduced a merged regex to correctly sync the ANSIString table with the clean version produced by ansi_parse. Something is still amiss though, since len(ANSIString({lclook{lttest{le)) != len(ANSIString({lclook{lttest{le).split(n)[0]) 2015-03-07 18:17:03 +01:00
Griatch
ad3f19896c Changed all src/ and ev references to evennia 2015-01-07 15:36:32 +01:00
Griatch
c7325a5032 Further reworking, naming the library folder 'evennia' instead of lib or src. 2015-01-07 13:36:57 +01:00
Renamed from lib/utils/ansi.py (Browse further)