Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Sinatra app for saving links to Backpack
require 'rubygems'
require 'sinatra'
require 'rest_client'
require 'pismo'
set :api_key, 'your api key for backpack goes here'
set :backpack_page, 'the backpack pages api you are saving to goes here'
get '/backpackit/*' do
url = params[:splat].first
doc =
title = '"' + doc.html_title + '":' + url,
:token => settings.backpack_page,
:note => { :title => title }
redirect url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.