Jump to content

Matthew Lancellotti

  • Posts

  • Joined

  • Last visited

  • Days Won


Matthew Lancellotti last won the day on November 8 2014

Matthew Lancellotti had the most liked content!

Profile Information

  • Interests
    math, tennis, violin, piano

Matthew Lancellotti's Achievements

Helping Hand

Helping Hand (3/5)



  1. This is a cool workflow. Seems to work on High Sierra with the exception of opening the newly made file in your favorite application. I have notifications disabled so I don't know if that part works. I'm wondering if we could somehow eliminate the redundancy in the workflow where it has a separate row for each filetype. Do you think it's doable? It would be nice to have a big folder of template files and have the workflow access all of them. Thoughts?
  2. @johnjoonso: Sorry I haven't checked this thread in so long. You must COPY the text to your clipboard (typically via Edit > Copy or ⌘C) before running the workflow. Then, when you type your regex and hit enter, the result is automatically pasted. ------ As a bonus, this means you could potentially copy text from one location, then move your cursor to another location, and get the result in the new location.
  3. Currently there are some issues with Run Script when using /usr/bin/php, /usr/bin/perl, /usr/bin/python, etc... Those processes are launched from the shell using certain environment variables (such as LANG=C or another non-unicode supporting environment) which disable features or environments we may need to run our scripts correctly. Currently the only solution to this would be to use /bin/bash or /bin/zsh and set things ourselves and then launch our script from there. Doing so means we sacrifice the convenience of having scripts right in the workflow visual themselves AND we can no longer take in the query conveniently. We must now take in the query through bash for example, which is quite tricky (an experienced programmer may be ok, but just try taking in something like She said, "He said, 'this is fantastic!' ", and you'll see things are much worse than what is apparent). To save us from this mess, we could have a vertical dual pane Run Script, where the top pane is a bash or zsh, and the bottom one of the script languages. Users can then easily set any setup variables they need to make things run smoothly. Thanks kindly, Matthew
  4. Great workflow! Requests: 1. How can I disable the "About" "documentation" that appears when I type the keyword? I would strongly prefer if it said "Units" "Convert units" or something like that. Can the link be disabled too? 2. There seems to be no circle icon. Can you put one in?
  5. Thanks for all the useful info, deanishe! I found a simple solution, and it was to change the environment variable from within my script. This is good because I don't have to take my query in through bash, and it will work wherever I distribute my workflow. In Perl specifically, I used $ENV{LANG} = 'en_US.UTF-8'; at the beginning of my script. My only question is, will non-US users have the en_US.UTF-8 environment?
  6. @ohmish Thank you very much, I appreciate it. Regex now supports the tr/// operation. Use cases: tr/this/that tr[a-z][A-Z] y[a-z][A-Z]cs etc..
  7. It doesn't make sense to me that Alfred would run my scripts in the LANG=C environment when there is something much better. Is there a good reason for this? Perhaps I will suggest a change to the company. Thanks for the workaround. It's messy but at least functional.
  8. Unfortunately, outputting in UTF-8 is not working. The ⌂ character, which I copied from a website (HTML code ⌂), still causes question markiness. The â character, on the other hand, causes the Alfred error: [ERROR: alfred.workflow.action.script] Code 0: Wide character in print at VeryKiwiFilter.pm line 56. My workflow grabs things from the clipboard, so I don't know how the input is coded. Will the clipboard guarantee it is UTF-8? Can the input be encoded in many different ways depending on what was copied? But either way, the output still looks great in the terminal, but not in Alfred. How can I further troubleshoot?
  9. My workflow script ends with printing output. That output goes to Alfred's "copy to clipboard". 1. How does Alfred interpret the output it receives? Do I need to escape anything in my output? Perl code: print 'this is a string with special characters in it Đ⌂' The above is a simplified model. What is REALLY happening is the Perl code copies the special characters from the clipboard in the first place, then prints them out. When I look at what the Perl code prints out in the terminal, I can see the special characters just fine. So it seems that it is ALFRED who is unable to accept the special characters or put them into the pasteboard correctly. It replaces them with '?' question marks. 2. I am open to creative solutions. I never intended to copy my output to the clipboard in the first place. I just needed to use the "paste into frontmost application" option. Using an apple script to execute "cmd-V" is an option, but I don't think it will work in all applications. I guess my second, slightly related question is "How does Alfred paste into the frontmost application reliably?" Maybe I can mimic that behavior and bypass Alfred.
  10. Dave, Thanks for the great workflow. 1. When I type "weather", I see an "Hourly Forecast" and an "Hourly Forecast at ..." option. Are those default Alfred things? I can't seem to find where they are coming from. How can I disable those? 2. Feature request: Would you be able to get the hourly forecast in the same way you get the 4-day forecast? I usually need to see the hourly.
  11. Thanks, dude. I had that same bug. Thanks for the fix! P.S. When the song is not found, the search in google options is disabled. But when no results are found, that's when i want to search on google! In fact, I shouldn't even have to hold down control in order for that to happen...
  12. Version 1.5.0 is here. Here are the improvements: A checkmark appears on the icon when your regex is valid (correct syntax). Regex will not execute invalid regexs. It is…awesome. You have full control to do custom regexing by opening the file at ~/Library/Application Support/Alfred 2/Workflow Data/com.verykiwi.com/RegexSequences.pl. Your custom regexs remain even when updating Regex. Quoted regexs (sq) can be saved.
  13. Hi, deanishe. I was using your Packal workflow. I input "packal workflows regex". The "Regex" workflow has a read question mark next to it. What does it mean? How can I, the author, fix the issue?

    1. deanishe


      Hi Matthew,

      The icons are documented in the README: https://github.com/deanishe/alfred-packal-search#icons

      What the question mark means is that the workflow is available on Packal, but you didn't install if from there (i.e. the search workflow didn't find Packal's metadata within the workflow). I'd expect authors to see the question mark next to their own workflows, seeing as they're probably running it from their own copy of the source code. So it sh...

  14. Thanks! You can view my new Regex workflow at alfred forum: http://www.alfredforum.com/topic/5100-regex-run-and-save-regular-expressions/ full details and download link on my website: http://code.instructorium.com/regex packal: http://www.packal.org/workflow/regex Thanks for your help.
  15. Perform a search and replace on copied text, and save regexs for future use. Download: http://code.instructorium.com/downloads/Regex.alfredworkflow Please visit http://code.instructorium.com/regex for more information. (also on Packal: http://www.packal.org/workflow/regex ) A summary is below: Commands you can use: 1. Any regular expression (no keyword necessary, Perl-style) "s/this/that/msg" "s@\$(\d+)\.(\d{2})@$1 dollars and $2 cents@g", etc. 2. Follow your regular expression with " save as " and then a name in order to save it for future use. "s&this&that&xg save as mythisthat", etc. 3. Use the "regex" keyword followed by the name you saved it under to execute a saved regex. "regex mythisthat", etc. As far as I know, it works on all versions of Alfred 2 and all versions of OS X. Your custom workflows are saved under ~/Library/Application Support/Alfred 2/workflows/com.verykiwi.regex/RegexSequences.pl. You can delete the com.verykiwi.regex folder after uninstall. Feel free to contact me if you have any issues.
  • Create New...