-
This commit is contained in:
parent
469c4a660a
commit
5eae26057f
@ -22,7 +22,7 @@ image() {
|
||||
declare -A values
|
||||
|
||||
tmpfile=$(mktemp --suffix=.tiff)
|
||||
transform='-resize 300%x200% -contrast -channel green -threshold 50%'
|
||||
transform='-resize 350%x200% -contrast -channel green -threshold 50%'
|
||||
|
||||
if (( debug_import >= 3 ))
|
||||
then
|
||||
@ -216,6 +216,12 @@ image() {
|
||||
value=${value//_/}
|
||||
read values[Recruiter] junk <<<"${value//,/}"
|
||||
;;
|
||||
#Agents Recruited 1
|
||||
'Consecutive Days Hacking'*)
|
||||
value="${line#Consecutive Days Hacking }"
|
||||
value=${value//_/}
|
||||
read values[Hackaton] junk <<<"${value//,/}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
||||
@ -18,9 +18,9 @@
|
||||
|
||||
send_headers() {
|
||||
local timestamp do_exit header thisdate expiredate
|
||||
read timestamp < <(stat -c %Y $0 settings "$rrdfile" lib/* .importing 2>/dev/null|sort -r)
|
||||
read timestamp < <(stat -c %Y $0 settings "$rrdfile" lib/* dav/* .importing 2>/dev/null|sort -r)
|
||||
thisdate=$(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z' -d @$timestamp)
|
||||
expiredate=$(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z' -d "+${1:-60} second")
|
||||
expiredate=$(LC_ALL=C TZ=GMT date +'%a, %d %b %Y %X %Z' -d "+${1:-5} second")
|
||||
if [[ $thisdate == $HTTP_IF_MODIFIED_SINCE ]]
|
||||
then
|
||||
echo "Status: 304 Not Modified"
|
||||
@ -28,7 +28,7 @@ send_headers() {
|
||||
fi
|
||||
echo "Last-Modified: $thisdate"
|
||||
echo "Expires: $expiredate"
|
||||
echo "Cache-Control: must-revalidate, max-age=${1:-60}"
|
||||
echo "Cache-Control: must-revalidate, max-age=${1:-5}"
|
||||
while read header
|
||||
do
|
||||
echo "$header"
|
||||
|
||||
19
settings
19
settings
@ -24,7 +24,7 @@ CACHE_DIR=/web/ingress-stats.riquer.fr/cache/
|
||||
# /cgi/$user/add.html
|
||||
IFS=/ read garbage garbage webuser garbage <<<"$REQUEST_URI"
|
||||
|
||||
debug_import=2
|
||||
debug_import=3
|
||||
|
||||
rrdfile=ingress.rrd
|
||||
|
||||
@ -86,6 +86,7 @@ declare -A uinames=(
|
||||
[Hacker]=Hacks
|
||||
[Translator]="Glyph Hack Points"
|
||||
[Recruiter]="Agents Recruited"
|
||||
[Hackaton]="Consecutive Days Hacking"
|
||||
)
|
||||
dsnames=(
|
||||
AP
|
||||
@ -125,16 +126,18 @@ medals=(
|
||||
Builder
|
||||
Connector
|
||||
Mind_Controller
|
||||
MU
|
||||
Recharger
|
||||
Liberator
|
||||
Pioneer
|
||||
Purifier
|
||||
Guardian
|
||||
Mercenary
|
||||
Engineer
|
||||
Hacker
|
||||
Translator
|
||||
Recruiter
|
||||
Hackaton
|
||||
Mercenary
|
||||
)
|
||||
|
||||
## (0) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
||||
@ -241,6 +244,18 @@ gold["Translator"]=6000
|
||||
platinum["Translator"]=20000
|
||||
black["Translator"]=50000
|
||||
|
||||
bronze["MU"]=5000
|
||||
silver["MU"]=50000
|
||||
gold["MU"]=250000
|
||||
platinum["MU"]=1000000
|
||||
black["MU"]=4000000
|
||||
|
||||
bronze["Hackaton"]=15
|
||||
silver["Hackaton"]=30
|
||||
gold["Hackaton"]=60
|
||||
platinum["Hackaton"]=180
|
||||
black["Hackaton"]=365
|
||||
|
||||
#bronze[""]=
|
||||
#silver[""]=
|
||||
#gold[""]=
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user