Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Yanick (3196)

Yanick
  (email not shown publicly)
http://babyl.dyndns.org/techblog

Journal of Yanick (3196)

Wednesday September 20, 2006
11:25 AM

use.perl.org offline journal editing

[ #31063 ]

I must admit that I find the journal editing page of use.perl.org a wee bit irksome. First, there's the itsy bitsy editing box (I'm sure there's a configuration somewhere to increase its size, but I haven't found it yet). Then there is the HTML formatting that, in these days of wikiness, feels awfully verbose and clunky.

The first itch, admittedly, can be solved by using Firefox's plugin ViewSourceWith , which allow to edit textbox field in your editor of choice.

But the second itch remained. So I rolled up my hack sleeves and typetty-typed a script that takes in a journal entry in good ol' pod, converts it to SlasHTML (using Pod::Simple and a XML::XPathScript template) and then uploads the result to use.perl.org (using Slash::Client::Journal ).

The script can be found here . To have it work for you, grep for cookie_file in the code and change it the right value for you. pod2slash entry.pod prints the formatted entry to STDOUT, and pod2slash -p entry.pod publish it to use.perl.org.

NOTE: for some reason the upload mechanism seems to choke when there are links. Darn, darn and triple darns.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • It would be cool if you made a mashup of that with App::GUI::Notepad.

    Then we'd be able to submit use.perl journal entries from a simple desktop app, rather than the command line. :)
    • I was thinking along the same line, but was considering Vim as the app of choice. :-)

      It's not the best mapping, but I was thinking of something like:

      :map ,p :!~/work/journal/pod2slash -p % >CR>
      :map ,q :!~/work/journal/pod2slash % >CR>
      • Well, the thing about using App::GUI::Notepad as a base is that then you have something that is completely standalone and CPAN-installable and should work on Win32/Linux/Mac the same.

        • Good point. I've installed A::G::N and will try to whip up something whenever I'll have time (which, at the rate things are going, could be in a few eons, so don't hold your breath). In the meantime... patches welcome? :-)
  • I do something rather more low-tech. I wrote about it in Writing HTML in textareas made convenient: a Markdown praise [perl.org].

    Works for me.