Permalink
Browse files

Add license and README

  • Loading branch information...
1 parent 1acad14 commit 0739a5c2008b51075d439a8b274c6c94b5a01a93 @vicchi committed Feb 25, 2013
Showing with 41 additions and 0 deletions.
  1. +10 −0 LICENSE
  2. +31 −0 checkins/README.md
View
@@ -0,0 +1,10 @@
+Copyright (c) 2013, Gary Gale <gary@vicchi.org>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+3. Neither the name of the author nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
@@ -0,0 +1,31 @@
+# Where You've Been According To Foursquare
+
+## Gentle Introduction
+
+This is a simple set of PHP scripts to visualise your Foursquare checkin history. You'll need a source of all of your checkins; you can either get these via the Foursquare API or you can run your own instance of [privatesquare](https://github.com/straup/privatesquare) to keep an up-to-date copy of them. These scripts assume you're using privatesquare on the same web server that you'll be using to serve the map up.
+
+## Installation
+
+You'll need to make a copy of the config.php.sample file and name it `config.php`. You'll need to edit this file with specifics for your privatesquare database configuration.
+
+ # Edit the database hostname, username, password and database name
+ # to match your privatesquare instance.
+
+ $config['hostname'] = 'localhost';
+ $config['user'] = 'user';
+ $config['password'] = 'password';
+ $config['database'] = 'privatesquare';
+
+ # Edit to match the user id your Foursquare account has in privatesquare. If you're the
+ # sole user, you can probably leave this unchanged (see the users table)
+
+ $config['userid'] = 1;
+
+Now change to the `tools` directory and run the `extract-checkins.php` script.
+
+ $ cd tools
+ $ php ./extract-checkins.php
+
+If all goes well and there's no problems accessing the database, this script will create a Javascript file, containing all your checkins in GeoJSON format as `js/checkins-geojson.js`. It's probably a good idea to check that this file exists and isn't empty.
+
+The GeoJSON will contain all of your checkins from your privatesquare instance at the time that you run `extract-checkins.php`; you might want to add this to your `crontab`, if your web host permits this, to run regularly and create a (relatively) up-to-date set of checkin information.

0 comments on commit 0739a5c

Please sign in to comment.