Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip ASCII color codes or replace them with HTML colors #18

Closed
barnumbirr opened this issue Sep 16, 2012 · 2 comments
Closed

Strip ASCII color codes or replace them with HTML colors #18

barnumbirr opened this issue Sep 16, 2012 · 2 comments

Comments

@barnumbirr
Copy link

Strip ASCII color codes or replace them with HTML colors, mainly because this is pretty "ugly":

[21:00:51] <TESTBOT> �[37m[�[31mTEST VF�[37m] - �[35mhTESTBOT TEST �[37m[TEST AGAIN]

Kudos for your hard work though, that piece of code is awesome.

@barnumbirr
Copy link
Author

Actually fixed it myself: https://gist.github.com/3735233

Added
msg = re.sub(r'\[(\d{1,2})m', '', msg)
in line 214 and that's pretty much it.

@excid3
Copy link
Owner

excid3 commented Sep 17, 2012

Awesome. I'll got ahead and merge this into the code.

@excid3 excid3 closed this as completed in db3f3ea Sep 17, 2012
mtigas pushed a commit to mtigas/logbot that referenced this issue Mar 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants