From ff37899e2b2f30a58a4974235d044406183802ef Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Wed, 18 Feb 2015 19:27:14 -0500 Subject: [PATCH] How to opt-in to `where` and better how-it-works --- templates/where.html | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/templates/where.html b/templates/where.html index 503426b..f012a92 100644 --- a/templates/where.html +++ b/templates/where.html @@ -39,19 +39,27 @@

Last Updated:

-

Users online now:

+

Users online now

{{range .Users}}

~{{.Name}}

{{Location .Region .Country}} {{.CurrentTime}}
{{end}} -

All users - full map | data

+

To add yourself

+

+ Anonymously: create a `.somewhere` file in your home dir with touch ~/.somewhere +

+

+ Publicly: create a `.here` file in your home dir with touch ~/.here +

+ +

Map - full screen - data

How does it work?

-

Every 15 minutes this program runs `who --ips` and looks up geo info on any IPs it can, hits Google's geocode API to get some more general coordinates, which adds to this data for this map, and then generates the page you see here.

-

You can see for yourself in the GitHub project, where contributions are welcome!

+

Every 15 minutes this program runs `who --ips` and then looks up IP geo info on opted-in, logged in users. It hits Google's geocode API with the "[Region], [Country]" data it found to get general coordinates, and generates this data, stripping out usernames for anonymous users. When viewing the map, an AJAJ request is made to get the data and the points are added to the map.

+

You can see for yourself in the GitHub project, where contributions are welcome!