Pages: 1 [2]
  Print  
Author Topic: pyqscore  (Read 46968 times)
Ingesecition
Nub


Cakes 0
Posts: 10



« Reply #25 on: February 05, 2014, 05:54:53 AM »

Very nice!
Logged

*Ruthless*
Half-Nub


Cakes 0
Posts: 81



« Reply #26 on: February 09, 2014, 11:30:09 AM »

Has anyone gotten in touch with Panic yet? I still haven't spoken to him in quite a long time.. I'm pretty sure I can ask him about this if I ever speak to him in IRC again. I hope it's soon.. I really want to test the program out on my machine.
Logged
Neon_Knight
In the year 3000
***

Cakes 49
Posts: 3775


Trickster God.


« Reply #27 on: February 09, 2014, 11:50:36 AM »

Sometimes he connects to these forums, though it's been a long time since he posted AFAIK.
Logged


"Detailed" is nice, but if it gets in the way of clarity, it ceases being a nice addition and becomes a problem. - TVT
Want to contribute? Read this.
*Ruthless*
Half-Nub


Cakes 0
Posts: 81



« Reply #28 on: February 09, 2014, 12:06:48 PM »

Thanks for telling. I hope we can get an update on this quick. I know he works alot though.. but maybe he will read the forum one day and see.
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #29 on: February 09, 2014, 02:28:46 PM »

You may sending him a PM. This may trigger a notification email to him.
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Apo
Nub


Cakes 0
Posts: 6


WWW
« Reply #30 on: March 09, 2014, 05:40:54 AM »

Sorry for my late reply. I changed my e-mail address but forgot to change it here too.

Just run

Code:
python pyqscore.py games.log

On Linux python is most likely already in your $PATH and you could install pyqscore.py to e.g. /usr/local/bin , so running

Code:
pyqscore.py games.log

should be sufficient.

This command will parse your OpenArena log and write the output to daily.htm in the same directory which you can then view in your web browser of choice. If you don't like the colors you have to customize pyqscore_style.css.

I should receive e-mail notifications from now on. But if I'm too slow with replies you can also contact me directly. The information are available on this site.

http://linuxiuvat.de/contact.htm
« Last Edit: March 09, 2014, 05:45:04 AM by Apo » Logged
kernel panic
Lesser Nub


Cakes 6
Posts: 114


« Reply #31 on: March 16, 2014, 05:44:05 PM »

Hi.

I don't really play or follow the forum anymore. I stumbled upon it the other day and saw this. I made some modifications to pyqscore to hopefully make it straigtforward to use. I also included the suggestions made in this thread by Akts^Itachi and Apo as well as some modification from Apo's file, and fixed some stuff.

Now one should be able to double-click on pyqscore.py and see a file dialog. Use it to open the games.log file which is found in a location similar to:

   C:\Documents and settings\username\Application data\OpenArena\baseoa\games.log

or:

   C:\Users\username\Appdata\Roaming\OpenArena\baseoa\games.log

   (~/.openarena/baseoa/games.log in Linux, of course)

That should be it. A browser window should display the generated HTML file...The script can still be run from the command line, and the Tkinter window deactivated in the options.

Download it from here:

http://sourceforge.net/projects/pyqscore/

If someone can update the wiki links it would be cool. Also, I noticed that the file provided by Apo does not include the icons, so it won't really work properly (at any rate, thanks for providing it).

@Apo: should you want to use this version (I recommend it, it fixes a few things), you'll notice you should do some edits again to accomodate your server's directory structure and probably CSS stuff, and take a look at the options again to get the same behavior : )

Cheers

kp
Logged
Gig
In the year 3000
***

Cakes 45
Posts: 4394


WWW
« Reply #32 on: March 17, 2014, 01:14:31 AM »

If someone can update the wiki links it would be cool.
DO NOT LINK[/b]) h t t p s : / / openarena . wikia . com/index.php?title=Servers&diff=16545&oldid=16404]Done. However, the wiki does not require registration (although registering is welcome!), so anyone can edit it.
Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Apo
Nub


Cakes 0
Posts: 6


WWW
« Reply #33 on: March 18, 2014, 08:52:33 AM »

Hi kp,

thanks for updating your script! Nevertheless I'm quite happy with my current version and it just works. So better don't touch. Smiley
Logged
kernel panic
Lesser Nub


Cakes 6
Posts: 114


« Reply #34 on: March 20, 2014, 04:30:39 AM »

Hi, Apo

That's wise. Although remember, if it ain't broken, tweak it!

Cheers
Logged
LBS
THIS ONE POST HERE SHOULD DO IT.


Cakes 0
Posts: 1


« Reply #35 on: November 19, 2015, 03:15:23 AM »

Hi ive downloaded the pyqscore code  but having issuses with an error in abit of the code & dont really understand whats its trying to do

def mainProcessing(log):
    '''Main processing function'''
    server = Server()
    cgames = []              # Cumulative list of games: instances of Game()
    N = 1                    # Game number
    lines = (line for line in log.values())
    for line in lines:
        if line.find(' InitGame: ') > 0 and lines.next().find(' Warmup:') == -1:
            # New game started (no warmup). Begin to parse stuff
            game = Game(N)
            N += 1
            game.pos = 1          # Player's score position
            game, server = lineProcInit(line, game, server)
            game, server, valid_game = oneGameProc(lines, game, server)
            if valid_game == True:
                server.time = server.time + game.time - min(game.ptime.values())
                cgames.append(game)               # Append game to list of games
    return server, cgames

The bit that giving me a headahce is " server.time = server.time + game.time - min(game.ptime.values()) " comes up with "ValueError: min() arg is an empty sequence"

& does not make the html file ? hope anyone can help


Chris
Logged
kernel panic
Lesser Nub


Cakes 6
Posts: 114


« Reply #36 on: November 19, 2015, 01:52:47 PM »

Hi, LBS,

Thank you for reporting this. Turns out I never considered the possibility of "empty" games where nothing happened. I uploaded a quick fix to sourgeforge, which is just these two extra lines:

Code:
            if valid_game == True:
                if len(game.players) == 0:
                    continue
                server.time = server.time + game.time - min(game.ptime.values())

Have fun!

KP
Logged
Pages: 1 [2]
  Print  
 
Jump to: