All Projects → simonedegiacomi → Gphotosuploader

simonedegiacomi / Gphotosuploader

Licence: gpl-3.0
Unofficial Google Photos uploader and Go library

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Gphotosuploader

Web File Uploader
A simple tool to let people upload and share images and files
Stars: ✭ 26 (-71.43%)
Mutual labels:  uploader
Laravel Simple Uploader
Simple file uploader for Laravel 5.
Stars: ✭ 59 (-35.16%)
Mutual labels:  uploader
React Images Uploading
The simple images uploader applied Render Props pattern that allows you to fully control UI component and behaviors.
Stars: ✭ 80 (-12.09%)
Mutual labels:  uploader
Html5 Uploader
A pure HTML5 file uploader
Stars: ✭ 9 (-90.11%)
Mutual labels:  uploader
Tus Php
🚀 A pure PHP server and client for the tus resumable upload protocol v1.0.0
Stars: ✭ 1,048 (+1051.65%)
Mutual labels:  uploader
Newsup
Fully feature high performance binary usenet uploader/poster
Stars: ✭ 65 (-28.57%)
Mutual labels:  uploader
Goph
🤘 The native golang ssh client to execute your commands over ssh connection. 🚀🚀
Stars: ✭ 734 (+706.59%)
Mutual labels:  uploader
Pussh
The cross platform, multi-functional screenshot utility
Stars: ✭ 86 (-5.49%)
Mutual labels:  uploader
Droply Js
Droply JS, a new responsive and cross browser chunk uploader with DragDrop and File Preview capabilities (HTML5/CSS3)
Stars: ✭ 50 (-45.05%)
Mutual labels:  uploader
Uploadcare Php
PHP API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
Stars: ✭ 77 (-15.38%)
Mutual labels:  uploader
Grapesjs Plugin Filestack
Enable Filestack uploader inside the Asset Manager
Stars: ✭ 14 (-84.62%)
Mutual labels:  uploader
Getlink Next
Get Link!
Stars: ✭ 48 (-47.25%)
Mutual labels:  uploader
Flutter Picgo
🚀 A simple & beautiful mobile tool for pictures uploading built by flutter
Stars: ✭ 72 (-20.88%)
Mutual labels:  uploader
Upload
文件上传功能
Stars: ✭ 8 (-91.21%)
Mutual labels:  uploader
Gridfieldbulkeditingtools
SilverStripe GridField Components set for bulk upload and bulk record edit, unlink & delete 📦💥
Stars: ✭ 83 (-8.79%)
Mutual labels:  uploader
Ax5ui Uploader
jQuery file uploader, HTML5(IE9+, FF, Chrome, Safari) - http://ax5.io/ax5ui-uploader/
Stars: ✭ 25 (-72.53%)
Mutual labels:  uploader
Gdrivedownloader
Just enter the direct URL of the file and it will upload it to Google Drive and print download link of it.
Stars: ✭ 60 (-34.07%)
Mutual labels:  uploader
Vux Uploader Component
a mobile vue component implementation for weui uploader
Stars: ✭ 87 (-4.4%)
Mutual labels:  uploader
Gokapi
Lightweight selfhosted Firefox Send alternative without public upload
Stars: ✭ 84 (-7.69%)
Mutual labels:  uploader
Vue2 Multi Uploader
Drag and drop multiple file uploader with Vue.js v2 and Axios
Stars: ✭ 77 (-15.38%)
Mutual labels:  uploader

G Photos Uploader - Deprecated

Build Status

IMPORTANT NOTICE: this project has been deprecated, since Google now released an official google photos API.

New projects built on top of the Google photos API are:
https://github.com/nmrshll/gphotos-uploader-cli for a command-line uploader
https://github.com/nmrshll/google-photos-api-client-go for a go client library

The new projects currently count against yout storage quota, once the client side compression is implemented this project will be deprecated.

Why? What is this?

