Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Improved pbcopy/pbpaste
branch: master
Failed to load latest commit information.
LICENSE Updated README
README.md Updated README
package.json Fix package.json dependency
pb.js version bump 0.1.2: autorelease pool
pboard.njs version bump 0.1.1: set support

README.md

pb

Improved pbcopy/pbpaste for OSX

Installation

npm install pb

Usage

$ pb [type]
$ get_data | pb -s [type]

For example, to grab the contents of the html pasteboard and put it on the plaintext pasteboard:

$ pb html | pb -s

From node, pb exposes:

  • get(type): get pasteboard data from specified pasteboard
  • set(type, data): set pasteboard data (overwrites other pasteboards)
var pb = require('pb');
var HTMLOutput = pb.get('html');
var textOutput = pb.get();

Supported Pasteboards

  • NSStringPboardType (plaintext)
  • NSHTMLPboardType (HTML)
Something went wrong with that request. Please try again.