Mudlet features and API requests

Gauroth
Posts: 22
Joined: Tue Sep 07, 2010 2:44 pm

Re: Mudlet API requests

Post by Gauroth »

Honestly not sure why I didn't think of that, it works nicely. Thanks

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mudlet API requests

Post by Vadi »

Yeah. But searchRoom needs to be fixed to return results in id - name order, because name - id means non-unique search results are lost.

Iocun
Posts: 174
Joined: Wed Dec 02, 2009 1:45 am

Re: Mudlet API requests

Post by Iocun »

Rakon wrote:Functions to get the html code of the currently selected line.

IE getHtml(window,linenumber) if no window, main is used. If no line number, then the last non ga or newline line is used. getHtml() would return the full html code of that line (exactly how copy html in the right context menu does) for further usage.
This would be really cool. I log with my own logging functions, and so far I found it too much work to implement my own html logging for that. A function like this would be immensely helpful.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mudlet API requests

Post by Vadi »

I don't think it's hard, take a look at screendump which logs to html

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Mudlet API requests

Post by Rakon »

Vadi wrote:I don't think it's hard, take a look at screendump which logs to html

I have screendump function that will log in HTML. I want the getHTML function so I can log line by line, for a few reasons:

1) I want an exact HTML log of what -I- see.
2) I do not want to wait until my sessions is over to log the buffer. (sometimes I just want to log a spar or two)
3) If I do a screen dump of my 5million line buffer, the log file generated is about on AVERAGE, 20MB or so. Ridiculous!
4) I want to manage the size of my log file and exactly what is logged. IE, again, for spars. I start a spar, I start logging. Spar is over, I stop logging. If I use the in client logging, it logs the mud text not HTML colours/buffer output. If I use screendump, it dumps the entire buffer and then I have to split/sed/awk/sort/edit the 20MB file into a more manageable file size, to extract only the log information I want. (a spar or two)

Based on the above, Screendump function is not viable alternative. I request the getHTML() function as specified.

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mudlet API requests

Post by Vadi »

Yeah that was a reply to Iocun, but to cover your points:

1) Screendump does log what you see
2) you don't have to?
3) Same will be with this probably, if not bigger
4) umm... have you realized that screendump by default dumps all lines? you should just mod it to dump a certain amount, or even just use it's algorithm and log line by line on the next line.

That's not to say it's not useful to have, the C++ version would be much faster. But there is a feasible alternative you can implement meanwhile.

User avatar
Rakon
Posts: 350
Joined: Tue Feb 16, 2010 7:41 pm
Contact:

Re: Mudlet API requests

Post by Rakon »

Vadi wrote:Yeah that was a reply to Iocun, but to cover your points:

1) Screendump does log what you see
2) you don't have to?
3) Same will be with this probably, if not bigger
4) umm... have you realized that screendump by default dumps all lines? you should just mod it to dump a certain amount, or even just use it's algorithm and log line by line on the next line.

That's not to say it's not useful to have, the C++ version would be much faster. But there is a feasible alternative you can implement meanwhile.
I do not believe you are understanding the request of this function is for. Screendump does not serve the purpose requested.

C++ version will be much faster yes.

When I am able to output everything between a start line point and and end line point, with the HTML colour of a screen dump (while being fast enough to not lock up mudlet as the screendump function provided by you does) , then I would not need to request this function be added.

Take a look at how Mushclient logs to file. (Yes, I know mudlet is different. ) But, when I click 'start log' or use the function openLog(), it opens a file and begins logging what is on the screen AFTER that point. It does so in HTML, and exactly what is shown on the output screen, not just the incoming text. IE, it copies/writes to file after all processing is complete on the line. Mushclient continues to log, until the button 'stop logging' or equivalent function is called. Then it writes the HTML post amble, and closes the log file. In this way/method I never once lagged out or had Mushclient lock up will writing the log file.

As well, with Mushclient the largest spar log file I have, is a whopping 650kb. http://penguincoder.com/logs/Exelethril ... 20Win.html .

With Mudlet using the screendump, a typical spar file is 2-4MB. http://penguincoder.com/logs/Calleis%20 ... 20win.html .

Why is Mushclient's HTML logging much more efficient and space conserving than Mudlets?

User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Re: Mudlet API requests

Post by Vadi »

I think you're using an old screendump version, and also screendump != Mudlet's HTML logging, it's a Lua-side implementation. On the topic of efficiency, right-click and 'view page source'.

And Mudlet does have HTML logging, just enable it in settings.

Alyven
Posts: 33
Joined: Sat Oct 01, 2011 8:43 pm

Re: Mudlet API requests

Post by Alyven »

Is there a function which get the char from a room. something like getRoomChar(roomID) ?

User avatar
chris
Posts: 493
Joined: Fri Jun 17, 2011 5:39 am

Re: Mudlet API requests

Post by chris »

I'm not sure what you mean by the char from a room

Post Reply