HTML logging??

Posted by Tillfallig on Wed 14 May 2003 04:44 PM — 20 posts, 67,472 views.

#0
Hi I use MUSHclient 3.04 and I am wondering can you log in color?
and is there a way to log directly to html?
// Tillfallig
Greece #1
Use 3.42 :p
Australia Forum Administrator #2
Once you have upgraded to a recent version (eg. 3.42) go to the logging configuration dialog and check the HTML box.
USA #3
The game I play uses color strings for names, and often uses multiple colors per name, so that my character Davin appears as:

<font color="#999999">D<font color="#FF0000">a<font color="#FFFF00">v</font>i</font>n</font>

What I wonder is if there is a way to have MUSHClient send these colors to the log, rather than me having to apply them later when editing the log.

Any ideas?

J
Australia Forum Administrator #4
You don't see those tags on the screen do you? If so, something is wrong. However to log the colours, either use HTML logging, or look for the ANSI log plugin from the plugins area.
USA #5
I'm not seeing them on the screen, but when I try the ansi log it gives me somethink like:

Centipede

Should I take out the Ansi log and try it?

J
Australia Forum Administrator #6
The ANSI log is supposed to save the ANSI codes which sounds like it is doing.

The HTML log save the HTML codes, which you can use to make a web page that looks like the original. There is no direct way of simply making a colour log.
USA #7
You can always log to an .html file (or change the extension later) and then have the log add the standard html pre/post amble (theres a button on the log page).


Then youd open it in IE/Netscape/webbrowser and itd show up like colored text.
USA #8
I am having a peculiar problem. From my world window I can click edit and select all and then right click on the highlighted text and choose the copy as HTML option. Then paste it into an regular text editor and manually change the file extention to HTML and see highlighted backgrounds. Even backgrounds with black spaces. However, when using the logging in html option it does not pick up any background colors whatsoever. I've tried fiddling around with the settings to see if I could do it but to no avail. I wanted to make a pretty log of my MUSH showing off all the nice ansi art and what have you.

Copying it by hand appears to place in it some code that looks like this: <span style="color: #C0C0C0; background: #20B2AA"> blah blah blah </span>. This apparently maintains the background color of the log.
Amended on Mon 03 Nov 2003 02:03 AM by Raveness
USA #9
Logging uses the <pre> tag, for preformatted text, that is why the spaces arent converted.

The background I believe would be formatted within the header, it is in mine. Do you have the 'standard html header/footer' in your logging options?

That is also where the preformatted tag is.
USA #10
Yes I did use the standard preformatted prefix etc..

For an example of the problem see:
http://www.geocities.com/kamirah_adkins/Log.html
This log was taken using the logging option on the game.

http://www.geocities.com/kamirah_adkins/Log2.html
While this one was taken by selecting all that same text, then right clicking on it and selecting 'Copy as HTML'. Then pasting it into MUSHClient's text editor and saving it as Log2.html.
Amended on Mon 03 Nov 2003 02:15 AM by Raveness
Australia Forum Administrator #11
My immediate reaction when I saw your example pages was that the two different pieces of HTML must have been done by different code in MUSHclient, otherwise why the difference? That turns out to be the case. :)

Further investigation reveals that the "log to disk" option does not even attempt to do the <span> blah </span> code which is why your disk log does not have background colours. Why not, I can't say, except that when I added the background colour in "copy to clipboard as HTML" I did not also add it to the normal logging.

As for why the colour is there, do you have "bleed background colour to edge" option set in global preferences?
Australia Forum Administrator #12
As a workaround if you used an editor that let you find-and-replace variable strings you could find instances of <span blah> and </span> and replace them both by an empty string.
USA #13
That that suggestion is backwards Nick. He needs to insert spans into the code to make the ANSI art work, not remove them. ;) Though adding them in manually is impractical at best.
Australia Forum Administrator #14
If you look at his example pages, the layout is OK, but the colour is bleeding wrongly. This is caused by the <span> tags not the lack of them.
USA #15
I did. I assumed that the color bands above and below the text are 'supposed' to be there as a border to visually seperate the contents. I am not sure that is caused be bleeding and not intentional. He also never said that this part was wrong, just that the HTML Log didn't do it at all.
USA #16
There's no bleeding on there. :) It's supposed to look that way. :) My aim is to have the background color there. Often to accent things or make things look artsy and what have you when coding we just ansi(Cx,blah) or the like. Log2 page is the desired look. The page with the spans. Also, I'm a she, thanks.

This is the code that was used to produce that border effect:

EXCERPT [#3]: %r[ansi(C,center(,78))]%r[ansi(C,space(10))][ansi(hw,center(RANDOM RP EXCERPT,68))]%r[ansi(C,space(10))][ansi(hw,center(~~~~~~~~~~~~~~~~~,68))]%r[ansi(C,space(10))]%b[iter(wrap(u(ex.%0),62,66,|),[switch(#@,>1,[ansi(C,space(10))]%B%B)]##,|,%r)]%r[ansi(C,center(,78))]%r

That was the best example of hey? where'd the background go. Also, notice that at the bottom you can't see when I type 'say [ansi(Cx,TESTING)]'
Amended on Wed 05 Nov 2003 02:19 AM by Raveness
USA #17
Well Raveness. Originally the copy to HTML didn't give you the backgrounds either. Nick was unaware at the time that <span> tags could be used. The next version came out with this added to the clipboard copying, but he obviously forgot to add it to the log output. That is why you are not seeing it in logs. This is frankly an oversite/bug in the current version.
USA #18
Okay, thanks.. I'll patiently await the next release and continue to log the way I'm logging. :) It's not really that big a problem, I was just wondering initially if there was something I was doing wrong. Thanks for the assistance and prompt responses and stuff.
Australia Forum Administrator #19
Added as bug #501.