264 lines
5.6 KiB
Plaintext
264 lines
5.6 KiB
Plaintext
# IngRRD (https://forge.riquer.fr/p/ingrrd/)
|
|
# Copyright (C) 2014-2015 Vincent Riquer
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as
|
|
# published by the Free Software Foundation, either version 3 of the
|
|
# License, or (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# Path to your fastcgi_cache (optional).
|
|
CACHE_DIR=/web/ingress-stats.riquer.fr/cache/
|
|
|
|
## FIXME change this according to your URLs:
|
|
#
|
|
# /$user/add.html
|
|
#IFS=/ read garbage webuser garbage <<<"$REQUEST_URI"
|
|
# /cgi/$user/add.html
|
|
IFS=/ read garbage garbage webuser garbage <<<"$REQUEST_URI"
|
|
|
|
debug_import=3
|
|
|
|
rrdfile=ingress.rrd
|
|
|
|
graph_width=800
|
|
|
|
L1color=FFCF58
|
|
L2color=FFA52E
|
|
L3color=FF7110
|
|
L4color=E70000
|
|
L5color=FF2691
|
|
L6color=EF24CE
|
|
L7color=C221E1
|
|
L8color=9523F8
|
|
L9color=987D35
|
|
L10color=9B641C
|
|
L11color=9B4409
|
|
L12color=830000
|
|
L13color=9B1759
|
|
L14color=8B1479
|
|
L15color=6B127D
|
|
L16color=591494
|
|
|
|
default_prevperiod=1month
|
|
now=$(date +%s)
|
|
|
|
(( default_start = now - 604800 ))
|
|
(( default_end = now + 1209600 ))
|
|
|
|
start=$default_start
|
|
end=$default_end
|
|
prevperiod=$default_prevperiod
|
|
|
|
declare -A uinames=(
|
|
[AP]=AP
|
|
[Explorer]="Unique Portals Visited"
|
|
[Seer]="Portals Discovered"
|
|
[XM]="XM Collected"
|
|
[Walked]="Distance Walked"
|
|
[Builder]="Resonators Deployed"
|
|
[Connector]="Links Created"
|
|
[Mind_Controller]="Control Fields Created"
|
|
[MU]="Mind Units Captured"
|
|
[Longest_Link]="Longest Link Ever Created"
|
|
[Largest_Field]="Largest Control Field"
|
|
[Recharger]="XM Recharged"
|
|
[Liberator]="Portals Captured"
|
|
[Pioneer]="Unique Portals Captured"
|
|
[Engineer]="Mods Deployed"
|
|
[Purifier]="Resonators Destroyed"
|
|
[Neutralized]="Portals Neutralized"
|
|
[Links_Destroyed]="Enemy Links Destroyed"
|
|
[Fields_Destroyed]="Enemy Control Fields Destroyed"
|
|
[Guardian]="Max Time Portal Held"
|
|
[Link_Maintained]="Max Time Link Maintained"
|
|
[Link_Length_x_Days]="Max Link Length x Days"
|
|
[Field_Held]="Max Time Field Held"
|
|
[Field_x_Days]="Largest Field MUs x Days"
|
|
[Mercenary]="Unique missions completed"
|
|
[Hacker]=Hacks
|
|
[Translator]="Glyph Hack Points"
|
|
[Recruiter]="Agents Recruited"
|
|
[Hackaton]="Consecutive Days Hacking"
|
|
)
|
|
dsnames=(
|
|
AP
|
|
Explorer
|
|
Seer
|
|
XM
|
|
Walked
|
|
Builder
|
|
Connector
|
|
Mind_Controller
|
|
MU
|
|
Longest_Link
|
|
Largest_Field
|
|
Recharger
|
|
Liberator
|
|
Pioneer
|
|
Engineer
|
|
Purifier
|
|
Neutralized
|
|
Links_Destroyed
|
|
Fields_Destroyed
|
|
Guardian
|
|
Link_Maintained
|
|
Link_Length_x_Days
|
|
Field_Held
|
|
Field_x_Days
|
|
Mercenary
|
|
Hacker
|
|
Translator
|
|
Recruiter
|
|
Hackaton
|
|
)
|
|
medals=(
|
|
Explorer
|
|
Seer
|
|
Walked
|
|
Builder
|
|
Connector
|
|
Mind_Controller
|
|
MU
|
|
Recharger
|
|
Liberator
|
|
Pioneer
|
|
Purifier
|
|
Guardian
|
|
Engineer
|
|
Hacker
|
|
Translator
|
|
Recruiter
|
|
Hackaton
|
|
Mercenary
|
|
)
|
|
|
|
## (0) 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
|
lvl=( . 0 2500 20000 70000 150000 300000 600000 1200000 2400000 4000000 6000000 8400000 12000000 17000000 24000000 40000000 )
|
|
lvlsilver=( . 0 0 0 0 0 0 0 0 4 5 6 7 0 0 0 0 )
|
|
lvlgold=( . 0 0 0 0 0 0 0 0 1 2 4 6 7 0 0 0 )
|
|
lvlplatinum=( . 0 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 )
|
|
lvlblack=( . 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 )
|
|
|
|
declare -A bronze silver gold platinum black
|
|
bronze["Explorer"]=100
|
|
silver["Explorer"]=1000
|
|
gold["Explorer"]=2000
|
|
platinum["Explorer"]=10000
|
|
black["Explorer"]=30000
|
|
|
|
bronze["Seer"]=10
|
|
silver["Seer"]=50
|
|
gold["Seer"]=200
|
|
platinum["Seer"]=500
|
|
black["Seer"]=5000
|
|
|
|
bronze["Hacker"]=2000
|
|
silver["Hacker"]=10000
|
|
gold["Hacker"]=30000
|
|
platinum["Hacker"]=100000
|
|
black["Hacker"]=200000
|
|
|
|
bronze["Builder"]=2000
|
|
silver["Builder"]=10000
|
|
gold["Builder"]=30000
|
|
platinum["Builder"]=100000
|
|
black["Builder"]=200000
|
|
|
|
bronze["Connector"]=50
|
|
silver["Connector"]=1000
|
|
gold["Connector"]=5000
|
|
platinum["Connector"]=25000
|
|
black["Connector"]=100000
|
|
|
|
bronze["Mind_Controller"]=100
|
|
silver["Mind_Controller"]=500
|
|
gold["Mind_Controller"]=2000
|
|
platinum["Mind_Controller"]=10000
|
|
black["Mind_Controller"]=40000
|
|
|
|
bronze["Recharger"]=100000
|
|
silver["Recharger"]=1000000
|
|
gold["Recharger"]=3000000
|
|
platinum["Recharger"]=10000000
|
|
black["Recharger"]=25000000
|
|
|
|
bronze["Liberator"]=100
|
|
silver["Liberator"]=1000
|
|
gold["Liberator"]=5000
|
|
platinum["Liberator"]=15000
|
|
black["Liberator"]=40000
|
|
|
|
bronze["Pioneer"]=20
|
|
silver["Pioneer"]=200
|
|
gold["Pioneer"]=1000
|
|
platinum["Pioneer"]=5000
|
|
black["Pioneer"]=20000
|
|
|
|
bronze["Purifier"]=2000
|
|
silver["Purifier"]=10000
|
|
gold["Purifier"]=30000
|
|
platinum["Purifier"]=100000
|
|
black["Purifier"]=300000
|
|
|
|
bronze["Guardian"]=3
|
|
silver["Guardian"]=10
|
|
gold["Guardian"]=20
|
|
platinum["Guardian"]=90
|
|
black["Guardian"]=150
|
|
|
|
bronze["Engineer"]=150
|
|
silver["Engineer"]=1500
|
|
gold["Engineer"]=5000
|
|
platinum["Engineer"]=20000
|
|
black["Engineer"]=50000
|
|
|
|
bronze["Walked"]=10
|
|
silver["Walked"]=100
|
|
gold["Walked"]=300
|
|
platinum["Walked"]=1000
|
|
black["Walked"]=2500
|
|
|
|
bronze["Mercenary"]=5
|
|
silver["Mercenary"]=25
|
|
gold["Mercenary"]=100
|
|
platinum["Mercenary"]=200
|
|
black["Mercenary"]=500
|
|
|
|
bronze["Recruiter"]=2
|
|
silver["Recruiter"]=10
|
|
gold["Recruiter"]=25
|
|
platinum["Recruiter"]=50
|
|
black["Recruiter"]=100
|
|
|
|
bronze["Translator"]=200
|
|
silver["Translator"]=2000
|
|
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[""]=
|
|
#platinum[""]=
|
|
#black[""]=
|