Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
zelenik
Beginner


Joined: 23 Sep 2006
Posts: 11

PostPosted: Mon May 25, 2020 2:49 am   

How do I review colored logs without the escape characters?
 
This feels pretty silly. I have a number of log files that I am trying to look at but it is hard to make out the mud text with all the escape characters in the TXT file. I'm sure there is another way to do it... I believe I did it in the past, but cant seem to figure it out now.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4662
Location: Pensacola, FL, USA

PostPosted: Mon May 25, 2020 11:35 am   
 
Open up preferences.
Session tab on the left.
Logging tab up top.
Adjust as needed.
_________________
Discord: Shalimarwildcat
Reply with quote
gawen
Newbie


Joined: 15 Dec 2012
Posts: 8

PostPosted: Mon May 25, 2020 2:23 pm   
 
I made this python script to convert my old logs to html. I run it outside cmud and it works fine. only have to install the ansi2html through pip

Code:

import os
from ansi2html import Ansi2HTMLConverter

os.chdir('path_to_logs')
conv = Ansi2HTMLConverter()

fls = os.scandir()
for a in fls:
    with open(a.name,'r') as f:
        ansi = "".join(f.readlines())
        html = conv.convert(ansi)
        with open(a.name + '.html','w') as g:
            g.write(html)

html = conv.convert(ansi)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net