473,486 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Filtering ansi control sequences...

48 New Member
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 2537
kaarthikeyapreyan
107 New Member
Am not sure if what you are looking for is this but... try using the dialog utility.
Feb 5 '09 #2
vituko
48 New Member
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
3372
by: aa | last post by:
Is it OK to include an ANSI file into a UTF-8 file?
1
2126
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
7047
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
1606
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
9189
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
3617
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
14784
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
3179
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
48019
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
7094
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6964
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7123
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,...
1
6839
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
5427
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,...
1
4863
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...
0
4559
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3070
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
598
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.