GithubHelp home page GithubHelp logo

tuomassalo / graphql-php-sqlite Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shahabqamar/graphql-php-sqlite

0.0 2.0 0.0 22 KB

A basic graphql server using the graphql-php package that works with a sqlite database.

PHP 100.00%

graphql-php-sqlite's Introduction

graphql-php-sqlite

A naïve GraphQL interface for querying photos.db from Apple Photos app.

TODO:

  • get image data:

    • imagePath

    • name (caption)

    • lat/lng

    • dimensions

    • imageDate

    • type

    • albums where the photo appears in?

  • search criteria (all optional):

    • q (freetext) (multi?)

    • {lat,long}{Min,Max} = 12.34567

    • date{Min,Max}

    • type = IMAGE|VIDEO

    • album name

    • keywords automatically assigned by Photos

  • fetch aggregate data (result count by date; geolocation clusters?)

  • order by = DATE_ASC|DATE_DESC

  • pagination

=======

  1. Clone the repo
  2. Copy photos.db to the same directory where you created the repo subdirectory. NB: You probably want to use a copy of photos.db, since the master database is usually locked in macOS.
  3. Make sure you have composer installed, with e.g. brew install composer. Navigate to the project folder and run composer install
  4. docker run --rm -p 8080:80 -e LOG_STDOUT=true -e LOG_STDERR=true -e LOG_LEVEL=debug -v $HOME/dev/gallery2:/var/www/html -v $HOME/Pictures/Photos\ Library.photoslibrary:/var/www/html/photosroot fauria/lamp
  5. Install and open ChromeiQL extension to Chrome. Endpoint: http://localhost:8080/graphql-php-sqlite/server/api.php

Try with this query:

{
  photos {
    imagePath
    name
  }
}

Or this:

{
  photos(q:"foo") {
    imagePath
    name
  }
}

graphql-php-sqlite's People

Contributors

shahabqamar avatar tuomassalo avatar

Watchers

 avatar  avatar

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.