summaryrefslogtreecommitdiff
path: root/cmd2/ansi.py
Commit message (Collapse)AuthorAgeFilesLines
* Updating docs for default style functionsKevin Van Brunt2020-01-161-3/+3
|
* Clean up function documentation so it renders properlykotfu2020-01-141-3/+7
|
* Merge branch 'master' into generating_output_docsTodd Leonhardt2020-01-091-42/+51
|\ | | | | | | | | | | # Conflicts: # docs/features/generating_output.rst # docs/features/settings.rst
| * Added dim text style supportKevin Van Brunt2020-01-071-9/+16
| |
| * Updated style regular expression to not require digitsKevin Van Brunt2019-12-191-2/+2
| |
| * Renamed ansi_safe_wcswidth() to style_aware_wcswidth()Kevin Van Brunt2019-12-191-13/+11
| | | | | | | | Renamed ansi_aware_write() to style_aware_write()
| * Changed allow_ansi to allow_style for accuracy in what types of ANSI escape ↵Kevin Van Brunt2019-12-191-23/+27
| | | | | | | | sequences are handled
* | Merge branch 'master' into generating_output_docskotfu2019-12-051-1/+1
|\ \ | |/ | | | | | | # Conflicts: # cmd2/ansi.py
| * Removed bold from style_successKevin Van Brunt2019-12-041-1/+1
| |
* | Fix flake8 errorkotfu2019-11-271-0/+5
| |
* | Fix minor errors in docstringskotfu2019-11-241-3/+4
|/
* Modified async_alert_str to also get passed the number of terminal columns ↵Todd Leonhardt2019-07-011-9/+5
| | | | and added unit tests for it
* Refactored ansi.async_alert_str() so that the cursor offset within the ↵Todd Leonhardt2019-06-301-4/+3
| | | | | | readline buffer is passed in This way, the function is independent of readline and can more easily be unit tested
* Initial changes for encapsulation of colorama usage within ansi.pyTodd Leonhardt2019-06-301-0/+74
| | | | | | | | | | | | | | | Changes include: - ansi.py is now the only cmd2 code which depends on colorama - cmd2 tests no longer rely on colorama - Added new functions to ansi.py: - async_alert_str() - set_title_str - Added unit test for set_title_str TODO: - Refactor async_alert_str so cursor position is passed in and import from rl_utils is no longer required - Add unit test(s) for async_alert_str - Refactor FG_COLORS and BG_COLORS in ansi.py to not use constants from colorama
* Minor fix to docstring of ansi.style()Todd Leonhardt2019-06-281-2/+2
|
* Updated Sphinx documentation and README.mdTodd Leonhardt2019-06-281-4/+4
|
* Moved RESET to end of color dictionaries and skip a test on Mac since it is ↵Todd Leonhardt2019-06-281-2/+2
| | | | unreliable on Azure DevOps CI
* Simplified ansi color dictionaries and lookup methodsTodd Leonhardt2019-06-271-32/+24
| | | | | | | Also: - Updated examples that use color to use cmd2.ansi instead of colorama - Updated tests that use color to use cmd2.ansi instead of colorama - plumbum_colorspy example shows how to override color lookup functions to use a different color library
* Added fg_lookup() and bg_lookup() two-stage color lookup functionsTodd Leonhardt2019-06-271-28/+63
|
* Moved cmd2.Cmd._decolorized_write() to ansi.py and renamed it to ↵Kevin Van Brunt2019-06-271-6/+19
| | | | ansi_aware_write().
* Made allow_ansi an application-wide setting and moved it to ansi.pyKevin Van Brunt2019-06-271-0/+8
|
* Renamed colors setting to allow_ansiKevin Van Brunt2019-06-261-8/+8
|
* Updated documentationKevin Van Brunt2019-06-261-2/+4
|
* Changed default styles to use a more flexible approach which could be used ↵Kevin Van Brunt2019-06-261-49/+13
| | | | to call any function to add style
* Changed signature of style() to allow for simpler calling and overriding of ↵Kevin Van Brunt2019-06-261-12/+39
| | | | settings in a provided TextStyle
* Combined some logic in styleKevin Van Brunt2019-06-261-20/+23
|
* Added TextStyle class and default implementations for various message types ↵Kevin Van Brunt2019-06-261-18/+38
| | | | like Warning, Error, and Succes
* Moved code related to ANSI escape codes to new file called ansi.pyKevin Van Brunt2019-06-261-0/+118