Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Hard line breaks in HTML logs

Hard line breaks in HTML logs

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Philip Mak   USA  (35 posts)  Bio
Date Tue 27 Aug 2002 06:59 AM (UTC)
Message
How can I log a world in HTML with color, WITHOUT having MUSHclient insert hard line breaks every time the line runs out of space?
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 28 Aug 2002 12:29 AM (UTC)
Message
It is designed to do that so that the HTML code looks like what you saw on the screen.

A workaround would be to do the logging yourself with a bit of mucking around with style runs, etc.

Alternatively, I suppose you would like a flag?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Philip Mak   USA  (35 posts)  Bio
Date Reply #2 on Wed 28 Aug 2002 12:31 AM (UTC)
Message
> Alternatively, I suppose you would like a flag?

Yes, I think there should be an option for making it not insert hard line breaks.

When hard line breaks are inserted, it becomes difficult to edit the log afterwards e.g. to filter out certain lines.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #3 on Wed 28 Aug 2002 01:19 AM (UTC)
Message
Isn't it hard anyway, because of all the <font> stuff when colours change?

Can't you just edit the log file, and replace all "<br>" with ""?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Philip Mak   USA  (35 posts)  Bio
Date Reply #4 on Wed 28 Aug 2002 05:16 AM (UTC)
Message
> Isn't it hard anyway, because of all the <font> stuff when colours change?

Actually, because my MUSH color-codes messages (e.g. pages are magenta, says are green), I can use "grep" or "grep -v" to filter out all of one type of message, etc. which I couldn't do if I logged in text format (which doesn't wreck the line breaks, but doesn't preserve the ANSI color, unless that has changed since 3.17).

> Can't you just edit the log file, and replace all "<br>" with ""?

There is no "<br>" in the logfile; line breaks are "\n" (which works while inside "<pre>"). The problem is that the HTML log doesn't distinguish between a hard line break and a soft line break, so there's no way for me to undo it by post-processing:

<font color="#FFFFFF">[Maison Yuriba] Lyra's Bed</font><font color="#C0C0C0">(#1977ae)</font>
<font color="#008080">It's a big, comfy bed with a thick mattress. The sheets covering it are a </font>
<font color="#008080">gentle cream color and are filled with dawn. There are several purple and white </font>
<font color="#008080">pillows near the head and the bed is easily big enough to accomodate two.</font>

<font color="#008080">On the side, there's a small lamp post on top of a flat, hardwood drawer. Next </font>
<font color="#008080">to the lamp, there's a small pen and a notepad.</font>
<font color="#C0C0C0">Players: Objects:</font>
<font color="#808000">Merin</font><font color="#C0C0C0">(#187PwerAC) </font><font color="#800080">Maison Map</font><font color="#C0C0C0">(#4481n) </font>
<font color="#808000">Amy</font><font color="#C0C0C0">(#565PwerACM) </font>
<font color="#808000">Yuriko</font><font color="#C0C0C0">(#106PWweACM) </font>


The above is an excerpt from an HTML log. Notice that the soft "\n" separating each line of the room description is indistinguishable from the "\n" where there really are hard line breaks.
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.


19,434 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.