From 1dc4a94a2690110bfb12ea939119a5eb9f005de5 Mon Sep 17 00:00:00 2001 From: schneefux Date: Sun, 26 Mar 2017 21:40:18 +0200 Subject: reorder, add high res pixabay images, more stats --- api.py | 4 +- templates/assets/images/candle.jpg | Bin 0 -> 8737 bytes templates/assets/images/candy.jpg | Bin 0 -> 85692 bytes templates/assets/images/canon.jpg | Bin 0 -> 126598 bytes templates/assets/images/desperate.jpg | Bin 0 -> 45410 bytes templates/assets/images/flare.jpg | Bin 0 -> 24028 bytes templates/assets/images/fountain.jpg | Bin 0 -> 111882 bytes templates/assets/images/kraken.jpg | Bin 1029530 -> 297535 bytes templates/assets/images/minefield.jpg | Bin 0 -> 157541 bytes templates/assets/images/needle.jpg | Bin 0 -> 27414 bytes templates/assets/images/pulse.jpg | Bin 0 -> 86922 bytes templates/assets/images/saw.jpg | Bin 0 -> 172760 bytes templates/assets/images/shoe.jpg | Bin 0 -> 117668 bytes templates/index.html | 95 +++++++++++++++++++++++----------- 14 files changed, 67 insertions(+), 32 deletions(-) create mode 100644 templates/assets/images/candle.jpg create mode 100644 templates/assets/images/candy.jpg create mode 100644 templates/assets/images/canon.jpg create mode 100644 templates/assets/images/desperate.jpg create mode 100644 templates/assets/images/flare.jpg create mode 100644 templates/assets/images/fountain.jpg create mode 100644 templates/assets/images/minefield.jpg create mode 100644 templates/assets/images/needle.jpg create mode 100644 templates/assets/images/pulse.jpg create mode 100644 templates/assets/images/saw.jpg create mode 100644 templates/assets/images/shoe.jpg diff --git a/api.py b/api.py index eda5592..08f95a9 100644 --- a/api.py +++ b/api.py @@ -34,11 +34,13 @@ def update_vals(): data["flares_sold"] = sql_val("SELECT SUM((participant.item_sells->>'*1038_Item_Flare*')::INT) FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") data["minions_per_kraken"] = sql_val("SELECT (SUM(match.duration)/60*5) / SUM(roster.kraken_captures) FROM match JOIN roster ON roster.match_api_id=match.api_id WHERE match.created_at > NOW() - '1 day'::INTERVAL") data["minion_candies"] = sql_val("SELECT SUM((item_uses->>'*1041_Item_MinionCandy*')::INT) FROM participant WHERE created_at > NOW() - '1 day'::INTERVAL") - data["infusions_min"] = sql_val("SELECT SUM(match.duration)/60 / (SUM((participant.item_uses->>'*1052_Item_WeaponInfusion*')::INT) + SUM((participant.item_uses->>'*1053_Item_CrystalInfusion*')::INT)) FROM participant JOIN roster ON participant.roster_api_id=roster.api_id JOIN match ON roster.match_api_id=match.api_id WHERE participant.created_at > NOW() - '1 day'::INTERVAL") + data["infusions_secs"] = sql_val("SELECT (24*60*60) / (SUM((participant.item_uses->>'*1052_Item_WeaponInfusion*')::INT) + SUM((participant.item_uses->>'*1053_Item_CrystalInfusion*')::INT))::FLOAT FROM participant JOIN roster ON participant.roster_api_id=roster.api_id JOIN match ON roster.match_api_id=match.api_id WHERE participant.created_at > NOW() - '1 day'::INTERVAL") data["scout_traps"] = sql_val("SELECT SUM((item_uses->>'*1054_Item_ScoutTrap*')::INT) FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") data["saw_turrets"] = sql_val("SELECT SUM(turret_kills) FROM participant WHERE hero='*SAW*' AND created_at > NOW() - '1 day'::INTERVAL") data["matches"] = sql_val("SELECT COUNT(*) FROM match WHERE created_at > NOW() - '1 day'::INTERVAL") data["minions_min"] = sql_val("SELECT SUM(minion_kills)/(24*60*60)::FLOAT FROM participant WHERE participant.created_at > NOW() - '1 day'::INTERVAL") + data["vox_minionkills"] = sql_val("SELECT SUM(minion_kills) FROM participant WHERE hero='*Vox*' AND created_at > NOW() - '1 day'::INTERVAL") + data["minionfeet"] = sql_val("SELECT SUM((item_grants->>'*1080_Item_MinionsFoot*')::INT) FROM participant WHERE created_at > NOW() - '1 day'::INTERVAL") c.close() diff --git a/templates/assets/images/candle.jpg b/templates/assets/images/candle.jpg new file mode 100644 index 0000000..3043419 Binary files /dev/null and b/templates/assets/images/candle.jpg differ diff --git a/templates/assets/images/candy.jpg b/templates/assets/images/candy.jpg new file mode 100644 index 0000000..b721a2f Binary files /dev/null and b/templates/assets/images/candy.jpg differ diff --git a/templates/assets/images/canon.jpg b/templates/assets/images/canon.jpg new file mode 100644 index 0000000..ae22962 Binary files /dev/null and b/templates/assets/images/canon.jpg differ diff --git a/templates/assets/images/desperate.jpg b/templates/assets/images/desperate.jpg new file mode 100644 index 0000000..aaf46e9 Binary files /dev/null and b/templates/assets/images/desperate.jpg differ diff --git a/templates/assets/images/flare.jpg b/templates/assets/images/flare.jpg new file mode 100644 index 0000000..0e1e84c Binary files /dev/null and b/templates/assets/images/flare.jpg differ diff --git a/templates/assets/images/fountain.jpg b/templates/assets/images/fountain.jpg new file mode 100644 index 0000000..98a6ab4 Binary files /dev/null and b/templates/assets/images/fountain.jpg differ diff --git a/templates/assets/images/kraken.jpg b/templates/assets/images/kraken.jpg index 5ce944f..0b27169 100644 Binary files a/templates/assets/images/kraken.jpg and b/templates/assets/images/kraken.jpg differ diff --git a/templates/assets/images/minefield.jpg b/templates/assets/images/minefield.jpg new file mode 100644 index 0000000..b95ecac Binary files /dev/null and b/templates/assets/images/minefield.jpg differ diff --git a/templates/assets/images/needle.jpg b/templates/assets/images/needle.jpg new file mode 100644 index 0000000..46320ac Binary files /dev/null and b/templates/assets/images/needle.jpg differ diff --git a/templates/assets/images/pulse.jpg b/templates/assets/images/pulse.jpg new file mode 100644 index 0000000..03b65b5 Binary files /dev/null and b/templates/assets/images/pulse.jpg differ diff --git a/templates/assets/images/saw.jpg b/templates/assets/images/saw.jpg new file mode 100644 index 0000000..5fc89e5 Binary files /dev/null and b/templates/assets/images/saw.jpg differ diff --git a/templates/assets/images/shoe.jpg b/templates/assets/images/shoe.jpg new file mode 100644 index 0000000..9a213c8 Binary files /dev/null and b/templates/assets/images/shoe.jpg differ diff --git a/templates/index.html b/templates/index.html index f40d425..93a5e1c 100644 --- a/templates/index.html +++ b/templates/index.html @@ -59,8 +59,11 @@

