Git Product home page Git Product logo

toms-image-uploader's Introduction

Toms-Image-Uploader

A small application for automatically syncing image folders with imgur.

Currently this application is little more than a minimal viable product so the features are small and the bugs are likely many.

How to use this applicaiton

To have the applicaiton attempt to sync a directory with imgur you must have two things:

  • An imgur album (made with your account) and
  • A directory/folder on disk containing images

Simply create a new file in the albums/ directory (by default) using the album ID as the filename, such as h2sn8.txt or h2sn8.album. The contents of this file should be the path of the target directory/folder from which the images will be pulled, such as C:\Users\Tom\Desktop\Photos or C:\Users\Tom\Pictures. Upon execution, the application will now cross reference the images found in the specified directory with those in the corresponding album and upload any that were missing.

Getting Started

In order to run and use this application you require both an Imgur account and a set of application keys.

If you do not have an imgur account you can sign up for one at: imgur.com/register

Registering your application

If you do not have a registered application you must sign up for one at: api.imgur.com/oauth2/addclient

Simply fill out the form with the required information and ignore fields related to Authorization type and callback as they are unneccessary to the execution of this program.

After successfully registering your application, Imgur will respond via the email address provided. Contained within this email should be two critical pieces of information, your client-id and client secret. Save these for later.

Authorizing your account

This application does not have an automatic authorization process in place, instead you must do so manually.

To do so, modify the following link with the client ID you received after registering your application and follow it:

https://api.imgur.com/oauth2/authorize?response_type=token&client_id=YOUR_CLIENT_ID_HERE

You may be asked to log into your Imgur account if not already and authorize the application. Upon doing so you will be redirected to a non-existent page.

alt

Contained within the parameters of this redirect are some of the keys/tokens neccessary for operation of this application. Extract the refresh token, as seen above, and have it on hand.

This lengthy process has now given you the three pieces of information you require to properly configure this application.
Open src/main/resources/application.properties and replace the null values with your keys so it resembles something like:

CLIENT_ID=1a2b3c4d
CLIENT_SECRET=onetwothreefourfivesixseveneight
REFRESH_TOKEN=notarealkey

From here you should be able to simply run or package the application like you would any other Maven project.

Built With

  • Spring Boot - For requesting and parsing JSON into POJO's
  • Maven - For dependency/build management
  • Java - ...
  • Eclipse - Blessed be the IDE, even if it does cause hair loss.

See also

toms-image-uploader's People

Contributors

thomgeg avatar

Watchers

James Cloos avatar  avatar

toms-image-uploader's Issues

Documentation

Hi there Tom!

This looks like it perfectly performs a process that I desperately need. Would you be willing to document the process for loading it up?

Unfortunately in my attempt to load it up (with no prior experience with python) I was able to load the GUI but the "location" field wouldn't accept a directory path name. It's very likely just a problem with me, not it.

If not, that's ok as it obviously looks like a personal project. I just figured there's no harm in asking.

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.