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

C:\jlj>jlj.pl
[new]/offline?
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
.
[send]/postpone/queue/delete?
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 jlj@umlautllama.com
http:// jerronimo. livejournal. com
http:// www.cis. rit.edu/~jerry/Software/perl/#jlj

C:\jlj>

[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] 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 !! =)

• Meanwhile, Back at the Ranch...

weather : clear outside : 16°C mood : ... Part 3 of my update... yes, these last three posts were originally one. I…

• In Other News...

weather : clear outside : 17°C mood : ... My friend hasn't been playing much WoW anymore and has been talking about…

• Peace and Quiet in the Wake of Guild Implosion

weather : clear outside : 17°C mood : ... Well, then. Our raiding guild sort of collapsed since the last time I…

• Post a new comment

Error

Anonymous comments are disabled in this journal

default userpic