How do I submit code without having to type it into the browser? I get the feeling that I'm missing something. I have two scripts and a scrap of SQL that I would like to post to PerlMonks.

Replies are listed 'Best First'.
Re: Submission Alternatives
by rjray (Chaplain) on Mar 26, 2002 at 03:59 UTC

    I've only ever used cut-n-pastse, but there are a few things that will help:

    • Try to keep your line-length down at 70 or so, if possible. The <code> tag will handle clean wrapping of the lines for display, but that will reduce the wrapping, which will be easier to read.
    • Using tool-of-choice, expand tabs out before copying into the paste-buffer. Depending on how the application (xterm, kterm, xemacs, etc.) interacts with your windowing environment, it may or may not do that automatically.

    --rjray

Re: Submission Alternatives
by Fletch (Bishop) on Mar 26, 2002 at 15:45 UTC

    <musing>Wouldn't it be cool if there were an (XML-RPC|SOAP) interface to posting and editing. Then one could write wrappers which would let you edit and post things using your-favourite-editor-here . . . </musing>

      or even a "upload file" button on the submission forms, with a little pulldown indicating if hte file contains your complete post, or just some code that should be wrapped in CODE tags and appended to what you type in the browser.
        File uploads would probably raise security issues noone wants to handle... but on the other hand, we can upload images after we reach a certain level (trusted or just an extra feature?). It would be nice to upload some code, then come to a preview page as usual, I agree...

        What one maybe would really like would be an upload script, a'la

        [prompt]# monkupload script.pl
        perhaps? That would require having some kind of list of "pending" submissions somewhere I guess, so one could lay the final touches via a browser, as usual. I am only speculating here, but with some special markup possible in the uploaded file, it could be a nice feature...

        Of course, I am quite happy enough with copy/paste, so I guess it is only my wish for more cool features in all situations that shows its ugly head again. :)


        You have moved into a dark place.
        It is pitch black. You are likely to be eaten by a grue.
      That would be a great thing, but, supposedly, is very unlikely to be implemented, as it would force the developers to export all the very non-trivial PM interface via SOAP or whatever.

        For posting replies, what more needs to be exported other than one routine that takes the parent node id, title, and text? The only other thing that'd be nice to have might be a get_node() that returns the title, author, and body of said node (for throwing through supercite, of course :).

        Conceptually I'm just looking for something along the lines of what pudge has working at Use Perl for the journal system with slash. See this entry in pudge's journal. The two routines I imagine are analagous to add_entry and get_entry there.

Re: Submission Alternatives
by shotgunefx (Parson) on Apr 05, 2002 at 12:03 UTC
    You could just write a script with LWP::UserAgent that logs in and posts it.

    -Lee

    "To be civilized is to deny one's nature."