A collection of scripts that operate on the contents of the clipboard.
Ruby Shell
Switch branches/tags
Nothing to show
Latest commit a08cfc3 Jun 13, 2017 @matthewfallshaw bugfix: fix totally wrong expanded story link
(Sometimes it’s worth testing your code before you ship it.)
Permalink
Failed to load latest commit information.
lib
spec
.gitignore
Guardfile
README.textile
Rakefile
clipboard-scripts.icns
install.rb
pb-bit-ly
pb-clear-clipboard
pb-dasherize
pb-de-google-link
pb-de-redirect-link
pb-define
pb-downcase
pb-escape-cgi
pb-escape-html
pb-escape-quoted-printable
pb-escape-uri
pb-finder-path
pb-finder-path-xdropbox
pb-gravatar-url
pb-html-to-textile
pb-humanize
pb-lorem
pb-markdown-to-html
pb-md5
pb-passwd-composer
pb-peek-at-clipboard
pb-peek-at-clipboard-sticky
pb-pivotal-lookup
pb-pwgen
pb-pwgen-pin
pb-pwgen-sticky
pb-qrencode
pb-random-number
pb-remove-spaces
pb-rot13
pb-sentence-case
pb-sort
pb-strip
pb-strip-newlines
pb-textile-to-html
pb-title-case
pb-undasherize
pb-underscore
pb-underscorize
pb-unescape-cgi
pb-unescape-html
pb-unescape-quoted-printable
pb-unescape-uri
pb-unformat
pb-ununderscore
pb-ununderscorize
pb-upcase
pb-vidir-here
pb-vim-buffer-here
pb-wc
pb-wcc

README.textile

Clipboard Scripts

A collection of scripts that operate on the OSX pasteboard.
I trigger these from Quicksilver, but they’d work from Alfred or any other launcher capable of launching shell scripts.

ToDo

  • would this make these tools cross-platform?

Prerequisites

  • ruby, rubygems (both of these are part of OSX since Tiger)
  • Quicksilver (or something equally awesome (if such a thing exists)) with the “Terminal Module” plugin
    • Quicksilver Install
      1. [skippable if you’ve already installed Quicksilver or a mythical something equally awesome] download and install Quicksilver
      2. Invoke Quicksilver and hit <Command>, (hold the squiggly apple key and tap the comma key, which I’ll say as <Command>, next time) to get to the preferences panel
      3. click to Plugins and tick the “Terminal Module” plugin checkbox

Install

  1. Prereq’s
  2. QS Terminal plugin
  3. [for most scripts] Growl and GrowlNotify: 2.x from the App Store, 1.3 for free from http://growl.info/downloads#generaldownloads. GrowlNotify from that download page even if you buy from the App Store.
  4. [for some scripts]
  1. are you a geek?
    • no:
      1. make a new directory for geeky stuff like this (I suggest code in your home directory)
      2. download these scripts , and unzip it into your new code directory (that’ll unzip to an ugly directory name that includes this GitHub account and a version string – you may want to rename it to just plain clipboard-scripts)
    • yes:
      1. from your code directory: git clone git://github.com/matthewfallshaw/clipboard-scripts.git
  2. from Terminal.app:
    (since you have Quicksilver you won’t reach for your mouse to open Terminal.app, you’ll Invoke Quicksilver (default <Ctrl><Space>), then type just enough of terminal for Quicksilver to offer it to you, and hit <Enter>)
    $ cd ~/code/clipboard-scripts (that’s the new, unzipped directory you just downloaded, or the directory you just git cloned)
    $ ./install.rb
    (say ‘a’ to accept everything)
  3. Invoke Quicksilver
  4. <Command>, (for preferences)
  5. Catalog
  6. Click the ‘+’ in the bottom left and add a File & Folder Scanner
  7. Select the bin subdirectory of this directory
  8. Click the small ‘i’ in the bottom right
  9. “Include Contents:” Folder Contents (Depth: 2)
  10. <Command>r (to rescan catalog)
  11. now (and always):
    1. select and copy any text which has formatting
    2. Invoke Quicksilver
    3. type enough of pb-unformat to let Quicksilver find that script (probably just unformat)
      now you have completely unformated text in the clipboard
  12. Now, go explore that directory for other useful scripts (like pb-wc for word count, pb-finder-path-xdropbox for the path to the currently selected file with “Dropbox:” instead of your dropbox, pb-sort, pb-random-number, etc.)

License

This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Australia License.

Tags

OSX Hacks, clipboard, pasteboard, shortcuts.