- Poor Minions! No one thinks about the Minions. + Poor Minions! +
We are raising awareness about how ruthless NPCs are treated in Vainglory. The killing needs to stop! +
+ This is data from the last day.

@@ -72,7 +75,7 @@
-
+

Minions

@@ -88,7 +91,7 @@
-
+

Turrets

@@ -96,14 +99,14 @@

{{ data.turrets_rebuilt }}

-

rebuilt by workers every day

+

need to be rebuilt by Minion workers

-
+

Minions

@@ -111,14 +114,14 @@

{{ data.minions_for_nothing }}
out of {{ data.minions_total }}

-

died for nothing

+

died for nothing.

-
+

Fountains

@@ -126,7 +129,22 @@

{{ data.fountains_wasted }}

-

bought for the looks

+

bought for the looks…

+
+
+
+
+ +
+
+

Minions

+ +
+
+
+

{{ data.vox_minionkills }}

+
+

couldn't endure Vox' tunes anymore.

@@ -141,14 +159,29 @@

{{ data.crystal_sentries }}

-

slaughtered

+

slaughtered.

+
+
+
+
+ +
+
+

Minions

+ +
+
+
+

{{ data.minionfeet }}

+
+

lost a foot in the Halcyon Fold.

-
+

Flares

@@ -156,7 +189,7 @@

{{ data.flares_sold }}

-

thrown in trash

+

thrown in trash.

@@ -171,14 +204,14 @@

{{ data.minions_per_kraken }}

-

are needed to unleash a Kraken

+

…are needed to unleash a Kraken

-
+

Minion Candies

@@ -186,38 +219,38 @@

{{ data.minion_candies }}

-

Minion parties

+

Minion parties!

-
-
-

Infusions

+
+
+

Turrets

-
every
-

{{ data.infusions_min }}
minutes

+
+

{{ data.saw_turrets }}

-

a hero gets high

+

were pushed together with SAW.

- +
-
-

Scout Traps

+
+

Infusions

-
-

{{ data.scout_traps }}

+
every
+

{{ data.infusions_secs | int }}
seconds

-

made the Fold a Dangerous Place

+

a hero gets high.

@@ -225,21 +258,21 @@
-
-

Turrets

+
+

Scout Traps

-

{{ data.saw_turrets }}

+

{{ data.scout_traps }}

-

were pushed by SAW in the last 24h

+

made the Fold a Dangerous Place

- +

Data

-- cgit v1.3.1