Git Product home page Git Product logo

qgooglephotos's Introduction

GitHub license PRs Welcome GitHub contributors GitHub issues

QGooglePhotos

A Qt/C++ application and library to access and retrieve data from Google Photos.
Report a bug or request a feature

Table of Contents

Getting Started

Prerequisites

The project is compiled with Qt 5.11.2. The Qt add-on Qt Network Authorization must be installed to build the project. You also need to provide the library VLC-Qt to build the project. It is only necessary for the video viewer widget though, you can run the Google Photos library without it if you want.

You need to register a new project in the Google Developpers Console as no one is provided. This step is necessary because you have to request the client credentials to identify your application.

You can follow this tutorial. Note: With Qt, the redirect URI must now be http://localhost:8080/.

Installation

Follow the instructions above then clone the repo (git clone https:://github.com/torresflo/QGooglePhotos.git) and build the project.

To run, the project is expecting the file clientid.json that contains the credentials of your Google Application at the root of the execuable of the project. Note: With Qt Creator, it should be placed in the build directory.

The file sould be similar to this one:

{
    "web":
    {
        "client_id":"YOU_CLIENT_ID_HERE",
        "project_id":"YOUR_APPLICATION_NAME_HERE",
        "auth_uri":"https://accounts.google.com/o/oauth2/auth",
        "token_uri":"https://oauth2.googleapis.com/token",
        "client_secret":"YOUR_CLIENT_SECRET_HERE",
        "redirect_uris":["http://localhost:8080/"]
    }
}

Usage

The project is divided in several parts, a library (folder GooglePhotos), a series of widgets to display the library (folder Widgets) and a simple application used to test everything (folder Application).

When starting the main application, in the main menu, go to Settings > Connection.... It will open your browser and ask you the authorization to access your Google Photos Library. Note: the request will be done with your credentials (placed in the file clientid.json).

Library

The library uses the Google Photos RESTful API.

The main classes of the library are:

  • LibrarySettings that represents the credentials.
  • QLibraryClient that represents the Google Photos library. It is used for the connection and to retrieve the albums.
  • QAlbum that represents an album in Google Photos. It is used to retrieve the media items (QPhotoItem and QVideoItem).
  • QPhotoItem that represents a photo.
  • QVideoItem that represents a video (you can access the video bytes directly through the video data URL available in the class).

Widgets

Various simple widgets are available to display the library:

  • QAlbumsWidget to display a list of albums in the library. It is currently the first widget instantiated in the main application.
  • QMediaItemListWidget to display the list of media items available in a QAlbum.
  • QPhotoViewer, a super simple viewer for a QPhotoItem.
  • QVlcVideoViewer, a super simple viewer for a QVideoItem.

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature)
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the GNU General Public License v3.0. See LICENSE for more information.

qgooglephotos's People

Contributors

torresflo 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.