Coder Social home page Coder Social logo

support for ANSI colors about nppexec HOT 6 OPEN

d0vgan avatar d0vgan commented on June 16, 2024
support for ANSI colors

from nppexec.

Comments (6)

d0vgan avatar d0vgan commented on June 16, 2024 2

Included in NppExec v0.6.1: the ability to remove ANSI escape sequences (npe_console e1).

from nppexec.

d0vgan avatar d0vgan commented on June 16, 2024

I'll consider it.
( In fact, I hate when people say "I'll consider it" - because you never know what they actually mean by that: will they just think about it or will they implement it at some point of time :) ).
I think the next version of NppExec will be able to filter the color codes. To do that, however, minimal logic of parsing the colors must be implemented anyway - I mean, at least for detection of the beginning and ending of the color code fragment of the output text.

from nppexec.

d0vgan avatar d0vgan commented on June 16, 2024

I have to say I am far from being familiar with ANSI colors, and the (ANSI escape codes) does not look clear to me.
Is there any sort of "formula" that describes all the possible ESC-sequences? By this "formula" I mean something like the following:

  • 2-byte seqences in form of 0x1B {x}, where {x} is in the range of [{start}, {end}] (question: what are the values of {start} and {end}?)
  • 3-byte seqences in form of 0x1B {x1} {x2}, where {x1} is in the range of [{start}, {end}] (question: what are the values of {start} and {end}?)
  • n-byte sequences in a form of 0x1B {start} {any number of bytes here} {end} (question: what are the possible values of {start} and {end}?)
  • n-byte sequences in a form of 0x1B {start_n} {exactly n bytes here} (question: what are the possible values of {start_n}?)
  • any other possible combination I did not think of

from nppexec.

d0vgan avatar d0vgan commented on June 16, 2024

I mean, I need to completely understand where any possible ESC-sequence begins and where exactly it ends - and only basing on this information I'll be able to do any processing, even simple filtering of the ESC-sequences.

from nppexec.

d0vgan avatar d0vgan commented on June 16, 2024

Added ability to remove ANSI escape sequences in https://github.com/d0vgan/nppexec/tree/develop .
Please check the latest binaries under https://sourceforge.net/projects/npp-plugins/files/NppExec/NppExec%20Plugin%20v0.6%20RC3-RC4%20%28dev%29/

from nppexec.

pidgeon777 avatar pidgeon777 commented on June 16, 2024

If one day NppExec will be able to colourize even parts of its lines (maybe compatibility with ANSI colours?), it would be very nice.

from nppexec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.