Google Photos does not have a desktop uploader for Linux, neither an API to upload a photo programmatically. (now there is an Official Google Photos API).

G Photos Uploader lets you upload photos from Linux (and, in theory, any OS for which you can compile a Go program) specifying the file name or watching a directory for changes. Furthermore, the project can also be used as a library that you can include in other Go programs.

Disclaimer

G Photos Uploader is an unofficial tool, I (and any possible contributor) don't guarantee any result. Any security or other kind of issues are at your own risk.

Requirements

To use the tool you need to install Go and Git (used by go get to download the dependencies). If you will use the authentication wizard you will also need a WebDriver.

Install

go get github.com/simonedegiacomi/gphotosuploader

How can I use it?

Standalone tool

To launch the tool you have two options:

  • Add the $GOPATH/bin folder to your path: doing this you can start the program just typing gphotosuploader (if you use this method and don't specify the auth.json and uploaded.txt file paths, these files will be created in the current working directory);
  • Enter the project folder and use go run main.go;

To use G Photos Uploader as a standalone tool you need to be authenticated. Authentication is implemented with a JSON file that contains your cookies and user ID.

Authentication

Every time you run the tool, it will check for the auth file. If the file is not found or the cookies seem to be expired, the tool will ask you if you want to run a wizard to get new cookies.

Authentication wizard

The authentication wizard uses the WebDrivers protocol, which is usually used to perform automation tests, that allows G Photos Uploader to control a browser and read the cookies from it. To use the WebDrivers Protocol you need to install a web driver (e.g. chromedriver):

  • On Ubuntu
sudo apt-get install chromium-chromedriver

# Create a link to launch the driver just typing 'chromedriver'
sudo ln -s /usr/lib/chromium-browser/chromedriver /usr/bin/chromedriver

# Then launch
chromedriver
brew install chromedriver

# Then launch
chromedriver
  • On Windows:
    • Download latest Chrome Web Driver from Google;
    • Copy chromedriver.exe in the path (C:\WINDOWS for example);
    • Then launch it with a command prompt or Win key + R then chromedriver.exe;

Note: If you are running G Photos Uploader on a headless machine, you can run chromedriver on a separate machine as such:

chromedriver --whitelisted-ips="HEADLESS_MACHINE_IP"

When the Driver starts it will print the address at which it is listening. Once you enter the name of the browser (refer to browserName here) and the address of the web driver in the tool, a new browser window will appear with the Google Photos Login page. Then you can login with your account just like you always do. When you're logged in the tool will read the cookies from the browser, save them into the auth file and close the browser window.
You can now stop the web driver server.

Authentication using a Chrome extension

You can also get the authentication file using a Chrome extension. You can read more about it here.

Upload a photo or watch a directory

Once you have the auth file, you're ready to go. For example, to upload a file named image.png:

gphotosuploader --upload ./image.png

Or to watch a directory:

gphotosuploader --watch path/to/photos --maxConcurrent 4

You can even upload all the photos of a directory and then start to watch another one:

gphotosuploader --upload /path/to/old/photos --upload /downloads/cat.png --watch path/to/new/photos

If you also want to add your photos to a specific existing album you can use the 'album' argument:

gphotosuploader --album albumId --upload ./image.png

Where the albumId is the string that you see in the url when you open the album in the Google Photos Web App (something like: https://photos.google.com/u/2/album/album_id)

If you also want create a new album to add your photos, you can use the 'albumName' argument:

gphotosuploader --albumName foo --upload ./image.png

The tool creates a file (default name: uploaded.txt) which is a list of uploaded files, which will not be re-uploaded. You can specify your own file using the uploadedList argument. To see all the available arguments, use --help.

Library

You can read a simple example here or get the documentation here.

Development

if you want to continue the development of this tool/library, execute first the following script:

githooks/create-links

This will links the hooks used to handle the version of the tool.

Used libreries

  • fsnotify: To watch for file system events;
  • Selenium: To authenticate using a browser;

Creators:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].