Jump to content

Search the Community

Showing results for tags 'ruby'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting


  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL




  1. This is my error : [ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON: input the {"items":[]} "input the" is the result of code "echo $userInput This Alfred node, runs a script called search.rb. I've screen shotted it below as well. The script calls all redbooth API's(a project management app) Projects, Tasklists and tasks. It then runs a loop through each item and looks for titles that match the user input/ARGV. I have run the script locally in my terminal and the script re
  2. Hi all, I've been getting lots of requests to update this workflow to make it compatible with Ruby >=2.0 which is what's been shipping with the past couple releases of macOS. Well, I took some time this week to finally do it and also added a few new features. Results will now show their album art, and the pairing process has been improved. You can also now search by artist name and album title. I've also renamed the workflow to iTunes DJ (reminiscent of the original queuing feature in iTunes). See the README on Github for more info and download links.
  3. StackOverflow Search for Alfred Search for answers on StackOverflow.com from Alfred 2. Download Get StackOverflow for Alfred from GitHub or Packal. Usage .so <query> — Search StackOverflow.com for <query>. See below for syntax. ↩ or ⌘+NUM — Open result in default browser ⌘+L — Show full question title in Alfred's Large Text window Query syntax By default, words in <query> will be search for in the title of posts. To specify a tag, prefix it with ., e.g. python will search for python in the post title, .python will search for the tag python. Results Answ
  4. Dash 2 (note: paid app) has just been released and it comes with a Alfred 2 Workflow. Dash lets users instantly search through documentation for 130+ APIs (ranging from HTML to Cocoa), for more information, check out Dash's webpage. All of the Dash-supported documentation sets are available for offline use. You can get the Dash workflow by installing Dash and going to Preferences > Integration > Alfred. Supported documentation as of the 2.0 release (documentation is constantly added so this list might go out of date): iOS, OS X, Man Pages, .NET Framework, ActionScript, Akk
  5. Since I love Ruby's fast syntax and ease of use maybe as much as I love Alfred, I decided to give Alfred the power to interpret Ruby, inspired by Altre's Python Interpreter. Ruby Interpreter also stores the last executed commands so you can re-use them and modify them later (set how much history you want to keep in Alfred Variables). Download from Packal
  6. Hey Folks, I want to start creating workflows with Ruby for Alfred. I learned basic Ruby on Codecademy and have a little background in developing with Java and Objective-C, so at least OOP is familiar. However, most content I find on developing with Ruby is kind of centered around the language elements and getting them right. Though I definitely need practice, it is not exactly what I am looking for. I want to gain experience in calling applications / APIs and how to get familiar with new APIs. You can probably already see how lost I am by how I am describing the topic To wrap it up
  7. I have a simple keyword script that parses some arguments in Ruby and then uses `curl` to submit to a url (a Google Form). All works as advertised, including error messages after rescued Exceptions, except that I get no notification from any output in my script that occurs *after* the `curl` command. Examples: # works correctly and echoes notification puts "Completed successfully!" `curl --data #{data} #{url}` # does not echo notification `curl --data #{data} #{url}` puts "Completed successfully!" In the second case, no notification ever gets issued. If I run the script from the command li
  8. I really love workflows and I wanted to start creating my own. I'm mostly a front-end developer and use ruby for the most part on any back-end dev work I do. I saw that Alfred supports Ruby workflows which made me very excited. I did some googling and had a hard time finding some tutorials about creating workflows with ruby, plenty with php though. I needed to learn the basics of workflows and wanted to do it in a language I knew (not familiar with php). I wrote a post detailing how a basic workflow functions with ruby. It's nothing you can't find anywhere else, but it was a good e
  9. Quickly access a ruby gem's URLs with: gem <gem name> URLs include: Homepage Rubygems Page Documentation Use [Return] to visit the url in the browser and [CMD]+[Return] to copy the url to your clipboard. Download
  10. I use Chrome on my desktop, but I like to do all of my reading on my iPad or iPhone and I like using the Reading List built into Safari. I've used Pocket for this before, but a lot of stuff ends up in Safari's Reading List when I'm using the Twitter client on iOS. This workflow will take your current Chrome tab and send it to Safari's Reading List. Installation Instructions From a terminal window, run: sudo gem install rb-appscript Download the workflow from: https://www.dropbox.com/s/bnxbpiabtcjfz60/Chrome%20to%20Safari%20Reading%20List.alfredworkflow Usage T
  11. I have spent almost 8 hours on this and I know it's an easy fix. I want to use this fork of the Sonos Ruby gem. The problem: I don't know how to require/include the gem, neither locally as a cloned copy or as a regular "require gem_name". The script runs fine in IRB, but when I try to run it in a workflow the sound doesn't pause. I thought it might be because my system Ruby is old, but I use Mavericks so that shouldn't be a problem. You can download the Workflow here from my Dropbox. And here's a SO question with more info, too. Any help is really appreciated. I am read
  12. Hi guys, I'm trying to create a simple alfred workflow (Keyword -> Run Script -> Post Notification) using ruby. If I run this scripts in the terminal, it runs just fine, but when I try to run them on Alfred, I get some errors: ruby start.rb {query} [ERROR: alfred.workflow.action.script] Code 1: -e:1:in `<main>': undefined local variable or method `start' for main:Object (NameError) I assumed that ruby wasn't in Alfred path so I tried /usr/bin/ruby start.rb {query} and got this error: [ERROR: alfred.workflow.action.script] Code 1: -e:1: unknown regexp option - b -e:1: syn
  13. Hi guys, I'm trying to create one workflow using a script filter with ruby. When i put everything in alfred script box it works fine, but i'd like to keep thing organized, so I tried to create 3 separate files, that are placed in workflow folder, and then use alfred script box just to call the methods defined in this files. Something like this: require_relative "file1" require_relative "file2" require_relative "file3" ... puts some_method(param) But when I do this, I get this exception: [ERROR: alfred.workflow.input.scriptfilter] Code 1: -e:1:in `require_relative': cannot infer
  14. For any file in your Dropbox folder, this workflow shows the dropbox short link URL (e.g. http://db.tt/1LkWGVJF) and copies the link to the clipboard (Cmd+Shift+D): 1. Select a file in Finder (must be a file within your Dropbox folder, e.g. ~/Dropbox/Photos/MyPhoto1.jpg) 2. Press Command+Shift+D 3. Authorize the workflow to use the Dropbox API (only if this is the first time) 4. The shortened link pops up and is copied to the clipboard. It uses OAuth in the background to connect to Dropbox so you can authorize the Alfred 2 Workflow without storing passwords insecurely. For those who
  15. Switch System Ruby Workflow for Alfred App A simple Ruby development workflow for Mavericks to switch system Ruby between 2.0.0 and 1.8.7. My use case is specifically for Alfred workflows development, since Alfred uses the system Ruby, and not the binaries from RVM or rbenv. It might come handy in similar situations where system Ruby is needed. Usage Type the switchruby keyword to see the menu option: The only actionable option is the first, which will switch between Ruby 2.0.0 and Ruby 1.8.7. The workflow will ask por Administration Privileges to continue. Installation Download the alfre
  16. Hello everybody. I am designing a workflow that will allow you to compile / interpret / execute code from most common languages, and then view output, copy to clipboard, or open in a new document. What I would like to ask is what sort of features would you like to have? This is meant to be useful and convenient for you. I will post up the workflow in progress soon. Feedback and feature requests are greatly appreciated! -Matthew
  17. Hello, I'm trying to create a workflow that does image processing to selected images in Finder. For some reason, when the script runs, it would stop executing after the first "exec" is called (e.g. when I call the "convert" command). Here's what my Alfred workflow looks like: http://goo.gl/45BiWd and here's what my Ruby script looks like: http://goo.gl/Fo7ssF I'm sorry. I have spent many hours trying to figure out why it stops after the first image is processed (resized and alpha removed). Does anyone know what the cause could be?
  18. Hello, I've just started to write Alfred workflow in Ruby with Zhaohai's workflow https://github.com/zhaocai/alfred-workflow My workflow is pretty simple, it converts the inputted units using the gem 'ruby-units' When I test the script in the terminal, it returns valid output for Alfred: >> /usr/bin/ruby main.rb 10 cm in m <items><item arg='copy=0.1' uid='' valid='yes'><title>0.1</title><subtitle>Copy to clipboard.</subtitle><icon>icon.png</icon></item></items> However, when running in Alfred, it only shows the fallback
  19. Hello, I am using fairly often Ruby (.rb) files to automate things, and currently they're associated with Terminal, and basically I am typing the start of their name in Alfred, and Alfred is launching them inside a Terminal window. I am wondering if Alfred can launch them in the background, without showing a Terminal window?
  20. Let’s say I have this test.rb ruby file (notice I’m not using a single quote (') but an apostrophe (’)) string = "It’s a string" puts string I can run this and get the expected output $ /usr/bin/ruby test.rb It’s a string However, in Alfred, if I have a Run Script that has the equivalent, it completely chokes and does nothing, other than the error sound. Using this as intended for it’s final version (having a hotkey that’ll pass selected text), we don’t even get the sound, just nothing.Using OS X 10.9 and Alfred 2.1.1(227).
  21. Hello again. I wonder if someone could help out with a bit of Ruby scripting. I've written a workflow that deletes a list of files selected from Alfred. The problem is with the script; I can't get it to delete the files. ext = "{query}" fileNames = text.split("/t") filesDeleted = "" fileNames.each do |fileName| command = "rm -r " + fileName system(command) filesDeleted << fileName end print filesDeleted Everything else works okay apart from the system call. Any ideas as to what I've forgotten? ...
  22. Hi, I want to write a little Workflow with Ruby. But i have a little bit trouble to do so. I use the Alfredo Library. Unfortunately until now i was not able to find some example workflows codes with the Alfredo library. Do somebody know such workflows?
  23. Hi, Here's a little workflow to query rubygems.org. Home: https://github.com/olibob/alfred-rubygems Direct download: https://github.com/olibob/alfred-rubygems/raw/master/alfred-rubygems.alfredworkflow Example: Maybe someone else than me will find it useful Regards, Olibob
  24. AlfredLite is a lightweight modular framework for creating workflows. Features Modular designOnly load the modules your workflow uses Faster load times (execution speed is an underappreciated feature of any workflow) Less bundeled dependencies Subclassable workflowsAlfred::Workflow is designed to be subclassed, the possibilities are endless! Requirements AlfredLite is tested against the following verions of Ruby: 1.8.7 (preinstalled on OS X Mountain Lion) 1.9.3 2.0.0 (preinstalled on OS X Mavericks) Contributing (aka I can't do this alone!) Bug FixesReporting bugs is encouraged and g
  25. Strange issue - hope somone would be able to explain why this happens. In our workflow: https://bitly.com/myphonedesktop-alfred2 when user triggers workflow, we have a check if our application (myPhoneDesktop) is running and if not we starting application. The way we check if app is running is the same way we do for all our other extensions, plugins, etc e.g., myPhoneDesktop for Dropzone - we have the following ruby method: def mpd_running?(app_name) `ps aux` =~ /#{app_name}/ ? true : false end Whats strange is that (ONLY from within Alfred) #mpd_running? method returns a fal
  • Create New...