473,403 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Filtering ansi control sequences...

48
Hi, I'm trying to write an interactive bash script. I'm using some ansi control sequences : format (color, blink,...) and cursor position, to make things easier for the administrator (also me). But now I've realized that if I want to log directly the output to a file, this file becomes more difficult to parse. Ok, I can remove relatively easily format sequences throw regexp, but cursor position movements are not so easy to "translate". I've googled for a while and found nothing.

Does someone know a cool way (gnu tool, library...) to filter ansi control sequences (there are a tone) to plain text / html (preserving format,...),...

Thanks a lot
Jan 29 '09 #1
2 2536
Am not sure if what you are looking for is this but... try using the dialog utility.
Feb 5 '09 #2
vituko
48
Thanks for your reply.

It's a good idea, but I feel surer when I have all the history while scrolling in my term, I prefer avoid ncurses interfaces,... And the colored interface is good but I want my logs also colored both in console mode (tail -f, cat, grep,...) and in plain text / other formats (xml...). Any way there should be a gnu tool that simply piping could process ansi outputs and export it. I didn't found.

Reallly the best start point I found after googling some hours are webterms : anyterm (c) / ajaxterm (python adaptation). It does exactly what I searched, but I have to analyze, extract and adapt the code that I need. It process term stdout/stderr and convert to html preserving the format (colors,...). Very, very interesting tools, amazing... Next time I'll have free time, I'll try to work with this idea...

Thanks
Feb 5 '09 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: aa | last post by:
Is it OK to include an ANSI file into a UTF-8 file?
1
by: Adriaan Renting | last post by:
I have the problem that I need to interact with a CD/DVD burning program called gear. I do this by running it in a pseudo terminal. I also need to log what I'm doing, so I copy all output I get...
6
by: alan | last post by:
Dear all, I have written my own function by C. And my development platform is W2k with VC6.0. Then I also defined a header file to extern declare this function. After that, I include this...
8
by: Kris Dugan | last post by:
I am using a Unix/Solaris 8/9 environment. I want to make a tool that will constantly read a structure of information and display that information (or "paint it") to the screen. Rather than...
17
by: hugo27 | last post by:
hugo27 July 13, 2004 > >The teachy books and documentation I've read do not >mention the Escape key, but everytime I hit it during >runtime my programs go bananas. > >This relates to a larger...
0
by: Patrick | last post by:
I'm working on a contact management application, and need a hand with one aspect... Here's what I want to create: ------------------------------------ A form split into two parts. There is a...
7
by: | last post by:
Hello, Does anyone have an idea on how I can filter the data in the gridview control that was returned by an sql query? I have a gridview that works fine when I populate it with data. Now I...
10
by: Michael B. Trausch | last post by:
Alright... I am attempting to find a way to parse ANSI text from a telnet application. However, I am experiencing a bit of trouble. What I want to do is have all ANSI sequences _removed_ from...
13
by: ramif | last post by:
Is there a way to print extended ASCII in C?? I tried to code something, but it only displays strange symbols. here is my code: main() { char chr = 177; //stores the extended ASCII...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.