aboutsummaryrefslogtreecommitdiffstats
path: root/SharedSupport/Default Bundles/MD5 Hash.spBundle
diff options
context:
space:
mode:
Diffstat (limited to 'SharedSupport/Default Bundles/MD5 Hash.spBundle')
-rw-r--r--SharedSupport/Default Bundles/MD5 Hash.spBundle/command.plist12
1 files changed, 11 insertions, 1 deletions
diff --git a/SharedSupport/Default Bundles/MD5 Hash.spBundle/command.plist b/SharedSupport/Default Bundles/MD5 Hash.spBundle/command.plist
index 0b820665..110231c2 100644
--- a/SharedSupport/Default Bundles/MD5 Hash.spBundle/command.plist
+++ b/SharedSupport/Default Bundles/MD5 Hash.spBundle/command.plist
@@ -2,15 +2,25 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
+ <key>author</key>
+ <string>Abhi Beckert</string>
<key>category</key>
<string>Hash</string>
<key>command</key>
<string>#!/usr/bin/ruby
+# fetch selected text from STDIN
+selectedText = gets
+
+# create sha1 hash
require 'digest/md5'
+hash = Digest::MD5.hexdigest(selectedText)
-print Digest::MD5.hexdigest(gets)
+# output hash
+print hash
</string>
+ <key>description</key>
+ <string>Convert the selected text to an MD5 hash.</string>
<key>input</key>
<string>selectedtext</string>
<key>input_fallback</key>