Code Monkey home page Code Monkey logo

storehub's Introduction

Storehub

API to store images to flickr or dropbox.

Uses dropbox (dropbox-sdk gem) and flickr (flickraw gem)

Local installation

Flickr auth

  • Register and app in Flickr
  • Add secret and api_token to .env file
  • Go to http://0.0.0.0:5000/2flickr.json
  • Read console feedback:
    • Go to the auth page and confirm
    • Paste in terminal the number given by flickr
    • Prease Enter
  • Continue reading the console:
    • Access_token and access_secret will be echoed. Add them to the .env file

Dropbox auth

Create a new app in: https://www.dropbox.com/developers/apps

** Locally **

  1. create .env put these lines in:

    1. DROPBOX_KEY=key_from_before
    2. DROPBOX_SECRET=secret_from_before
    3. SEND_TO_DROPBOX_TOKEN=the_token_you_want (used to upload captures to dropbox)
  2. foreman start

  3. open http://localhost:5000 in the same browser you used to sign up the new dropbox account

  4. It will take you to dropbox, authorize the app. You will be redirected back and it will tell you the new DROPBOX_TOKEN

  5. put DROPBOX_TOKEN=that_token in your .env file

  6. restart foreman, and enjoy

Heroku Installation

$ heroku create --buildpack git://github.com/ddollar/heroku-buildpack-multi.git
$ heroku config:add $(cat .env)

$ git push heroku master
$ heroku open

Usage

Links

http://www.flickr.com/services/api/

Bookmarklets

Store image in flickr

javascript:(function(){document.head.appendChild(document.createElement('script')).src='http://0.0.0.0:5000/bookmarklet/url2flickr.js';})(); javascript:(function(){document.head.appendChild(document.createElement('script')).src='https://raw.github.com/vieron/storehub/master/public/bookmarklet/url2flickr.js';})();

##TO-DO

  • Remove jquery from bookmaklet
  • Auth

storehub's People

Contributors

vieron avatar

Stargazers

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