Git Product home page Git Product logo

phileas's Introduction

Phileas logo Build Status CodeCov GoDoc

“I see that it is by no means useless to travel, if a man wants to see something new”

Phileas can tell you where you should travel next, based on your instagram likes. Phileas ingests your likes and drops them as markers on a map. It also uses Yelp's API and enriches your liked media with some more information—like places of interest, eateries, hotels, etc.

Installation

  1. Create an ini file as shown in the settings section of this README
  2. Put it in /etc/phileas.ini; optionally, you can pass the location of the ini file at run time
  3. Download Phileas: go get github.com/avadhutp/phileas
  4. First, run setup as phileas setup; this will set up the required table structure
  5. Second, initiate the backfill as phileas backfill; this will populate the database with all the historic data
  6. Next, you should initiate, in two seperate processes, philease enrich locations and phileas enrich google-places; this will also add some more information to the locations that will help when mapping them
  7. Finally, run the actual Phileas server by issuing phileas start; you can issue this command in parallel with the backfill command

Settings

Phileas works off of an ini file. This supports the following configs:

Common

Example:

[common]
port = 8081
mapquest_key = XXXXX
Setting Description
port Ther port number on which to start the Phileas server
mapquest_key Used for reverse geo coding. Can be gotten from developer.mapquest.com

Mysql

Example:

[mysql]
host = localhost
port = 3306
username = user
password = password
schema = phileas

Instagram

Phileas needs to connect to the Instagram API to fetch your likes. For this, it needs to connect to your Intagram API Account, the details for which can be gotten from www.instagram.com/developer/clients/manage. You need to

  1. Create a new client in the Manage Clients section
  2. And then copy the required config into the instagram section of phileas's config file as show below:
[instagram]
client_id = xxxxxxxxxxxxxx
secret = xxxxxxxxxxxxxxxx
access_token = xxxxxxxx

Google

Phileas needs to connec to google APIs for two things—

  1. To be able to display maps in a browser (browser API key is required)
  2. To query Google Places API for places information (server API key is required)
  3. Make sure you enable
  4. Google Maps Javascript API
  5. Google Places API
  6. Both these keys can be gotten from developers.google.com. Create two keys—one for the browser and one for the server. And use these in the ini file as shown below:
[google]
browser_key = xxxxxxxxxxxxxxxxxx
server_key = xxxxxxxxxxxxxxxxxx

URLs

URL Description Expected HTTP code Expected response
/ping Healthcheck URL to see if the server is up and running 200 pong
/top Shows a google map with the locations overlayed 200 Google map markup
/countries.json Information about all the bookmarks in Phileas's database grouped by country; this information is encoded in the GeoJSON format 200 GeoJSON-encoded locations
/top.json Locations from Phileas's database encoded, again, in the GeoJSON format 200 GeoJSON-encoded locations
/loc/[location-id] Get's all images and their captions from Phileas's database 200 HTML with thumbnail images and captions

phileas's People

Contributors

avadhutp avatar golint-fixer avatar

Stargazers

Ross Crawford-d'Heureuse avatar

Watchers

James Cloos avatar

Forkers

golint-fixer

phileas's Issues

Create a `stats` page

That shows:

  1. Likes per country
  2. (Google) Places information is available for how many locations?
  3. Address information is available for how many locations?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.