Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 35 lines (19 sloc) 1.925 kB
443adce @xavi- Added support for linux and (kinda) windows.
authored
1 # node-copy-paste
2
67d61ae @xavi- Added links to README and rewoarded so text.
authored
3 A command line utility that allows read/write (i.e copy/paste) access to the system clipboard. It does this by wrapping [`pbcopy/pbpaste`](https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/pbcopy.1.html) (for OSX), [`xclip`](http://www.cyberciti.biz/faq/xclip-linux-insert-files-command-output-intoclipboard/) (for linux), and [`clip`](http://www.labnol.org/software/tutorials/copy-dos-command-line-output-clipboard-clip-exe/2506/) (for windows). Currently works with node.js v0.8+.
443adce @xavi- Added support for linux and (kinda) windows.
authored
4
5 ## The API
6
2a4ab86 @xavi- Changed npm package name to copy-paste.
authored
7 When `require("copy-paste")` is executed, two global functions are added:
443adce @xavi- Added support for linux and (kinda) windows.
authored
8
1a2f061 @xavi- Refector code to make it less redundant. Also now copy accpets array…
authored
9 - `copy(text)`: asynchronously replaces the current contents of the clip board with `text`. Takes either a string, array, object, or readable stream.
0a11688 @xavi- Added reference to experimental-fallbacks branch, as well as fixed ty…
authored
10 - `paste()`: synchronously returns the current contents of the system clip board.
443adce @xavi- Added support for linux and (kinda) windows.
authored
11
6218491 @xavi- Added documentation for as well as adjusted the url to the experimen…
authored
12 If you do not want to pollute the global namespaced call `require("copy-paste").noConflict()`. It'll remove the `copy` and `paste` global functions as well as return an object that has `copy` and `paste` properties.
13
443adce @xavi- Added support for linux and (kinda) windows.
authored
14 ## Getting node-copy-paste
15
16 The easiest way to get node-copy-paste is with [npm](http://npmjs.org/):
17
2a4ab86 @xavi- Changed npm package name to copy-paste.
authored
18 npm install -g copy-paste
67d61ae @xavi- Added links to README and rewoarded so text.
authored
19
20 Rarely is it a good idea to install modules globally, but `node-copy-paste` is immensely useful while doing work in the REPL or while debugging. It's nice having it around.
443adce @xavi- Added support for linux and (kinda) windows.
authored
21
22 Alternatively you can clone this git repository:
23
8b3812e @xavi- Fixed clone instructions in README.
authored
24 git clone git://github.com/xavi-/node-copy-paste.git
443adce @xavi- Added support for linux and (kinda) windows.
authored
25
26 ## Future plans
27
6218491 @xavi- Added documentation for as well as adjusted the url to the experimen…
authored
28 I'm hoping to add various fallbacks for instances when `xclip` or `clip` is not avaiable (see [experimental-fallbacks](https://github.com/xavi-/node-copy-paste/tree/experimental-fallbacks/platform) branch). Also this library needs to be more thoroughly tested on windows.
443adce @xavi- Added support for linux and (kinda) windows.
authored
29
30 ## Developed by
31 * Xavi Ramirez
32
33 ## License
34 This project is released under [The MIT License](http://www.opensource.org/licenses/mit-license.php).
Something went wrong with that request. Please try again.