punkbuster pb_sv_autoss


(tjw) #1

In case anyone else is interested in doing the same, here is a shell script I run from from cron that conceales guids in punkbuster screenshots for public display:


#!/bin/sh

PATH="$PATH:/usr/X11R6/bin"

SRC="/usr/local/enemy-territory/enemy-territory/.etwolf/pb/svss"
DST="/www/et.tjw.org/admin/screens/auto"

#clean up previous shots from web dir
rm $DST/*.png
rm -f $DST/thumbs/*

#copy new shots
for i in $(find $SRC -name "*.png" -printf "%f
"); do
	height=$(identify $SRC/$i 2>/dev/null | \
		sed 's/.* [0-9]*x\([0-9]*\)+0+0 .*/\1/');
	# top of the box is 49 px from bottom
	y1=$(echo "$height - 49" | bc)
	# bottom of box is 39 px from bottom
	y2=$(echo "$height - 39" | bc)
	draw="rectangle 15 $y1 213 $y2"
	convert -fill 'white' -draw "$draw" $SRC/$i $DST/$i
done;

#update header
today=$(date +%Y-%m-%d)
echo "<h2>et.tjw.org auto screen shots - $today</h2>" > $DST/header.php

#clean up old screenshots from pb dir OPTIONAL
#sudo /bin/rm $SRC/pb*

(Requires ImageMagick)

You can see the end result here (refreshes every hour):
http://et.tjw.org/admin/screens/auto/

pb settings:

pb_sv_ssheight 1200
pb_sv_sswidth 1600
PB_SV_SsXPct 50
PB_SV_SsYPct 50
pb_sv_sssrate 4
pb_sv_autoss 1
pb_sv_autossfrom 300
pb_sv_autossto 1500

I’m using dmi to generate the thumbnail index page:
http://tjw.org/dmi/


(DG) #2

Out of interest, why would you want to remove the GUID’s? :???:


(tjw) #3

Admins on my server use their guids to log in to the website to vote and post comments so putting them in public view would be bad.

This script does not fully hide the guids. It leaves the last 8 characters of the guid visible just like /pb_plist does.


(Fusen) #4

why not just use real usernames? ;X


(ouroboro) #5

why not just accept that the guy has a reason for doing it the way he does it, and thank him for the open source code?


(DG) #6

why not just…

:wink:


(tjw) #7

“Everything should be made as simple as possible, but not simpler.” – Albert Einstein

The server runs shrub so all any of the admins has to do is ‘!setlevel ETPlayer 1’ and that player can immediately log in to the site to vote and post comments.