Author Topic: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)  (Read 22831 times)

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« on: 2011-01-02 20:16:24 »
HKTools are split into different Classes (that work like regular plugins):
*HKIP allows you to have an always up-to-date IP displayed, it also displays "Not connected" if checkip.dyndns.org is unreachable.
*HKTS3 working together with the TS3 Plugin will display the nicks of actively speaking clients in your ts3
*HKMIRANDA working together with the Miranda Plugin will display the last message received if it is less than 30 seconds old
*HKFB2k working together with the fb2k plugin will display the currently playing song if any
To make layouting easier I also included a class that draws a rectangle and a class that draws a line

You can change the font and color settings in HK.lua (look for user settings). I recommend using only fixed fonts, hktools comes with it's own font, a conversion of the great 4x6 bdf font by Janne V. Kujala (http://mirtchovski.com/p9/9fonts/index.php), which is by far the tiniest font I was able to find and is exceptionally readable.

you need to install both hktools-0.20 and hktools-deps-0.20.zip, I included installers for the parts that can be automated to make this as easy as possible.

To give you a more visual idea of what all this actually does: http://img337.imageshack.us/i/3ja.mp4/

Since the dependencies grew very big with IBM's ICU library for unicode support I have to host them myself:
http://www.fileden.com/files/2010/3/8/2787526/hktools-deps-0.20.zip

SirReal

  • Administrator
  • Hero Member
  • *****
  • Posts: 735
    • linkdata.se
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #1 on: 2011-01-02 20:24:13 »
Nice work. Nice taste in music too, I see.

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #2 on: 2011-01-03 03:45:42 »
A quick preview, multiple lines for miranda: http://img842.imageshack.us/i/9ap.mp4/

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
HKTools 0.21 beta (IP, TS3, MIRANDA, foobar2000)
« Reply #3 on: 2011-01-04 04:10:50 »
There are still some things missing and possibly a lot of bugs, one of which I can't quite catch.
HK Miranda should now display messages in this format:
Code: [Select]
nick1:message1Xmessage2Xme
ssage4Xmessage6lineoneXme
ssage6linetwo
nick2:message3Xmessage5
however it seems that this doesn't always work perfectly so if you care to help me catch this (and possibly other) bugs please download the beta below and if you come across something that doesn't seem right attach your log file for that session to a post in this thread
« Last Edit: 2011-01-04 04:19:08 by lethys »

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #4 on: 2011-01-05 02:26:50 »
I believe to have fixed all of the major bugs with miranda in a few hours, so here's a new beta version.

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #5 on: 2011-01-05 12:24:00 »
I'm sorry for the inconvenience of having them named the same, this is a newer version with a one-line fix:
http://www.fileden.com/files/2010/3/8/2787526/hktools-0.21beta2.exe.zip it also includes all dependencies except for the miranda/fb2k/ts3 plugins but those haven't changed a bit since they were first mentioned by me

Known issues:
under rare circumstances that I haven't determined yet text may scroll down indefinitely until one of the messages is too old to be displayed and therefore removed and the pager resets its position.
nicks that use non-letter characters will break stuff badly
« Last Edit: 2011-01-06 15:17:17 by lethys »

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #6 on: 2011-01-06 16:33:14 »
hktools-0.21beta3:
among other things:
*fixed the nick regex
*miranda will now determine how many characters it can display based on the actual size in the layout
http://www.fileden.com/files/2010/3/8/2787526/hktools-0.21beta3.zip

Known Issues:
*under rare circumstances that I haven't determined yet text may scroll down indefinitely until one of the messages is too old to be displayed and therefore removed and the pager resets its position.
*you will have to have at least 100 lines in your miranda.txt or things break
*if you have many messages that are multiple lines long 100 lines from miranda.txt might not be enough to form 20 messages and things will break

