The Bride of the First House (bride) wrote,
The Bride of the First House

Perl: JLJ

weather: sunny/cloudy
mood: amused

WOOHOO!!! I got it working. It was just a matter of ironing out minor Windoes things. =D

[Tuesday, May 21, 2002 - 1811h]

Okay, this wasn't actually posted with JLJ 2.3, but it actually connected to LJ for me and added itself to my "Clients used:" list, so I felt the need to explain =D

JLJ was meant to be used with some kind of UNIX or Linux. I was running it on NT2000 with ActivePerl. It should work the nearly same way. I tweaked the things I knew about, but I guess the things I don't know about were out of whack.

It barfed on submit_form_to_server()...

Welcome, Bride of The First House.
Subject? Perl: jlj
Enter body of text. use a '.' on a line by itself to end.

Testing with jlj 2.3
Welcome, Bride of The First House.
ERROR: Was not able to send message. (Client error: Missing required argument(s))

JLJ version 2.3 2002-April-02
Scott "Jerry" Lawrence
http:// jerronimo. livejournal. com
http:// www.cis.


[Update - 1833h]

Oh, how very interesting... I see why it's failing. Sorta. An LJ entry must have a value in the EVENT thing. EVENT comes from the var $body which is completely missing. So, of course, LJ laughs and tells me to go away. And, SUBJECT is also missing.

[Update - 2223h]

jerronimo wrote:
although, i think i know what might be the problem... it's probably looking for files lile ~yourusername/.jlj/queue/file where on your pc, those files do not exist at all.

Oh okay, yeah, that jives with what I found ... $fullbody was null just before being sent off. And when I was running it, I kept refreshing the /.jlj/queue directory, but nothing showed up.

I'll probably pick at it in the next little while =)

[Update - Wednesday, May 22, 1050h]

WHEEEEEEE!!! I got it. =D Some documentation:

1. .livejournal.rc can live anywhere as long as the HOME environment variable is defined and pointing to it. To define an environment variable:

a. Right-click on "My Computer" and go to "Properties".
b. Go to the "Advanced" tab.
c. Click on "Environment Variables".
d. Add a new System Variable (Variable Name = "HOME"; Variable Value = C:\path\to\.livejournal.rc\file).

I don't think you have to mess with the "base dir" setting in .livejournal.rc because it's not used it anyway.

2. Windows filenames cannot contain certain characters... ':' being one of them =) It was failing on creating $tempfilename, but not telling anyone =P I took the colons out of Line 1517.

3. Windows paths use '\' as the directory separator. So, everywhere that you build the directory paths, I had to change '/' to '\\' (I just changed them where I saw them, I don't know if I got them all).

And this should work on Win9x-2K with the default installation of ActivePerl.

An odd thing I noticed though... it seems to ignore the "Security:" setting in .livejournal.rc. I have it set to "Public" (that's the first one in the list and I even tried deleting the others). But my entries all get posted as "Private".

Oh! And I just discovered that we can have stuff sticking out of the <lj-cut> tags now =) =) =) Thanks ntang!! =)


  • Blast from the Past!

    weather : sunny outside : 17°C mood : ... Heh, it'll be interesting to see who reads this journal anymore =) The…

  • My Hermit Life

    weather : sunny outside : 24°C mood : ... Holy tap-dancing Christ on a pogo stick, it's been a really long time.…

  • Latest Nail Art

    weather : sunny outside : 21°C mood : ... I think I understand why I like nail art so much. I'm a Business Analyst by…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded