Commit graph

57 commits

Author SHA1 Message Date
Griatch
6ae2ca6901 Moved escape mechanism to a central location in serversessionhandler. 2014-08-21 09:13:53 +02:00
Griatch
8afdbc6adb Changed ansi parser to strip hard-coded ansi codes inserted raw into the stream, as discussed in #551. 2014-08-20 20:15:11 +02:00
Michael K
42d614dc0e Changed check to basestring, allowing for ansi. 2014-08-15 22:00:40 +02:00
Griatch
05c9d67ffc Made the tab, space and linebreak ansi characters case-insensitive. Resolves #522. 2014-06-28 18:51:04 +02:00
Jonathan Piacenti
834b039a0d Fixed issues with transformation functions on ANSIString. 2014-04-12 15:27:13 +02:00
Kelketek Rritaa
0a7734c3d5 Added tests for ANSIString, and fixed some bugs for it along the way. 2014-03-09 20:43:36 +01:00
Griatch
021dca4ba7 evtable and evform supports ansi, with some limitations due to wrap not being supported by ANSIString at this point. 2014-03-09 20:23:14 +01:00
Griatch
b80baca8e1 Fixed error in removing ansi-escapes. 2014-03-09 20:23:14 +01:00
Griatch
13dc71e02e Changed parser.strip_ansi to parser.strip_raw_codes for contexual clarity. 2014-03-09 20:23:14 +01:00
Griatch
1a65d12b2c Fixed a bug in strip_ansi that caused issues all over. 2014-03-09 20:23:14 +01:00
Kelketek Rritaa
f0130d8384 Added tests for ANSIString, and fixed some bugs for it along the way. 2014-03-09 20:23:14 +01:00
Griatch
ef8755581c optimized ansi parsing a bit as well as did some general cleanup. 2014-03-09 20:22:48 +01:00
Kelketek Rritaa
04eb057419 Fixed regression where reconverted ANSIStrings would lose all codes.
Made slices append trailing color codes.
2014-03-09 20:22:48 +01:00
Kelketek Rritaa
af0a149148 Made the in-memory representation of ANSIString the clean string, removing the need for the regexable flag. 2014-02-28 14:19:54 -06:00
Griatch
07978e2145 Fixed some issues with counting characters in ANSIString. A first version of Evtable that works with ansi. 2014-02-26 12:33:16 +01:00
Kelketek Rritaa
6a7e329a39 Whoops, overcorrected some of that for split(). 2014-02-24 18:14:29 -06:00
Kelketek Rritaa
d4e98a80f9 Resolves #482. ANSIString splitting and slicing more sane. 2014-02-24 15:01:26 -06:00
Kelketek Rritaa
67f53564cb Adjustments for getting interleving ANSI codes in splits, slices, and indexes. 2014-02-22 15:49:26 -06:00
Kelketek Rritaa
8c1b81a06c Implemented .split() and .rsplit() for ANSIString. Props to the PyPy team. 2014-02-21 18:54:38 -06:00
Kelketek Rritaa
a9ad82d005 Added a 'regexable' mode for ANSIString, fixed a few bugs with it.
Refactored with metaclass and added comments. Resolves #481, Resolves #480
2014-02-15 18:41:55 -06:00
Griatch
c09d6eef53 Removing test with ANSIString for the moment. It might not be suited for evform due to regex handling. 2014-02-01 22:39:42 +01:00
Kelketek Rritaa
9ebd2d76ce Fixed some unicode encoding mixups. 2014-02-01 14:03:44 -06:00
Kelketek Rritaa
f446a74c28 Resolves #466. Items that are not strings are converted into strings before being turned into ANSIStrings. 2014-01-30 20:40:44 -06:00
Kelketek Rritaa
382bf01bef Fixes #465. Issues with translation method should be resolved. 2014-01-30 20:36:51 -06:00
Kelketek Rritaa
939c97f3f6 Flipped __radd__ arguments for ANSIString.... harder! Added __add__ 2014-01-28 07:22:48 -06:00
Kelketek Rritaa
a54f0b5b9e Merge branch 'master' of https://github.com/evennia/evennia 2014-01-28 07:04:36 -06:00
Kelketek Rritaa
e9198fe87a Flipped __radd__ arguments for ANSIString. 2014-01-28 07:04:10 -06:00
Griatch
cf39c955a0 Merge pull request #458 from Kelketek/master
Made __radd__ work properly for ANSIString.
2014-01-26 22:34:01 -08:00
Kelketek Rritaa
6fbe5c4337 Made __radd__ work properly for ANSIString. 2014-01-26 16:42:06 -06:00
Griatch
5c41adf7d0 Added {-type coding for backgrounds. First removal of mentions of the %c syntax from @color command (%c style syntax is still working though) 2014-01-26 18:46:28 +01:00
Kelketek Rritaa
d69f4dc674 Changed backgrounnd ANSI flag from - to [ 2014-01-26 08:07:58 -06:00
Kelketek Rritaa
09ee3c3f2c Added ANSIString class. Allows a user to work with ANSI-encoded strings more easily. 2014-01-26 07:14:47 -06:00
Griatch
9dcfddbf59 Reverted non-finished ANSIClass changes for now (best to handle those away from main branch). Resolves Issue 451. 2014-01-09 01:31:42 +01:00
Griatch
acbfa57240 Merge. Resolves Issue 448. Resolves Issue 444. Resolves Issue 443. Resolves Issue 445. 2014-01-04 11:26:32 +01:00
Kelketek
5ae4995f0f Some naming tweaks. 2014-01-02 09:12:40 -06:00
Kelketek
f8f592af75 Added transformation-type string methods to ANSIString. 2014-01-01 14:25:26 -06:00
Kelketek
b9d333180a Several more methods added to ANSIString. Existing ones from init moved out to bind properly. 2013-12-31 22:18:13 -06:00
Kelketek
63761f66ec ANSIString in progress. Checking in what I have so far. 2013-12-31 08:37:42 -06:00
Griatch
1ae17bcbe4 PEP8 cleanup of the entire codebase. Unchanged are many cases of too-long lines, partly because of the rewrite they would require but also because splitting many lines up would make the code harder to read. Also the third-party libraries (idmapper, prettytable etc) were not cleaned. 2013-11-14 19:31:17 +01:00
Kelketek
00f46d36cd Fixed #346, examine cutting off parts of output due to ANSI coloration. 2013-02-06 15:07:44 -06:00
Griatch
0ced5287f4 Some more minor fixes. 2012-12-12 01:18:49 +01:00
Griatch
9f6e3de637 Various cleanups and fixes found during refurbishing the unittest framework (not pushed yet) 2012-11-05 00:55:25 +01:00
Griatch
ec46465656 Implemented ansi-colour backgrounds in webclient. Added a new @color command for displaying colour spaces. Also changed a number of other features outlined in Issue 309. 2012-10-24 21:41:07 +02:00
Griatch
c0a4f62e95 Some minor fixes. 2012-10-23 01:35:47 +02:00
Griatch
53c6e5ae52 Implemented a new way to handle colour-escaping as discussed in Issue 305. Thanks to MercuryZero for ideas on how to implement this! Resolves Issue 305. 2012-10-23 01:20:10 +02:00
Griatch
e03c303d5e Changed The way to escape %c-style colour codes from \\%c to %%c. No other changes or escaping done yet at this point. 2012-10-14 23:43:38 +02:00
Griatch
7de8e3fa82 Ansi fix - changed so one needs \\ to escape mux-style colour codes instead of just \. The extended { syntax is now escaped by adding an extra { in front - combining the two should enable getting around most needs of colouring backslashes. Resolves Issue 286. 2012-10-14 20:49:26 +02:00
Griatch
1feb3a80a5 Some minor cleanups here and there. 2012-04-29 12:35:21 +02:00
Griatch
ed6def0c88 Made XTERM256 properly range between 0-5 (it was erroneously capped at 1-5 which mean the darkest values
of the colour cube were unreachable).
Fixed some issues with the lock caching.
2012-04-29 01:26:10 +02:00
Griatch
63329f5420 Added the ability to escape colour codes with \, So using \{g in a text will now result in '{g' being printed instead of the text switching to bright green. This can be useful for documentation. 2012-04-15 23:42:57 +02:00