Boxmarklet, Easily upload PDF version of a webpage to Box. This code powers http://boxmarklet.herokuapp.com.
Boxmarklet is a bookmarklet tood for uploading PDF version of a webpage to user's Box account. The backend runs on Sinatra.
The app uses wkhtmltopdf for taking screenshots of a webpage and box-ruby-sdk for interacting with Box API.
Though, the app is targeted for heroku platform. In order to deploy it on your heroku dyno, follow the steps given below.
- Create an account on heroku
- Copy this code to a folder on your machine, and initialize a GIT repository.
- Create a developer account on box and create an application there. In the edit box application section, enter redirect URI in the following format:
https://<your-app-name>.herokuapp.com/authorization_callback
- Copy the API-key and put it in config.ru file for production and development environment. (You can create a different application for your dev setup and put the key for it in the development environment section in config.ru file)
- Set APP_URL config variable in boxmarklet.js file to point to your application URL.