GithubHelp home page GithubHelp logo

dropbox2onereceipt's Introduction

Dropbox 2 OneReceipt

This is a small web application written in Python and intended to run on the Google App Engine that will monitor a user-specified Dropbox folder for new items and email them to a configurable email address. It is intended to mostly automate uploading of receipts to OneReceipt but can be adapted to other purposes as well.

Setup

Step 1 - Install Dropbox App

Step 2 - Create Dropbox App

  • Create a new Dropbox App
  • Select the 'Dropbox API' option
  • Set access to 'App folder'
  • Give the app a name (like 'Receipts123') and click Create
  • In the section with App key & App Secret, copy and paste the key and secret and save it for later

Step 3 - Get Dropbox App Access Token

  • Install the Dropbox Python Library
  • Download and extract the Python SDK
  • Install the library
  • pip install dropbox
  • From the commandline, navigate to the extracted sdk and go to the example directory
  • Edit cli_client.py and update the values of APP_KEY and APP_SECRET to match the key and secret from step 2 above. Save the file.
  • Execute cli_client.py and at the prompt type login
  • Copy and paste the url in the instructions to a new browser window. Click the Allow button.
  • Copy the authorization code and paste it into the terminal and hit enter
  • Type exit. Open token_store.txt which contains your Dropbox app access token.
  • Copy the token after the oauth2: prefix and save it for later

Step 4 - Get the Google App Engine

  • Download the Python SDK and install it
  • Open the Google App Engine Launcher
  • Login to the Developer Console
  • Create a new project and note the project id
  • Configure your email address in the Application Settings, under Compute/App Engine
  • Emails will not be sent if this is not configured
  • You can only configure sender emails associated with the account being using to access the developer console

Step 5 - Checkout dropbox2onereceipt

  • git clone [email protected]:kldavis4/dropbox2onereceipt.git
  • Change to the project directory and copy app_config.py.sample to app_config.py
  • Edit app_config.py and replace the access token with the one from Step 3
  • Configure the destination_email, sender_email, and sent_folder as well
  • Edit app.yaml and set the application field to project id from Step 4

Step 6 - Deploy the application to Google App Engine

  • In the App Engine Launcher, select Add Existing Project
  • Locate the project directory you checked out in Step 5 and select it
  • Hit Deploy (or test locally first at http://localhost:8080)

Usage

Step 1 - Get your receipts into Dropbox

  • Take some pictures of your receipts
  • Once the images have automatically uploaded to dropbox, open your browser and navigate to the [https://www.dropbox.com/home/Camera Uploads](Camera Uploads) folder
  • Select the receipt photos and move them to the folder under the Apps directory with the application that you created in Step 2 above

Step 2 - Send your receipts to OneReceipt

  • Navigate to the /scan url on your Google App Engine application. This will scan the folder in Dropbox, download each file and email it to the configured address, and then move it to a sent folder.
  • It is possible to configure a cron job that will automatically trigger the scan periodically. See the documentation for more details.

Quotas

  • Depending on frequency of usage, number of receipts, and size of the images being uploaded, this application should be able to run under the free quotas. Check the App Engine Quotas to see how much the app is using.
  • Current daily quotas
  • Recipient Emails: 100
  • Attachment Data: 97.7MB

Logging

  • If somethings not working right, go to the Monitoring section and select Logs to view them
  • The app will log any unexpected errors

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.