Created
September 11, 2012 22:33
-
-
Save ismaelga/3702645 to your computer and use it in GitHub Desktop.
Lorens - Alfred extension problem
This file contains 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 "lorem" | |
hash = {'c' => 'chars', 'w' => 'words', 'p' => 'paragraphs'} | |
args = ARGV[0].split | |
*args = hash[args[1]], args[0].to_i | |
print Lorem::Base.new(*args).output |
This file contains 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
# works in normal mode but not with silent mode | |
cd ~/Library/Application\ Support/Alfred/extensions/scripts/Lorens | |
ruby lorens.rb {query} | pbcopy | |
echo "Lipsum text is now ready in the clipboard" | |
exit # added to exit terminal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment