[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Convert text logs to color?

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Convert text logs to color?
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Thu 05 May 2011 10:39 PM (UTC)  quote  ]
Message
Sounds like the way some editors syntax-colour C code. You just follow some rules. Say you make a regular expression that breaks up a line like this:


Nick says, "hi there".


So you might make "Nick" one colour, "says" another, and what he says a third.

Effectively it would be like trigger-matching. You would also detect stuff like combat messages, etc.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by forral   USA  (79 posts)  [Biography] bio
Date Thu 05 May 2011 04:53 PM (UTC)  quote  ]
Message
Wow, this is an old thread of mine -_-

Twisol, the logs I have are from YEARS ago when I played on Portal (A 16-bit client with no support for HTML tagging or other functionality). All the logs are PLAIN .txt documents, with no HTML color codes or otherwise.

There is a website for the mud I play, www.clanannwn.net, which has the ability for players to upload .txt logs and it somehow parses and converts them to the correct colors for our specific mud. I haven't been able to talk to the website owner but I'd love to find some way of doing this
[Go to top] top

Posted by Twisol   USA  (2,229 posts)  [Biography] bio
Date Fri 08 Apr 2011 09:10 PM (UTC)  quote  ]

Amended on Fri 08 Apr 2011 09:12 PM (UTC) by Twisol

Message
I've actually got an answer for you! :D Unfortunately, I won't have something I can give you until the end of the day (it's 1pm here). I'm writing a browser-based client, and the front-end is written in Javascript. I just need to finish migrating the ANSI parser itself (which seems to work fantastically) into the front-end, then I'll be able to extract the relevant parts into a web page you can use. :)

(I'm assuming you have raw logging enabled. If not, then all that's being logged is plain text, meaning the color information was totally lost. But raw logging will preserve the color info.)

EDIT: Oh, wait. The OP posted two months ago. I have some other things I should probably be doing instead, so if anyone out there does want this conversion utility, just poke me and I'll build it.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Daniel P   USA  (77 posts)  [Biography] bio
Date Fri 08 Apr 2011 05:09 PM (UTC)  quote  ]
Message
I've not considered this...since it's possible to log straight to HTML from the beginning.

I'm sure the most straightforward way would be to open the text file in something like Word/OpenOffice, do a regexp search and replace with colored formatting. Except I don't have much of an idea of how to do that.

Another option might be to set up MUSHClient with triggers to change the output color for each line based on what the line is, and then somehow (??) parse the text files through MUSHClient line-by-line with the Simulate() function.

Or you could turn yourself into a zombie by manually converting every single file in a text editor. Actually, this might be easier than you'd think...a simple <body bgcolor="black">...</body> on the ends, and then <font face="courier" color="color-code"> for the beginning each line. Do one color at a time. It'd be fairly easy to spot similar lines just by scanning down, and hopefully your text editor would automatically move your cursor to the beginning of each line as you scroll down through.

I know it's not much of an answer, but it could be a starting point..
[Go to top] top

Posted by forral   USA  (79 posts)  [Biography] bio
Date Sat 12 Feb 2011 12:40 AM (UTC)  quote  ]
Message
Hi all

I'm sorting through years' of MUD files and I have found a bunch of old .txt logs (mostly from Portal Client, but the logs are just generic, nothing client-specific).

I'd like to convert them to full-color HTML files, and I know it can be done but I'm not sure how. There is a website for the MUD I play that allows players to upload their logs (www.clanannwn.net) and I've asked the webmaster how it converts to color but I have not received a response.

Perhaps one of you lovely knowledgeable people will be able to guide me?

Thanks very much,
Forral
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


1,689 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]