dfay

Member
  • Content count

    436
  • Joined

  • Last visited

  • Days Won

    17

dfay last won the day on January 9

dfay had the most liked content!

About dfay

  • Rank
    Advanced Member
  • Birthday

Contact Methods

  • Website URL
    http://dfay.fastmail.fm/alfred/

Profile Information

  • Gender
    Not Telling
  • Interests
    see also https://github.com/derickfay - assorted small projects related to Keynote, BibDesk, Alfred, Taskpaper & more
    http://dfay.fastmail.fm/et/ - using Editorial with TaskPaper files
    http://dfay.fastmail.fm/bibdesk/ - BibDesk scripts and templates
    and a blast from the past: http://dfay.fastmail.fm/wordperfect - WordPerfect on the Mac

Recent Profile Visitors

4,904 profile views
  1. This is crying out for Hazel. It might be possible in Alfred but it's going to be convoluted whereas Hazel lets you automatically run scripts on files in a given directory (thereby avoiding the human intervention necessary in step 2).
  2. Use Applescript: tell application "System Events" command key down keystroke tab delay 3 command key up end tell I used this technique with Alfred Remote -- see
  3. query="{query}" x = float(query)/60 y = x*25 print "%.2f" % x, "%.2f" % y
  4. Also if you want to go further here is a whole command-line time calculator library I wrote in python some years ago. The code above does the conversion to minutes rather than seconds but it's basically the same as the input_time, to_seconds and base_time functionality below. def to_seconds(i): seconds=int(i[2])+(int(i[1])*60)+(int(i[0]) * 60 * 60) return seconds def from_seconds(raw_seconds): seconds=abs(int(raw_seconds)) minutes=0 hours=0 while seconds > 59: seconds=seconds-60 minutes=minutes+1 while minutes > 59: minutes=minutes-60 hours=hours+1 if raw_seconds<0: hours=hours*-1 return [str(hours), str(minutes), str(seconds)] def input_time(): time = raw_input('enter time in h:m:s format: ') time_list=time.split(":") return time_list def add(base_time): increase=input_time() return(from_seconds(to_seconds(base_time)+to_seconds(increase))) def subtract(base_time): decrease=input_time() return(from_seconds(to_seconds(base_time)-to_seconds(decrease))) def multiply(base_time, multiplier): return(from_seconds(to_seconds(base_time)*multiplier)) def divide(base_time, divisor): return(from_seconds(to_seconds(base_time)/divisor)) def milePaceToKMPace(mile_pace): return(multiply(mile_pace,0.621371)) def kmPacetoMilePace(km_pace): return(multiply(km_pace,1.609343994)) def decimal_equivalent(base_time): return(to_seconds(base_time)/3600.0) def negative(base_time): return(multiply(base_time,-1)) def display_time(i): if len (i[1])==1: i[1]="0"+i[1] if len (i[2])==1: i[2]="0"+i[2] print i[0]+":"+i[1]+":"+i[2]
  5. Try this in a Run Script box with language as python and input as {query}. You can pipe it out to a Copy to Clipboard action. i = "{query}".split(":") m=int(i[1])+(int(i[0])*60) print float(m)/60
  6. Try this in a Run Script box with language as python and input as {query}. You can pipe it out to a Copy to Clipboard action. query="{query}" x = float(query)/60 y = x*25 print x,y
  7. I've had mine in ~/Dropbox/Sync/Alfred/ for years and it works fine.
  8. well the easiest way to do this is just to use the built in calculator feature or if RPN is your thing there's this which I made but never use - or you can use bash and bc: http://unix.stackexchange.com/questions/30478/doing-simple-math-on-the-command-line-using-bash-functions-1-divided-by-2-us
  9. I used Gemini 2 a lot about a year ago when I replaced the mechanical HD on my iMac with an SSD and 2nd HD, and cleaned up several hundred GB of photos in the process. It worked fine for me but I switched to using SnapSelect for photos since it does fuzzy matching of similar but not identical photos. No complaints with Gemini 2, though. The bigger trick is to set up your work process so you don't end up with dupes in the first place
  10. For the app cleaning function in Hazel you don't need to set up any rules - just turn on System Preferences > Hazel > Trash > Enable App Sweep
  11. yes i agree. i got clean my mac 2 in a bundle some time ago and won't be updating. if you use Hazel, the app deletion feature is redundant, too.
  12. Here you go -- rough draft at this point: https://dl.dropboxusercontent.com/u/6601556/Alfred/Ulysses Sheet Actions.alfredworkflow There are three commands: un - create a new sheet in Ulysses ua - set the active sheet to an existing sheet (requires manual entry of the sheet id for reasons discussed above) up - append to the active sheet (may not work consistently for reasons unclear) and a File Action Add to Ulysses (active for plain text and Markdown files by default) - create a new sheet with the contents of the selected file The latter could easily be extended to other file types with some pandoc magic.
  13. clipboard

    Take a look at these for examples of how to proceed: https://www.alfredforum.com/topic/2180-case-converter-including-title-case/#comment-12226 https://www.alfredforum.com/topic/4818-code-case/#comment-29475 (this may be the best model if you want to be able to preview the output) Also this one that I use but which never posted: https://dl.dropboxusercontent.com/u/6601556/Alfred/Text cleaners.alfredworkflow
  14. x-callback is working on the Mac now as of a version or 2 ago of Ulysses....it's easy enough to create a new sheet but the ids that are used still need to be gathered manually (by option-right clicking on the sheet). Based on the code in the ulysses search workflow, I've been poking around in the Ulysses library structure, and it seems that the ids are not contained there. That is, when I know an id, I can search every file in the library without finding that id anywhere there. I've got a workflow working which requires the user to set an "active sheet" & then allows appending text to the active sheet (as well as creating new sheets, which is easy), but the goal of searching sheets and then appending to the selected sheet from the results seems impossible without a way to find the id programatically.
  15. Well the first of those issues can easily be fixed in that workflow by changing the argument to be optional, and editing main.rb (or better copying it and making a new script filter to call the edited version) with the lines if (search_term.length > 0) puts MenuItems.generate_xml(search_term, MenuItems.generate_items()) end replaced with if (search_term != "") puts MenuItems.generate_xml(search_term, MenuItems.generate_items()) else puts MenuItems.generate_xml("",MenuItems.generate_items()) end The second issue would require third-party developers to make the commands discoverable to Alfred, which hardly seems likely especially since it's only to accommodate a few edge cases. I'd think writing a workflow to read the Sublime Text palette commands directly might be a better solution.