Martin Atkins (mart) wrote in lj_dev,
Martin Atkins

Admin Console 'help' command, plus little fixes

This patch primarily adds a 'help' command to the admin console. This is of negligible benefit to people using the web-based interface, of course, and is mostly for those using either the console thingy in LogJam or ljsh, where loading a web browser to view the command reference might be inconvenient or annoying.

I'm not really keen on how I did the wrapping. I'd actually like it better if the admin console returned some kind of basic markup which each interface was free to format in any way desired, but as it is I had no alternative but to do the wrapping server-side as the client has no idea what data it's getting in order to decide whether to wrap it or not, and how to wrap it. I have a better plan for this, which I'll go into shortly. Text::Wrap should probably be loaded outside this subroutine...

It also fixes the spelling of "this" in one of the help texts, and makes the web-based interface to the console escape HTML and BML in the output, since my help command was returning the argsummary with its variables enclosed in pointy brackets thus making them vanish.

My 'better' plan to the wrapping is for an option in the console-calling thing to specify a preferred output width. This can then be wired into the protocol mode so clients can send some number (or in the case of ljsh, send the actual width of the terminal) and have textual output wrapped to that width where possible or relevant. A good default of 80 could be assumed if the client doesn't supply a value. This is more of a workaround than a plan, but never mind.


  • cl-journal livejournal client

    Hey everyone, I'd like to present a livejournal client that I wrote to fulfill my needs but maybe there are other people that can find it…

  • SessionGenerate and ljloggedin

    Are there any information after release 86 and changes in cookies scheme to use sessiongenerate? It returns ljsession key, but this key is not enough…

  • Retrieving comments

    Hi, Is there a way to retrieve a list of comments made by user XXX (which may or may be not the currently logged in user) in the journals of users…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded