PlaneShift

Development => PlaneShift Mods => Topic started by: Aiwendil on October 19, 2009, 04:31:32 pm

Title: Small script to see who is online on laanx
Post by: Aiwendil on October 19, 2009, 04:31:32 pm
Maybe someone is interested in this. It's just a short python script I wrote to check who is online on laanx.

Download (http://rapidshare.com/files/295061964/PS-PlayerS.py-0.02.zip)

Screenshot:
(http://img194.imageshack.us/img194/2159/psplayerspy2.png)

How to install:
Just download the zip file and unpack it. To run the script you will need python around version 2.6, Python 3 won't work. If it's more commonly used I maybe convert the script. On linux I guess almost everyone will have python installed. You can check the version with "python --version" in a shell. After this all that is needed is a "chmod +x PS-PlayerS.py" on the file and then running it with "./PS-PlayerS.py". On windows most people will need to install python first. You can download python 2.6.3 here: http://www.python.org/download/ . After installing python all that should be needed to start the script is double-clicking it in a windows explorer. Sorry about Mac users...it was never tested on a mac and I have no idea if it works there. If someone is brave enough to try it out please let me know.

The script writes a log file and uses a simple configuration file. Both can be found at "~/.PStools/" in linux, at "C:\Documents and Settings\<username>\.PStools\" in windows XP and at "C:\Users\<username>\.PStools\" in vista.

The configuration file:
---
[config]
dialogwindowx = 990
height = 30
width = 20
frequency = 10.0
mainwindowx = 1109
mainwindowy = 0
dialogwindowy = 73
statuspage = http://laanx.fragnetics.com/index.php?page=char_stats
logfile = ~/.PStools/onlineplayer.log

[friends]
gms = Alerele Anqua Dahtess Dajoji Denorri Dohmo Eliseth Ingles Kander Katu Larizo Marathal Mektar Rhumdor Roberra Smekel Talad Taulus Tazen Venalan Vonor Xopal Zeetra Zordian
friends = Anaros Anumesa Caraick Dannae Detiey Domec Elvi Estava Hangatyr Hevore Ixala Jaguer Jaycol Kaisa Kitaja Lace Lhaa Lolitra Lucyenne Maudis Mordaan Morila Nixe Rigwyn Shew Stelanso Tinwei Vayl Zahii Zakrei
enemies = Paraya Aiwendil
---

[config] section
dialogwindowx: x coordinate where dialog windows appear in screen.
dialogwindowy: y coordinate where dialog windows appear in screen.
mainwindowx: x coordinate where the application window appear in screen.
mainwindowy: y coordinate where the application window appear in screen.
height: the number of lines in the text window showing the players online. By changing this you can change the size of the application.
width: how many characters fit in each line of the text window showing the players online. By changing this you can change the size of the application.
statuspage: the webadress of the status page of the server. Better not touch this.
logfile: Name and position of the logfile.
frequency: How long (in seconds) should the script wait before it checks the status page again.

[friends section]
gms: A list, separated by spaces, of GMs. Those names will show up blue in the application window
friends: A list, separated by spaces, of friends. Those names will show up green in the application window
enemies: A list, separated by spaces, of enemies. Those names will show up red in the application window

About the list:
A player will only show up in one of the lists. If a player is a friend and enemy he/she will only show up as friend. The priority is: Friends - Enemies - GMs - remaining players
The default GM list has the name from the PlaneShift Game Masters thread (http://www.hydlaaplaza.com/smf/index.php?topic=35716.0) in the PS forum (from 18th of October 2009). The list must be maintained by the user if a new GM joins the team.

Known bugs in version 0.02
- The text window with the player names messes up sometimes. It's usually correct again after the next update of the player list. I guess some multi-threading problem.
- The server status is not really tested...laanx crashes not often enough. And I have no idea what happens if the server is in the "locked" status for example, I guess the script shows it as "ok" then.

Oh...and up to now this script hasn't formated any hard-disks...but you never know. I can't think of much that can go wrong, but that doesn't mean anything...you don't blame me if something goes terribly wrong. Oh, and I know the sourcecode is pretty ugly...you don't have to look at it if you are disturbed by this.

Changelog: 0.02
- Added a status label for laanx
- Added a status label for the status webpage
- Added Enemies and GMs lists
- Added Config menu
- Added Saving of current window position
- Added possiblitiy to specify where Dialogs appear on screen
- Added Menu items for the GMs and Enemies lists
- Empty names can no longer be added to the lists
- The same name can't be added again to a list
Title: Re: Small script to see who is online on laanx
Post by: Raekh on October 19, 2009, 06:20:34 pm
Hey, nice and handy tool there!

2 ideas, without having the slightest clue about effort=P :

1) How about making use of qt or gtk, for a nicer appearance?

2) What I always wanted to have for the ingame buddylist is an option to add custom info to anyone buddied. So how about this? The window could be split horizontally, to display custom info for friends/enemies? But since names in the general list currently are "merely list items", I suppose it would be much more easy to implement by those add/remove-friend or enemy windows? Ideally you would click a friend or enemy in the list, and have the info displayed at the bottom. Hm... maybe this would also require the window to be resizable.. =x

Nonetheless, good work! \\o//

Quote
enemies = Paraya Aiwendil
You enemy'd yourself? =o
xD
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on October 19, 2009, 07:03:40 pm
Caarrie tested the script on a mac, and it seems to work. Thanks a lot for this. It's now included in http://www.planeshift.caarrie.org/PS_Buddy_list_mac.zip (http://www.planeshift.caarrie.org/PS_Buddy_list_mac.zip). To run it on a Mac X11 must be installed. The archive contains two applications:
The archive must be unzipped in the /Applications/PlaneShift folder in order to run at all.
Config and log files are in "~/.PStools" which is /Users/<username>/.PStools on a mac.

Caarrie also hosts the script at http://www.planeshift.caarrie.org/PS-PlayerS.py-0.02.zip (http://www.planeshift.caarrie.org/PS-PlayerS.py-0.02.zip) now. Thanks for this. For future versions of the script (If I feel bored again and do something on it ;)) only the "PS-PlayerS.py" file must be replaced on a mac. The PythonCheck and PS_Buddy_list applications should continue to run as long as the script isn't renamed. Thanks lot for this again Caarrie.

(Tested on latest 10.5.8 with python 2.5.1)

Glad you like it so far Raekh.

1) How about making use of qt or gtk, for a nicer appearance?
Oh, I would love to use Qt. Tk/Tkinter is something completely new for me, never used it before. It is...a bit limited. Ok, not really limited but doesn't offer everything I'm used to from Qt. But the problem with Qt is that you will need the libraries and the python bindings installed. Tkinter comes with python, so the python interpreter is all windows users have to install. I guess I can ask linux users to go to the package manager and install Qt and PyQt, but I have no clue how much work that would be on windows. (and the same for gtk and PyGtk)

2) What I always wanted to have for the ingame buddylist is an option to add custom info to anyone buddied. So how about this? The window could be split horizontally, to display custom info for friends/enemies?
Yes, one of the planned features I want to add. No idea yet how I do it, but last name, race, gender, guild and comments for names a planned...if I find the patience to do it. ;)

Quote
enemies = Paraya Aiwendil
You enemy'd yourself? =o
xD

Hehe, needed some neutral names for the screenshot...I already removed all not publicly known alts from the friends list ;). Oh, and that reminds me, Xillix is missing in the default GM list...I have no idea how her GM char is called.

Title: Re: Small script to see who is online on laanx
Post by: Raekh on October 19, 2009, 08:11:42 pm
Quote
I guess I can ask linux users to go to the package manager and install Qt and PyQt
Hm.. maybe there could be some check for qt and gtk, and in case of one of each this could be set in a conf file. The script would always start with checking for a definition in the conf first. If it is empty, it could check for qt/gtk on the system, if it is one of each it could make use of the according one. In addition there could be a third value, like "none", which would cause the script to start using tkinter (for Win and Mac)?
But then again, not really sure if checking such would entirely work without being root? Perhaps having a look at some of those plasmoids, that extract qt versions, could provide with some clue?


Quote
But the problem with Qt is that you will need the libraries and the python bindings installed
On the other hand, or for a start:
Forgetting about that loop to check for installed stuff, perhaps users could set such a variable themselves, in case they run KDE or Gnome, and have the required packages installed, for they could enjoy more eyecandy?

Anyway, most important question would be whether all this could be united simply and efficiently in one small script=P
Okay, that much about my current wild guessing.. ;)

Quote
Yes, one of the planned features I want to add.
Awesome o/
Title: Re: Small script to see who is online on laanx
Post by: Rigwyn on October 19, 2009, 08:26:36 pm

It would be neat if it had a feature for adding user defined fields of several types .. like  int, text, boolean
 
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on October 19, 2009, 08:34:12 pm
Aiwendil is lazy and keeps the Qt/Gtk ui in mind as a long term goal

It would be neat if it had a feature for adding user defined fields of several types .. like  int, text, boolean

It's a script, I provide the sourcode...one could say it's already possible to add these things ;). Ok, I got what you mean, I will look into it if it can be done easily.
Title: Re: Small script to see who is online on laanx
Post by: LigH on October 20, 2009, 09:03:09 am
 :-\ Another one of such scripts...

I believe Peeg already made one in PHP, which scans the Laanx HTML status page.

Once I took this script and changed it so that it scans the XML server report instead.

Then there was this major hardware failure, and Laanx had to be moved.

Since then, the XML report file is not up-to-date anymore.

Many people already asked acraig to make it available again.

So my "PlaneShift Online Buddy List (http://www.ligh.de/psolbl/GuildBuddyList.php?guild=The+Royal+House+of+Purrty)" always shows the server as "offline" now, for months at least - probably already a year.


 :'( acraig - do something!
Title: Re: Small script to see who is online on laanx
Post by: weltall on October 21, 2009, 06:05:12 am
- The text window with the player names messes up sometimes. It's usually correct again after the next update of the player list. I guess some multi-threading problem.

this seems to fix the problem

Code: [Select]
--- /tmp/PS-PlayerS.py 2009-10-19 16:23:24.000000000 +0200
+++ ./PS-PlayerS.py 2009-10-21 05:55:59.000000000 +0200
@@ -637,17 +637,17 @@
             self.text.delete("1.0", Tkinter.END)
             # only write the sections that contain any names
             if len(friendslist) > 0:
-                self.text.insert(Tkinter.CURRENT, 'Friends:\n', "FriendsTopic")
-                self.text.insert(Tkinter.CURRENT, friendstext, "Friends")
+                self.text.insert(Tkinter.END, 'Friends:\n', "FriendsTopic")
+                self.text.insert(Tkinter.END, friendstext, "Friends")
             if len(enemieslist) > 0:
-                self.text.insert(Tkinter.CURRENT, 'Enemies:\n', "EnemiesTopic")
-                self.text.insert(Tkinter.CURRENT, enemiestext, "Enemies")
+                self.text.insert(Tkinter.END, 'Enemies:\n', "EnemiesTopic")
+                self.text.insert(Tkinter.END, enemiestext, "Enemies")
             if len(GMslist) > 0:
-                self.text.insert(Tkinter.CURRENT, 'GMs:\n', "GMsTopic")
-                self.text.insert(Tkinter.CURRENT, GMstext, "GMs")
+                self.text.insert(Tkinter.END, 'GMs:\n', "GMsTopic")
+                self.text.insert(Tkinter.END, GMstext, "GMs")
             if len(playerlist) > 0:
-                self.text.insert(Tkinter.CURRENT, 'Players:\n', "PlayersTopic")
-                self.text.insert(Tkinter.CURRENT, playertext, "Players")
+                self.text.insert(Tkinter.END, 'Players:\n', "PlayersTopic")
+                self.text.insert(Tkinter.END, playertext, "Players")
             self.text.config(state=Tkinter.DISABLED)
             # and restore the position of the scrollbar again
             self.text.yview(Tkinter.MOVETO, pos[0])
Title: Re: Small script to see who is online on laanx
Post by: Akkaido Kivikar on October 21, 2009, 08:44:49 am
I like the enemies idea... that should be implemented in the buddy list in game, as there are several troublemakers I have on there so I know when to be on the lookout for OOC dramas in their usual haunts.

Looks nice as an application.
Title: Re: Small script to see who is online on laanx
Post by: Nakem on November 08, 2009, 10:25:41 pm
=== Update! See below (http://www.hydlaaplaza.com/smf/index.php?topic=36145.msg419453#msg419453). ===

If you don't mind, I did a Qt version of this. The interface is the same and it even uses the same configuration but there are binaries, too. So you don't have to install Python or Qt just download the archive and execute the binary. But there are only binaries for Linux and Windows. If anyone wants to compile the binary for Mac, just post here.

A screenshot for Linux:
(http://img697.imageshack.us/img697/7355/shot1.png)
And a screenshot for Windows:
(http://img689.imageshack.us/img689/2153/shot2b.png)

There are three versions:
The complete archive with everything included. (23MB)(.tar.gz) (http://gruenprint.de/nakem-repos/PS-PlayerS-qt/full.tar.gz)  (.zip) (http://gruenprint.de/nakem-repos/PS-PlayerS-qt/full.zip)
The windows binary and the Instructions. (9MB)(.tar.gz) (http://gruenprint.de/nakem-repos/PS-PlayerS-qt/win.tar.gz)  (.zip) (http://gruenprint.de/nakem-repos/PS-PlayerS-qt/win.zip)
The linux binary and the Instructions. (14MB)(.tar.gz) (http://gruenprint.de/nakem-repos/PS-PlayerS-qt/lin.tar.gz)  (.zip) (http://gruenprint.de/nakem-repos/PS-PlayerS-qt/lin.zip)

I hope you can use this anywhere... :)
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on November 23, 2009, 04:43:24 pm
Okay, finished the new version of the script. This time I included a basic info dialog for players. The infos are saved in a xml file in the configuration directory.

Download (http://rapidshare.com/files/311094433/PS-PlayerS.py-0.03.zip)

(http://img130.imageshack.us/img130/6871/mainwindow.png)

ChangeLog: 0.03

Known Bugs in 0.03

Sorry, the script is again untested on a Mac. To try it out follow the instructions here (http://www.hydlaaplaza.com/smf/index.php?topic=36145.msg411372#msg411372) and also download the new archive. Then replace the "PS-playerS.py" file in the "PS_Buddy_list_mac.zip" archive with the new version. If I haven't messed up too bad it should still work.

And a big thanks to weltall. The patch works pretty fine. Not really sure why the current cursor position is not always the end of the text box but the way weltall suggests to do is more clean anyway.

Getting rid of the console in windows
And last but not least a short guide for our beloved windows users how to get rid of the console window of python for the script. It's adjusted to windows users needs, namely uses the mouse as much as possible and needs the keyboard only at one point. I hope it's understandable.
Title: Re: Small script to see who is online on laanx
Post by: LigH on November 23, 2009, 05:22:31 pm
Should also work by right-clicking a *.py file, clicking the "Open with..." entry, adding "pythonw.exe" to the list of applications and selecting it, and checking the box "Always run with...".
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on November 23, 2009, 06:47:32 pm
Sure, with the problem that all python scripts are run without a console then...Not sure if that is wanted for all. There are a lot script that doesn't have any GUI at all.
Title: Re: Small script to see who is online on laanx
Post by: weltall on November 23, 2009, 08:21:35 pm
what about a guild entry too? :)
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on November 23, 2009, 08:40:36 pm
what about a guild entry too? :)
(http://img340.imageshack.us/img340/5103/infowindow.png)
There is one ;)
Title: Re: Small script to see who is online on laanx
Post by: LigH on November 24, 2009, 09:15:09 am
BTW - running Vista in VirtualBox is ... nerdy. ;)

The good old XML report had its advantage that it contained the guild information about the players currently being online. The player stats HTML page doesn't.
Title: Re: Small script to see who is online on laanx
Post by: weltall on November 24, 2009, 09:19:05 am
i had win7 in vmware and virtualbox then installed it natively and deleted the image (10gb are a lot)
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on November 24, 2009, 02:48:09 pm
The good old XML report had its advantage that it contained the guild information about the players currently being online. The player stats HTML page doesn't.
I guess that's one of the reasons why it's not available anymore...back then the xml report also showed the secret guilds of players. And I prefer to have the script an IC tool, meaning the user chooses what infos get in there. This way you can add only the infos your have and keep it as a reminder for the infos you know ICly about other characters.

Oh, and it's a themed windows XP...I have a native vista64 installed. But I boot it not very often...what leads to booting it even less because I hate having to install all the updates I missed the two month I didn't use it at each start.

Edit:
I tried the script with ezpcusa and it seems to work fine. Haven't done much testing, but at least I get the online player list. To use it with ezpcusa just open the "PS-PlayerS.py.ini" file and change the line
Code: [Select]
statuspage = http://laanx.fragnetics.com/index.php?page=char_stats
to
Code: [Select]
statuspage = http://planeshift.ezpcusa.com/index.php?page=char_stats
Then it should use the ezpcusa status page (http://planeshift.ezpcusa.com/index.php?page=char_stats) for the player list.

Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on November 30, 2009, 09:07:09 pm
Got Lhaa to host the zip file for me...a big thanks to her for that. So download from here (http://www.cyanureill.net/ps/PSpy/PS-PlayerS.py-0.03.zip) without the stup...annoy...whatever Rapidshare.
Title: Re: Small script to see who is online on laanx
Post by: Nakem on November 30, 2009, 09:19:35 pm
It still crashes on a non-threaded Tk lib  :'(
Maybe I'll get to update the Qt version...  :)
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on November 30, 2009, 09:25:16 pm
What crash? Any console output? But using the threaded Tk version here.
Title: Re: Small script to see who is online on laanx
Post by: Nakem on November 30, 2009, 09:32:35 pm
Here you go:

Code: [Select]
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 522, in __bootstrap_inner
    self.run()
  File "PS-PlayerS.py", line 359, in run
    self.parse()
  File "PS-PlayerS.py", line 395, in parse
    self.guicallback(self.players)
  File "PS-PlayerS.py", line 1167, in updateText
    self.playerCount['text'] = 'Players Online: ' + str(len(players))
  File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1209, in __setitem__
    self.configure({key: value})
  File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1202, in configure
    return self._configure('configure', cnf, kw)
  File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1193, in _configure
    self.tk.call(_flatten((self._w, cmd)) + self._options(cnf))
TclError: out of stack space (infinite loop?)

But it's known bug when using a non-threaded Tklib in a threaded programm.
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on November 30, 2009, 09:57:05 pm
Ah, I see. I guess it would be possible to build the script without using threads...but it would take some time to rework everything. Initially I only wanted to try out the python threads, but now the whole GUI somehow depends on the thread polling the server status. Would be interesting to know how many distributions are shipped without a thread-safe tcl/Tk.
Title: Re: Small script to see who is online on laanx
Post by: Nakem on November 30, 2009, 10:09:53 pm
Using Qt works for me and that's why I created the Qt version but it looks better, too. ;)
Maybe the problem is that you use the Tk functions of the main thread in the status thread? I don't really know.....

What about showing a notify message, every time a friend (or enemy) logs in/out? Maybe something like this:
(http://img692.imageshack.us/img692/6760/shot1q.png)

It would help, if you're waiting for someone in PS.
Title: Re: Small script to see who is online on laanx
Post by: Nakem on December 02, 2009, 06:40:39 pm
=== Update! See below (http://www.hydlaaplaza.com/smf/index.php?topic=36145.msg419453#msg419453). ===

Finished the Qt version! It is compatible with the configuration files of the latest release so you can use them both at the same time.
Like last time I built executables. And here are the screenshots:
LinuxWindows
(http://img222.imageshack.us/img222/1600/shot3.png)(http://img230.imageshack.us/img230/7607/shot1m.png)

And here are the downloads:
The binaries for Linux and Windows together with the source code and the documentation.24MB (.tar.gz) (http://www.gruenprint.de/nakem-repos/PS-PlayerS-qt-0.03/full.tar.gz) (.zip) (http://www.gruenprint.de/nakem-repos/PS-PlayerS-qt-0.03/full.zip)
The binary for Linux and the documentation.15MB (.tar.gz) (http://www.gruenprint.de/nakem-repos/PS-PlayerS-qt-0.03/lin.tar.gz) (.zip) (http://www.gruenprint.de/nakem-repos/PS-PlayerS-qt-0.03/lin.zip)
The binary for Windows and the documentation.9,1MB (.tar.gz) (http://www.gruenprint.de/nakem-repos/PS-PlayerS-qt-0.03/win.tar.gz) (.zip) (http://www.gruenprint.de/nakem-repos/PS-PlayerS-qt-0.03/win.zip)

I hope you like it.  :)
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on December 03, 2009, 06:21:07 pm
Thx Nakem, looks great. For the notification window...A bit hard fo me to do with Tk, at least if it should be a bit more than just a pop-up window. But I guess it's far easier to do with your Qt version. There are still some flaws in the script and things i would like to add. But once I have all the basic functionalityI think shipping it in your Qt version is the better way...and maybe just keep the Tk version for compatibility with macs.

[Edit:]
And just because I saw your signature...would it be a good idea to post a link to the script in psde too? I'm not often enough there to really know what's going on, but I guess there are some german speakers that don't read this forum regularly. And at least in german I can post...okay, posting in english too even if I can't speak really speak the language.
Title: Re: Small script to see who is online on laanx
Post by: Nakem on December 03, 2009, 10:48:42 pm
The box was actually made with "notify-send" (a simple command line program) but I fear it won't run under Windows. I'll try to find another way though.
I wrote the article (http://www.psde.de/wiki/buddy-list-deutsch-freundesliste) on PSDe but I'm not sure it it's fine that way.
One last thing though, maybe we could implement support for translations  ::) ?
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on December 03, 2009, 11:40:31 pm
Thanks for the psde article Nakem and the translation is not a bad idea. Shouldn't be too hard to do in python. I didn't use many strings yet, so I can look into it.
Title: Re: Small script to see who is online on laanx
Post by: LigH on December 04, 2009, 09:46:28 am
Also possibly useful - a free definition of user groups (more than the predefined friends/enemies/GMs) via GUI elements...
Title: Re: Small script to see who is online on laanx
Post by: weltall on December 11, 2009, 01:22:00 pm
for this to work on laanx you need to change PLAYERTAGCOUNT from 171 to 192
on ezpcusa no changes yet but will in future change in the same way
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on December 11, 2009, 02:03:39 pm
Thanks weltall, will include this in the next version of course. For now it shouldn't be too hard to open the script in a text editor and find the following part near the start:
Code: [Select]
# hardcoded config
CONFIGDIR = '~/.PStools'
CONFIGFILE = CONFIGDIR + '/PS-PlayerS.py.ini'
XMLINFOFILE = CONFIGDIR + '/playerinfo.xml'
PLAYERTAGCOUNT = 192
REPORTTIMECOUNT = 98
REPORTTIMEOUTMSG = 'Timeout!'
RACES = ("unknown", "Ylian", "Xacha", "Dermorian", "Nolthrir", "Stonebreaker", "Hammerwielder", "Lemur", "Kran", "Diaboli", "Enkidukai", "Klyros", "Ynnwn")

Change the "PLAYERTAGCOUNT = 171" in line 37 to "PLAYERTAGCOUNT = 192" and save. The script should display the names after this change again.
Title: Re: Small script to see who is online on laanx
Post by: Nakem on December 12, 2009, 09:01:44 pm
=== Update! See below. (http://www.hydlaaplaza.com/smf/index.php?topic=36145.msg419453#msg419453) ===


=== PS PlayerS 0.03-qt3 ===

I've implemented a notification bubble to show you when your friends log in and out. I also implemented a 'Minimize to Tray' feature. You can disable the two features, if you want.
LinuxWindows
(http://img229.imageshack.us/img229/9418/shot1g.png)(http://img704.imageshack.us/img704/9711/shot2.png)
It even has an updater which retrieves the current list from the forum.
(http://img706.imageshack.us/img706/9060/shot3m.png)

=== Mac users ===

Please install Xcode and X11 which are on the installation CDs/DVDs.
Then install MacPorts by downloading the disk image for Snow Leopard (http://distfiles.macports.org/MacPorts/MacPorts-1.8.2-10.6-SnowLeopard.dmg), Leopard (http://distfiles.macports.org/MacPorts/MacPorts-1.8.2-10.5-Leopard.dmg) or Tiger (http://distfiles.macports.org/MacPorts/MacPorts-1.8.2-10.4-Tiger.dmg) and double-clicking the pkg file that is contained in the disk images.
Please follow the instructions on the screen.

Afterwards you have to type the following two lines in the terminal:
Code: [Select]
sudo port selfupdate
sudo port install py26-pyqt4

And run the PS-PlayerS-qt.py file contained in the full package.

=== Downloads ===

IMPORTANT: After you installed the program please click on Config > Update GM list to get the current list of GMs. The one shipped with the program is outdated.

And here are the downloads:
The binaries for Linux and Windows together with the source code and the documentation.24MB (.tar.gz) (http://sourceforge.net/projects/psbuddylist/files/0.03-qt3/full.tar.gz/download)  (.zip) (http://sourceforge.net/projects/psbuddylist/files/0.03-qt3/full.zip/download)
The binary for Linux and the documentation.15MB (.tar.gz) (http://sourceforge.net/projects/psbuddylist/files/0.03-qt3/linux.tar.gz/download)  (.zip) (http://sourceforge.net/projects/psbuddylist/files/0.03-qt3/linux.zip/download)
The binary for Windows and the documentation.9,1MB (.tar.gz) (http://sourceforge.net/projects/psbuddylist/files/0.03-qt3/windows.tar.gz/download)  (.zip) (http://sourceforge.net/projects/psbuddylist/files/0.03-qt3/windows.zip/download)

Title: Re: Small script to see who is online on laanx
Post by: derula on January 23, 2010, 05:08:09 pm
Nakem, since I updated to openSUSE 11.2, your version doesn't run anymore. Aiwendil's runs fine. Qt is installed obviously, so is python-qt (if it matters). There is no console output, no stderr output either. Nothing at all happens if I try to start it. It doesn't hang either, just quits right after starting. The exit status is 0, i.e. success. Any clues what I might be doing wrong?
Title: Re: Small script to see who is online on laanx
Post by: Nakem on January 29, 2010, 02:18:51 pm
Found the bug and fixed it....
If you downloaded it before you have to replace the PS-PlayerS-qt file with this one: http://psbuddylist.svn.sourceforge.net/viewvc/psbuddylist/dist/PS-PlayerS-qt
(Please right-click on the link and select "Save as...")
Otherwise the downloaded file should work.
Title: Re: Small script to see who is online on laanx
Post by: derula on February 06, 2010, 12:58:48 am
Works again, thanks!

Edit: By the way, is there a way to make it use a different Qt theme?
Title: Re: Small script to see who is online on laanx
Post by: Nakem on February 15, 2010, 02:39:08 pm
There are three ways to change the theme:
Code: [Select]
[qt]
style=<the theme you want>
Title: Re: Small script to see who is online on laanx
Post by: derula on February 16, 2010, 06:59:50 pm
  • If you have KDE installed, you can set the kde theme to the theme you want.

I do use KDE, however the tool doesn't use KDE's theme (I use QtCurve). Instead, it uses something that looks like a native Windows (9x) theme. Maybe the bundled version of Qt is incompatible with the installed version of QtCurve? Would probably be easier (for KDE users at least) to have the modified Python script instead of the bundled binaries... :)
Title: Re: Small script to see who is online on laanx
Post by: Koios on February 16, 2010, 07:47:36 pm
It worked just fine yesterday. Today, however, all I get is the player count and the list reads: "Friends:" Clicking refresh list have said "Please wait..." for 20 mins now. Really liked this app, please help? :)
Title: Re: Small script to see who is online on laanx
Post by: Nakem on February 16, 2010, 11:03:55 pm
@derula
From the last release post:
Quote
The source code and the documentation.   ~136KB   (.tar.gz) (http://sourceforge.net/projects/psbuddylist/files/0.04-qt/source.tar.gz/download)  (.zip) (http://sourceforge.net/projects/psbuddylist/files/0.04-qt/source.zip/download)
Otherwise, feel free to browse the code and build your own executables: http://psbuddylist.svn.sourceforge.net/viewvc/psbuddylist/
Please read the README.txt, too!

@Koios
Which OS do you have?
If you're on Linux, please run it on the console and post what it shows.
Title: Re: Small script to see who is online on laanx
Post by: Koios on February 17, 2010, 01:40:26 am
*Koios slaps forehead* Knew there was something missing, sorry.
I'm on XP. It's weird, cause it's getting info. The player count vary and updates really quick, just nothing else showing than "Friends:"
*EDIT: It now shows two people in my Friends list, but more are on that aren't showing. ??? *
Title: Re: Small script to see who is online on laanx
Post by: derula on February 17, 2010, 03:32:08 pm
@Nakem: Well I suppose I'm blind, then. Stupid me.
Title: Re: Small script to see who is online on laanx
Post by: Nakem on February 17, 2010, 10:48:46 pm
@Koios
Did you try downloading the program again?
Don't worry it will keep your settings.
If it doesn't help, please download this file (https://sourceforge.net/projects/psbuddylist/files/0.03-qt3/windows-debug.exe/download) and save this file (http://paste.frubar.net/11890/txt) as start.bat (be sure the extension is the same and not something like .txt) in the same directory as the first file.
Afterwards run start.bat (with a double-click). You should now see the normal Window of the PS Buddylist. Please close it again and paste the content of the log.txt file in the forum please.
Title: Re: Small script to see who is online on laanx
Post by: Koios on February 18, 2010, 12:44:27 am
Log .txt:
Starting PS-PlayerS.py

The cmd window after double-clicking start.bat:
Traceback <most recent call last>:
  File "<string>", line 942, in updateText
  File "<string>", line 1001, in getLastname
  File "<string>", line 426, in getInfo
IndexError: list index out of range

Those 5 lines repeats themselves if the cmd is kept open.
Title: Re: Small script to see who is online on laanx
Post by: Nakem on February 18, 2010, 05:19:07 pm
=== PS-PlayerS-qt 0.04-qt ===

Sorry for the trouble.  :sweatdrop:
Found the bug and fixed it. The program couldn't handle empty comments and wasn't able to create the players list.

== Workaround for version 0.03-qt3 and older ==

Go to %userprofile%\.PStools\ (on Windows) or ~/.PStools/ (on Linux) and open the playerinfo.xml
Replace all lines looking like this ...
<Character Gender="unknown" Guild="" Lastname="" Name="Whatever" Race="unknown"/>
... with this ...
<Character Gender="unknown" Guild="" Lastname="" Name="Whatever" Race="unknown">.</Character>
... and it should work with the current version.

== Download ==

In the new version there are instructions for Mac Users in the Installation chapter inside the documentation as well as for Windows and Linux.
If you run the program the first time (and don't have the configuration form an older version), it now automatically updates the GM list.

Note: The documentation is included in all packages.
The source code~136KB(.tar.gz) (https://sourceforge.net/projects/psbuddylist/files/0.04-qt/source.tar.gz/download)  (.zip) (https://sourceforge.net/projects/psbuddylist/files/0.04-qt/source.zip/download)
The Windows binaries10.3MB(.tar.gz) (https://sourceforge.net/projects/psbuddylist/files/0.04-qt/windows.tar.gz/download)  (.zip) (https://sourceforge.net/projects/psbuddylist/files/0.04-qt/windows.zip/download)
The Linux binaries15.2MB(.tar.gz) (https://sourceforge.net/projects/psbuddylist/files/0.04-qt/linux.tar.gz/download)  (.zip) (https://sourceforge.net/projects/psbuddylist/files/0.04-qt/linux.zip/download)
Title: Re: Small script to see who is online on laanx
Post by: Koios on February 21, 2010, 01:10:16 pm
It works again!  \\o// *Koios makes waffles for Nakem*
Title: Re: Small script to see who is online on laanx
Post by: Nakem on February 21, 2010, 10:39:26 pm
/me eats the waffles.
Thanks  :lol:
Title: Re: Small script to see who is online on laanx
Post by: derula on February 25, 2010, 08:18:19 pm
Hey nakem.

I tried to start the thing and nothing happened. Here's the reason:

from playerinfo.xml:
Code: [Select]
<?xml version="1.0" ?>
<CharacterInfo><Character [...]/><Character [...]/><Character [...]/><Character [...]/><Character [...]/><Character Gender="

Okay, so that probably has something to do with my German translation and that the tool saves the literal gender values to the XML (as you said you want to release an official version with translation, should probably store 0,1,2 or maybe m,f,n for Genders and so on). Also, entering any non-ASCII characters in the character info description field won't work very well, either (should at least show an error message, what it does is fail silently, or maybe even worse, destroys the XML similarly to above example).

Anyway that's not so tragic, just thought I'd let you know.
Title: Re: Small script to see who is online on laanx
Post by: garoninja on April 05, 2010, 03:04:28 am
I was thinking about this script to see who is online and then I thought that this would be a great thing to have on my Ipod touch. I'm sure it is quite possible to do, but I dont have the programming skills to do it. If any one comes up with an Ipod compatible version then please let me know.
Title: Re: Small script to see who is online on laanx
Post by: bloodedIrishman on April 05, 2010, 10:33:17 am
I like it.  :thumbup:

Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on April 28, 2010, 02:59:05 pm
Can't believe I really do a serious post...*shrugs*

Okay, made my version of the script using the new RP server as default. Not really any other changes, can't be arsed to put more effort in it.
Install instructions the same as in my past posts.

Changelog for version 0.4:
- Using skylab as default server now
- updated the default GM list
- reads the correct html field with names now again without having to change the tagcount constant

RapidShare download. (http://rapidshare.com/files/381157306/PS-PlayerS.py-0.04.zip) (If anyone is up to host this for easier downloading do so...I'm not going to ask the person who hosted this for me in the past and who is now banned from the forums)

Important notes for the version:
If you used an old version of my script only downloading the new version won't help with using the new server. The old one is still in the configuration file which takes precedence over the hardcoded server address in the script. So to make it use the new server open "~./PStools/PS-PlayerS.py.ini" (or "%userprofile%\.PStools\PS-PlayerS.py.ini" in windows) with a text editor and remove the "statuspage = ..." line. It will be put back in place after the first start, then using skylab.

Okay, going to set my account for deletion again...if you have any questions sent me a PM in the OL forums (http://outlaws.myfreeforum.org/) or on psde. (http://www.psde.de/)
Title: Re: Small script to see who is online on laanx
Post by: LigH on April 28, 2010, 03:55:06 pm
(If anyone is up to host this for easier downloading do so...I'm not going to ask the person who ...)

http://www.ligh.de/PlaneShift/PS-PlayerS.py-0.04.zip



And stop whining. Either pro or con community. - Hurt your enemies by ignoring them.
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on April 28, 2010, 04:02:00 pm
Simple solution to that....delete my account as I requested. Until then I see no reason to stop at all...it far too much fun.
Title: Re: Small script to see who is online on laanx
Post by: LigH on April 28, 2010, 04:23:00 pm
:) I enjoy seeing you having fun.
Title: Re: Small script to see who is online on laanx
Post by: Lhaa on April 28, 2010, 09:47:50 pm
And stop whining.

Jerk.
The tool is made for YOU players who are still there by somebody who isn't going to even use it, be nice.
Title: Re: Small script to see who is online on laanx
Post by: LigH on April 29, 2010, 08:05:46 am
I am sorry that you misunderstood my intentions.

It was meant like a "Heads up!" - like a "Stop thinking of those you don't enjoy thinking of, stay with those you like."

Believe it or not - it hurts me each time I see friends vanish due to issues with others. I don't enjoy chosing between ex-friends either.
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on January 31, 2012, 08:07:37 pm
Just because I updated it to use myself again...here a link to a version for the current RP server. Doubt anyone still uses this...but in case you did remove the old config files or you have to adjust the server adress yourself in those.

http://minus.com/mov8alkUu#1
Title: Re: Small script to see who is online on laanx
Post by: Aiwendil on February 01, 2012, 07:42:24 pm
Yeah, I suck!. Sorry, packed the wrong script version. Corrected this today and now it really should use the new server. ;)

http://min.us/mov8alkUu#1o

Edit: Okay, as I just found out there are really linux distros who have a separate package for python-tkinter (or python-tk)...didn't expect something like this exists. If you are on such a distro you will have to install the tk-package as well.