Log in

No account? Create an account
ljKlient 0.2.0 Preview Release 1 - LiveJournal Client Discussions [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

ljKlient 0.2.0 Preview Release 1 [Oct. 3rd, 2007|11:00 pm]
LiveJournal Client Discussions


[mood |accomplishedaccomplished]

Today marks another milestone in the development of ljKlient — as the first preview of the 0.2 series is released.  Please go to the project website to download the package.

New features include:

  • Macros — press a key, and have ljKlient type in your favourite HTML code without hassle!  Even better, if you define it right (more on that later), it’ll even include the selected text wherever you want, and position the cursor similarly too.
  • A completely reworked music data formatting system (which, admittedly is still very much in the works) — if you now query for music, it will drop the parts which weren’t available.  So if there’s no information about the Album in the currently played track, no worries: you’ll only have one “—” there, and likely won’t have to edit the input.
  • A sidebar with a quickly accessible Friendlist, to accommodate the Drag&Drop feature of said list.  It still needs some cleanup and I’ll have to make it refresh if the big list (which (and only which) will be used — eventually — for friend adding, editing and removal) happens to get updated.  In short, it works and looks fine.  If you really can’t stand it, start ljklient with ‘--nosidebar’ for now.
  • Apropos of ‘--nosidebar’, which is a quite confusing name for the option, as it’s about the sidebar friendlist, we now can edit past events — the history calendar and list (latter to display the items on a certain day) are on the second tab of the sidebar.  Past event editing appears to work fine, although it’s something I rarely do, therefore it wasn’t as rigorously tested as other things, so please be cautious.  Needless to say, your pastevents get drafted too, so there’s plenty opportunity of getting them back somehow.  You can’t delete events yet.
  • Really really serious reworking of ljKlient’s internals, the code is now much cleaner, much more Qt4-ish, and most importantly, we don’t crash on exit.  That’s a good thing, right?
  • Apropos of exit: we have a systray icon now.  Doubleclick it to show or hide the editor or the login window (whichever is appropriate at the time — only one of them can be seen, ever, afterall), right click it to get a menu to quit the application.  Clicking X on the editor or the login window only hides the window, Minimize minimises it to task bar.  This behaviour is in accordance with the way many other applications work, including Kopete, KMail, X-Lite, Skype, and so on.
  • On past events.  Please make sure you Refresh after changing the journal with the combobox…  It’s more than likely that you get an error from LJ if you don’t do that and submit a post, but if you are an administrator of a community you MAY overwrite something with your post if they happen to share the same ID.  Please make sure you don’t fiddle with the journal thingy while you have an entry loaded (will disable it later when in Past Edit mode — to post things to a dozen journals it should be sufficient to load the Last Sent draft (see File menu), and change the journal there.)
  • We also seem to have a config file now.  It’s in an INI-like format, which is extremely cool because it’s ridiculously readable for humans — but unfortunately Python loves to rearrange items in there, so don’t rely on finding something at the same line where you left it earlier.  This also means I can’t quite provide an example one full of helpful comments, as those will get clobbered too.
  • And last but not least, we have a Qt4 interface now too, so people can get PyQt4 and enjoy ljKlient that way too — it is a work in progress though, and doesn’t have most of the KDE3 frontend’s features.

As mentioned, we have a config file.  It is located in ~/.ljKlient/ljKlient.conf.  This is where you tell ljKlient about the macros, for example.

INI style files are really simple.  They’re divided into sections, which have options in them.  Kinda like this:

[Section 1]
option1 = value1
option2 = value2

[Section 2]
option1 = value3
option3 = value4

Think of sections like folders, and options like files in folders.  Files which have a single value in them, be it a string or a number.

The macro format used by ljKlient is also very simple.  First of all, we work in two sections: Macros, and Macro shortcuts.  Every option is a number in these sections, and their values is the macro, or the macro shortcut.  I’ll give you an example

1 = <p>$^</p>
2 = <strong>$^</strong>
3 = <em>$^</em>
4 = <lj-cut text="^">$</lj-cut>
5 = $&#xA0;^
6 = <a href="^">$</a>

[Macro shortcuts]
1 = Ctrl+P
2 = Ctrl+B
3 = Ctrl+I
4 = Ctrl+K
5 = Ctrl+Space
6 = Ctrl+M

You’ll notice that the numbers are the same in the two sections.  This means that option “3” is the macro “<em>$^</em>”, with the shortcut “Ctrl+I” assigned to it.  Simple, huh?

The macros in the example seem to be HTML code bits — just what are the $ and ^ things then?  Well, the $ character looks like an S (I’ll never understand what it has to do with the name Dollar, maybe I should wiki it up), which means Selection.  The $ thing will simply get replaced by whatever text you had selected before activating the macro.  I don’t know what it does on multiple $s, feel free to figure it out yourself.

The ^ is sometimes also called a “caret” — and this is where your cursor will be positioned after the macro has run.  This really needs to be in the code only once.  I think it will position to the first ^ and leave the rest alone, but I’m not particularly sure right now (I wrote the macro code in August, and haven’t touched it ever since, because it seems to just work without any problems at all).

All clear?  Good.  Now get downloading :)

PS: to try the Qt4 GUI, create a GUI section with the guitype = Qt4 option-value pair defined.


From: calrefawena
2007-10-03 09:40 pm (UTC)
Yay :D

I'd be using this right now if Fedora didn't still have Python 2.4 by default...

(At least that's why I assume it chokes on the x if y else z syntax)
(Reply) (Thread)
[User Picture]From: ralesk
2007-10-03 10:03 pm (UTC)

I think I fixed that now :) Hopefully the next time you download it, it’ll work. It throws an “str isn’t callable” error at me on exit, but it seems to work with python2.4 now :)

(Reply) (Parent) (Thread)
From: calrefawena
2007-10-03 10:08 pm (UTC)
Wow, thanks!

I was installing Python 2.5, but now it works anyway, I'll not bother just yet :)

Thanks again :D
(Reply) (Parent) (Thread)
[User Picture]From: natf
2007-10-05 11:08 pm (UTC)
Will that work on BSD unixes like Mac OSX?
(Reply) (Thread)
[User Picture]From: ralesk
2007-10-05 11:37 pm (UTC)
FreeBSD worked back in the 0.1.x days and I don’t expect it to be otherwise now either. Unfortunately I can’t quite test it.

If you can get KDElibs and PyKDE3 on your OS X (in the X Window session), for example from fink, that should do.

On the other hand, the Qt4 frontend is supposed to run natively on OS X, as long as you have PyQt4 installed (www.riverbankcomputing.com), along with its dependencies (let’s see: python, qt4 (from trolltech), sip (also from riverbankcomputing)), it should run. There are a few delicacies that my software isn’t prepared for, such as the placement of the configuration directory, which I cannot test without having access to a machine running OS X.

Also, eventually I hope I can make self-containing binaries for both Windows and OS X, so users won’t have to install a thing to get this program to work.
(Reply) (Parent) (Thread)
[User Picture]From: natf
2007-10-08 10:59 pm (UTC)
Also, eventually I hope I can make self-containing binaries for both Windows and OS X, so users won’t have to install a thing to get this program to work.

I think that I will have to wait for that, then. My installing/coding/etc. 1337 skilz are a bit MonSter-eaten these days (I am a medically retired with multiple sclerosis programmer and QA) but you can always ask me to test something that is self installing if you need a hand!
(Reply) (Parent) (Thread)
[User Picture]From: ralesk
2007-10-08 11:10 pm (UTC)

Sure thing :D Thanks!

(Reply) (Parent) (Thread)