-
-
Save davidchambers/973656 to your computer and use it in GitHub Desktop.
TextMate command to open a markdown document in hashify.me
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require "base64" | |
message = "HG: Enter commit message. Lines beginning with 'HG:' are removed." | |
data = STDIN.read | |
data.gsub!(/^HG: .+\n/, '') if data.include? message | |
%x[open http://hashify.me/#{Base64.encode64(data).gsub(/\n/, '')}] | |
=begin | |
+-[ COMMAND SETTINGS ]------------+ | |
| Save: nothing | | |
| Input: entire document | | |
| Output: discard | | |
+---------------------------------+ | |
=end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bundles » Bundle Editor » Edit Commands…