TODO:
*reimplement pagers and miranda stuff as classes and fix the known issues along the way
*see what can be done to give pidgin the same support miranda has now (hopefully crossplatform)
« Last Edit: 2011-01-06 19:32:34 by lethys »

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #7 on: 2011-01-07 19:48:54 »
hktools-0.21beta4:
*Up and Down Pager is now a class
*Log Reader is a new class:
It will always hold the most recent 50 messages of a miranda log file created by msg-export.
a new logreader object is created like this
Code: [Select]
local log=hk.LogAccess:New(filename)After that it has to be initialized once: log:Initialize()
it will read the whole file and save it in a table, for now it only supports the syntax for miranda logs and will group multiple lines belonging to the same message as one entry in the table it will also store the current position in the file for later reference
Periodically log:Update() should be called, which will see if the file size has changed and put any new messages into place 1 of the message table and delete the latest.
You get access to the log by calling something like messages = log:Read() (which will return the last 50 messages, this is hardcoded for now)

The effect is that the use of cpu, ram and hard drive access goes down drastically!

*most miranda functions have been optimized for the garbage collector, any non needed objects are freed as soon as a function is done and the garbage collector is called manually. This probably has some bad effects on comparisons elsewhere, for example tables can't be compared without comparing the actual contents of the tables.

So beware that while miranda should be stable and ram consumption should be constant (it could easily go up to 100+MB before), for now other parts of hk tools might give trouble and I expect other lua scripts would give trouble too since the garbagecollector is quite aggressive now.

Also the log reader will only work if you have at least 50 messages in the miranda log file, which is an inconvenience. so you have to fill your log with 50 messages before things will start to work. (this will be fixed in the next beta)

New Link: http://www.fileden.com/files/2010/3/8/2787526/0.21beta4.zip
« Last Edit: 2011-01-07 20:38:45 by lethys »

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #8 on: 2011-01-08 02:53:25 »
Coming up:
Better TS3 support:
*join/leave notification: +NICK(OLDCHANNEL)/-NICK(NEWCHANNEL)
*text message support

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #10 on: 2011-01-09 22:01:23 »
Look forward to:
*more ts3 support (kick messages, move messages)
*pidgin support
« Last Edit: 2011-01-10 05:13:38 by lethys »

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #11 on: 2011-01-10 05:58:49 »
It nearly drove me mad, but I present to you: 0.21beta6 with pidgin support
other changes include the aforementioned ts3 support for kick/move messages

For the pidgin support you will have to install ActivePerl 5.10: http://www.activestate.com/activeperl/downloads
which will most likely require you to restart your computer (it did on my windows xp machine)

NOTE: the TS3 plugin has been updated, please copy the folders of TS3 to your ts3 folder

UPDATE: quick fix for G19 displays: font_height is reintroduced because the actual height of a font can differ from font_size.

so far there is no antialiasing, I will see what i can do about that.

http://www.fileden.com/files/2010/3/8/2787526/0.21beta6-1.zip
« Last Edit: 2011-01-10 06:32:18 by lethys »

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #12 on: 2011-01-10 20:54:36 »
I noticed that the layout functions are only stable if you use them with my tiny fixed font, I will see if I can get a decent looking fixed font for a G19 type display with nice hinting etc. and add layout classes that will work nicely on a G19.
I'll try to implement something like themes so it's easily possible to change the look.

SirReal

  • Administrator
  • Hero Member
  • *****
  • Posts: 735
    • linkdata.se
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #13 on: 2011-01-10 21:23:32 »
I just hope you won't have to rewrite too much when A14 comes out.
At least you'll have a lot more functionality to work with.
I was thinking about UTF-8 support for Lua. Which library are you using?
If it's feasible, I'll add that functionality to LH_Lua instead.
Qt has very good UTF-8 support, and it's a shame not to provide that to Lua scripts for free.

lethys

  • Moderator
  • Jr. Member
  • *****
  • Posts: 78
Re: HKTools 0.20 (IP, TS3, MIRANDA, foobar2000)
« Reply #14 on: 2011-01-11 19:13:40 »
I figured if I wanted good utf8 ibm's icu library can't hurt so i use it although it's huge in file size: http://luaforge.net/projects/icu-lua
when will A14 come out+ I noticed that many of my layout classes don't work so well when used with a big font so I'm planning a bit of a rewrite anyway to introduce "themes" to the plugin that make it easier to switch the look.
Most of then code I wrote though is completely independent of lcdhosts implementation though as far as I can see really the only thing that depends on lcdhost is the name of functions from the template and those are quick to change. well I'll see

 

anything