HackerTrans
トップ新着トレンドコメント過去質問紹介求人

webpro

no profile record

投稿

Inspect ANSI control codes and escape sequences

ansi.tools
115 ポイント·投稿者 webpro·12 か月前·51 コメント

コメント

webpro
·12 か月前·議論
Some of the issues mentioned in this thread have been improved, including private CSI sequences, default param values, and cancellation + substitution.
webpro
·12 か月前·議論
The lexer and parser handled it perfectly first try. The HTML renderer had a few issues though, but it's being rendered reasonably well now. The torture test has been added to the package tests and to the website as an example.
webpro
·12 か月前·議論
There is some recovery in the lexer, but would love to learn what would make it crash! The url you provide gives a 404.
webpro
·12 か月前·議論
Raw input should be cool now (there's "raw" in the examples as well)
webpro
·12 か月前·議論
What would prevent you from starting? Could be fun :)
webpro
·12 か月前·議論
Emojis and other unicode characters may or may not be rendered as a single-width character. I've been splitting hairs and strings.

The tool currently counts any unicode character as a single-width one.
webpro
·12 か月前·議論
Thanks, this is great feedback. I'll see what I can do, stay tuned.
webpro
·12 か月前·議論
There is https://github.com/webpro/ANSI.tools/blob/main/packages/pars... and others
webpro
·12 か月前·議論
Thanks. Agreed. The way I see it, ignore the noise and there might be something in there.
webpro
·12 か月前·議論
That's some interesting feedback, thanks for sharing. I'll see what I can extract and apply from it. Please bear with me, this is only my initial take on the whole concept (and as you point out, it isn't that trivial). Didn't have much examples to be inspired by, but we're on our way anyway.
webpro
·12 か月前·議論
Thanks! It's all open source (including the tokenizer/parser), so feel free come collaborate on GitHub.
webpro
·12 か月前·議論
The parser has, but not the HTML renderer indeed. Using a third-party lib for that currently, but noticed the limitations too. Might replace it with my own!
webpro
·12 か月前·議論
Thanks for sharing, haven't seen that one yet. Will see if I can borrow ideas from it.
webpro
·12 か月前·議論
At least I tried to make it look like a 1993 website
webpro
·12 か月前·議論
Got to start somewhere! Didn't see many examples to get inspired by either. Here's the full table: https://ansi.tools/lookup. This is my initial take on it. Please bring in the corneriest cases! It's open source so bug reports, RFCs and pull requests are most welcome.
webpro
·12 か月前·議論
Working with and debugging ANSI control codes and escape sequences can be a challenge.

This free web-based tool helps to inspect the input, visualize colors and styling, and list control codes. By using a proper tokenizer and parser (not just regex hacks), it supports all sorts of control codes. The parser is open source and available too (find links in "about").

Type or paste text in the black text area, or try out the examples. Use the lookup table to filter & find specific codes.

Feedback welcome, I’d love to know what’s confusing, missing, or especially useful.