kepford / serverless-feedbin-to-pinboard

Creates Pinboard.in bookmarks from Feedbin RSS items using Serverless and AWS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Serverless: Feedbin Content to Pinboard Bookmark

Purpose

Provide a reliable service that will look at a Feedbin.com account for starred articles and create bookmarks on the user's Pinboard.in account.

What it does

1. Get Feedbin item IDs from a feed such as starred

Feedbin API docs

Feedbin will give us an array of IDs. We can then use this to fetch each one.

Get starred entry IDs

2. Get individual Feedbin items

Get entries

Feedbin Content:

[
  {
    "id": 2077,
    "feed_id": 135,
    "title": "Objective-C Runtime Releases",
    "url": "http:\/\/mjtsai.com\/blog\/2013\/02\/02\/objective-c-runtime-releases\/",
    "author": "Michael Tsai",
    "content": "<p><a href=\"https:\/\/twitter.com\/bavarious\/status\/297851496945577984\">Bavarious<\/a> created a <a href=\"https:\/\/github.com\/bavarious\/objc4\/commits\/master\">GitHub repository<\/a> that shows the differences between versions of <a href=\"http:\/\/www.opensource.apple.com\/source\/objc4\/\">Apple\u2019s Objective-C runtime<\/a> that shipped with different versions of Mac OS X.<\/p>",
    "summary": "Bavarious created a GitHub repository that shows the differences between versions of Apple\u2019s Objective-C runtime that shipped with different versions of Mac OS X.",
    "published": "2013-02-03T01:00:19.000000Z",
    "created_at": "2013-02-04T01:00:19.127893Z"
  }
]

3. Create Pinboard bookmarks

Pinboard API

Supported options for bookmarking

options = {
  description: 'The title of the bookmark',
  url: 'http://github.com',
  toread: 'yes',
  tags: 'devtools, git',
  shared: 'yes'
};

4. Unstar or delete starred Feedbin entries

If we successfully bookmark an item we want to unstar it in Feedbin.

Delete starred entries

This project uses the Serverless framework. You can get started by following this guide.

Setup

You will need to following things set up before you can contribute to this project.

  1. An AWS account.
  2. The AWS CLI installed. Guide
  3. Create an AWS user. Guide

Install correct version of Node

nvm use

Install all the things

npm install

AWS CLI

For convenience install the AWS CLI. Then configure your new CLI by following this guide

Environment variables

Copy the example.env.js to a new file named .env.js and add your own settings there.

Local development

Run npm run offline

Testing Locally

npm run sls -- invoke -f functionName -l

Watching Log for a Function

npm run sls -- logs -f hello -s dev -t Tail the logs on dev for function named hello.

Deployment

Deploy all project code

npm run sls -- deploy

Deploy one function

npm run sls -- deploy -f functionName -s dev Deploys the function named functionName to the dev environment.

Deploy to specific environments

The default environment we use is dev so if you wanted to deploy to prod environment you would do -s prod.

npm run sls -- deploy -s prod

About

Creates Pinboard.in bookmarks from Feedbin RSS items using Serverless and AWS

License:GNU General Public License v3.0


Languages

Language:JavaScript 100.0%