use.perl.org offline journal editing

Yanick on 2006-09-20T16:25:41

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 next step...

Alias on 2006-09-21T07:27:31

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. :)

Re:The next step...

Yanick on 2006-09-21T14:23:43

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>

Re:The next step...

Alias on 2006-09-22T06:31:21

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.

Re:The next step...

Yanick on 2006-09-27T14:22:04

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? :-)

My own approach

Aristotle on 2006-09-21T19:11:17

I do something rather more low-tech. I wrote about it in Writing HTML in textareas made convenient: a Markdown praise.

Works for me.