Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    62

Everything posted by dfay

  1. But there's this new regex library in Swift 5.7 that I really wanna try out for workflows.......
  2. How did you find writing a workflow in Swift? I’ve been using it a lot for some other stuff but haven’t tried writing any workflows or command-line utilities etc.
  3. Just saw the blog post and I’m wicked curious to know what this will bring!
  4. This is the crux of the issue, and the reason why this isn't likely to be feasible.
  5. @Vero is there a process to set up Python 3 in Monterey? I just used the shebang above & it just worked.
  6. Sure. I put it in a gist so you can view the changes easily. Mostly it involved breaking its dependence on @deanishe's Python workflow framework. https://gist.github.com/derickfay/4b46ebc69e4bd9d85817ffd6a6885dd6/revisions
  7. Here's a version of fuzzylist.py that works in Python 3: #!/usr/bin/env python3 # -*- coding: utf-8 -*- import csv import sys import json import os theFile=sys.argv[1] fieldnames=["title","subtitle","arg","iconfile"] json_filename = theFile.split(".")[0]+".json" def convert(csv_filename, json_filename, fieldnames): f=open(csv_filename, 'r') csv_reader = csv.DictReader(f,fieldnames) jsonf = open(json_filename,'w') jsonf.write('{"items":[') data="" for r in csv_reader: r['uid']=r['arg'] r['icon']={"path":r['iconfile']} data = data+json.dumps(r)+",\n" jsonf.write(data[:-2]) jsonf.write(']}') f.close() jsonf.close() if (not os.path.isfile(json_filename)) or (os.path.getmtime(theFile) > os.path.getmtime(json_filename)) : convert(theFile, json_filename, fieldnames) with open(json_filename, 'r') as fin: print(fin.read(), end="") and a link to an updated version of fuzzy.py: https://github.com/deanishe/alfred-fuzzy/issues/3
  8. I've got a Python 3 version working & just posted it in @deanishe's github repo at https://github.com/deanishe/alfred-fuzzy/issues/3
  9. This is now working in MacOS 12.3 with Python 3. Thanks to @giovanni for doing the hard work on CodeCase. I just used FileMerge to see what he did, and replicated it here.
  10. @giovanniI've just updated to Monterey 12.3 but I haven't had any chance to look into Python 3 at all, so yes, that would be a wonderful help! I have a working version that uses shortcuts to replace the hotkeys but it's adding an extra line break, and they're way too slow for the Script Filter. So much for going purely native with Apple... Do you mean Code Case or the original Case Converter?
  11. The worst case scenario is that you'll end up with a lot of files with (so and so's conlicted copy - 2022-03-10) appended to the end. I set a Hazel rule to watch for conflicted copy in the filename.
  12. So I've been playing around with the idea of writing v.3 entirely calling Shortcuts - i'd already built something largely equivalent for use on my iPad anyway. All the individual actions are working but they insert an additional blank line. The bigger problem is that Shortcuts Events isn't up to the task of running Shortcuts quickly enough to work in a script filter....
  13. You’ll need to call a script - this is the best resource, if a bit dated, on how to script System Preferences: https://macscripter.net/viewtopic.php?id=24773
  14. I had the same problem with a formerly working workflow today.
  15. Yes, you can do this with a script filter. Would you want to enter just one of the values (e.g. Cost) and have the other three calculated for you? Or would you want to be able to enter any of the 4? If you search there are quite a few calculator workflows out there: https://www.alfredforum.com/search/?&q=calculator
  16. My hope is that python 3’s handling of unicode will fix the cyrillic issues in the case converter. Gotta find the time to try it…
  17. @Andrewwould this also work for python 3?
  18. It seems to be in /System/Library/PrivateFrameworks/MarkupUI.framework/PlugIns/MarkupPhotoExtension.appex but I can't get it to launch - it produces a "trace trap" error in zsh. Discussion here got me started: https://indiestack.com/2018/09/finder-quick-actions/
  19. Info here may be helpful https://github.com/derickfay/import-alfred-snippets
×
×
  • Create New...